CN110908806A - Mixed flow task management method, device, equipment and storage medium - Google Patents
Mixed flow task management method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN110908806A CN110908806A CN201911212823.XA CN201911212823A CN110908806A CN 110908806 A CN110908806 A CN 110908806A CN 201911212823 A CN201911212823 A CN 201911212823A CN 110908806 A CN110908806 A CN 110908806A
- Authority
- CN
- China
- Prior art keywords
- task
- information
- execution
- database
- mixed flow
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2379—Updates performed during online database operations; commit processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/508—Monitor
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The embodiment of the invention discloses a mixed flow task management method, a device, equipment and a storage medium, wherein the mixed flow task management method comprises the following steps: when an initial task is received, acquiring load information of at least two execution nodes, and distributing the execution nodes for the initial task according to the load information to obtain task distribution information; storing the task allocation information into a database; the database comprises a corresponding relation between the task information and the execution node information; issuing the initial task to an execution node according to the task allocation information; and receiving task execution verification information, and updating the task information in the database if the task execution verification information is inconsistent with the task allocation information. According to the embodiment of the invention, the execution nodes are dynamically allocated to the initial task according to the load condition of the execution nodes, so that the execution efficiency of the execution nodes can be effectively improved; and the task allocation information is stored in the database, so that the accuracy and reliability of the execution node in executing the task can be improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a mixed flow task management method, a mixed flow task management device, mixed flow task management equipment and a storage medium.
Background
With the progress of technology and the development of the demand of the live broadcast market, the multi-user video live broadcast service, namely the multi-user anchor live broadcast service, is more and more. In the internet-based multi-person video live broadcast service, in consideration of the limitations of the performance of handheld mobile terminals of audiences and networks, the multiple anchor broadcasts are required to upload respective live broadcast contents in real time respectively, and the live broadcast contents are mixed and then pushed to cdn clusters by a server, so that a viewer can watch the wonderful live broadcast contents of the multiple anchor broadcasts in real time and pleasantly with the minimum network flow overhead and the minimum energy consumption overhead when watching for a long time. For example, in news live broadcast, a host and a reporter are live broadcast in two places; multi-view live broadcast in game live broadcast; multiple main broadcasts in beauty direct broadcast are simultaneously direct broadcast; multi-view live in a video debate, etc. When the live broadcasting is carried out in a show field with multiple main broadcasts in the same live broadcasting room, mixed flow operation needs to be carried out on the live streams of the multiple main broadcasts, and the live streams of the main broadcasts are mixed into one-way video stream to be played, so that the entertainment cost of audiences holding mobile terminals is reduced, and the high-efficiency synchronous display of the pictures of the main broadcasts in the same live broadcasting room is realized.
The existing mixed flow operation adopts a plurality of mixed flow machines to simultaneously execute a plurality of mixed flow tasks so as to ensure the efficient execution of the mixed flow tasks. The mixed flow machines are generally distributed randomly or sequentially for mixed flow tasks.
However, when the mixed flow task amount is increased, for a limited mixed flow machine, if the mixed flow task is randomly or sequentially and simply distributed to the mixed flow machine, the load of part of the mixed flow machine is overloaded, and the mixed flow task on the machine is not smoothly executed. And when the mixed flow machine breaks down and goes off the line, the distributed mixed flow task disappears, and unreliability is brought to the execution of the mixed flow task.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for managing mixed flow tasks, which can ensure the high efficiency of executing tasks by an execution node when the amount of the mixed flow tasks is increased, and can realize the accuracy of subsequent updating and recovery of the tasks by storing the mixed flow tasks distributed to the execution node in a database, thereby improving the reliability of executing the mixed flow tasks.
In a first aspect, an embodiment of the present invention provides a method for managing a mixed flow task, including:
when an initial task is received, acquiring load information of at least two execution nodes, and distributing the execution nodes for the initial task according to the load information to obtain task distribution information;
storing the task allocation information into a database; the database comprises a corresponding relation between task information and execution node information;
issuing the initial task to an execution node according to the task allocation information;
and receiving task execution verification information, and updating the task information in the database if the task execution verification information is inconsistent with the task allocation information.
In a second aspect, an embodiment of the present invention further provides a device for managing a mixed flow task, including:
the task allocation information determining module is used for acquiring load information of at least two execution nodes when an initial task is received, and allocating the execution nodes for the initial task according to the load information to obtain task allocation information;
the task allocation information storage module is used for storing the task allocation information into a database; the database comprises a corresponding relation between the task information and the execution node information;
the initial task issuing module is used for issuing the initial task to the execution node according to the task distribution information;
and the task information updating module is used for receiving the task execution verification information, and updating the task information in the database if the task execution verification information is inconsistent with the task allocation information.
In a third aspect, an embodiment of the present invention further provides a computer device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the mixed flow task management method according to any embodiment of the invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for managing mixed flow tasks according to any embodiment of the present invention.
According to the embodiment of the invention, the execution nodes are distributed to the initial task according to the load condition of the execution nodes, so that the execution efficiency of the execution nodes can be effectively improved, and the phenomenon that the execution efficiency of the task is reduced due to the fact that part of the execution nodes are overloaded is avoided; and the task allocation information is stored in the database and then the action of issuing the execution node by the initial task is executed, so that the task allocation information of the database is updated conveniently according to the task execution verification information, the accuracy of executing the task by the execution node is improved, meanwhile, the task allocation information is stored in the database, the task execution state of each execution node is monitored conveniently, and the task execution reliability is improved.
Drawings
FIG. 1 is a flow chart of a mixed flow task management method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a mixed flow task management method according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a device for managing a mixed flow task according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of a mixed flow task management method in an embodiment of the present invention, which is applicable to load balancing distribution of mixed flow tasks in a large batch, and meanwhile, in a case where multiple channels guarantee high reliability of executing tasks. The method can be executed by a mixed flow task management device, which can be implemented in software and/or hardware and can be configured in a computer device, for example, the computer device can be a device with communication and computing capabilities, such as a background server. As shown in fig. 1, the method specifically includes:
The initial task refers to an object which needs to be operated by an executed node, and comprises video stream information which needs to be mixed. Illustratively, when a live broadcast is started in a live broadcast room of a multi-anchor, four anchor broadcasts are performed, four video streams are obtained, and the four video streams need to be mixed to generate one video stream, so that the mixed flow task is an initial task to be executed. The execution nodes refer to objects capable of operating initial tasks, and comprise servers with mixed flow functions, and a plurality of execution nodes form a mixed flow cluster. Load information refers to a measure of the current workload of an executing node.
In this embodiment, the initial task may be a mixed flow task that the whole system has just received, for example, a mixed flow task that the whole system has just been powered on and is received for the first time. The mixed flow task acquired when the scheme is executed for the first time can be determined as an initial task, for example, the whole system is powered on and normally runs.
In this embodiment, optionally, the load information includes an IP address of the execution node, a used memory, and a current task amount. The task allocation information refers to an allocation situation of the initial task, and for example, the task allocation information includes information of the initial task and information of the allocated execution node. Used memory includes used CPU memory.
Specifically, the real-time mixed flow task is received, load information of each execution node is obtained, the load information includes information such as used memory and current execution task amount of each execution node, and then the execution task amount which can be supported by the remaining available resources of all the execution nodes is determined. And selecting the execution nodes with abundant resources and light load according to the determined residual supported execution task amount of each execution node, distributing the real-time mixed flow task to the execution nodes, and determining the information of the real-time mixed flow task and the information of the distributed execution nodes. The execution nodes are distributed for the real-time mixed flow task according to the load information of the execution nodes, the execution efficiency of the real-time mixed flow task can be improved, the phenomenon that the execution nodes are halted due to the fact that the load of part of the execution nodes is too heavy is avoided, and the execution efficiency of the execution points is improved.
In the embodiment of the present invention, the load information of each executing node may be periodically reported by the executing node according to a preset time interval. Illustratively, each execution node periodically reports respective load information according to a preset time interval, determines global load information, and uploads the global load information to a database for storage, wherein the global load information includes information such as an IP address, a used memory, and a current execution task amount of each execution node. The management device of the mixed flow task corresponding to the method of the embodiment periodically acquires global load information in the database, calculates the global load information, and records the global load information into the local memory to determine the load state of each execution node for use when the execution nodes are distributed for the task. The load state information comprises information such as residual memory, residual CPU and residual supporting execution task amount of each execution node, and is obtained by calculating global load information. In addition, in order to ensure the real-time performance of the global load information and the load status information, the information is generally updated at a preset time interval of 5 seconds. The global load information is stored in the database, so that each scheduling machine can calculate the current system load conveniently, repeated acquisition of the load information of the execution node is avoided, and the efficiency of determining the load information is improved; and the local load state information of the execution device is determined according to the global load information, so that the stability of the information source is improved.
The database is an independent storage area for storing data related to task management. In this embodiment, an efficient cache database may be used to ensure the efficiency of information storage. And the database is used for storing the task allocation information, so that the task allocation information is prevented from being influenced by the state of the execution node, and the reliability of the execution task is protected.
Specifically, after an execution node is allocated to the initial task, the task allocation condition is stored in the database, and the task allocation information further includes information of the initial task and information of the allocated execution node. In a possible embodiment, optionally, the task information includes: live broadcasting room information of the mixed flow task, streaming address attribute information of each video stream in the mixed flow task, identity information of a main broadcasting user, task state information and the like. The live broadcasting room information of the mixed flow task refers to the number of main broadcasting in live broadcasting in the live broadcasting room, unique identification information of the main broadcasting room and the type of the main broadcasting room (a radio station room, a video room and the like); the stream pulling address attribute information of each video stream in the mixed stream task is used for an execution node to pull the main broadcast stream for confluence, and the information comprises coding information, code rate information, frame rate information and the like of each video stream; the anchor user identity information refers to identity information of each anchor, such as an anchor UID (user identification). For example, on the basis of the above example, the task allocation information includes that the initial task is to perform a mixed flow operation on four video streams, anchor information corresponding to each of the four video streams, such as information for uniquely identifying an anchor identity, such as an anchor ID number, and address information of the anchor live stream, and information of an execution node allocated to the task, such as an IP address of the execution node.
The task information and the corresponding execution node information are stored in the database, a basis for recovering data is provided for subsequent emergency situations, the emergency situations can be that the tasks distributed on the execution node disappear due to the fault of the execution node, and at the moment, the task information on the fault execution node can be determined according to the task distribution information in the database, so that the targeted recovery is realized, and the task execution safety is ensured. And the subsequent task update is conveniently executed according to the complete task allocation information in the database, so that the reliability of task execution is ensured.
And 103, issuing the initial task to an execution node according to the task allocation information.
Specifically, after the task allocation information is stored in the database, the task is issued to the corresponding execution node according to the information of the execution node corresponding to the initial task in the task allocation information. For example, according to the IP address of the execution node corresponding to the task included in the task allocation information, the task is issued to the IP address, so that the execution node performs an operation on the task.
The task distribution information is stored in the database and then the task issuing operation is executed, so that the phenomenon that the task disappears due to the fact that the executing node fails after the task is issued is avoided, a searchable basis is provided for the task issuing, and the task executing reliability is improved.
And 104, receiving task execution verification information, and updating the task information in the database if the task execution verification information is inconsistent with the task allocation information.
The task execution verification information refers to information for verifying accuracy of an initial task, and real-time performance and accuracy of the task being executed by the execution node can be guaranteed according to the task execution verification information. Illustratively, the task execution verification information includes update information of an initial task or newly added mixed flow task information received by the task receiving end. For example, the task execution verification information comprises the latest information of the live broadcast room of the new mixed flow task in the initial task, and the identity information of each video stream and the main broadcast user in the mixed flow task.
Specifically, after receiving the task execution verification information, performing one-to-one matching operation on the latest task information in the verification information and the task information stored in the database, and if the task matching is successful and the task information is consistent, not performing the operation; if the task matching is successful but the task information is inconsistent, updating the task information in the database by using the corresponding task information in the task execution verification information, finding the corresponding execution node according to the information of the distribution node stored in the database, and performing task replacement operation; if the task in the database is not matched with the task execution verification information, deleting the corresponding task information in the database, and stopping the task being executed on the corresponding execution node; if the task execution verification information exists but the database does not contain the task, distributing the corresponding task according to the load information of each execution node, storing the task distribution information in the database, and issuing the task to the distributed execution node for execution.
By updating the task allocation information in the database according to the received task execution verification information, the real-time performance, accuracy and reliability of task execution on the execution node are guaranteed, the phenomenon that the execution node wastes resources due to the fact that the execution node executes an invalid task is avoided, and the efficiency of executing the task of the execution node is improved.
According to the embodiment of the invention, the execution nodes are allocated to the initial task according to the load condition of the execution nodes, so that the execution efficiency of the execution nodes can be effectively improved, and the phenomenon that the execution nodes are failed due to the overload of part of the execution nodes is avoided, and further the task execution efficiency is reduced; and the task allocation information is stored in the database and then the action of issuing the execution node by the initial task is executed, so that the task allocation information of the database is updated conveniently according to the task execution verification information, the accuracy of executing the task by the execution node is improved, meanwhile, the task allocation information is stored in the database, the task execution state of each execution node is monitored conveniently, and the task execution reliability is improved.
Example two
Fig. 2 is a flowchart of a mixed flow task management method in the second embodiment of the present invention, and the second embodiment is further optimized based on the first embodiment. As shown in fig. 2, the method includes:
203, issuing the initial task to an execution node according to the task allocation information; and step 204 is performed or step 205 is performed.
The first preset time interval is used for setting a period for acquiring real-time task information, and the first preset time interval ensures real-time performance and accuracy of the task, for example, the first preset time interval is 10 seconds, that is, the real-time task information is acquired every 10 seconds. The real-time task information refers to instant task information issued by the service end, and comprises update information of an initial task or newly added task information. For example, as the live broadcast is carried out, the anchor broadcast in the live broadcast room frequently enters the live broadcast room or leaves the live broadcast room, the video stream information of the mixed stream required by the live broadcast room changes, the real-time task information includes task information of the latest mixed stream task, and if the number of anchor broadcasts in the live broadcast room and the identity information of the anchor broadcast do not change, the task information of the mixed stream task in the real-time task information does not change.
Specifically, the real-time task information is acquired according to a preset time interval for acquiring the real-time task information, and the real-time task includes all task information required to be subjected to mixed flow operation at the moment of acquisition, such as change information of initial task information and newly added task information. And matching the real-time task information with the task allocation information stored in the database.
And if the real-time task information contains task information which is not contained in the database, the mixed flow task is a newly added mixed flow task, the mixed flow task is distributed according to the obtained load information of each execution node, distribution information is stored in the database, the distribution information comprises task information and corresponding execution node information, and the task is issued to the execution nodes. The newly added mixed flow task can be timely operated, and the efficiency and the real-time performance of task execution are guaranteed.
If the task allocation information in the database contains the task information which is not contained in the real-time task information, the mixed flow task in the database is deleted by the service side, the execution node information distributed by the mixed flow task is obtained from the database, and the execution operation of the mixed flow task in the execution node is stopped. The timely stopping of the task deletion ensures the saving of the resource of the execution node and improves the efficiency of the execution node for executing the task.
If the mixed flow task in the real-time task information exists in the database but the task information of the mixed flow task does not match, the mixed flow task exists but the content is changed, for example, the identity information of the main broadcast in the live broadcast room is changed, such as changing the main broadcast or adding a new main broadcast. Acquiring the execution node information distributed by the mixed flow task from the database, stopping the execution operation of the mixed flow task which is separated from the main broadcast in the execution node, additionally issuing the newly-added main broadcast mixed flow task to the execution node, and updating the mixed flow task information in the database. And updating the task allocation information in the database and the mixed flow task being executed in the execution node according to the real-time task information so as to ensure the accuracy of the execution task, avoid the occupation of the execution node resources by the invalid task, improve the utilization rate of the execution node resources and ensure the high reliability of the execution task.
And if the task information in the real-time task information is consistent with the task information in the database, no operation is performed.
The second preset time interval is used for setting a period for acquiring information of the executing node executing the task, and the second preset time interval is used for monitoring the executing node executing the task to ensure the accuracy of the executing task. For example, the second preset time interval is set to 15 seconds, that is, the task information being executed by each execution node is acquired every 15 seconds. The task information executed by the execution node refers to the task information which is issued to each node according to the task allocation information.
Specifically, task information being executed by the execution node is acquired according to a preset time interval, and the executed task information comprises live broadcast room information in the mixed flow task and video stream information required to be subjected to mixed flow operation. And matching the acquired executing task information of the executing node with the task allocation information stored in the database.
If the task currently executed in the execution node does not have the task information in the database, which indicates that the mixed flow task may not be stopped from the execution node in time due to network delay or task loss and the like, the mixed flow task is stopped from the execution node, so that the accuracy of the execution node in executing the task is ensured, and the efficiency of executing the mixed flow task is improved.
If the database has task information which is not in the task being executed in the execution node, and the mixed flow task is not issued according to the task allocation information in time due to network delay and the like, the mixed flow task is allocated according to the acquired load information of each execution node, the allocation information is stored in the corresponding mixed flow task in the database, the allocation information comprises the execution node information corresponding to the mixed flow task, and the mixed flow task is issued to the allocated execution node. The completeness and the accuracy of the mixed flow task execution stored in the database are realized, the missing execution of the mixed flow task is avoided, and the efficiency of the mixed flow task execution is further improved.
If the mixed flow task in the execution node exists in the database, but the task information of the mixed flow task of the execution node is not matched with the database, it is indicated that the mixed flow task is not updated in time, for example, the change of the identity information of the anchor in the live broadcast room includes changing the anchor or adding an anchor. However, if the mixed flow task is not updated timely due to network delay and the like, the specific information of the mixed flow task is acquired from the database, the execution operation of the mixed flow task corresponding to the off-line main broadcast flow in the execution node is stopped, and the execution of the mixed flow task corresponding to the newly added main broadcast is added. And updating the mixed flow task being executed in the execution node according to the task information in the database so as to ensure the integrity and the accuracy of the execution task, avoid the occupation of the invalid task on the execution node resource and improve the reliability of the execution node in executing the task.
And if the task information being executed by the execution node is consistent with the information in the database, not operating the task which is matched with the information.
The task information in the execution node is periodically acquired and matched with the task information stored in the database, so that the reliability and accuracy of task execution in the execution node are ensured, and the mixed flow task execution efficiency is improved.
On the basis of the above technical solutions, optionally, the method further includes: and if the reporting information of the execution node is not acquired in a second preset time interval, distributing the tasks distributed to the execution node to the execution nodes except the execution node according to the task distribution information.
Specifically, when the set second preset time interval is reached, the execution task information uploaded by all execution nodes is not received, the execution node information for which the task information is not reported is determined, all the execution task information in the execution node is determined according to the task allocation information in the database, the determined task is redistributed according to the load information of other execution nodes, and the task information in the database is updated, that is, the execution node information corresponding to the task information of the redistributed execution node is updated, so that the accuracy of the task information in the database is ensured. Illustratively, when matching the database according to the acquired task information reported by the executing node, recording the reporting time of the executing node, and if the difference between the reporting time and the current time exceeds 3 times of a second preset time interval, it indicates that the executing node may fail to be offline and cannot continue to operate the issued mixed flow task. The working state of the execution node is monitored by monitoring the acquired reporting time of the execution node, and then the task on the offline execution node is determined according to the task distribution information stored in the database, so that the task is redistributed, the phenomenon that the task on the execution node disappears due to the offline of the execution node is avoided, and the reliability of task execution is improved.
The embodiment of the invention updates the task allocation information stored in the database through the real-time task information, realizes the update of the mixed flow task which is being executed in the execution node according to the actual situation, and improves the accuracy of the task execution of the execution node; and the task information reported by the execution node is obtained to be matched with the corresponding task information in the database, so that the working state of the execution node is monitored, the reliability of the task being executed by the execution node is ensured, and the execution efficiency of the mixed flow task is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a management device for mixed flow tasks in a third embodiment of the present invention, which is applicable to load balancing distribution of mixed flow tasks in large batches while ensuring reliability of executing tasks. As shown in fig. 3, the apparatus includes:
the task allocation information determining module 310 is configured to, when an initial task is received, obtain load information of at least two execution nodes, and allocate the execution nodes to the initial task according to the load information to obtain task allocation information;
the task allocation information storage module 320 is used for storing the task allocation information into a database; the database comprises a corresponding relation between the task information and the execution node information;
an initial task issuing module 330, configured to issue an initial task to an execution node according to the task allocation information;
and the task information updating module 340 is configured to receive the task execution verification information, and update the task information in the database if the task execution verification information is inconsistent with the task allocation information.
According to the embodiment of the invention, the execution nodes are distributed to the initial task according to the load condition of the execution nodes, so that the execution efficiency of the execution nodes can be effectively improved, and the phenomenon that the execution efficiency of the task is reduced due to the fact that part of the execution nodes are overloaded is avoided; and the task allocation information is stored in the database and then the action of issuing the execution node by the initial task is executed, so that the task allocation information of the database is updated conveniently according to the task execution verification information, the accuracy of executing the task by the execution node is improved, meanwhile, the task allocation information is stored in the database, the task execution state of each execution node is monitored conveniently, and the task execution reliability is improved.
Optionally, the task information updating module 340 is specifically configured to:
acquiring real-time task information according to a first preset time interval, and matching the real-time task information with task allocation information stored in the database; and if the real-time task information and the task distribution information have unmatched tasks, redistributing the unmatched tasks and updating the task distribution information in the database.
Optionally, the task information updating module 340 is specifically configured to:
acquiring task information executed by the execution node according to a second preset time interval, and matching the executed task information with task allocation information stored in a database;
and if the executed task information of the execution node is not matched with the task allocation information, updating the task allocation information according to the executed task information.
Optionally, the apparatus further comprises:
and if the reporting information of the execution node is not acquired in a second preset time interval, distributing the tasks distributed to the execution node to the execution nodes except the execution node according to the task distribution information.
Optionally, the load information includes an IP address of the execution node, a used memory, and a current execution task amount.
Optionally, the task information includes: live broadcasting room information of the mixed flow task, and user identity information of each video flow in the mixed flow task.
The mixed flow task management device provided by the embodiment of the invention can execute the mixed flow task management method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the mixed flow task management method.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 4 is only one example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 4, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory device 28, and a bus 18 that couples various system components including the system memory device 28 and the processing unit 16.
The system storage 28 may include computer system readable media in the form of volatile storage, such as Random Access Memory (RAM)30 and/or cache storage 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Storage 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in storage 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system storage device 28, for example, implementing a mixed flow task management method provided by an embodiment of the present invention, including:
when an initial task is received, acquiring load information of at least two execution nodes, and distributing the execution nodes for the initial task according to the load information to obtain task distribution information;
storing the task allocation information into a database; the database comprises a corresponding relation between the task information and the execution node information;
issuing the initial task to an execution node according to the task allocation information;
and receiving task execution verification information, and updating the task information in the database if the task execution verification information is inconsistent with the task allocation information.
EXAMPLE five
The fifth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for managing a mixed flow task, which includes:
when an initial task is received, acquiring load information of at least two execution nodes, and distributing the execution nodes for the initial task according to the load information to obtain task distribution information;
storing the task allocation information into a database; the database comprises a corresponding relation between the task information and the execution node information;
issuing the initial task to an execution node according to the task allocation information;
and receiving task execution verification information, and updating the task information in the database if the task execution verification information is inconsistent with the task allocation information.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A method for managing mixed flow tasks is characterized by comprising the following steps:
when an initial task is received, acquiring load information of at least two execution nodes, and distributing the execution nodes for the initial task according to the load information to obtain task distribution information;
storing the task allocation information into a database; the database comprises a corresponding relation between task information and execution node information;
issuing the initial task to an execution node according to the task allocation information;
and receiving task execution verification information, and updating the task information in the database if the task execution verification information is inconsistent with the task allocation information.
2. The method of claim 1, wherein receiving task execution verification information, and if the task execution verification information is inconsistent with task allocation information, updating the task information in the database comprises:
acquiring real-time task information according to a first preset time interval, and matching the real-time task information with task allocation information stored in the database; and if the real-time task information and the task distribution information have unmatched tasks, redistributing the unmatched tasks and updating the task distribution information in the database.
3. The method of claim 1, wherein receiving task execution verification information, and if the task execution verification information is inconsistent with task allocation information, updating the task information in the database comprises:
acquiring task information executed by the execution node according to a second preset time interval, and matching the executed task information with task allocation information stored in a database;
and if the executed task information of the execution node is not matched with the task allocation information, updating the task allocation information according to the executed task information.
4. The method of claim 3, further comprising:
and if the reporting information of the execution node is not acquired in a second preset time interval, distributing the tasks distributed to the execution node to the execution nodes except the execution node according to the task distribution information.
5. The method of claim 1, wherein the load information comprises an IP address of an executing node, used memory, and a current amount of tasks to execute.
6. The method of claim 5, wherein the task information comprises: live broadcasting room information of the mixed flow task, and user identity information of each video flow in the mixed flow task.
7. A device for managing a mixed flow task, comprising:
the task allocation information determining module is used for acquiring load information of at least two execution nodes when an initial task is received, and allocating the execution nodes for the initial task according to the load information to obtain task allocation information;
the task allocation information storage module is used for storing the task allocation information into a database; the database comprises a corresponding relation between the task information and the execution node information;
the initial task issuing module is used for issuing the initial task to the execution node according to the task distribution information;
and the task information updating module is used for receiving the task execution verification information, and updating the task information in the database if the task execution verification information is inconsistent with the task allocation information.
8. The apparatus of claim 7, wherein the task information update module is specifically configured to:
acquiring real-time task information according to a first preset time interval, and matching the real-time task information with task allocation information stored in the database; and if the real-time task information and the task distribution information have unmatched tasks, redistributing the unmatched tasks and updating the task distribution information in the database.
9. A computer device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of mixed flow task management as claimed in any one of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of managing a mixed flow task according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911212823.XA CN110908806A (en) | 2019-12-02 | 2019-12-02 | Mixed flow task management method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911212823.XA CN110908806A (en) | 2019-12-02 | 2019-12-02 | Mixed flow task management method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110908806A true CN110908806A (en) | 2020-03-24 |
Family
ID=69821594
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911212823.XA Pending CN110908806A (en) | 2019-12-02 | 2019-12-02 | Mixed flow task management method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110908806A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111526386A (en) * | 2020-05-06 | 2020-08-11 | 北京三体云时代科技有限公司 | Data transmission method and device based on auxiliary mixed screen equipment and data transmission system |
CN112965796A (en) * | 2021-03-01 | 2021-06-15 | 亿企赢网络科技有限公司 | Task scheduling system, method and device |
CN114071168A (en) * | 2021-11-16 | 2022-02-18 | 上海哔哩哔哩科技有限公司 | Mixed-flow direct-broadcast stream scheduling method and device |
CN114363651A (en) * | 2022-01-04 | 2022-04-15 | 上海哔哩哔哩科技有限公司 | Live stream processing method and device |
CN114422863A (en) * | 2020-10-13 | 2022-04-29 | 上海哔哩哔哩科技有限公司 | Video interactive live broadcast method and system |
CN114422394A (en) * | 2022-01-19 | 2022-04-29 | 北京鼎兴达信息科技股份有限公司 | Service address utilization rate calculation method, system and equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104461752A (en) * | 2014-11-21 | 2015-03-25 | 浙江宇视科技有限公司 | Two-level fault-tolerant multimedia distributed task processing method |
US20160239350A1 (en) * | 2015-02-12 | 2016-08-18 | Netapp, Inc. | Load balancing and fault tolerant service in a distributed data system |
CN106886452A (en) * | 2017-01-23 | 2017-06-23 | 北京思特奇信息技术股份有限公司 | A kind of method of simplified cloud system task scheduling |
CN109254842A (en) * | 2017-07-12 | 2019-01-22 | 腾讯科技(深圳)有限公司 | Method for managing resource, device and the readable storage medium storing program for executing of distributive type system |
CN109784646A (en) * | 2018-12-14 | 2019-05-21 | 深圳壹账通智能科技有限公司 | Method for allocating tasks, device, storage medium and server |
-
2019
- 2019-12-02 CN CN201911212823.XA patent/CN110908806A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104461752A (en) * | 2014-11-21 | 2015-03-25 | 浙江宇视科技有限公司 | Two-level fault-tolerant multimedia distributed task processing method |
US20160239350A1 (en) * | 2015-02-12 | 2016-08-18 | Netapp, Inc. | Load balancing and fault tolerant service in a distributed data system |
CN106886452A (en) * | 2017-01-23 | 2017-06-23 | 北京思特奇信息技术股份有限公司 | A kind of method of simplified cloud system task scheduling |
CN109254842A (en) * | 2017-07-12 | 2019-01-22 | 腾讯科技(深圳)有限公司 | Method for managing resource, device and the readable storage medium storing program for executing of distributive type system |
CN109784646A (en) * | 2018-12-14 | 2019-05-21 | 深圳壹账通智能科技有限公司 | Method for allocating tasks, device, storage medium and server |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111526386A (en) * | 2020-05-06 | 2020-08-11 | 北京三体云时代科技有限公司 | Data transmission method and device based on auxiliary mixed screen equipment and data transmission system |
CN114422863A (en) * | 2020-10-13 | 2022-04-29 | 上海哔哩哔哩科技有限公司 | Video interactive live broadcast method and system |
CN114422863B (en) * | 2020-10-13 | 2023-05-12 | 上海哔哩哔哩科技有限公司 | Video interactive live broadcast method and system |
CN112965796A (en) * | 2021-03-01 | 2021-06-15 | 亿企赢网络科技有限公司 | Task scheduling system, method and device |
CN112965796B (en) * | 2021-03-01 | 2024-04-09 | 亿企赢网络科技有限公司 | Task scheduling system, method and device |
CN114071168A (en) * | 2021-11-16 | 2022-02-18 | 上海哔哩哔哩科技有限公司 | Mixed-flow direct-broadcast stream scheduling method and device |
CN114071168B (en) * | 2021-11-16 | 2023-09-12 | 上海哔哩哔哩科技有限公司 | Mixed-flow live stream scheduling method and device |
CN114363651A (en) * | 2022-01-04 | 2022-04-15 | 上海哔哩哔哩科技有限公司 | Live stream processing method and device |
CN114422394A (en) * | 2022-01-19 | 2022-04-29 | 北京鼎兴达信息科技股份有限公司 | Service address utilization rate calculation method, system and equipment |
CN114422394B (en) * | 2022-01-19 | 2023-08-29 | 北京鼎兴达信息科技股份有限公司 | Service address utilization rate calculation method, system and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110908806A (en) | Mixed flow task management method, device, equipment and storage medium | |
WO2019205371A1 (en) | Server, message allocation method, and storage medium | |
US9276959B2 (en) | Client-configurable security options for data streams | |
CN106533713B (en) | Application deployment method and device | |
CN111078396B (en) | Distributed data access method and system based on multitasking examples | |
US10482084B2 (en) | Optimized merge-sorting of data retrieved from parallel storage units | |
CN106301865B (en) | Data processing method and device applied to service providing device | |
US8843632B2 (en) | Allocation of resources between web services in a composite service | |
CN110874272A (en) | Resource allocation method and device, computer readable storage medium and electronic device | |
WO2020119060A1 (en) | Method and system for scheduling container resources, server, and computer readable storage medium | |
CN108696571B (en) | Cloud storage service system and method, cloud service intelligent equipment and electronic device | |
CN105049509A (en) | Cluster scheduling method, load balancer and clustering system | |
US20230300086A1 (en) | On-demand resource capacity in a serverless function-as-a-service infrastructure | |
CN111679911A (en) | Management method, device, equipment and medium for GPU (graphics processing Unit) card in cloud environment | |
CN110633046A (en) | Storage method and device of distributed system, storage equipment and storage medium | |
CN113204425A (en) | Method and device for process management internal thread, electronic equipment and storage medium | |
US20200220910A1 (en) | Idempotent processing of data streams | |
CN202872848U (en) | Cloud storage terminal equipment based on cloud information and cloud computing services | |
US9853933B2 (en) | Message queue replication with message ownership migration | |
CN104468710A (en) | Mixed big data processing system and method | |
US11531572B2 (en) | Cross-cluster host reassignment | |
CN106257447A (en) | The video storage of cloud storage server and search method, video cloud storage system | |
US9529416B2 (en) | Rack space power utilization | |
JP2023031248A (en) | Edge computing network, data transmission method, apparatus, device, and storage medium | |
CN111343152B (en) | Data processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200324 |
|
RJ01 | Rejection of invention patent application after publication |