CN-122001856-A - Video subscription processing method and related device
Abstract
The application relates to the technical field of data processing and discloses a video subscription processing method and a related device, wherein the video subscription processing method comprises the steps of classifying a plurality of first subscription requests in a first subscription request set according to a first subscription parameter to obtain a subscription request subset; dividing a subscription request subset into a plurality of subscription request groups according to a second subscription parameter, aggregating all first subscription requests in the subscription request groups into a second subscription request, constructing a second subscription request set according to the second subscription request, and sending the second subscription request set to a corresponding video sending end to obtain videos corresponding to the second subscription request set. The method and the device can improve the processing efficiency of the subscription request by dividing and processing the subscription request aggregate according to the first subscription parameter and the second subscription parameter to obtain a second request aggregate and then sending the second subscription request aggregate to the corresponding video sending end to obtain the video corresponding to the second subscription request aggregate.
Inventors
- ZHANG LINGJIE
Assignees
- 广州视臻信息科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241105
Claims (11)
- 1. A method for subscription processing of video, the method comprising: acquiring a plurality of first subscription requests sent by a plurality of video receiving terminals, wherein the first subscription requests comprise first subscription parameters, second subscription parameters and information of subscribed video sending terminals; Classifying a plurality of first subscription requests in a fixed time period according to subscribed video sending terminals to obtain a first subscription request set, wherein one first subscription request set corresponds to one video sending terminal; classifying a plurality of first subscription requests in the first subscription request set according to a first subscription parameter to obtain a subscription request subset; Dividing the subscription request subset into a plurality of subscription request groups according to a second subscription parameter; Aggregating all first subscription requests in the subscription request group into second subscription requests, wherein one second subscription request corresponds to one subscription request group; Constructing a second subscription request set according to the second subscription requests, wherein the second subscription request set comprises all second subscription requests corresponding to the same video sending end; and sending the second subscription request set to a corresponding video sending end, and obtaining videos corresponding to the second subscription request set.
- 2. The method according to claim 1, wherein the method is applied to a server, the server is respectively connected to a video receiving end and a video sending end, the sending the second subscription request set to a corresponding video sending end, and obtaining a video corresponding to the second subscription request set includes: The second subscription request set is sent to the video sending end, so that the video sending end returns corresponding videos according to the second subscription request set; And after receiving the video sent by the video sending end, sending the video to a corresponding video receiving end.
- 3. The method of claim 2, wherein prior to aggregating the first subscription requests for a fixed period of time into one first set of subscription requests, the method further comprises: acquiring the frame rate of the video sent by the video sending end; and determining a fixed time period corresponding to the first subscription request according to the frame rate, wherein the fixed time period=a preset coefficient is the inverse of the frame rate.
- 4. The method of claim 1, wherein the first subscription parameter comprises a resolution, and wherein classifying the plurality of first subscription requests in the first set of subscription requests according to the first subscription parameter to obtain the subset of subscription requests comprises: acquiring resolution corresponding to the first subscription request; Classifying the first subscription requests in the subscription request total set according to the resolution corresponding to the first subscription requests to obtain first subsets, wherein the resolution corresponding to the first subscription requests in each first subset is the same; Acquiring a frame rate corresponding to the first subscription request; Classifying the first subsets according to the frame rate corresponding to the first subscription requests to obtain second subsets, and determining the second subsets as subscription request subsets, wherein the frame rate corresponding to the first subscription requests in each second subset is the same.
- 5. The method of claim 1, wherein the second subscription parameter comprises a bit rate, and wherein the dividing the subset of subscription requests into a number of subscription request groups according to the second subscription parameter comprises: Acquiring bit rate corresponding to a first subscription request in the subscription request subset; obtaining the maximum value and the minimum value of the bit rate corresponding to the first subscription request according to the bit rate corresponding to the first subscription request; Determining a range interval of the bit rate according to the maximum value and the minimum value; Equally dividing the range interval of the bit rate into a plurality of subintervals; And dividing the subscription request subset into a plurality of subscription request groups according to the subintervals, wherein one subscription request group corresponds to one subinterval.
- 6. The method of claim 5, wherein aggregating the first subscription request in the set of subscription requests into the second subscription request comprises: and aggregating the first subscription requests with the same resolution and frame rate in the subscription request group into a second subscription request, wherein the bit rate of the second subscription request is the minimum bit rate corresponding to the first subscription request in the subscription request group.
- 7. The method of claim 6, wherein constructing a second set of subscription requests from the second subscription request comprises: Acquiring all second subscription requests in a current fixed time period; And merging all the second subscription requests into a second subscription request set to construct the second subscription request set.
- 8. The subscription processing method of the video is characterized by being applied to a video sending end, wherein the video sending end is connected with a server, and the method comprises the following steps: receiving a second subscription request set sent by the server, and acquiring resolution, frame rate and bit rate corresponding to the second subscription request; Judging whether the resolution and the frame rate corresponding to the second subscription request are equal to the resolution and the frame rate corresponding to the subscription request stored in the video sending end; If the resolution and the frame rate corresponding to the second subscription request are equal to the resolution and the frame rate corresponding to the current video in the video sending end, combining the second subscription request with the subscription request stored in the video sending end to obtain a third subscription request, wherein the bit rate corresponding to the third subscription request is a smaller value in the bit rate corresponding to the second subscription request and the subscription request stored in the video sending end; And sending the video corresponding to the third subscription request to the server according to the third subscription request.
- 9. A subscription processing system for video, the system comprising: The system comprises a server, a plurality of video receiving terminals and a plurality of video transmitting terminals; the video receiving end is in communication connection with the server and is used for sending a first subscription request to the server; The server is respectively in communication connection with the video receiving end and the video sending end, and is used for executing the video subscription processing method according to any one of claims 1-7 so as to send the obtained second subscription request set to the corresponding video sending end; The video sending end is in communication connection with the server and is used for receiving a second subscription request set sent by the server and returning videos corresponding to the second subscription requests to the server according to the second subscription request set.
- 10. An electronic device, comprising: At least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of subscription processing of video according to any one of claims 1-7 or claim 8.
- 11. A non-transitory computer readable storage medium, wherein a computer program or instructions is stored in the non-transitory computer storage medium, which when executed, implements the method of subscription processing of video according to any one of claims 1-7 or claim 8.
Description
Video subscription processing method and related device Technical Field The embodiment of the application relates to the technical field of data processing, in particular to a video subscription processing method and a related device. Background The SFU architecture (SELECTIVE FORWARDING UNIT) is an architecture that routes and forwards client audio-video data streams through a server. In the architecture, the server is mainly responsible for forwarding media or storage media without directly performing higher-computation-power requirements such as encoding, transcoding, decoding, mixing and the like, and the SFU architecture is commonly used for network architectures in video conferences and real-time communication systems and is widely applied to scenes such as multi-person video calls, live broadcasting, online education and the like. Under the SFU architecture, the video receiving end subscribes to the video by sending a subscription request to the server, wherein the subscription request comprises the identification of the video sending end, the resolution of the video sending end, the frame rate of the video sending end and the bit rate of the video sending end. When the server receives the subscription requests, the server forwards all the subscription requests to the sending end of the video sending end, and the video sending end decides what video picture to send according to the subscription requests. At present, the server in the scheme of the prior art is only used for forwarding the subscription request sent by the video receiving end to the video sending end, and does not process the subscription request, when the number of the session increases, the server needs to process a large number of subscription requests at the same time, so that the server needs to process and forward the subscription request frequently, and when a plurality of video receiving ends initiate subscription to the same video sending end, the video sending end can process calculation of three dimensions of resolution, frame rate and bit rate in all the subscription requests frequently, so as to determine the resolution, frame rate and bit rate of the video to be sent, and further the processing efficiency of the subscription request is reduced. Disclosure of Invention The embodiment of the application provides a video subscription processing method and a related device, wherein the subscription processing method comprises the steps of dividing and processing a subscription request total set according to a first subscription parameter and a second subscription parameter to obtain a second request set, and then sending the second subscription request set to a corresponding video sending end to obtain a video corresponding to the second subscription request set. The embodiment of the application provides the following technical scheme: In a first aspect, an embodiment of the present application provides a method for subscription processing of video, where the method includes: Acquiring a plurality of first subscription requests sent by a plurality of video receiving terminals, wherein the first subscription requests comprise first subscription parameters, second subscription parameters and information of subscribed video sending terminals; classifying a plurality of first subscription requests in a fixed time period according to subscribed video sending terminals to obtain a first subscription request set, wherein one first subscription request set corresponds to one video sending terminal; Classifying a plurality of first subscription requests in a first subscription request set according to the first subscription parameters to obtain a subscription request subset; Dividing the subscription request subset into a plurality of subscription request groups according to the second subscription parameters; Aggregating all first subscription requests in the subscription request group into second subscription requests, wherein one second subscription request corresponds to one subscription request group; constructing a second subscription request set according to the second subscription requests, wherein the second subscription request set comprises all second subscription requests corresponding to the same video sending end; and sending the second subscription request set to a corresponding video sending end, and obtaining videos corresponding to the second subscription request set. In some embodiments, the method is applied to a server, the server is respectively connected with a video receiving end and a video sending end, and sends a second subscription request set to a corresponding video sending end, and obtains a video corresponding to the second subscription request set, including: The second subscription request set is sent to the video sending end, so that the video sending end returns the corresponding video according to the second subscription request set; and after receiving the video sent by the video sending end, sen