WO2013097234A1 - 处理业务的方法和系统 - Google Patents

处理业务的方法和系统 Download PDF

Info

Publication number
WO2013097234A1
WO2013097234A1 PCT/CN2011/085176 CN2011085176W WO2013097234A1 WO 2013097234 A1 WO2013097234 A1 WO 2013097234A1 CN 2011085176 W CN2011085176 W CN 2011085176W WO 2013097234 A1 WO2013097234 A1 WO 2013097234A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing
processing mode
service
unit
mode attribute
Prior art date
Application number
PCT/CN2011/085176
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to CN201180003695.3A priority Critical patent/CN103299298B/zh
Priority to PCT/CN2011/085176 priority patent/WO2013097234A1/zh
Publication of WO2013097234A1 publication Critical patent/WO2013097234A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24568Data stream processing; Continuous queries

Definitions

  • the present invention relates to the field of information technology, and in particular, to a method and system for processing a service in the field of information technology. Background technique
  • Parallel transcoding usually consists of three steps: STEP, transcoding, and merging.
  • the sharding step is used to segment the file input by the user to generate a small video file.
  • the transcoding step is used to output after sharding. Small video files for format conversion; the merge step is used to merge all transcoded slices of the same video file.
  • Cloud Map Reduce In the current cloud map reduction (Cloud Map Reduce, called "CMR") framework, parallel transcoding consists of three steps: fragmentation, transcoding, and merging.
  • the user's input file first passes through the sharding step, generates a key-value pair (KEY, VALUE) and injects into the input queue (INPUT QUEUE) of the transcoding processing unit (WORKER), where the key (KEY) is the file name and the value (VALUE) is The storage location of the fragmented video file after the fragmentation; the transcoding processing unit acquires data from the input queue, and generates a key-value pair output after completing the transcoding; after the CMR framework collects the key-value pair, the clustering algorithm according to the set partitioning algorithm The key-value pair is injected into the corresponding binning queue ( REDUCE QUEUE ).
  • the merge processing unit is started after all of the fragment transcoding processing units have performed the format conversion. Then retrieve the key-value pairs (KEY, VALUE) in the binned queue to perform the merge function.
  • the merge process must be completed after all the transcoding processing units have completed the format conversion.
  • the processing of the service is single and inflexible, resulting in low system processing efficiency. Therefore, when the user submits multiple video file transcodings at the same time, the transcoding process takes a long time, which seriously affects the processing efficiency of the system and the performance of the system.
  • the use of CMR mode requires data to be stored in the queue and then read from the queue. Especially for the merge process, the queue needs to be read twice to obtain the data, which also seriously affects the performance of the system.
  • Embodiments of the present invention provide a method and system for processing a service, which can improve processing of the system. effectiveness.
  • an embodiment of the present invention provides a method for processing a service, the method comprising: determining a processing mode attribute of a first step of processing a service, where the processing mode attribute of the first step includes a batch mode or a stream processing mode
  • the first step is any one of the steps for processing the service; according to the processing mode attribute of the first step, creating a first processing unit corresponding to the processing mode attribute of the first step, to process the first One step.
  • an embodiment of the present invention provides a system for processing a service, where the system includes a scheduling module and a node management module, where the scheduling module includes: a first determining unit, configured to determine a process for processing the first step of the service. a mode attribute, the processing mode attribute of the first step includes a batch mode or a stream processing mode, the first step is any one of the steps for processing the service; the node management module includes: a first creating unit, And creating, according to the processing mode attribute of the first step, a first processing unit corresponding to the processing mode attribute of the first step to process the first step.
  • the method and system for processing a service creates a processing unit corresponding to the processing mode attribute according to a processing mode attribute for processing each step of the service to perform each step, so that the service is processed.
  • the method is more flexible and more diverse, so that the business can be processed in a combination of batch processing and stream processing, thereby improving the processing efficiency of the system, improving the performance of the system, and improving the user experience.
  • FIG. 1 is a schematic flowchart of a method for processing a service according to an embodiment of the present invention.
  • FIG. 2 is another schematic flowchart of a method for processing a service according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method of creating a processing unit according to an embodiment of the present invention.
  • FIG. 4 is still another schematic flowchart of a method for processing a service according to an embodiment of the present invention.
  • FIG. 5 is still another schematic flowchart of a method for processing a service according to an embodiment of the present invention.
  • FIG. 6 is still another schematic flowchart of a method for processing a service according to an embodiment of the present invention.
  • FIG. 7 is still another schematic flowchart of a method for processing a service according to an embodiment of the present invention.
  • FIG. 8 is a schematic block diagram of a system for processing a service according to an embodiment of the present invention.
  • 9 is a schematic block diagram of a scheduling module in accordance with an embodiment of the present invention.
  • Figure 10 is a schematic block diagram of a first creation unit in accordance with an embodiment of the present invention.
  • FIG. 11 is another schematic block diagram of a system for processing a service according to an embodiment of the present invention.
  • FIG. 12 is still another schematic block diagram of a system for processing a service according to an embodiment of the present invention.
  • FIG. 13 is still another schematic block diagram of a system for processing a service according to an embodiment of the present invention.
  • FIG. 14 is still another schematic block diagram of a system for processing a service according to an embodiment of the present invention. detailed description
  • FIG. 1 shows a schematic flow chart of a method 100 of processing a service in accordance with an embodiment of the present invention. As shown in FIG. 1, the method 100 includes:
  • S110 Determine a processing mode attribute of a first step for processing a service, where the processing mode attribute of the first step includes a batch mode or a stream processing mode, where the first step is any one of the steps for processing the service. ;
  • the system for processing the service may determine the processing mode attribute of one of the steps for processing the service for the service to be processed, so that the system processing the service may create a processing unit corresponding to the processing mode of the step according to the processing mode attribute of the step. (Worker).
  • the processing mode attribute includes a batch mode or a streaming mode, so that the system for processing the service can process the service in a combination of batch processing and stream processing.
  • the method for processing a service creates a processing unit corresponding to the processing mode attribute according to a processing mode attribute for processing each step of the service to perform each step, so that the processing manner of the service is more flexible and more Diversified, so that the business can be processed in a combination of batch processing and stream processing, thereby improving the processing efficiency of the system, improving the performance of the system, and improving the user experience.
  • the system can create a Streaming Worker for processing the merge step according to the stream processing mode. Therefore, the stream processing unit of the combining step can process the service by using the stream processing mode, and when receiving the key value pair (Key, Value) sent by the processing unit of the previous step, the service processing can be started without using The processing unit waiting for the previous step can be executed only after it has been completed. Therefore, the method of the embodiment of the present invention makes the processing mode of the service more flexible and more diverse, and can improve the processing efficiency of the system, thereby improving the performance of the system, and thereby improving the user experience.
  • the system processing the service determines the processing mode attribute of the first step.
  • the first step is any one of the steps for processing a service, for example, the first step may be an initial step for processing a service, or a last step, and the first step may also be In an intermediate step of processing a service, embodiments of the present invention are not limited thereto.
  • the system for processing the service may determine the processing mode attribute of the first step according to the service request sent by the user; and the system for processing the service may also determine the first according to the output manner of a step before the first step.
  • the processing mode attribute of the step may be separately described below with reference to FIG.
  • the method 100 for processing a service may further include:
  • S130 Receive a service request sent by a user for requesting processing, where the service request includes a processing mode attribute for processing each step of the service.
  • S110 includes: determining, according to the service request, a processing mode attribute of a first step of processing the service.
  • the user may send a service request to the system through the service template, and the service module may explicitly indicate the processing mode attribute of each step for processing the service, so that the system may determine the processing mode attribute of each step according to the service request. .
  • the system for processing the service can also determine the processing mode attribute of the first step according to whether the output mode of a step immediately before the first step adopts a partition output mode. Specifically, when the output mode of the previous step of the first step is a partition output, it may be determined that the processing mode attribute of the first step is a stream processing mode; when the output mode of the previous step of the first step is not used In the partition mode, it can be determined that the processing mode attribute of the first step is the batch mode.
  • the system processing the service creates a first processing unit corresponding to the processing mode attribute of the first step.
  • the processing mode attribute includes a batch processing mode and a stream processing mode.
  • the system for processing the service may create a batch processing unit or a stream processing unit according to the processing mode attribute of the step. Description will be made below in conjunction with the method 120 of creating a processing unit shown in FIG.
  • the method 120 includes:
  • the method for processing a service creates a processing unit corresponding to the processing mode attribute according to a processing mode attribute for processing each step of the service to perform each step, so that the processing manner of the service is more flexible and more Diversified, so that the business can be processed in a combination of batch processing and stream processing, thereby improving the processing efficiency of the system, improving the performance of the system, and improving the user experience.
  • the system for processing the service may be after the corresponding first processing unit is created according to the processing mode attribute of the first step, or at the same time, according to the second step immediately following the first step.
  • the processing mode attribute of the second step is the batch processing mode, the stream processing mode, and the first step is the last one of the processing services. step. It should be understood that this second step is a step immediately following the first step for processing the service, the first step being any one of the steps for processing the service.
  • FIG. 4 shows a schematic flow diagram of a method 200 of processing a service in accordance with an embodiment of the present invention.
  • the method 200 includes:
  • the output address of the first processing unit is set to the address of the input queue of the second step, and the input queue of the second step provides an input for the second batch processing unit for processing the second step.
  • the system for processing the service may determine the processing mode attribute of the second step according to the service request sent by the user; the system may also determine the processing mode attribute of the second step according to the output manner of the first step, specifically: When the output mode of the first step is the partition output, determining that the processing mode attribute of the second step is the stream processing mode; when the output mode of the first step does not use the partition mode, determining that the processing mode attribute of the second step is the Batch mode.
  • the system processing the service determines that the processing mode attribute of the second step is the batch mode
  • the system can create an input queue for the second step, such as requesting the distributed queue system to create an input queue for the second step.
  • the system may set the output address of the first processing unit to the address of the input queue of the second step, and the input queue of the second step is the second batch for processing the second step.
  • the processing unit provides input.
  • the system may cyclically execute S110, S120 to create a second processing unit for processing the second step in a similar manner, and may also follow the first
  • the processing mode attribute of the third step after the second step is processed accordingly to improve the processing efficiency of the system and improve the performance of the system. For the sake of cleanliness, we will not repeat them here.
  • FIG. 5 shows a schematic flow diagram of a method 300 of processing a service in accordance with an embodiment of the present invention.
  • the method 300 includes:
  • S320 Determine, according to the number of partitions set by the partitioning algorithm, a quantity of the second stream processing unit for processing the second step, so as to create a second stream processing unit corresponding to the quantity.
  • the system may perform a partitioning algorithm, which may be specified by the user in advance, or may adopt a system default partitioning algorithm, such as a hash. (HASH) algorithm, sample partitioning algorithm, etc.
  • the system processing the service may determine the number of second stream processing units for processing the second step according to the number of partitions set by the partitioning algorithm, in order to create a second stream processing unit corresponding to the number.
  • the system for processing the service may further create a partition routing information table according to the partitioning algorithm, so that the first processing unit sends the output result of the first processing unit to the corresponding second stream processing unit according to the partition routing information table.
  • the partition routing table may include, for example, a partition identifier, such as a key Key, and may also include location information of a processing unit that processes tasks within the partition, such as an IP address.
  • the partition routing table can be stored in a distributed coordination system or server such as CHUBBY.
  • CHUBBY distributed coordination system or server
  • the first processing unit for processing the first step when the processing mode attribute of the second step is the stream processing mode, the first processing unit for processing the first step directly sends the output result to the second stream processing for processing the second step.
  • the unit does not need to store the output result in the queue.
  • the second stream processing unit processes the service, the output result sent by the first processing unit can be directly obtained, and the input data is not acquired by the frequent reading queue. Therefore, the method of the embodiment of the present invention can effectively avoid the problem of multiple reading queues, thereby further improving the processing efficiency of the system, improving the performance of the system, and improving the user experience.
  • the method 400 according to the embodiment of the present invention includes:
  • the system processing the service requests the distributed queue system to create an output queue of the first step, and sets the output address of the first processing unit to the first step. The address of the output queue.
  • the method for processing a service creates a processing unit corresponding to the processing mode attribute according to a processing mode attribute for processing each step of the service to perform each step, so that the processing manner of the service is more flexible and more Diversified, so that the business can be processed in a combination of batch processing and stream processing, thereby improving the processing efficiency of the system, improving the performance of the system, and improving the user experience.
  • a method for processing a service will be described in detail below by taking a system for processing a service, including a scheduling module and a node management module, as an example.
  • the method 500 includes:
  • the scheduling module receives a service template sent by the user for requesting processing of the parallel transcoding service, where the service template indicates that the parallel transcoding service includes a fragmentation step, a transcoding step, and a merge step.
  • the processing mode attribute of the fragmentation step is a batch mode (Batch)
  • the processing mode attribute of the transcoding step is a batch mode (Batch)
  • the processing mode attribute of the combining step is a stream processing mode (Streaming).
  • the service template indicates that the partitioning algorithm used in the merging step is a hashing algorithm
  • the scheduling module can determine the sharding step of processing the service first by parsing the service template, and can determine that the processing mode attribute of the sharding step is a batch processing mode. ;
  • the scheduling module requests the distributed queue system to create an input queue of the fragmentation step, where the distributed queue system is, for example, an Amazon Queue Service ("SQS");
  • SQL Amazon Queue Service
  • the distributed queue system returns an address of the created input queue to the scheduling module.
  • the scheduling module sends a request to the node management module, requesting the node management module 1 to create a batch processing unit (Batch Worker) for the fragmentation step, setting an input queue of the batch processing unit to an address of the input queue returned in S503, and loading the user Processing program
  • the scheduling module determines that the transcoding step needs to be processed after the fragmentation step by parsing the service template, and determines that the processing mode attribute of the transcoding step is a batch processing mode.
  • the scheduling module requests the distributed queue system to create an input queue of the transcoding step
  • the distributed queue system returns an address of the creation queue to the scheduling module
  • the scheduling module requests the node management module 1 to set the output address of the output module of the fragment processing unit to be the queue address returned in S507;
  • the node management module 1 returns a setting success response
  • the scheduling module requests the node management module 2 to create a batch processing unit (Batch Worker) for the transcoding step, set the input queue of the Batch Worker to be the queue address returned in S508, and load the user processing program;
  • Batch Worker a batch processing unit
  • the scheduling module determines a final processing merge step by parsing the service template, and determines that the processing mode attribute of the step is a stream processing worker (Streaming Worker);
  • the scheduling module determines, according to the number of partitions set by the partitioning algorithm, the number of processing units (Workers) in the merging step;
  • the scheduling module requests the node management module 3 to create a stream processing unit (Streaming Worker) for the merging step;
  • the scheduling module requests the node management module 2 to start the partition module to load the set partition algorithm, and set the access address of the partition routing table;
  • the node management module 2 returns a startup success response
  • the scheduling module continues to parse the service template, and determines that there is no subsequent step, the scheduling module requests the distributed queue system to create a queue;
  • the distributed queue system returns the address of the created queue
  • the scheduling module requests the node management module 3 to set the output address of the output module of the merge step to the queue address returned in S521;
  • Node Management Module 3 returns a successful setup response.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • the method for processing a service creates a processing unit corresponding to the processing mode attribute according to a processing mode attribute for processing each step of the service to perform each step, so that the processing manner of the service is more flexible and more Diversified, so that the business can be processed in a combination of batch processing and stream processing, thereby improving the processing efficiency of the system, improving the performance of the system, and improving the user experience.
  • FIG. 8 shows a schematic block diagram of a system 600 for processing traffic in accordance with an embodiment of the present invention.
  • the system 600 includes a scheduling module 700 and a node management module 800.
  • the scheduling module 700 includes:
  • the first determining unit 710 is configured to determine a processing mode attribute of the first step of processing the service, where the processing mode attribute of the first step comprises a batch mode or a stream processing mode, where the first step is for processing the service. Any one of the steps;
  • the node management module 800 includes:
  • the first creating unit 810 is configured to create, according to the processing mode attribute of the first step, a first processing unit corresponding to the processing mode attribute of the first step to process the first step.
  • the system for processing a service is based on various steps for processing a service.
  • a processing mode attribute creating a processing unit corresponding to the processing mode attribute to perform each step, so that the processing method of the service is more flexible and more diverse, so that the business can be processed in a combination of batch processing and stream processing. It can improve the processing efficiency of the system, improve the performance of the system, and improve the user experience.
  • the scheduling module 700 further includes: a receiving unit 720, configured to receive a service request sent by a user for requesting processing of the service, where the service request includes Processing mode attributes for each step of the business;
  • the first determining unit 710 is further configured to: determine, according to the service request, a processing mode attribute of the first step.
  • the first creating unit 810 includes: a first creating subunit 811, when the processing mode attribute of the first step is the batch processing mode, Creating a first batch processing unit included in the first processing unit, the first batch processing unit processing a key value pair in the input queue;
  • a second creating subunit 812 configured to: when the processing mode attribute of the first step is the stream processing mode, create a first stream processing unit included in the first processing unit, where the first stream processing unit performs the received key value pair deal with.
  • the scheduling module 700 further includes:
  • a second creating unit 730 configured to create an input queue of the second step when the processing mode attribute of the second step immediately after the first step is the batch mode;
  • the node management module 800 further includes:
  • a first setting unit 820 configured to set an output address of the first processing unit to an address of an input queue of the second step, where the input queue of the second step is a second batch processing unit for processing the second step Provide input.
  • the node management module 800 further includes:
  • a partitioning unit 830 configured to execute a set or default partitioning algorithm when the processing mode attribute of the second step immediately following the first step is the stream processing mode;
  • the scheduling module 700 further includes:
  • a second determining unit 740 configured to determine, according to the number of partitions set by the partitioning algorithm, a number of second stream processing units for processing the second step, so as to create a second stream processing unit corresponding to the quantity;
  • a third creating unit 750 configured to create a partition routing information table according to the partitioning algorithm, so as to facilitate And outputting the output result of the first processing unit to the corresponding second stream processing unit according to the partition routing information table.
  • the scheduling module 700 further includes:
  • a fourth creating unit 760 configured to create an output queue of the first step when the first step is to process the last step of the service
  • the node management module 800 further includes:
  • the second setting unit 840 is configured to set an output address of the first processing unit to an address of an output queue of the first step.
  • the scheduling module 700 further includes: a third determining unit 770, configured to determine the second step when the output mode of the first step is a partition output
  • the processing mode attribute is the stream processing mode
  • the fourth determining unit 780 is configured to determine, when the output mode of the first step does not use the partition mode, the processing mode attribute of the second step is the batch processing mode.
  • system 600 may correspond to the system for processing services in the embodiments of the present invention, and the above and other operations and/or functions of the respective modules in the system 600 are respectively implemented in FIG. 1 to FIG. The corresponding processes of the respective methods 100 to 500 are not described here.
  • the system for processing a service creates a processing unit corresponding to the processing mode attribute according to a processing mode attribute for processing each step of the service to perform each step, so that the processing method of the service is more flexible and more Diversified, so that the business can be processed in a combination of batch processing and stream processing, thereby improving the processing efficiency of the system, improving the performance of the system, and improving the user experience.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the components displayed for the unit may or may not be physical units, ie may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

Abstract

本发明公开了一种处理业务的方法和系统。该方法包括:确定用于处理业务的第一步骤的处理模式属性,该第一步骤的处理模式属性包括批处理模式或流处理模式;根据该第一步骤的处理模式属性,创建与该第一步骤的处理模式属性相应的第一处理单元,以处理该第一步骤。该系统包括调度模块和节点管理模块,该调度模块包括第一确定单元,该节点管理模块包括第一创建单元。本发明实施例的处理业务的方法和系统,通过根据用于处理业务的各步骤的处理模式属性,创建与该处理模式属性相应的处理单元以执行各步骤,使得业务的处理方式更加灵活,从而能够以批处理和流处理相结合的方式处理业务,由此能够提高系统的处理效率,提高系统的性能,并能够提高用户的体验。

Description

处理业务的方法和系统 技术领域
本发明涉及信息技术领域, 尤其涉及信息技术领域中处理业务的方法和 系统。 背景技术
并行转码通常由分片、 转码、 合并三个步骤(STEP )组成, 其中分片 步骤用于对用户输入的文件进行分割, 生成小片视频文件; 转码步骤用于对 经过分片后输出的小视频文件进行格式转换; 合并步骤用于对同一个视频文 件的所有经过转码后的分片进行合并。
在目前的云映射筒化(Cloud Map Reduce, 筒称为 "CMR" )框架下, 并行转码由分片、 转码、 合并三个步骤组成。 用户的输入文件首先经过分片 步骤, 生成键值对(KEY, VALUE ) 并注入转码处理单元(WORKER ) 的 输入队列 (INPUT QUEUE ), 其中键(KEY ) 为文件名, 值(VALUE ) 为 分片后的小片视频文件的存储位置; 转码处理单元从输入队列获取数据, 并 在完成转码后生成键值对输出; CMR框架收集该键值对后, 按照设定的分 区算法将该键值对注入到对应的筒化队列 ( REDUCE QUEUE )。
当所有分片的转码处理单元都执行完格式转换后, 启动合并处理单元。 再获取筒化队列中的键值对(KEY, VALUE ), 以执行合并功能。
按照目前的 CMR框架, 必须要在所有转码处理单元完成格式转换之后 才能启动合并过程, 业务的处理方式单一, 不灵活, 导致系统的处理效率较 低。 因此当用户同时提交了多个视频文件转码时, 由于转码过程耗时很长, 严重影响了系统的处理效率和系统的性能。 另一方面, 使用 CMR模式需要 将数据存储到队列中, 再从队列中读出, 尤其对于合并过程而言, 需要对队 列进行两次读取才能获取到数据, 从而也严重影响系统的性能。
因此, 需要一种合适的方案, 能够提高处理业务的系统的性能。 发明内容
本发明实施例提供了一种处理业务的方法和系统, 能够提高系统的处理 效率。
一方面, 本发明实施例提供了一种处理业务的方法, 该方法包括: 确定 用于处理业务的第一步骤的处理模式属性, 该第一步骤的处理模式属性包括 批处理模式或流处理模式,该第一步骤为用于处理该业务的步骤中的任意一 个步骤; 根据该第一步骤的处理模式属性, 创建与该第一步骤的处理模式属 性相应的第一处理单元, 以处理该第一步骤。
另一方面, 本发明实施例提供了一种处理业务的系统, 该系统包括调度 模块和节点管理模块, 该调度模块包括: 第一确定单元, 用于确定用于处理 业务的第一步骤的处理模式属性,该第一步骤的处理模式属性包括批处理模 式或流处理模式, 该第一步骤为用于处理该业务的步骤中的任意一个步骤; 该节点管理模块包括:第一创建单元,用于根据该第一步骤的处理模式属性, 创建与该第一步骤的处理模式属性相应的第一处理单元, 以处理该第一步 骤。
基于上述技术方案, 本发明实施例的处理业务的方法和系统, 通过根据 用于处理业务的各步骤的处理模式属性,创建与该处理模式属性相应的处理 单元以执行各步骤, 使得业务的处理方式更加灵活, 更加多样化, 从而能够 以批处理和流处理相结合的方式处理业务, 由此能够提高系统的处理效率, 提高系统的性能, 并能够提高用户的体验。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对本发明实施例中 所需要使用的附图作筒单地介绍, 显而易见地, 下面所描述的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。
图 1是根据本发明实施例的处理业务的方法的示意性流程图。
图 2是根据本发明实施例的处理业务的方法的另一示意性流程图。
图 3是根据本发明实施例的创建处理单元的方法的示意性流程图。
图 4是根据本发明实施例的处理业务的方法的再一示意性流程图。
图 5是根据本发明实施例的处理业务的方法的再一示意性流程图。
图 6是根据本发明实施例的处理业务的方法的再一示意性流程图。
图 7是根据本发明实施例的处理业务的方法的再一示意性流程图。 图 8是根据本发明实施例的处理业务的系统的示意性框图。 图 9是根据本发明实施例的调度模块的示意性框图。
图 10是根据本发明实施例的第一创建单元的示意性框图。
图 11是根据本发明实施例的处理业务的系统的另一示意性框图。
图 12是根据本发明实施例的处理业务的系统的再一示意性框图。
图 13是根据本发明实施例的处理业务的系统的再一示意性框图。
图 14是根据本发明实施例的处理业务的系统的再一示意性框图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明的一部分实施例, 而不 是全部实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创 造性劳动的前提下所获得的所有其他实施例, 都应属于本发明保护的范围。
图 1示出了根据本发明实施例的处理业务的方法 100的示意性流程图。 如图 1所示, 该方法 100包括:
S110, 确定用于处理业务的第一步骤的处理模式属性, 该第一步骤的处 理模式属性包括批处理模式或流处理模式, 该第一步骤为用于处理该业务的 步骤中的任意一个步骤;
S120, 根据该第一步骤的处理模式属性, 创建与该第一步骤的处理模式 属性相应的第一处理单元, 以处理该第一步骤。
处理业务的系统对于待处理的业务, 可以确定用于处理业务的其中一个 步骤的处理模式属性, 从而处理业务的系统可以根据该步骤的处理模式属 性, 创建与该步骤的处理模式相应的处理单元 (Worker )。 其中, 该处理模 式属性包括批处理(Batch )模式或流处理(Streaming )模式, 从而处理业 务的系统能够以批处理和流处理相结合的方式处理该业务。
因此, 本发明实施例的处理业务的方法, 通过根据用于处理业务的各步 骤的处理模式属性, 创建与该处理模式属性相应的处理单元以执行各步骤, 使得业务的处理方式更加灵活, 更加多样化, 从而能够以批处理和流处理相 结合的方式处理业务, 由此能够提高系统的处理效率, 提高系统的性能, 并 能够提高用户的体验。
例如, 对于并行转码业务而言, 如果合并步骤的处理模式属性设置为流 处理模式, 那么系统可以根据该流处理模式, 创建用于处理合并步骤的流处 理单元( Streaming Worker )。 从而, 该合并步骤的流处理单元可以采用流处 理模式对业务进行处理, 并在接收到上一步骤的处理单元发送的键值对 ( Key, Value ) 时, 就可以开始业务的处理, 而不用等待上一步骤的处理单 元全部完成之后才能执行。 因此, 本发明实施例的方法使得业务的处理方式 更加灵活, 更加多样化, 能够提高系统的处理效率, 从而能够提高系统的性 能, 并由此能够提高用户的体验。
在 S110中, 处理业务的系统确定第一步骤的处理模式属性。
应理解, 该第一步骤是用于处理业务的步骤中的任意一个步骤, 例如, 该第一步骤可以是用于处理业务的起始步骤, 或最后一个步骤, 该第一步骤 也可以是用于处理业务的一个中间步骤, 本发明实施例并不限于此。
在本发明实施例中, 处理业务的系统可以根据用户发送的业务请求, 确 定第一步骤的处理模式属性; 处理业务的系统也可以根据第一步骤之前的一 个步骤的输出方式, 确定该第一步骤的处理模式属性。 下面将结合图 2, 对 上述两种情况分别进行描述。
如图 2所示, 根据本发明实施例的处理业务的方法 100还可以包括:
S130, 接收用户发送的用于请求处理业务的业务请求, 该业务请求包括 用于处理该业务的每个步骤的处理模式属性;
此时, S110包括: 根据该业务请求, 确定用于处理该业务的第一步骤的 处理模式属性。
例如, 用户可以通过业务模板向系统发送业务请求, 该业务模块可以显 式指示用于处理该业务的各步骤的处理模式属性, 由此系统根据该业务请 求, 可以确定每个步骤的处理模式属性。
另一方面, 处理业务的系统也可以根据紧接该第一步骤之前的一个步骤 的输出方式是否采用分区 (Partition )输出方式, 确定该第一步骤的处理模 式属性。 具体而言, 当该第一步骤的上一步骤的输出方式为分区输出时, 可 以确定该第一步骤的处理模式属性为流处理模式; 当该第一步骤的上一步骤 的输出方式未使用分区方式时, 可以确定该第一步骤的处理模式属性为批处 理模式。
在 S120中, 处理业务的系统创建与该第一步骤的处理模式属性相应的 第一处理单元。 在本发明实施例中, 处理模式属性包括批处理模式和流处理模式, 相应 地, 处理业务的系统可以根据步骤的处理模式属性, 创建批处理单元或流处 理单元。 下面将结合图 3所示的创建处理单元的方法 120进行描述。
如图 3所示, 可选地, 该方法 120包括:
S121 , 在该第一步骤的处理模式属性为该批处理模式时, 创建该第一处 理单元包括的第一批处理单元, 该第一批处理单元对输入队列中的键值对进 行处理;
S122, 在该第一步骤的处理模式属性为该流处理模式时, 创建该第一处 理单元包括的第一流处理单元, 该第一流处理单元对接收的键值对进行处 理。
因此, 本发明实施例的处理业务的方法, 通过根据用于处理业务的各步 骤的处理模式属性, 创建与该处理模式属性相应的处理单元以执行各步骤, 使得业务的处理方式更加灵活, 更加多样化, 从而能够以批处理和流处理相 结合的方式处理业务, 由此能够提高系统的处理效率, 提高系统的性能, 并 能够提高用户的体验。
在本发明实施例中, 处理业务的系统在根据第一步骤的处理模式属性, 创建相应的第一处理单元之后, 或者与此同时, 还可以根据紧随该第一步骤 之后的第二步骤的处理模式属性,进行相应的处理,以提高系统的处理效率, 提高系统的性能。
下面将结合图 4至图 6, 分别针对下面三种情况对本发明实施例进行详 细描述, 即第二步骤的处理模式属性为批处理模式、 流处理模式以及该第一 步骤为处理业务的最后一个步骤。 应理解, 该第二步骤是紧随用于处理业务 的第一步骤之后的一个步骤, 该第一步骤是用于处理业务的步骤中的任意一 个步骤。
图 4示出了根据本发明实施例的处理业务的方法 200的示意性流程图。 可选地, 如图 4所示, 该方法 200包括:
S210,在紧随该第一步骤之后的第二步骤的处理模式属性为该批处理模 式时, 创建该第二步骤的输入队列;
S220,将该第一处理单元的输出地址设置为该第二步骤的输入队列的地 址, 该第二步骤的输入队列为用于处理该第二步骤的第二批处理单元提供输 入。 处理业务的系统可以根据用户发送的业务请求,确定第二步骤的处理模 式属性; 该系统也可以根据第一步骤的输出方式, 确定该第二步骤的处理模 式属性, 具体而言: 在该第一步骤的输出方式为分区输出时, 确定该第二步 骤的处理模式属性为该流处理模式; 在该第一步骤的输出方式未使用分区方 式时, 确定该第二步骤的处理模式属性为该批处理模式。
当处理业务的系统确定第二步骤的处理模式属性为批处理模式时, 系统 可以创建该第二步骤的输入队列,例如请求分布式队列系统创建该第二步骤 的输入队列。 当该输入队列创建成功时, 系统可以将该第一处理单元的输出 地址设置为该第二步骤的输入队列的地址, 该第二步骤的输入队列为用于处 理该第二步骤的第二批处理单元提供输入。
应理解, 当处理业务的系统执行完 S210、 S220之后, 该系统可以循环 执行 S110、 S120, 以类似地方式创建用于处理该第二步骤的第二处理单元, 并且还可以根据紧随该第二步骤之后的第三步骤的处理模式属性, 进行相应 的处理, 以提高系统的处理效率, 提高系统的性能。 为了筒洁, 在此不再赘 述。
还应理解, 在本发明的各种实施例中, 上述各过程的序号的大小并不意 味着执行顺序的先后, 各过程的执行顺序应以其功能和内在逻辑确定, 而不 应对本发明实施例的实施过程构成任何限定。
图 5示出了根据本发明实施例的处理业务的方法 300的示意性流程图。 可选地, 如图 5所示, 该方法 300包括:
S310,在紧随该第一步骤之后的第二步骤的处理模式属性为该流处理模 式时, 执行设定的或默认的分区算法;
S320, 根据该分区算法设定的分区个数, 确定用于处理该第二步骤的第 二流处理单元的数量, 以便于创建与该数量相应的第二流处理单元;
S330, 根据该分区算法创建分区路由信息表, 以便于根据该分区路由信 息表, 将该第一处理单元的输出结果发送到相应的该第二流处理单元。
当处理业务的系统确定第二步骤的处理模式属性为流处理模式时, 系统 可以执行分区算法, 该分区算法可以预先由用户指定, 也可以采用系统默认 的分区算法, 该分区算法例如是哈希 (HASH ) 算法、 样本分区算法等。 处 理业务的系统根据该分区算法设定的分区个数, 可以确定用于处理该第二步 骤的第二流处理单元的数量, 以便于创建与该数量相应的第二流处理单元。 处理业务的系统根据该分区算法还可以创建分区路由信息表, 以便于第 一处理单元根据该分区路由信息表,将该第一处理单元的输出结果发送到相 应的该第二流处理单元。 该分区路由表例如可以包括分区标识, 例如键 Key 等, 也可以包括处理该分区内任务的处理单元的位置信息, 例如 IP地址等。 该分区路由表可以保存在诸如 CHUBBY的分布式协调系统或服务器中。 本 发明实施例仅以此为例进行说明, 但本发明实施例并不限于此。
在本发明实施例中, 当第二步骤的处理模式属性为流处理模式时, 用于 处理第一步骤的第一处理单元直接将输出结果发送到用于处理第二步骤相 应的第二流处理单元, 不用将输出结果存储到队列中; 同时, 第二流处理单 元对业务进行处理时, 可以直接获取第一处理单元发送的输出结果, 也不用 频繁读取队列获取输入的数据。 因此, 本发明实施例的方法能够有效避免多 次读取队列的问题,从而能够进一步提高系统的处理效率,提高系统的性能, 并能够提高用户的体验。
在本发明实施例中, 当该第一步骤为处理该业务的最后一个步骤时, 可 选地, 如图 6所示, 根据本发明实施例的方法 400包括:
S410, 创建该第一步骤的输出队列;
S420 ,将该第一处理单元的输出地址设置为该第一步骤的输出队列的地 址。
当该第一步骤为处理该业务的最后一个步骤时, 处理业务的系统例如请 求分布式队列系统创建该第一步骤的输出队列, 并将该第一处理单元的输出 地址设置为该第一步骤的输出队列的地址。
因此, 本发明实施例的处理业务的方法, 通过根据用于处理业务的各步 骤的处理模式属性, 创建与该处理模式属性相应的处理单元以执行各步骤, 使得业务的处理方式更加灵活, 更加多样化, 从而能够以批处理和流处理相 结合的方式处理业务, 由此能够提高系统的处理效率, 提高系统的性能, 并 能够提高用户的体验。
下面将以处理业务的系统包括调度模块和节点管理模块为例, 并结合图 7对根据本发明实施例的处理业务的方法 500进行详细描述。
如图 7所示, 该方法 500包括:
S501 , 调度模块接收用户发送的用于请求处理并行转码业务的业务模 板, 该业务模板指示该并行转码业务依次包括分片步骤、 转码步骤和合并步 骤, 其中该分片步骤的处理模式属性为批处理模式(Batch ), 该转码步骤的 处理模式属性为批处理模式(Batch ), 该合并步骤的处理模式属性为流处理 模式(Streaming ), 并且该业务模板指示该合并步骤采用的分区算法为哈希 算法;调度模块通过解析该业务模板,可以确定首先处理该业务的分片步骤, 并且可以确定分片步骤的处理模式属性为批处理模式;
5502, 调度模块向分布式队列系统请求创建分片步骤的输入队列, 该分 布式队列系统例如为亚马逊( Amazon )筒单队列服务( Simple Queue Service, 筒称为 "SQS" )等;
5503 , 分布式队列系统向调度模块返回创建的输入队列的地址;
S504, 调度模块向节点管理模块发送请求, 请求节点管理模块 1为分片 步骤创建批处理单元(Batch Worker ),设置该批处理单元的输入队列为 S503 中返回的输入队列的地址, 并加载用户处理程序;
5505 , 节点管理模块 1创建成功后向调度模块返回成功响应;
5506, 调度模块通过解析业务模板, 可以确定在分片步骤之后需要处理 转码步骤, 并确定该转码步骤的处理模式属性为批处理模式;
5507, 调度模块向分布式队列系统请求创建转码步骤的输入队列;
5508, 分布式队列系统向调度模块返回创建队列的地址;
5509,调度模块请求节点管理模块 1设置分片处理单元的输出模块的输 出地址为 S507中返回的队列地址;
S510, 节点管理模块 1返回设置成功响应;
5511 ,调度模块请求节点管理模块 2为转码步骤创建批处理单元( Batch Worker ), 设置该 Batch Worker的输入队列为 S508中返回的队列地址, 并加 载用户处理程序;
5512, 节点管理模块 2创建成功后, 返回成功响应;
S513 , 调度模块通过解析业务模板, 确定最后处理合并步骤, 并确定该 步骤的处理模式属性为流处理模式( Streaming Worker );
5514,调度模块按照分区算法设定的分区个数确定合并步骤的处理单元 ( Worker ) 的个数;
5515 , 调度模块请求节点管理模块 3 为合并步骤创建流处理单元 ( Streaming Worker );
5516, 节点管理模块 3创建成功后, 返回成功响应; 5517, 调度模块创建分区路由表, 并将该分区路由表存储在分布式协调 协调中;
5518, 调度模块请求节点管理模块 2启动分区模块, 以加载设定的分区 算法, 并设定分区路由表的访问地址;
S519, 节点管理模块 2返回启动成功响应;
5520, 调度模块继续解析业务模板, 并确定没有后续步骤时, 调度模块 向分布式队列系统请求创建队列;
5521 , 分布式队列系统返回创建的队列的地址;
5522,调度模块请求节点管理模块 3设置合并步骤的输出模块的输出地 址为 S521中返回的队列地址;
5523 , 节点管理模块 3返回设置成功响应。
应理解, 在本发明的各种实施例中, 上述各过程的序号的大小并不意味 着执行顺序的先后, 各过程的执行顺序应以其功能和内在逻辑确定, 而不应 对本发明实施例的实施过程构成任何限定。
因此, 本发明实施例的处理业务的方法, 通过根据用于处理业务的各步 骤的处理模式属性, 创建与该处理模式属性相应的处理单元以执行各步骤, 使得业务的处理方式更加灵活, 更加多样化, 从而能够以批处理和流处理相 结合的方式处理业务, 由此能够提高系统的处理效率, 提高系统的性能, 并 能够提高用户的体验。
上文中结合图 1至图 7, 详细描述了根据本发明实施例的处理业务的方 法, 下面将结合图 8至图 14, 描述根据本发明实施例的处理业务的系统。
图 8示出了根据本发明实施例的处理业务的系统 600的示意性框图。如 图 8所示, 该系统 600包括调度模块 700和节点管理模块 800, 该调度模块 700包括:
第一确定单元 710,用于确定用于处理业务的第一步骤的处理模式属性, 该第一步骤的处理模式属性包括批处理模式或流处理模式, 该第一步骤为用 于处理该业务的步骤中的任意一个步骤;
该节点管理模块 800包括:
第一创建单元 810, 用于根据该第一步骤的处理模式属性, 创建与该第 一步骤的处理模式属性相应的第一处理单元, 以处理该第一步骤。
因此, 本发明实施例的处理业务的系统, 通过根据用于处理业务的各步 骤的处理模式属性, 创建与该处理模式属性相应的处理单元以执行各步骤, 使得业务的处理方式更加灵活, 更加多样化, 从而能够以批处理和流处理相 结合的方式处理业务, 由此能够提高系统的处理效率, 提高系统的性能, 并 能够提高用户的体验。
在本发明实施例中, 可选地, 如图 9所示, 该调度模块 700还包括: 接收单元 720, 用于接收用户发送的用于请求处理该业务的业务请求, 该业务请求包括用于处理该业务的每个步骤的处理模式属性;
该第一确定单元 710还用于: 根据该业务请求, 确定该第一步骤的处理 模式属性。
在本发明实施例中, 可选地, 如图 10所示, 该第一创建单元 810包括: 第一创建子单元 811 , 用于在该第一步骤的处理模式属性为该批处理模 式时, 创建该第一处理单元包括的第一批处理单元, 该第一批处理单元对输 入队列中的键值对进行处理;
第二创建子单元 812, 用于在该第一步骤的处理模式属性为该流处理模 式时, 创建该第一处理单元包括的第一流处理单元, 该第一流处理单元对接 收的键值对进行处理。
可选地, 如图 11所示, 该调度模块 700还包括:
第二创建单元 730, 用于在紧随该第一步骤之后的第二步骤的处理模式 属性为该批处理模式时, 创建该第二步骤的输入队列;
该节点管理模块 800还包括:
第一设置单元 820, 用于将该第一处理单元的输出地址设置为该第二步 骤的输入队列的地址, 该第二步骤的输入队列为用于处理该第二步骤的第二 批处理单元提供输入。
可选地, 如图 12所示, 该节点管理模块 800还包括:
分区单元 830, 用于在紧随该第一步骤之后的第二步骤的处理模式属性 为该流处理模式时, 执行设定的或默认的分区算法;
该调度模块 700还包括:
第二确定单元 740, 用于根据该分区算法设定的分区个数, 确定用于处 理该第二步骤的第二流处理单元的数量, 以便于创建与该数量相应的第二流 处理单元;
第三创建单元 750, 用于根据该分区算法创建分区路由信息表, 以便于 根据该分区路由信息表,将该第一处理单元的输出结果发送到相应的该第二 流处理单元。
可选地, 如图 13所述, 该调度模块 700还包括:
第四创建单元 760,用于在该第一步骤为处理该业务的最后一个步骤时, 创建该第一步骤的输出队列;
该节点管理模块 800还包括:
第二设置单元 840, 用于将该第一处理单元的输出地址设置为该第一步 骤的输出队列的地址。
在本发明实施例中, 可选地, 如图 14所示, 该调度模块 700还包括: 第三确定单元 770, 用于在该第一步骤的输出方式为分区输出时, 确定 该第二步骤的处理模式属性为该流处理模式;
第四确定单元 780, 用于在该第一步骤的输出方式未使用分区方式时, 确定该第二步骤的处理模式属性为该批处理模式。
应理解,根据本发明实施例的系统 600可对应于本发明实施例中的处理 业务的系统,并且系统 600中的各个模块的上述和其它操作和 /或功能分别为 了实现图 1至图 7中的各个方法 100至 500的相应流程, 为了筒洁, 在此不 再赘述。
因此, 本发明实施例的处理业务的系统, 通过根据用于处理业务的各步 骤的处理模式属性, 创建与该处理模式属性相应的处理单元以执行各步骤, 使得业务的处理方式更加灵活, 更加多样化, 从而能够以批处理和流处理相 结合的方式处理业务, 由此能够提高系统的处理效率, 提高系统的性能, 并 能够提高用户的体验。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来实 现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能一 般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执 行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每个 特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超 出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为了描述的方便和筒洁, 上述 描述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对 应过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另外, 所显示或讨论的相互之间的 耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或 通信连接, 也可以是电的, 机械的或其它的形式连接。 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本发明实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以是两个或两个以上单元集成在 一个单元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用软件 功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销 售或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的技术方案本质上或者说对现有技术做出贡献的部分, 或者该技术方 案的全部或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在 一个存储介质中, 包括若干指令用以使得一台计算机设备(可以是个人计算 机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部 分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储器(ROM, Read-Only Memory )、 随机存取存储器 ( RAM, Random Access Memory )、 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到各种等效的修改或替换, 这些修改或替换都应涵盖在本发明的保护范围 之内。 因此, 本发明的保护范围应以权利要求的保护范围为准。

Claims

权利要求
1、 一种处理业务的方法, 其特征在于, 包括:
确定用于处理业务的第一步骤的处理模式属性, 所述第一步骤的处理模 式属性包括批处理模式或流处理模式, 所述第一步骤为用于处理所述业务的 步骤中的任意一个步骤;
根据所述第一步骤的处理模式属性,创建与所述第一步骤的处理模式属 性相应的第一处理单元, 以处理所述第一步骤。
2、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 接收用户发送的用于请求处理所述业务的业务请求,所述业务请求包括 用于处理所述业务的每个步骤的处理模式属性;
所述确定用于处理业务的第一步骤的处理模式属性, 包括:
根据所述业务请求, 确定所述第一步骤的处理模式属性。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述创建与所述第 一步骤的处理模式属性相应的第一处理单元, 包括:
在所述第一步骤的处理模式属性为所述批处理模式时,创建所述第一处 理单元包括的第一批处理单元, 所述第一批处理单元对输入队列中的键值对 进行处理;
在所述第一步骤的处理模式属性为所述流处理模式时,创建所述第一处 理单元包括的第一流处理单元, 所述第一流处理单元对接收的键值对进行处 理。
4、 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 所述方法 还包括:
在紧随所述第一步骤之后的第二步骤的处理模式属性为所述批处理模 式时, 创建所述第二步骤的输入队列;
将所述第一处理单元的输出地址设置为所述第二步骤的输入队列的地 址, 所述第二步骤的输入队列为用于处理所述第二步骤的第二批处理单元提 供输入。
5、 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 所述方法 还包括:
在紧随所述第一步骤之后的第二步骤的处理模式属性为所述流处理模 式时, 执行设定的或默认的分区算法; 根据所述分区算法设定的分区个数,确定用于处理所述第二步骤的第二 流处理单元的数量, 以便于创建与所述数量相应的第二流处理单元;
根据所述分区算法创建分区路由信息表, 以便于根据所述分区路由信息 表, 将所述第一处理单元的输出结果发送到相应的所述第二流处理单元。
6、 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 所述方法 还包括:
在所述第一步骤为处理所述业务的最后一个步骤时,创建所述第一步骤 的输出队列;
将所述第一处理单元的输出地址设置为所述第一步骤的输出队列的地 址。
7、 根据权利要求 4至 6中任一项所述的方法, 其特征在于, 所述方法 还包括:
在所述第一步骤的输出方式为分区输出时,确定所述第二步骤的处理模 式属性为所述流处理模式;
在所述第一步骤的输出方式未使用分区方式时,确定所述第二步骤的处 理模式属性为所述批处理模式。
8、 一种处理业务的系统, 其特征在于, 所述系统包括调度模块和节点 管理模块, 所述调度模块包括:
第一确定单元, 用于确定用于处理业务的第一步骤的处理模式属性, 所 述第一步骤的处理模式属性包括批处理模式或流处理模式, 所述第一步骤为 用于处理所述业务的步骤中的任意一个步骤;
所述节点管理模块包括:
第一创建单元, 用于根据所述第一步骤的处理模式属性, 创建与所述第 一步骤的处理模式属性相应的第一处理单元, 以处理所述第一步骤。
9、 根据权利要求 8所述的系统, 其特征在于, 所述调度模块还包括: 接收单元, 用于接收用户发送的用于请求处理所述业务的业务请求, 所 述业务请求包括用于处理所述业务的每个步骤的处理模式属性;
所述第一确定单元还用于: 根据所述业务请求, 确定所述第一步骤的处 理模式属性。
10、 根据权利要求 8或 9所述的系统, 其特征在于, 所述第一创建单元 包括: 第一创建子单元,用于在所述第一步骤的处理模式属性为所述批处理模 式时, 创建所述第一处理单元包括的第一批处理单元, 所述第一批处理单元 对输入队列中的键值对进行处理;
第二创建子单元,用于在所述第一步骤的处理模式属性为所述流处理模 式时, 创建所述第一处理单元包括的第一流处理单元, 所述第一流处理单元 对接收的键值对进行处理。
11、 根据权利要求 8至 10中任一项所述的系统, 其特征在于, 所述调 度模块还包括:
第二创建单元,用于在紧随所述第一步骤之后的第二步骤的处理模式属 性为所述批处理模式时, 创建所述第二步骤的输入队列;
所述节点管理模块还包括:
第一设置单元,用于将所述第一处理单元的输出地址设置为所述第二步 骤的输入队列的地址, 所述第二步骤的输入队列为用于处理所述第二步骤的 第二批处理单元提供输入。
12、 根据权利要求 8至 10中任一项所述的系统, 其特征在于, 所述节 点管理模块还包括:
分区单元, 用于在紧随所述第一步骤之后的第二步骤的处理模式属性为 所述流处理模式时, 执行设定的或默认的分区算法;
所述调度模块还包括:
第二确定单元, 用于根据所述分区算法设定的分区个数, 确定用于处理 所述第二步骤的第二流处理单元的数量, 以便于创建与所述数量相应的第二 流处理单元;
第三创建单元, 用于根据所述分区算法创建分区路由信息表, 以便于根 据所述分区路由信息表,将所述第一处理单元的输出结果发送到相应的所述 第二流处理单元。
13、 根据权利要求 8至 10中任一项所述的系统, 其特征在于, 所述调 度模块还包括:
第四创建单元, 用于在所述第一步骤为处理所述业务的最后一个步骤 时, 创建所述第一步骤的输出队列;
所述节点管理模块还包括:
第二设置单元,用于将所述第一处理单元的输出地址设置为所述第一步 骤的输出队列的地址。
14、 根据权利要求 11至 13中任一项所述的系统, 其特征在于, 所述调 度模块还包括:
第三确定单元, 用于在所述第一步骤的输出方式为分区输出时, 确定所 述第二步骤的处理模式属性为所述流处理模式;
第四确定单元, 用于在所述第一步骤的输出方式未使用分区方式时, 确 定所述第二步骤的处理模式属性为所述批处理模式。
PCT/CN2011/085176 2011-12-31 2011-12-31 处理业务的方法和系统 WO2013097234A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201180003695.3A CN103299298B (zh) 2011-12-31 2011-12-31 处理业务的方法和系统
PCT/CN2011/085176 WO2013097234A1 (zh) 2011-12-31 2011-12-31 处理业务的方法和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/085176 WO2013097234A1 (zh) 2011-12-31 2011-12-31 处理业务的方法和系统

Publications (1)

Publication Number Publication Date
WO2013097234A1 true WO2013097234A1 (zh) 2013-07-04

Family

ID=48696287

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/085176 WO2013097234A1 (zh) 2011-12-31 2011-12-31 处理业务的方法和系统

Country Status (2)

Country Link
CN (1) CN103299298B (zh)
WO (1) WO2013097234A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106873945A (zh) * 2016-12-29 2017-06-20 中山大学 基于批处理和流式处理的数据处理架构及数据处理方法
CN112822125A (zh) * 2020-04-08 2021-05-18 中兴通讯股份有限公司 一种业务流的传输方法、装置、设备及存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110170B (zh) * 2019-04-30 2021-12-07 北京字节跳动网络技术有限公司 一种数据处理的方法、装置、介质及电子设备
US20220276893A1 (en) * 2019-08-27 2022-09-01 Microsoft Technology Licensing, Llc Workflow-based scheduling and batching in multi-tenant distributed systems
CN112150248B (zh) * 2020-09-30 2021-08-03 欧冶云商股份有限公司 一种基于批流融合的挂货量统计方法、系统、装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5878196A (en) * 1996-03-27 1999-03-02 Fuji Xerox Co., Ltd. Printer control system
CN101197827A (zh) * 2007-12-14 2008-06-11 华为技术有限公司 一种文档管理方法、系统以及相关设备
CN101459848A (zh) * 2008-12-26 2009-06-17 西安交通大学 一种分布式多格式数字视频转码结构设计方法
CN101841476A (zh) * 2010-04-22 2010-09-22 北京星网锐捷网络技术有限公司 报文处理方法、装置和网络设备
US20110145828A1 (en) * 2009-12-16 2011-06-16 Hitachi, Ltd. Stream data processing apparatus and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5878196A (en) * 1996-03-27 1999-03-02 Fuji Xerox Co., Ltd. Printer control system
CN101197827A (zh) * 2007-12-14 2008-06-11 华为技术有限公司 一种文档管理方法、系统以及相关设备
CN101459848A (zh) * 2008-12-26 2009-06-17 西安交通大学 一种分布式多格式数字视频转码结构设计方法
US20110145828A1 (en) * 2009-12-16 2011-06-16 Hitachi, Ltd. Stream data processing apparatus and method
CN101841476A (zh) * 2010-04-22 2010-09-22 北京星网锐捷网络技术有限公司 报文处理方法、装置和网络设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106873945A (zh) * 2016-12-29 2017-06-20 中山大学 基于批处理和流式处理的数据处理架构及数据处理方法
CN112822125A (zh) * 2020-04-08 2021-05-18 中兴通讯股份有限公司 一种业务流的传输方法、装置、设备及存储介质
CN112822125B (zh) * 2020-04-08 2023-08-01 中兴通讯股份有限公司 一种业务流的传输方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN103299298A (zh) 2013-09-11
CN103299298B (zh) 2016-11-02

Similar Documents

Publication Publication Date Title
US10244066B2 (en) Push notification delivery system
WO2018076759A1 (zh) 基于区块链的多链管理方法、系统、电子装置及存储介质
US20170331867A1 (en) Method, device and system for pushing file
WO2018006676A1 (zh) 加速资源处理方法、装置及网络功能虚拟化系统
CN111404990B (zh) 文件传输方法、装置、客户端及存储介质
WO2021155671A1 (zh) 高延时网络环境鲁棒的联邦学习训练方法、装置、计算机设备及存储介质
WO2013178082A1 (zh) 图片上传方法、系统、客户端及网络服务器、计算机存储介质
WO2013075446A1 (zh) 处理业务的方法和系统
WO2018161881A1 (zh) 结构化数据的处理方法、存储介质和计算机设备
WO2011113372A1 (zh) 多群组操作同步的方法、系统和群组服务器
EP3101850A1 (en) Packet processing method, device and system
WO2013097234A1 (zh) 处理业务的方法和系统
EP2633667A2 (en) System and method for on the fly protocol conversion in obtaining policy enforcement information
CN109254854A (zh) 异步调用方法、计算机装置及存储介质
CN110661829A (zh) 文件下载方法及装置、客户端和计算机可读存储介质
WO2021051881A1 (zh) Vpp 集群管理方法及装置、计算机设备及存储介质
WO2021226781A1 (zh) 防火墙规则的更新方法、装置、服务器及存储介质
WO2015180241A1 (zh) 业务数据处理方法、装置、终端设备及计算机存储介质
WO2016101759A1 (zh) 一种数据路由方法、数据管理装置和分布式存储系统
WO2012028033A1 (zh) 消息更新的方法和装置
CN108076149B (zh) 会话保持方法和装置
CN111614726B (zh) 一种数据转发方法、集群系统及存储介质
US20180081746A1 (en) Application message processing system, method, and application device
US20150079966A1 (en) Methods for facilitating telecommunication network administration and devices thereof
CN112131014A (zh) 决策引擎系统及其业务处理方法

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: 11878663

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: 11878663

Country of ref document: EP

Kind code of ref document: A1