Business processing method, device, electronic device and storage medium
By selecting appropriate business processing units and processing nodes in the audio and video service platform, the problem of uneven resource occupation of different business terminals is solved, and efficient resource utilization and timely task processing are achieved.
Patent Information
- Application Number
- CN202111225813.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-21
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2041-10-21
AI Technical Summary
When connecting to different business ends, the audio and video service platform has problems such as uneven processing resource occupation, resulting in untimely task processing, and the use of machines that process large resources to ensure stability, resulting in waste of resources.
By obtaining the service processing request for the target service type, selecting the corresponding service processing unit, and determining the memory capacity required for the current processing task, selecting a processing node with matching memory capacity from multiple processing nodes for processing.
It realizes the selection of appropriate business processing units and processing nodes for processing tasks of different business types, ensuring timely processing of various business types tasks, while avoiding waste of processing resources.
Smart Images

Figure CN114003358B_ABST
Abstract
Description
Background Art
[0002] At present, as a platform that provides audio and video processing services, the audio and video service platform can provide corresponding audio and video processing services for different business terminals to meet the audio and video processing needs of each business terminal. Different business terminals implement different audio and video services and require different audio and video processing services.
[0003] For example, a certain business end is used to implement the management of songs in the music library. During the execution of the song management business, the songs in the music library can be processed accordingly through the music library song processing service provided by the audio and video service platform; another business end is used to implement the song recording business. During the execution of the song recording, the recorded songs can be processed accordingly through the recorded song processing service provided by the audio and video service platform.
[0004] The following problems exist when the audio and video service platform connects to different business terminals:
[0005] 1. Different business terminals have different business traffic. It may happen that a certain business terminal occupies a large amount of processing resources within a period of time, resulting in untimely processing of tasks at other business terminals.
[0006] 2. Different business ends require different processing resources. In order to ensure the stability of service operation, machines with larger processing resources are usually used, which causes a waste of processing resources to a certain extent. Summary of the invention
[0007] The embodiments of the present disclosure provide a business processing method, device, electronic device and storage medium for timely processing tasks of various business terminals and avoiding waste of processing resources.
[0008] In a first aspect, an embodiment of the present disclosure provides a service processing method, including:
[0009] Obtaining a business processing request of a target business type, wherein the business processing request includes a current processing task;
[0010] Selecting a target business processing unit corresponding to the target business type from a plurality of business processing units; wherein each business processing unit includes a plurality of processing nodes, and a processing memory of each processing node has a corresponding memory capacity;
[0011] Determine a target memory capacity required for the current processing task, and select a target processing node having a processing memory matching the target memory capacity from a plurality of processing nodes of the target business processing unit;
[0012] The current processing task is processed by the target processing node to obtain a processing result.
[0013] In a possible implementation manner, the service processing request further includes a target service identifier of the target service type; after obtaining the service processing request of the target service type, and before selecting the target service processing unit corresponding to the target service type from multiple service processing units, the method further includes:
[0014] Selecting a target task queue corresponding to the target service identifier from a plurality of task queues; wherein each task queue is used to store service processing requests of a corresponding service type;
[0015] Adding the business processing request to the target task queue;
[0016] The processing of the current processing task by the target processing node includes:
[0017] The business processing request is obtained from the target task queue through the target processing node, and the current processing task is processed.
[0018] In a possible implementation manner, selecting a target service processing unit corresponding to the target service type from a plurality of service processing units includes:
[0019] Based on the first corresponding relationship between the task queue and the service processing unit, the target service processing unit corresponding to the target task queue is determined.
[0020] In a possible implementation manner, selecting a target service processing unit corresponding to the target service type from a plurality of service processing units includes:
[0021] Based on the second correspondence between the service identifier and the service processing unit, the target service processing unit corresponding to the target service identifier is determined.
[0022] In a possible implementation manner, determining the target memory capacity required for the current processing task includes:
[0023] Based on the third corresponding relationship between the processing task and the memory capacity of the target business processing unit, the target memory capacity corresponding to the current processing task is determined.
[0024] In a possible implementation, the processing task includes multimedia content, and the third corresponding relationship includes: a corresponding relationship between content specifications of the multimedia content and memory capacity;
[0025] The corresponding relationship between the content specification of the multimedia content and the memory capacity is obtained in the following manner:
[0026] For each of the plurality of service processing units, determining a memory capacity required by the service processing unit to process multimedia contents of a plurality of content specifications respectively;
[0027] According to the memory capacities required by the multimedia contents of the plurality of content specifications, the corresponding relationship between the content specifications of the multimedia contents and the memory capacities is set.
[0028] In a possible implementation manner, the current processing task belongs to the processing task, and the current processing task includes current multimedia content;
[0029] The determining, based on the third correspondence between the processing task and the memory capacity of the target business processing unit, the target memory capacity corresponding to the current processing task includes:
[0030] Acquire target content specifications of the current multimedia content;
[0031] Based on the correspondence between the content specification of the multimedia content and the memory capacity of the target service processing unit, the target memory capacity corresponding to the target content specification is determined.
[0032] In a possible implementation manner, after the current processing task is processed by the target processing node and a processing result is obtained, the method further includes:
[0033] The processing result is returned to the target service end corresponding to the service processing request in the form of an asynchronous message through the target processing node.
[0034] In a second aspect, an embodiment of the present disclosure further provides a service processing device, including:
[0035] An acquisition module, used to acquire a business processing request of a target business type, wherein the business processing request at least includes a current processing task;
[0036] A processing unit selection module, used to select a target business processing unit corresponding to the target business type from a plurality of business processing units; wherein each business processing unit includes a plurality of processing nodes, and the processing memory of each processing node has a corresponding memory capacity;
[0037] a processing node routing module, configured to determine a target memory capacity required for the current processing task, and select a target processing node having a processing memory matching the target memory capacity from a plurality of processing nodes of the target business processing unit;
[0038] The processing module is used to process the current processing task through the target processing node to obtain a processing result.
[0039] In a possible implementation manner, the service processing request further includes a target service identifier of the target service type; and the device further includes:
[0040] A queue selection module, used to select a target task queue corresponding to the target service identifier from a plurality of task queues; wherein each task queue is used to store service processing requests of a corresponding service type;
[0041] An adding module, used for adding the business processing request to the target task queue;
[0042] The processing module is also used for:
[0043] The business processing request is obtained from the target task queue through the target processing node, and the current processing task is processed.
[0044] In a possible implementation manner, the processing unit selection module is further configured to:
[0045] Based on the first corresponding relationship between the task queue and the service processing unit, the target service processing unit corresponding to the target task queue is determined.
[0046] In a possible implementation manner, the processing unit selection module is further configured to:
[0047] Based on the second correspondence between the service identifier and the service processing unit, the target service processing unit corresponding to the target service identifier is determined.
[0048] In a possible implementation manner, the processing node routing module further includes:
[0049] The capacity determination submodule is used to determine the target memory capacity corresponding to the current processing task based on the third corresponding relationship between the processing task and the memory capacity of the target business processing unit.
[0050] In a possible implementation, the processing task includes multimedia content, and the third correspondence between the processing task and the memory capacity includes: a correspondence between content specifications of the multimedia content and the memory capacity;
[0051] The correspondence between the content specification and the memory specification of the multimedia content of the target service processing unit is obtained in the following manner:
[0052] For each of the plurality of service processing units, determining a memory capacity required by the service processing unit to process multimedia contents of a plurality of content specifications respectively;
[0053] According to the memory capacities required by the multimedia contents of the plurality of content specifications, the corresponding relationship between the content specifications of the multimedia contents and the memory capacities is set.
[0054] In a possible implementation manner, the current processing task belongs to the processing task, and the current processing task includes current multimedia content;
[0055] The capacity determination submodule is also used for:
[0056] Acquire target content specifications of the current multimedia content;
[0057] Based on the correspondence between the content specification of the multimedia content and the memory capacity of the target service processing unit, the target memory capacity corresponding to the target content specification is determined.
[0058] In a possible implementation, the device further includes:
[0059] The sending module is used to return the processing result to the target service end corresponding to the service processing request in the form of an asynchronous message through the target processing node.
[0060] In a third aspect, the present disclosure further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the processor implements the steps of any one of the business processing methods of the first aspect.
[0061] In a fourth aspect, the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the business processing methods of the first aspect are implemented.
[0062] The service processing method provided by the embodiment of the present disclosure has at least the following beneficial effects:
[0063] According to the scheme provided by the embodiment of the present disclosure, when a business processing request of a target business type is obtained, a target business processing unit corresponding to the target business type is selected from multiple business processing units, and then the target memory capacity required for the current processing task in the business processing request is determined, and a target processing node with a processing memory matching the target memory capacity is selected from multiple processing nodes of the target business processing unit; finally, the current processing task is processed by the target processing node to obtain a processing result. In the embodiment of the present disclosure, each business type can correspond to a business end, so that different business processing units can be selected for processing for processing tasks of different business types, so as to process processing tasks of various business types in a timely manner; and for each business type of processing task, a processing node with suitable memory can be selected in the corresponding business processing unit to avoid wasting processing resources.
[0064] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or be understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0066] Figure 1 A schematic diagram of an application scenario of a business processing method provided by an embodiment of the present disclosure;
[0067] Figure 2 A flowchart of a business processing method provided by an embodiment of the present disclosure;
[0068] Figure 3 A flowchart of another business processing method provided by an embodiment of the present disclosure;
[0069] Figure 4 A schematic diagram of a business processing system provided by an embodiment of the present disclosure;
[0070] Figure 5 A timing flow chart of a business processing method provided by an embodiment of the present disclosure;
[0071] Figure 6 A schematic diagram of a service processing device provided by an embodiment of the present disclosure;
[0072] Figure 7 A schematic diagram of another service processing device provided by an embodiment of the present disclosure;
[0073] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0075] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein.
[0076] In addition, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.
[0077] The following is a brief introduction to the design concept of the embodiment of the present disclosure.
[0078] As mentioned above, the current audio and video service platform can provide corresponding audio and video processing services for different business terminals to meet the audio and video processing needs of each business terminal. However, in the process of connecting with different business terminals, the audio and video service platform has the following problems:
[0079] 1. Different business terminals have different business traffic. It may happen that a certain business terminal occupies a large amount of processing resources within a period of time, resulting in untimely processing of tasks at other business terminals.
[0080] 2. Different business ends require different processing resources. In order to ensure the stability of service operation, machines with larger processing resources are usually used, which causes a waste of processing resources to a certain extent.
[0081] In view of this, the embodiments of the present disclosure provide a business processing method, device, electronic device and storage medium. For processing tasks of different business types, different business processing units can be selected for processing, so as to timely process processing tasks of various business types, and each business type can correspond to a business end; and, for processing tasks of each business type, a processing node with appropriate memory can be selected in the corresponding business processing unit to avoid wasting processing resources.
[0082] The application scenarios of the embodiments of the present disclosure are exemplarily introduced below with reference to the accompanying drawings.
[0083] refer to Figure 1 , which is a schematic diagram of an application scenario of the business processing method provided by the embodiment of the present disclosure. The application scenario includes multiple business terminals 100 and a service platform 200. The service platform 200 includes multiple business processing units. Each business processing unit includes multiple processing nodes, and the processing memory of each processing node has a corresponding memory capacity. Among them, the multiple business terminals 100 and the service platform 200 can be connected through a wired or wireless communication network.
[0084] The service end 100 may be a terminal device, including but not limited to desktop computers, mobile phones, mobile computers, tablet computers, media players, smart wearable devices, smart TVs, vehicle-mounted devices, personal digital assistants (PDAs), and other electronic devices. The service processing unit may be a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0085] Each business terminal 100 may correspond to one or more business types, and each business type is bound to a business processing unit. When a business terminal 100 sends a business processing request of a corresponding business type to the service platform 200, the service platform 200 selects a business processing unit corresponding to the corresponding business type from multiple business processing units, and then determines the memory capacity required for the processing task in the business processing request, and selects a processing node with a processing memory matching the memory capacity from multiple processing nodes of the selected business processing unit; finally, the processing task is processed by the selected processing node to obtain a processing result.
[0086] The above application scenarios are only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0087] The business processing method of the embodiment of the present application is introduced below with reference to the accompanying drawings and specific implementation methods.
[0088] refer to Figure 2 , the embodiment of the present disclosure provides a business processing method, which can be applied to a service platform, such as Figure 1 The service platform 200 shown, the business processing method may include the following steps:
[0089] Step S201: Obtain a business processing request of a target business type, wherein the business processing request includes a current processing task.
[0090] In the embodiment of the present disclosure, the service platform can process business processing requests of multiple business terminals, and each business terminal can correspond to one or more business types, which can be determined according to specific business scenarios, and the embodiment of the present disclosure does not limit this. The following is an example of each business terminal corresponding to one business type.
[0091] For example, business end 1 is used to implement the management service of music library songs, and its business type may be music library song management; business end 2 is used to implement the song recording service, and its business type may be recorded song management.
[0092] In the above step S201, the service platform can receive a business processing request of a target business type sent by a target business end among multiple business ends. The current processing task in the business processing request can be determined according to the business needs of the target business end. For example, for the above business end 1, the processing task in its business processing request can be to perform corresponding processing on related songs in the music library.
[0093] In a specific implementation, each service type may correspond to a service identifier, so that different service types can be distinguished according to the service identifier. Therefore, the target service type in the above step S201 may correspond to the target service identifier, and the above service processing request may carry the target service identifier.
[0094] After obtaining the above business processing request, the business processing request can be added to the target task queue corresponding to the target business identifier. Specifically, the service platform can pre-set multiple task queues for multiple business types, that is, each business type corresponds to a task queue, and the business identifier of each business type can be bound to the corresponding task queue.
[0095] Therefore, if Figure 3 As shown, after the above step S201, the following steps may also be included:
[0096] Step S201_1, selecting a target task queue corresponding to a target service identifier from a plurality of task queues; wherein each task queue is used to store service processing requests of a corresponding service type.
[0097] In this step, a target task queue corresponding to the target service identifier may be selected from multiple task queues according to a preset binding relationship between the service identifier and the task queue.
[0098] For example, the preset binding relationship between the service identifier and the task queue is: service identifier 1 corresponds to task queue 1, service identifier 2 corresponds to task queue 2, service identifier 3 corresponds to task queue 3. Assuming the target service identifier is service identifier 3, its corresponding target task queue is task queue 3.
[0099] Step S201_2, adding the business processing request to the target task queue.
[0100] The task queue may be set in a database of the service platform. After obtaining a business processing request, the business processing request is first added to a corresponding target task queue so as to execute subsequent steps S202 and S203.
[0101] Step S202, selecting a target business processing unit corresponding to a target business type from a plurality of business processing units; wherein each business processing unit includes a plurality of processing nodes, and a processing memory of each processing node has a corresponding memory capacity.
[0102] In the embodiments of the present disclosure, a dedicated business processing unit can be pre-set for each business type. For example, the specific form of the business processing unit can be a server cluster or distributed system composed of multiple physical servers, or a cloud server, etc., which is not limited by the embodiments of the present disclosure. A business processing unit handles business processing requests of one business type, which can ensure the timeliness and stability of processing of different business types. In addition, a business processing unit can set up multiple processing nodes for different processing tasks of the corresponding business type. For example, the specific form of each processing node can be a server. These processing nodes have the same function, but the memory capacity of the processing memory is different to match the memory capacity required for different processing tasks to avoid wasting processing resources.
[0103] In a specific implementation, a dedicated service processing unit may be set for each service type through the following two possible implementations.
[0104] In a first possible implementation, since each service type corresponds to a task queue, a first corresponding relationship between the task queue and the service processing unit may be preset, that is, one task queue corresponds to one service processing unit.
[0105] In this implementation manner, the above step S202 selects a target service processing unit corresponding to the target service type from multiple service processing units, which may include the following steps:
[0106] Based on the first corresponding relationship between the task queue and the service processing unit, a target service processing unit corresponding to the target task queue is determined.
[0107] For example, the first correspondence between the pre-set task queues and business processing units is: task queue 1 corresponds to business processing unit 1, task queue 2 corresponds to business processing unit 2, and task queue 3 corresponds to business processing unit 3. Assuming that the target task queue is task queue 3, its corresponding target business processing unit is business processing unit 3.
[0108] In a second possible implementation, since each service type corresponds to a service identifier, a second corresponding relationship between the service identifier and the service processing unit may be preset.
[0109] In this implementation manner, the above step S202 selects a target service processing unit corresponding to the target service type from multiple service processing units, which may include the following steps:
[0110] Based on the second corresponding relationship between the service identifier and the service processing unit, a target service processing unit corresponding to the target service identifier is determined.
[0111] For example, the second correspondence between the pre-set service identifier and the service processing unit is: service identifier 1 corresponds to service processing unit 1, service identifier 2 corresponds to service processing unit 2, and service identifier 3 corresponds to service processing unit 3. Assuming that the target service identifier is service identifier 3, the corresponding target service processing unit is service processing unit 3.
[0112] Step S203, determining the target memory capacity required for the current processing task, and selecting a target processing node having a processing memory matching the target memory capacity from multiple processing nodes of the target business processing unit.
[0113] In the embodiment of the present disclosure, a third correspondence between processing tasks and memory capacity can be pre-set for each of the multiple business processing units, and based on the third correspondence, the memory capacity of each of the multiple processing nodes of the corresponding business processing unit can be pre-configured.
[0114] Based on this, determining the target memory capacity required for the current processing task in the above step S203 may include the following steps:
[0115] Based on the third corresponding relationship between the processing task and the memory capacity of the target business processing unit, the target memory capacity corresponding to the current processing task is determined.
[0116] The processing task may include multimedia content, such as audio, video, picture, text, advertisement, etc., which is not limited in the embodiment of the present disclosure. The business processing unit may perform corresponding processing on the multimedia content. At this time, the third corresponding relationship may include: the corresponding relationship between the content specification of the multimedia content and the memory capacity.
[0117] In a specific implementation, the correspondence between the content specifications of the multimedia content and the memory capacity may be preconfigured, and the configuration process may include the following steps:
[0118] A1. For each of the multiple service processing units, determine the memory capacity required for the service processing unit to process multimedia contents of multiple content specifications respectively.
[0119] In this step, the memory capacity required for multimedia content of corresponding content specifications may be determined based on business processing experience.
[0120] A2. According to the memory capacities required for the multimedia contents of the plurality of content specifications, a corresponding relationship between the content specifications of the multimedia contents and the memory capacities is set.
[0121] Among them, each content specification can be a specification range. For example, the multimedia content is audio information, and the content specification of the audio information can be the audio duration. At this time, the correspondence between the audio duration range and the memory capacity can be set for each business processing unit, as shown in Table 1.
[0122] Table 1
[0123]
[0124] Since the above-mentioned current processing task belongs to the processing task, when the processing task includes multimedia content, the current processing task includes the current multimedia content; further, determining the target memory capacity corresponding to the current processing task may include the following steps:
[0125] B1. Obtain target content specifications of the current multimedia content.
[0126] For example, the current multimedia content is audio information, and its target content specification may be a target audio duration.
[0127] B2. Determine a target memory capacity corresponding to the target content specification based on the correspondence between the content specification of the multimedia content and the memory capacity of the target service processing unit.
[0128] For example, the target business processing unit is business processing unit 1 in Table 1, and the target content specification is 5 minutes. Combined with the above Table 1, the target content specification belongs to 0 to 10 minutes, and the memory capacity required for processing is 2GB, that is, the target memory capacity is 2GB, which means that the current multimedia content needs to be processed by a processing node with at least 2GB of memory.
[0129] Step S204: Process the current processing task through the target processing node to obtain a processing result.
[0130] As can be seen from the foregoing content, the business processing request may be located in the target task queue, so step S204 may include the following steps:
[0131] Step S204_1: Obtain a business processing request from the target task queue through the target processing node, and process the current processing task in the business processing request.
[0132] In the embodiments of the present disclosure, different business processing units can be selected to process processing tasks of different business types, so as to timely process processing tasks of various business types; and, for processing tasks of each business type, a processing node with appropriate memory can be selected in the corresponding business processing unit to avoid wasting processing resources.
[0133] Furthermore, if Figure 3 As shown, after the current processing task is processed by the target processing node in step S204 and the processing result is obtained, the following steps may also be included:
[0134] Step S205: The processing result is returned to the target service end corresponding to the service processing request in the form of an asynchronous message through the target processing node.
[0135] In a specific implementation, after obtaining the processing result of the current processing task, the processing result can be placed in a message queue, and then when the processing result needs to be returned to the corresponding business end, the processing result is taken out from the message queue and sent. Optionally, the processing results of multiple business ends can be placed in the same message queue to save memory resources.
[0136] Combine the following Figure 4 An exemplary introduction is given to a business processing system (ie, a service platform) for implementing the business processing method of an embodiment of the present disclosure.
[0137] like Figure 4As shown, a business processing system provided by an embodiment of the present disclosure includes: an algorithm docking management platform, an algorithm task delivery front-end cluster, a task queue, an algorithm task routing service, and an algorithm service cluster; wherein the algorithm refers to the processing method provided by the business processing system for the processing tasks of the business end. The functions of the above-mentioned parts are as follows:
[0138] Algorithm docking management platform: responsible for docking with the business end, such as Figure 4 It automatically deploys the task queues, algorithm task routing services, and algorithm service clusters that are exclusive to each business end, as well as the management and maintenance of basic information such as the memory capacity requirements of each algorithm service cluster in the process of processing different tasks (such as different audio information).
[0139] Algorithm task delivery front-end cluster: responsible for receiving algorithm requests from the business end, which can be understood as business processing requests of the above embodiments of the present disclosure, including algorithm tasks, and delivering them to the corresponding task queue according to the source of the algorithm request (i.e., which business end it comes from). Among them, the algorithm task can be understood as the processing task of the above embodiments of the present disclosure.
[0140] Task queue: MongoDB (an unstructured database storage system) can be used to provide a first-in-first-out consumption model for algorithm tasks; a task queue only stores the algorithm tasks of one business end. Here it is assumed that a business end only handles one business type of business.
[0141] Algorithm service cluster: obtains algorithm tasks from the task queue, provides algorithm processing services for algorithm tasks, and returns the processing results to the business end in the form of messages. An algorithm service cluster is bound to a business end and only consumes algorithm tasks in the task queue bound to the business end; considering that different algorithm tasks require different memory capacities, an algorithm service cluster has multiple specifications of processing nodes, which only differ in memory capacity and are completely the same in function.
[0142] It can be understood that the algorithm service cluster is the business processing unit in the above embodiments of the present disclosure.
[0143] Algorithm Task Routing Service: Located between the task queue and the algorithm service cluster, it is responsible for routing the algorithm tasks to the corresponding processing nodes in the algorithm service cluster, and sending the algorithm tasks to the processing nodes with the required memory capacity by determining the memory capacity required for the algorithm tasks. For example, the required memory capacity is calculated by calculating the duration of the audio in the algorithm task and combining it with the algorithm service running memory requirements configured by the algorithm docking management platform.
[0144] Combine the following Figure 5 The configuration phase and algorithm service phase of the business processing system are introduced respectively.
[0145] Phase 1: Configuration Phase
[0146] The algorithm maintainer configures the mapping relationship between algorithm tasks (such as audio duration) and memory capacity according to the memory resource requirements of the algorithm operation of the algorithm service cluster. That is, when the audio duration to be processed is within a specific market range, the processing node with at least how much memory capacity is required to run on it, as shown in Table 1 above.
[0147] The business end applies for the unique business identifier BizType corresponding to the business type on the algorithm docking management platform according to its own business type;
[0148] After the business end successfully applies for the business identifier BizType, the algorithm docking management platform will automatically trigger the automated deployment of the algorithm environment corresponding to the business identifier BizType based on the business identifier BizType applied for by the business end and the algorithm information used, including the business end's proprietary task queue, algorithm task routing service, and algorithm service cluster.
[0149] Phase 2: Algorithm service phase
[0150] When the business end delivers the business processing request carrying the algorithm task to the algorithm task delivery front-end cluster through the remote procedure call (RPC) service, the algorithm task delivery front-end cluster will write the business processing request route into the task queue corresponding to the business identifier BizType according to the business identifier BizType in the current business processing request.
[0151] Afterwards, the algorithm task routing service corresponding to the business end determines the memory capacity required for the algorithm task in the business processing request. For example, when the algorithm task is audio information, it determines the audio duration of the audio information, and then determines the memory capacity required to process the audio information based on the pre-configured mapping relationship between the audio duration and the memory capacity.
[0152] The algorithm service cluster obtains the business processing request from the task queue and processes the algorithm task in the business processing request through the processing node with the required memory capacity. After the algorithm service cluster processes the algorithm task, it returns the processing result to the business end in the form of an asynchronous message, and the business end then executes subsequent business according to the processing result of the algorithm task.
[0153] The above business processing system has at least the following advantages:
[0154] 1. Business-centric algorithm cluster deployment, operation, and maintenance mechanism: The algorithm service cluster deployment method centered on the business type (indicated by the business identifier bizType) allocates different algorithm operation services to different business ends, thereby achieving isolation of different services; at the same time, different algorithm service clusters are divided based on business types, and different computing resources can be allocated according to the traffic characteristics of the business to ensure the timeliness and stability of algorithm tasks for different businesses.
[0155] 2. Task routing strategy based on audio duration-memory capacity configuration rules: By configuring the algorithm's memory capacity requirements for different audio durations, it supports the deployment of multi-specification algorithm services for the same service, copes with audio task processing in a wider range of audio durations, and ensures the stability and economy of service operation.
[0156] Based on the same inventive concept, the embodiment of the present disclosure also provides a business processing device. The principle of solving the problem by the business processing device is similar to the method of the above embodiment. Therefore, the implementation of the business processing device can refer to the implementation of the method, and the repeated parts will not be repeated. Figure 6 A schematic diagram of a service processing device provided by an embodiment of the present disclosure is shown.
[0157] like Figure 6 As shown, the embodiment of the present disclosure also provides a service processing device, including an acquisition module 61, a processing unit selection module 62, a processing node routing module 63 and a processing module 64.
[0158] An acquisition module 61 is used to acquire a business processing request of a target business type, where the business processing request at least includes a current processing task;
[0159] The processing unit selection module 62 is used to select a target business processing unit corresponding to the target business type from a plurality of business processing units; wherein each business processing unit includes a plurality of processing nodes, and the processing memory of each processing node has a corresponding memory capacity;
[0160] The processing node routing module 63 is used to determine the target memory capacity required for the current processing task and select a target processing node having a processing memory matching the target memory capacity from a plurality of processing nodes of the target business processing unit;
[0161] The processing module 64 is used to process the current processing task through the target processing node to obtain a processing result.
[0162] In a possible implementation manner, the service processing request also includes a target service identifier of a target service type; Figure 7 As shown, the device also includes:
[0163] The queue selection module 65 is used to select a target task queue corresponding to the target business identifier from multiple task queues; wherein each task queue is used to store business processing requests of a corresponding business type;
[0164] Adding module 66, used to add the business processing request to the target task queue;
[0165] The processing module 64 is further configured to:
[0166] The target processing node obtains the business processing request from the target task queue and processes the current processing task.
[0167] In a possible implementation manner, the processing unit selection module 62 is further configured to:
[0168] Based on the first corresponding relationship between the task queue and the service processing unit, a target service processing unit corresponding to the target task queue is determined.
[0169] In a possible implementation manner, the processing unit selection module 62 is further configured to:
[0170] Based on the second corresponding relationship between the service identifier and the service processing unit, a target service processing unit corresponding to the target service identifier is determined.
[0171] In a possible implementation, the processing node routing module 63 further includes:
[0172] The capacity determination submodule is used to determine the target memory capacity corresponding to the current processing task based on the third corresponding relationship between the processing task and the memory capacity of the target business processing unit.
[0173] In a possible implementation, the processing task includes multimedia content, and the third correspondence between the processing task and the memory capacity includes: a correspondence between content specifications of the multimedia content and the memory capacity;
[0174] The correspondence between the content specification and the memory specification of the multimedia content of the target service processing unit is obtained in the following manner:
[0175] For each of the plurality of service processing units, determining a memory capacity required for the service processing unit to process multimedia contents of a plurality of content specifications respectively;
[0176] According to the memory capacities required by the multimedia contents of the plurality of content specifications, the corresponding relationship between the content specifications of the multimedia contents and the memory capacities is set.
[0177] In a possible implementation, the current processing task belongs to a processing task, and the current processing task includes current multimedia content;
[0178] The capacity determination submodule is also used to:
[0179] Get the target content specification of the current multimedia content;
[0180] Based on the correspondence between the content specification of the multimedia content and the memory capacity of the target service processing unit, a target memory capacity corresponding to the target content specification is determined.
[0181] In a possible implementation, the device further includes:
[0182] The sending module 67 is used to return the processing result to the target service end corresponding to the service processing request in the form of an asynchronous message through the target processing node.
[0183] For the convenience of description, the above parts are divided into modules according to their functions and described separately. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software or hardware.
[0184] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.
[0185] Regarding the device in the above embodiment, the specific execution mode of each module therein has been described in detail in the embodiment of the method, and will not be elaborated here.
[0186] Based on the same inventive concept, the embodiment of the present disclosure also provides an electronic device, the principle of solving the problem by the electronic device is similar to the method of the above embodiment, so the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated. Figure 8 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.
[0187] See also Figure 8 As shown, the electronic device may include a processor 802 and a memory 801. The memory 801 provides the processor 802 with program instructions and data stored in the memory 801. In the embodiment of the present disclosure, the memory 801 may be used to store the program for business processing in the embodiment of the present disclosure.
[0188] The processor 802 calls the program instructions stored in the memory 801, and the processor 802 is used to execute the method in any of the above method embodiments, for example Figure 2 The illustrated embodiment provides a double-talk detection method.
[0189] The specific connection medium between the memory 801 and the processor 802 is not limited in the embodiments of the present disclosure. Figure 8 In the embodiment, the memory 801 and the processor 802 are connected via a bus 803. The bus 803 is connected to the processor 802 via a bus 803. Figure 8 The connections between other components are shown in bold lines, and are not intended to be limiting. Bus 803 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0190] The memory may include a read-only memory (ROM) and a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0191] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0192] The embodiments of the present disclosure further provide a computer storage medium, in which a computer program is stored. A processor of an electronic device reads the computer program from the computer readable storage medium, and the processor executes the computer program, so that the electronic device executes the business processing method in any of the above method embodiments.
[0193] In the specific implementation process, the computer storage medium may include: Universal Serial Bus Flash Drive (USB), mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other storage media that can store program codes.
[0194] In some possible implementations, various aspects of the business processing method provided by the present disclosure may also be implemented in the form of a program product, which includes a program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the business processing method according to various exemplary embodiments of the present disclosure described above in this specification. For example, the electronic device may execute the following steps: Figure 2 The business processing flow in steps S201 to S204 is shown.
[0195] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0196] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0197] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0198] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0199] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.
Claims
1. A business processing method, characterized in that: include: Obtaining a business processing request of a target business type, wherein the business processing request includes a current processing task; Selecting a target business processing unit corresponding to the target business type from a plurality of business processing units; wherein each business processing unit includes a plurality of processing nodes, and a processing memory of each processing node has a corresponding memory capacity; Determine a target memory capacity required for the current processing task, and select a target processing node having a processing memory matching the target memory capacity from a plurality of processing nodes of the target business processing unit; Processing the current processing task through the target processing node to obtain a processing result; The current processing task includes current multimedia content, and determining a target memory capacity required for the current processing task includes: Acquire target content specifications of the current multimedia content; Based on the correspondence between the content specification of the multimedia content and the memory capacity of the target service processing unit, determining the target memory capacity corresponding to the target content specification; wherein each content specification is a corresponding specification range; The corresponding relationship between the content specification of the multimedia content and the memory capacity is obtained in the following manner: For each of the multiple business processing units, determine the memory capacity required for the business processing unit to respectively process multimedia contents of multiple content specifications, and set the correspondence between the content specifications and memory capacity of the multimedia contents of the business processing unit according to the memory capacity required for each of the multimedia contents of the multiple content specifications.
2. The method according to claim 1, characterized in that The service processing request also includes a target service identifier of the target service type; after obtaining the service processing request of the target service type, and before selecting a target service processing unit corresponding to the target service type from a plurality of service processing units, the method further includes: Selecting a target task queue corresponding to the target service identifier from a plurality of task queues; wherein each task queue is used to store service processing requests of a corresponding service type; Adding the business processing request to the target task queue; The processing of the current processing task by the target processing node includes: The business processing request is obtained from the target task queue through the target processing node, and the current processing task is processed.
3. The method according to claim 2, characterized in that The selecting, from a plurality of service processing units, a target service processing unit corresponding to the target service type comprises: Based on the first corresponding relationship between the task queue and the service processing unit, the target service processing unit corresponding to the target task queue is determined.
4. The method according to claim 2, characterized in that: The selecting, from a plurality of service processing units, a target service processing unit corresponding to the target service type comprises: Based on the second correspondence between the service identifier and the service processing unit, the target service processing unit corresponding to the target service identifier is determined.
5. The method according to any one of claims 1 to 4, characterized in that: After the target processing node processes the current processing task and obtains the processing result, the method further includes: The processing result is returned to the target service end corresponding to the service processing request in the form of an asynchronous message through the target processing node.
6. A service processing device, characterized in that: include: An acquisition module, used to acquire a business processing request of a target business type, wherein the business processing request at least includes a current processing task; A processing unit selection module, used to select a target business processing unit corresponding to the target business type from a plurality of business processing units; wherein each business processing unit includes a plurality of processing nodes, and the processing memory of each processing node has a corresponding memory capacity; a processing node routing module, configured to determine a target memory capacity required for the current processing task, and select a target processing node having a processing memory matching the target memory capacity from a plurality of processing nodes of the target business processing unit; A processing module, used to process the current processing task through the target processing node to obtain a processing result; The current processing task includes current multimedia content, and the processing node routing module is specifically used for: Acquire target content specifications of the current multimedia content; Based on the correspondence between the content specification of the multimedia content and the memory capacity of the target service processing unit, determining the target memory capacity corresponding to the target content specification; wherein each content specification is a corresponding specification range; The corresponding relationship between the content specification of the multimedia content and the memory capacity is obtained in the following manner: For each of the multiple business processing units, determine the memory capacity required for the business processing unit to respectively process multimedia contents of multiple content specifications, and set the correspondence between the content specifications and memory capacity of the multimedia contents of the business processing unit according to the memory capacity required for each of the multimedia contents of the multiple content specifications.
7. The device according to claim 6, characterized in that The service processing request also includes a target service identifier of the target service type; and the device also includes: A queue selection module, used to select a target task queue corresponding to the target service identifier from a plurality of task queues; wherein each task queue is used to store service processing requests of a corresponding service type; An adding module, used for adding the business processing request to the target task queue; The processing module is also used for: The business processing request is obtained from the target task queue through the target processing node, and the current processing task is processed.
8. The device according to claim 7, characterized in that The processing unit selection module is also used for: Based on the first corresponding relationship between the task queue and the service processing unit, the target service processing unit corresponding to the target task queue is determined.
9. The device according to claim 7, characterized in that The processing unit selection module is also used for: Based on the second correspondence between the service identifier and the service processing unit, the target service processing unit corresponding to the target service identifier is determined.
10. The device according to any one of claims 6 to 9, characterized in that The device also includes: The sending module is used to return the processing result to the target service end corresponding to the service processing request in the form of an asynchronous message through the target processing node.
11. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of any one of the methods in claims 1 to 5.
12. A computer-readable storage medium, characterized in that: The method comprises a program code. When the program code is run on an electronic device, the program code is used to enable the electronic device to execute the steps of any method described in claims 1 to 5.
Citation Information
Patent Citations
Business processing method and server
CN106330769A
Audio and video transcoding task allocation method and allocation device
CN112422977A