CN112860432A - Process management method, device and server - Google Patents

Process management method, device and server Download PDF

Info

Publication number
CN112860432A
CN112860432A CN202110095647.7A CN202110095647A CN112860432A CN 112860432 A CN112860432 A CN 112860432A CN 202110095647 A CN202110095647 A CN 202110095647A CN 112860432 A CN112860432 A CN 112860432A
Authority
CN
China
Prior art keywords
multimedia data
data stream
request
client
server
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.)
Granted
Application number
CN202110095647.7A
Other languages
Chinese (zh)
Other versions
CN112860432B (en
Inventor
李尾冬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202110095647.7A priority Critical patent/CN112860432B/en
Publication of CN112860432A publication Critical patent/CN112860432A/en
Application granted granted Critical
Publication of CN112860432B publication Critical patent/CN112860432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明实施例提供了一种进程管理方法、装置及服务器。其中,所述方法包括:将所述多个进程划分为多个进程组,其中,每个进程组对应至少一个客户端,并且不同进程组对应于不同的客户端;每当接收到客户端发送的多媒体数据流请求,将所述多媒体数据请求分配至与发送所述多媒体数据流请求的客户端对应的进程组中的进程进行处理。可以通过对进程进行分组,并将客户端分配至不同的进程组中,从而使得多个客户端针对同一多媒体数据流发送的多媒体数据流请求能够被分配至不同的进程进行处理。充分利用了服务器中的各个进程对多媒体数据流请求进行处理,可以有效提高服务器能够并行处理的多媒体数据流请求的数目。

Figure 202110095647

Embodiments of the present invention provide a process management method, device, and server. Wherein, the method includes: dividing the multiple processes into multiple process groups, wherein each process group corresponds to at least one client, and different process groups correspond to different clients; The multimedia data stream request is allocated to a process in a process group corresponding to the client that sends the multimedia data stream request for processing. By grouping processes and assigning clients to different process groups, multimedia data stream requests sent by multiple clients for the same multimedia data stream can be assigned to different processes for processing. Each process in the server is fully utilized to process multimedia data stream requests, which can effectively increase the number of multimedia data stream requests that the server can process in parallel.

Figure 202110095647

Description

Process management method, device and server
Technical Field
The invention relates to the technical field of cloud services, in particular to a process management method, a process management device and a server.
Background
The cloud server stores multimedia data streams, if a user wants to acquire the multimedia data streams through the client, the client can be controlled to send a multimedia data stream request to the server according to the desired multimedia data stream, the server acquires the multimedia data streams according to the multimedia data stream request after receiving the multimedia data stream request, and the acquired multimedia data streams are sent to the client.
The number of multimedia data stream requests that can be processed concurrently by the server is limited by physical resources, and when there are too many multimedia data stream requests received by the server, a new server needs to be erected to process the multimedia data stream requests together, and the erection of the new server will generate additional hardware cost and operation and maintenance cost.
Therefore, how to effectively increase the number of multimedia data stream requests that can be processed by the server in parallel becomes a technical problem to be solved urgently.
Disclosure of Invention
Embodiments of the present invention provide a process management method, an apparatus, and a server, so as to increase the number of multimedia data stream requests that can be processed by the server in parallel. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, there is provided a process management method, applied to a server, where the server runs a plurality of processes, the method including:
dividing the plurality of processes into a plurality of process groups, wherein each process group corresponds to at least one client, and different process groups correspond to different clients;
and each time a multimedia data stream request sent by a client is received, distributing the multimedia data request to a process in a process group corresponding to the client sending the multimedia data stream request for processing.
In a possible embodiment, before the allocating the multimedia data request to a process in a process group corresponding to a client sending the multimedia data stream request for processing, the method further includes:
judging whether the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream or not;
the allocating the multimedia data request to a process in a process group corresponding to a client sending the multimedia data stream request for processing includes:
and if the multimedia data stream requested by the multimedia data stream request is the hot multimedia data stream, distributing the multimedia data request to a process in a process group corresponding to the client sending the multimedia data stream request for processing.
In one possible embodiment, after the determining whether the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream, the method further comprises:
and if the multimedia data stream requested by the multimedia data stream request is not the hot multimedia data stream, distributing the multimedia data request to a process corresponding to the multimedia data stream requested by the multimedia data stream request according to a preset corresponding relation between the multimedia data stream and the process for processing.
In one possible embodiment, before dividing the plurality of processes into a plurality of process groups, the method further comprises:
acquiring the number of process groups;
the dividing the plurality of processes into a plurality of process groups comprises:
dividing the plurality of processes into the number of process groups.
In a possible embodiment, the obtaining the number of process groups includes:
determining the number of process groups according to the heat degree of the hot multimedia data stream, wherein the number of the process groups is positively correlated with the heat degree.
In a second aspect of the embodiments of the present invention, there is provided a process management apparatus applied to a server, where the server runs a plurality of processes, the apparatus including:
the system comprises a process grouping module, a process grouping module and a process grouping module, wherein the process grouping module is used for dividing a plurality of processes into a plurality of process groups, each process group corresponds to at least one client, and different process groups correspond to different clients;
and the request distribution module is used for distributing the multimedia data request to the processes in the process group corresponding to the client sending the multimedia data stream request for processing each time the multimedia data stream request sent by the client is received.
In a possible embodiment, the request allocating module is further configured to determine whether the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream;
the request allocation module is specifically configured to allocate, if the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream, the multimedia data request to a process in a process group corresponding to a client that sends the multimedia data stream request for processing.
In a possible embodiment, the request allocating module is further configured to, if the multimedia data stream requested by the multimedia data stream request is not a hot multimedia data stream, allocate the multimedia data request to a process corresponding to the multimedia data stream requested by the multimedia data stream request according to a preset correspondence between the multimedia data stream and the process, and process the multimedia data request.
In a possible embodiment, the apparatus further includes a grouping configuration module, configured to obtain a number of process groups;
the process grouping module is specifically configured to divide the plurality of processes into the process groups of the number of process groups.
In a possible embodiment, the grouping configuration module is specifically configured to determine the number of process groups according to a heat degree of a hot multimedia data stream, where the number of process groups is positively correlated with the heat degree.
In a third aspect of embodiments of the present invention, there is provided a server, including:
a computer-readable storage medium for storing a computer program;
a processor for implementing the method steps of any of the above first aspects when executing the program stored on the computer readable storage medium.
In a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, performs the method steps of any one of the first aspects.
The embodiment of the invention has the following beneficial effects:
the process management method, the device and the server provided by the embodiment of the invention can distribute the client to different process groups by grouping the processes, so that the multimedia data stream requests sent by a plurality of clients for the same multimedia data stream can be distributed to different processes for processing. The method makes full use of each process in the server to process the multimedia data stream requests, and can effectively improve the number of the multimedia data stream requests which can be processed by the server in parallel.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a process management method according to an embodiment of the present invention;
fig. 2 is another schematic flow chart of a process management method according to an embodiment of the present invention;
fig. 3 is another schematic flow chart of a process management method according to an embodiment of the present invention;
FIG. 4a is a schematic structural diagram of a process management device according to an embodiment of the present invention;
fig. 4b is a schematic structural diagram of a process management apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to more clearly describe the process management method provided by the embodiment of the present invention, an exemplary application scenario of the process management method provided by the embodiment of the present invention will be described below. It should be understood that the following example is only one possible application scenario of the process management method provided in the embodiment of the present invention, and in other possible embodiments, the process management method provided in the embodiment of the present invention may also be applied in other possible application scenarios, and the following example does not limit this.
When a user needs to watch the live broadcast on the client, the client can be controlled to send a multimedia data stream request to the server, wherein the multimedia data stream request is used for requesting a multimedia data stream corresponding to the live broadcast which the user needs to watch. The multimedia data stream request may carry an identifier of the requested multimedia data stream, which is hereinafter referred to as a multimedia data stream identifier.
After receiving the multimedia data stream request, the server may perform hash operation on the multimedia data stream identifier carried by the multimedia data stream to obtain a hash value. And according to the corresponding relation between the preset hash value and the process, returning the multimedia data stream request to the source through the process corresponding to the hash value.
When there are multiple clients sending multimedia data stream requests for the same multimedia data stream, the multiple multimedia data stream requests will be handed back to the source by the same process because the multimedia data streams requested by the multiple multimedia data stream requests are the same. And limited by physical resources such as CPU, memory, etc., the maximum number of requests for a multimedia data stream that a process can load is limited.
However, for some reasons, there may be a large number of clients requesting the same multimedia data stream in the same time period, for example, a hit event may attract a large number of users to watch in the same time period, and then there are a large number of clients requesting the live multimedia data stream corresponding to the hit event in the same time period. If the number of clients requesting the same multimedia data stream in the same time period exceeds the maximum number of multimedia data stream requests that can be loaded by one process, a provider of the live broadcast service needs to establish a new server to return to the source together, so as to meet the requirement of a user for watching live broadcast. And the erection of a new server will result in the increase of hardware cost and operation and maintenance cost of the provider of the live broadcast service.
Based on this, an embodiment of the present invention provides a process management method, which is applied to a server in which a plurality of processes are run, and the method may be as shown in fig. 1, and includes:
s101, dividing a plurality of processes into a plurality of process groups.
S102, when receiving a multimedia data stream request sent by a client, distributing the multimedia data request to a process in a process group corresponding to the client sending the multimedia data stream request for processing.
With the adoption of the embodiment, the processes can be grouped, and the clients can be allocated to different process groups, so that the multimedia data stream requests sent by a plurality of clients for the same multimedia data stream can be allocated to different processes for processing. The method makes full use of each process in the server to process the multimedia data stream requests, and can effectively improve the number of the multimedia data stream requests which can be processed by the server in parallel.
Exemplarily, the maximum number of requests for a multimedia data stream that can be loaded per process is 100, and if the back source is performed in the manner in the foregoing example, a maximum of 100 clients are theoretically allowed to request the same multimedia data stream at the same time without installing a new server, and the same multimedia data stream is referred to as a target multimedia data stream for convenience of description hereinafter.
The process management method provided by the embodiment of the present invention manages the processes in the server, assuming that the processes of the server are divided into 10 process groups, and assuming that the multimedia data stream requests sent by different clients for the target multimedia data stream are uniformly distributed (actually, they may not be uniformly distributed) to the 10 process groups, because each process group has a process for processing the multimedia data stream requests sent for the target multimedia data stream, each process group can load 100 multimedia data stream requests sent for the target multimedia data stream, that is, theoretically, 1000 clients are allowed to request the target multimedia data stream at most in the same time period. Therefore, the number of multimedia data stream requests which can be processed by the server in parallel is obviously increased.
Wherein, in S101, each process group corresponds to at least one client, and different process groups correspond to different clients. The representation form of the correspondence between the process group and the client may be different according to different application scenarios, for example, the representation form may be represented in a function form, may also be represented in a relationship table form, and may also be represented in other forms, which is not limited in this embodiment.
For convenience of description, it is assumed that the correspondence is expressed in the form of a function, and it may be expressed as a function y ═ f (x), where x is a client and y is a process group. The representation form of the client and the process group can also be different according to different application scenarios, for example, in one possible embodiment, the client can be represented by the IP address of the client, and in another possible embodiment, the client can also be represented by the product serial number of the client. In one possible embodiment, the process group may be represented by a sequence number of the process group, and in another possible embodiment, the process group may also be represented by a name of the process group.
F (-) represents a function for mapping x into y, the value range of the function is all process groups, and the specific form of the function can be a hash function in different forms according to different application scenes. For example, assuming that the number of process groups is 10, in one possible embodiment, y ═ f (x) can be as follows:
y=xmod5
where xmod5 represents the remainder of x divided by 5.
In S102, the multimedia data stream in this document may refer to different multimedia data streams according to different application scenes, for example, the multimedia data stream in an application scene of live video may refer to a live video stream, the multimedia data stream in an application scene of video on demand may also refer to a video data stream of a video on demand requested by a user, and the multimedia data stream in an application scene of online music playing may also refer to an audio data stream, which is not limited in this embodiment.
Hereinafter, for convenience of description, a process group corresponding to a client that sends a multimedia data request is referred to as a target process group. In one possible embodiment, the multimedia data stream request may be preferentially assigned to a process in the target process group that is not in an idle state for processing, in consideration of reducing processes for processing the multimedia data stream request. And can preferentially distribute multimedia data stream requests requesting the same multimedia data stream to the same process.
For example, assuming that the target process group includes 3 processes, which are respectively denoted as process 1, process 2, and process 3, and the target process group corresponds to the client 1 and the client 2, and assuming that the process 1 is already used to source back a multimedia data stream request sent by the client 1 for a target multimedia data stream before executing S102, when a multimedia data stream request sent by the client 2 for the target multimedia data stream is received, the multimedia data stream request sent by the client 2 for the target multimedia data stream is also sourced back by the process 1.
The processing manner of the process for the multimedia data stream request may be different according to different application scenarios, for example, the process may determine whether the server locally stores the target data stream, if the server locally stores the target data stream, the process may end the processing of the multimedia data stream request because the server has already acquired the target data stream, and if the server locally does not store the target multimedia data stream, the process may return to the source to acquire the target multimedia data stream.
In another possible embodiment, for load balancing, the multimedia data stream request may be preferentially allocated to the lowest-load process in the target process group for processing, where the lowest-load process may refer to the process with the least number of multimedia data stream requests currently being processed.
Referring to fig. 2, fig. 2 is another schematic flow chart of a process management method according to an embodiment of the present invention, where the method may include:
s201, dividing a plurality of processes into a plurality of process groups.
The step is the same as the foregoing step S101, and reference may be made to the foregoing description related to S101, which is not described herein again.
S202, each time a multimedia data stream request sent by a client is received, determining whether the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream.
The criteria of the hot multimedia data stream may be set by the user according to actual conditions, for example, in a possible embodiment, the hot multimedia data stream may refer to a multimedia data stream with a heat degree greater than a preset heat degree threshold.
The heat of a multimedia data stream may be used to indicate the number of clients expected to request the multimedia data stream in the current time period, the heat of the multimedia data stream is theoretically higher when the number of clients expected to request the multimedia data stream in the current time period is larger, and the heat of the multimedia data stream is theoretically lower when the number of clients expected to request the multimedia data stream in the current time period is smaller.
S203, if the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream, distributing the multimedia data request to the process in the process group corresponding to the client sending the multimedia data stream request for processing.
If the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream, it can be considered that the number of clients requesting the multimedia data stream requested by the multimedia data stream is large, and at this time, the number of multimedia data stream requests that can be issued and processed by the server can be increased as much as possible to cope with the situation that many clients request the same multimedia data stream.
In a possible embodiment, if the multimedia data stream requested by the multimedia data stream request is not a hot multimedia data stream, the process corresponding to the target multimedia data stream requested by the multimedia data stream request may be determined according to a preset correspondence relationship between the multimedia data stream and the process, and the target process is used to return the multimedia data stream request to the source.
It can be understood that, if the multimedia data stream requested by the multimedia data stream request is not a hot multimedia data stream, the number of clients expected to request the multimedia data stream requested by the multimedia data stream request in the current time period may be considered to be small, that is, even if different multimedia data stream requests sent by different clients for the multimedia data stream requested by the multimedia data stream request are sourced back through the same process, the number of the multimedia data stream requests is considered to be within the maximum number of the multimedia data stream requests that can be loaded by the process. Therefore, at this time, it is not necessary to increase the number of multimedia data stream requests that the server can issue and process, but the multimedia data streams transmitted for the same multimedia data stream are returned to the source through the same process as much as possible, so as to reduce the number of processes run by the server.
As analyzed above, the larger the number of process groups divided theoretically, the more the number of multimedia data stream requests that the server can and issue processes increases. And the smaller the number of divided process groups, the smaller the number of processes that the server needs to run.
Different practical requirements may exist in different application scenarios, for example in some application scenarios the service provider may wish to increase as much as possible the number of multimedia data stream requests that the server is able to process in parallel, in other application scenarios the service provider may wish to reduce as much as possible the number of processes that the server needs to run. Therefore, if the number of divided process groups is a fixed value, it may not be applicable to different application scenarios.
Based on this, in a possible embodiment, as shown in fig. 3, fig. 3 shows another possible embodiment of the process management method provided by the embodiment of the present invention, which includes:
s301, acquiring the number of process groups.
The server may be obtained by calculation according to a preset rule, or may be sent to the server after being obtained by calculation according to a preset rule by other electronic devices except the server, or may be determined by relevant personnel according to actual experience or requirements and input to the server.
For example, in one possible embodiment, the number of process groups may be determined according to the popularity of the popular multimedia data stream, wherein the number of process groups is positively correlated with the popularity. It can be understood that if the popularity of a multimedia data stream is higher, it can be considered that the number of clients expected to request the same multimedia data stream in the current time period is larger, and at this time, the number of multimedia data stream requests that can be processed by the server should be increased more to meet the requirement of the user for acquiring the multimedia data stream. If the popularity of a hot multimedia data stream is lower, it can be considered that the number of clients expecting to request the same multimedia data stream in the current time period is smaller, and at this time, the number of multimedia data stream requests that the server can process in parallel should be increased less, so as to reduce the number of processes that the server needs to run as much as possible.
S302, dividing a plurality of processes into a plurality of process groups with the number of process groups.
The dividing mode may be to divide the process into the process groups with the number of process groups uniformly, or to divide the process into the process groups with the number of process groups non-uniformly. And all processes may be divided into process groups of the number of process groups, or some processes may be divided into process groups of the number of process groups, and the rest of the processes are not divided into any process group.
And S303, each time a multimedia data stream request sent by a client is received, distributing the multimedia data request to a process in a process group corresponding to the client sending the multimedia data stream request for processing.
This step is the same as S102, and reference may be made to the related description about S102, which is not repeated herein.
By selecting the embodiment, the number of the process groups can be flexibly changed according to requirements, so that the process management method provided by the embodiment of the invention can be suitable for different application scenes.
Referring to fig. 4a, fig. 4a is a schematic structural diagram of a process management apparatus according to an embodiment of the present invention, where the process management module is applied to a server, the server runs a plurality of processes, and the process management apparatus may include:
a process grouping module 401, configured to divide the plurality of processes into a plurality of process groups, where each process group corresponds to at least one client, and different process groups correspond to different clients;
a request allocating module 402, configured to, each time a multimedia data stream request sent by a client is received, allocate the multimedia data request to a process in a process group corresponding to the client sending the multimedia data stream request for processing.
In a possible embodiment, the request allocating module 402 is further configured to determine whether the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream;
the request allocating module 402 is specifically configured to allocate, if the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream, the multimedia data request to a process in a process group corresponding to a client that sends the multimedia data stream request for processing.
In a possible embodiment, the request allocating module 402 is further configured to, if the multimedia data stream requested by the multimedia data stream request is not a hot multimedia data stream, allocate the multimedia data request to a process corresponding to the multimedia data stream requested by sending the multimedia data stream request according to a preset correspondence between multimedia data streams and processes, and process the multimedia data request.
In a possible embodiment, as shown in fig. 4b, the apparatus further includes a grouping configuration module 403, configured to obtain the number of process groups;
the process grouping module 401 is specifically configured to divide the multiple processes into the process groups of the number of process groups.
In a possible embodiment, the grouping configuration module 403 is specifically configured to determine a number of process groups according to a heat degree of a hot multimedia data stream, where the number of process groups is positively correlated with the heat degree.
An embodiment of the present invention further provides a server, as shown in fig. 5, including:
a computer-readable storage medium 501 for storing a computer program;
the processor 502, when executing the program stored on the computer-readable storage medium 501, implements the following steps:
dividing the plurality of processes into a plurality of process groups, wherein each process group corresponds to at least one client, and different process groups correspond to different clients;
and each time a multimedia data stream request sent by a client is received, distributing the multimedia data request to a process in a process group corresponding to the client sending the multimedia data stream request for processing.
In a possible embodiment, before the allocating the multimedia data request to a process in a process group corresponding to the client sending the multimedia data stream request for processing, the processor 502 may be further configured to perform the following steps:
judging whether the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream or not;
the allocating the multimedia data request to a process in a process group corresponding to a client sending the multimedia data stream request for processing includes:
and if the multimedia data stream requested by the multimedia data stream request is the hot multimedia data stream, distributing the multimedia data request to a process in a process group corresponding to the client sending the multimedia data stream request for processing.
In one possible embodiment, after said determining whether the multimedia data stream requested by the multimedia data stream request is a hot multimedia data stream, the processor 502 may be further configured to perform the following steps:
and if the multimedia data stream requested by the multimedia data stream request is not the hot multimedia data stream, distributing the multimedia data request to a process corresponding to the multimedia data stream requested by the multimedia data stream request according to a preset corresponding relation between the multimedia data stream and the process for processing.
In a possible embodiment, before dividing the plurality of processes into a plurality of process groups, the processor 502 may be further configured to perform the following steps:
acquiring the number of process groups;
the dividing the plurality of processes into a plurality of process groups comprises:
dividing the plurality of processes into the number of process groups.
In a possible embodiment, the obtaining the number of process groups includes:
determining the number of process groups according to the heat degree of the hot multimedia data stream, wherein the number of the process groups is positively correlated with the heat degree.
The server provided by the embodiment of the invention can also comprise a communication bus, a communication interface and the like. The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the process management methods described above.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the process management methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the server, the computer-readable storage medium, and the computer program product, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1.一种进程管理方法,其特征在于,应用于服务器,所述服务器运行有多个进程,所述方法包括:1. A process management method, characterized in that, applied to a server, and the server runs a plurality of processes, the method comprising: 将所述多个进程划分为多个进程组,其中,每个进程组对应至少一个客户端,并且不同进程组对应于不同的客户端;dividing the multiple processes into multiple process groups, wherein each process group corresponds to at least one client, and different process groups correspond to different clients; 每当接收到客户端发送的多媒体数据流请求,将所述多媒体数据请求分配至与发送所述多媒体数据流请求的客户端对应的进程组中的进程进行处理。Whenever a multimedia data stream request sent by a client is received, the multimedia data request is allocated to a process in a process group corresponding to the client that sent the multimedia data stream request for processing. 2.根据权利要求1所述的方法,其特征在于,在所述将所述多媒体数据请求分配至与发送所述多媒体数据流请求的客户端对应的进程组中的进程进行处理之前,所述方法还包括:2 . The method according to claim 1 , wherein, before allocating the multimedia data request to a process in a process group corresponding to the client sending the multimedia data stream request for processing, the Methods also include: 判断所述多媒体数据流请求所请求的多媒体数据流是否为热门多媒体数据流;Judging whether the multimedia data stream requested by the multimedia data stream request is a popular multimedia data stream; 所述将所述多媒体数据请求分配至与发送所述多媒体数据流请求的客户端对应的进程组中的进程进行处理,包括:The process of allocating the multimedia data request to a process group corresponding to the client sending the multimedia data stream request for processing includes: 如果所述多媒体数据流请求所请求的多媒体数据流为热门多媒体数据流,将所述多媒体数据请求分配至与发送所述多媒体数据流请求的客户端对应的进程组中的进程进行处理。If the multimedia data stream requested by the multimedia data stream request is a popular multimedia data stream, the multimedia data request is allocated to a process in a process group corresponding to the client sending the multimedia data stream request for processing. 3.根据权利要求2所述的方法,其特征在于,在所述判断所述多媒体数据流请求所请求的多媒体数据流是否为热门多媒体数据流之后,所述方法还包括:3. The method according to claim 2, characterized in that, after said judging whether the multimedia data stream requested by the multimedia data stream request is a popular multimedia data stream, the method further comprises: 如果所述多媒体数据流请求所请求的多媒体数据流不为热门多媒体数据流,按照预设的多媒体数据流与进程之间的对应关系,将所述多媒体数据请求分配至与发送所述多媒体数据流请求所请求的多媒体数据流对应的进程进行处理。If the multimedia data stream requested by the multimedia data stream request is not a popular multimedia data stream, according to the preset correspondence between the multimedia data stream and the process, the multimedia data stream is allocated and sent to the multimedia data stream. The process corresponding to the requested multimedia data stream is requested to be processed. 4.根据权利要求1所述的方法,其特征在于,在将所述多个进程划分为多个进程组之前,所述方法还包括:4. The method according to claim 1, wherein before dividing the multiple processes into multiple process groups, the method further comprises: 获取进程组数目;Get the number of process groups; 所述将所述多个进程划分为多个进程组,包括:The dividing the multiple processes into multiple process groups includes: 将所述多个进程划分为所述进程组数目个进程组。Dividing the plurality of processes into the number of process groups. 5.根据权利要求4所述的方法,其特征在于,所述获取进程组数目,包括:5. The method according to claim 4, wherein the acquiring the number of process groups comprises: 根据热门多媒体数据流的热度,确定进程组数目,其中,所述进程组数目与所述热度正相关。The number of process groups is determined according to the popularity of popular multimedia data streams, wherein the number of process groups is positively correlated with the popularity. 6.一种进程管理装置,其特征在于,所述装置应用于服务器,所述服务器运行有多个进程,所述装置包括:6. A process management device, wherein the device is applied to a server, and the server runs multiple processes, and the device comprises: 进程分组模块,用于将所述多个进程划分为多个进程组,其中,每个进程组对应至少一个客户端,并且不同进程组对应于不同的客户端;a process grouping module, configured to divide the multiple processes into multiple process groups, wherein each process group corresponds to at least one client, and different process groups correspond to different clients; 请求分配模块,用于每当接收到客户端发送的多媒体数据流请求,将所述多媒体数据请求分配至与发送所述多媒体数据流请求的客户端对应的进程组中的进程进行处理。The request allocation module is configured to, whenever a multimedia data stream request sent by a client is received, allocate the multimedia data request to a process in a process group corresponding to the client that sends the multimedia data stream request for processing. 7.根据权利要求6所述的装置,其特征在于,所述请求分配模块,还用于判断所述多媒体数据流请求所请求的多媒体数据流是否为热门多媒体数据流;7. The device according to claim 6, wherein the request distribution module is also used to judge whether the requested multimedia data flow of the multimedia data flow request is a popular multimedia data flow; 所述请求分配模块,具体用于如果所述多媒体数据流请求所请求的多媒体数据流为热门多媒体数据流,将所述多媒体数据请求分配至与发送所述多媒体数据流请求的客户端对应的进程组中的进程进行处理。The request allocation module is specifically configured to allocate the multimedia data request to a process corresponding to the client sending the multimedia data flow request if the multimedia data flow requested by the multimedia data flow request is a popular multimedia data flow Processes in the group are processed. 8.根据权利要求7所述的装置,其特征在于,所述请求分配模块,还用于如果所述多媒体数据流请求所请求的多媒体数据流不为热门多媒体数据流,按照预设的多媒体数据流与进程之间的对应关系,将所述多媒体数据请求分配至与发送所述多媒体数据流请求所请求的多媒体数据流对应的进程进行处理。8. The device according to claim 7, wherein the request distribution module is also used for, if the requested multimedia data flow of the multimedia data flow request is not a popular multimedia data flow, according to the preset multimedia data flow The corresponding relationship between streams and processes, the multimedia data request is allocated to the process corresponding to the multimedia data stream requested by sending the multimedia data stream request for processing. 9.根据权利要求6所述的装置,其特征在于,所述装置还包括分组配置模块,用于获取进程组数目;9. The device according to claim 6, wherein the device further comprises a grouping configuration module for acquiring the number of process groups; 所述进程分组模块,具体用于将所述多个进程划分为所述进程组数目个进程组。The process grouping module is specifically configured to divide the plurality of processes into the number of process groups of the process groups. 10.根据权利要求9所述的装置,其特征在于,所述分组配置模块,具体用于根据热门多媒体数据流的热度,确定进程组数目,其中,所述进程组数目与所述热度正相关。10. The apparatus according to claim 9, wherein the grouping configuration module is specifically configured to determine the number of process groups according to the heat of popular multimedia data streams, wherein the number of process groups is positively correlated with the heat . 11.一种服务器,其特征在于,包括:11. A server, characterized in that, comprising: 计算机可读存储介质,用于存放计算机程序;A computer-readable storage medium for storing computer programs; 处理器,用于执行所述计算机可读存储介质上所存放的程序时,实现权利要求1-5任一所述的方法步骤。The processor is configured to implement the method steps of any one of claims 1-5 when executing the program stored on the computer-readable storage medium. 12.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-5任一所述的方法步骤。12. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps of any one of claims 1-5 are implemented.
CN202110095647.7A 2021-01-25 2021-01-25 Process management method, device and server Active CN112860432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110095647.7A CN112860432B (en) 2021-01-25 2021-01-25 Process management method, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110095647.7A CN112860432B (en) 2021-01-25 2021-01-25 Process management method, device and server

Publications (2)

Publication Number Publication Date
CN112860432A true CN112860432A (en) 2021-05-28
CN112860432B CN112860432B (en) 2024-12-03

Family

ID=76008413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110095647.7A Active CN112860432B (en) 2021-01-25 2021-01-25 Process management method, device and server

Country Status (1)

Country Link
CN (1) CN112860432B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039881A (en) * 2021-10-19 2022-02-11 创盛视联数码科技(北京)有限公司 Communication connection monitoring method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429783A (en) * 2018-01-16 2018-08-21 重庆金融资产交易所有限责任公司 Electronic device, configuration file method for pushing and storage medium
CN109033360A (en) * 2018-07-26 2018-12-18 腾讯科技(深圳)有限公司 A kind of data query method, apparatus, server and storage medium
US20190036993A1 (en) * 2017-07-27 2019-01-31 Gabriel LAVI Method and a system for facilitating unilateral broadcast of data from a server to a large number of clients, within a wireless lan environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190036993A1 (en) * 2017-07-27 2019-01-31 Gabriel LAVI Method and a system for facilitating unilateral broadcast of data from a server to a large number of clients, within a wireless lan environment
CN108429783A (en) * 2018-01-16 2018-08-21 重庆金融资产交易所有限责任公司 Electronic device, configuration file method for pushing and storage medium
CN109033360A (en) * 2018-07-26 2018-12-18 腾讯科技(深圳)有限公司 A kind of data query method, apparatus, server and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
安海涛;: "多媒体云计算下的大规模数据流调度方法研究", 现代电子技术, no. 20, 15 October 2015 (2015-10-15) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039881A (en) * 2021-10-19 2022-02-11 创盛视联数码科技(北京)有限公司 Communication connection monitoring method
CN114039881B (en) * 2021-10-19 2023-08-08 创盛视联数码科技(北京)有限公司 Communication connection monitoring method

Also Published As

Publication number Publication date
CN112860432B (en) 2024-12-03

Similar Documents

Publication Publication Date Title
CN110032447B (en) Method and apparatus for allocating resources
US10783267B2 (en) Centralized throttling service
CN110519183B (en) Node speed limiting method and device, electronic equipment and storage medium
US20170126583A1 (en) Method and electronic device for bandwidth allocation based on online media services
JP2018525761A (en) Scalable real-time messaging system
CN109379448B (en) File distributed deployment method and device, electronic equipment and storage medium
CN101132373A (en) Methods for providing quality of service for streams
CN108566370B (en) Method and device for returning data to source
CN110830565B (en) Resource downloading method, device, system, electronic equipment and storage medium
CN111355971B (en) Live streaming transmission method and device, CDN server and computer readable medium
CN112445857A (en) Resource quota management method and device based on database
CN104580393A (en) Method and device for expanding server cluster system and server cluster system
CN110620828A (en) File pushing method, system, device, electronic equipment and medium
AU2021343451B2 (en) Configurable access-based cache policy control
CN115250368B (en) Video preheating method, device, equipment and storage medium
CN110300306A (en) Based on RTMP agreement live stream load-balancing algorithm
WO2020125381A1 (en) Method and apparatus for generating information
CN110213349A (en) A kind of HTTP dispatching method and device
CN111478781B (en) Message broadcasting method and device
CN110099292B (en) Data center node determination method and device and electronic equipment
CN112860432B (en) Process management method, device and server
WO2020124726A1 (en) Audio and video stream distribution method in audio and video stream distribution system, and dynamic parent node
CN114077483A (en) Data resource scheduling method, server, system and storage medium
CN110417902B (en) Streaming network service load method, related device and readable storage medium
JP2019526860A (en) Scalable real-time messaging system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant