Video processing system, method, device, electronic device and storage medium

By utilizing video identification, caching, and fragmented downloading technologies in the video processing system, the problems of slow video processing speed and repeated downloading are solved, an efficient video processing process is realized, and the cost and access difficulty are reduced.

CN116033187BActive Publication Date: 2024-08-30BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310011807.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-05
Publication Date
2024-08-30
Estimated Expiration
2043-01-05

AI Technical Summary

Technical Problem

In the existing technology, the entire video needs to be downloaded during video processing, resulting in slow video processing, and multiple requests for the same video will result in repeated downloads, which wastes time and resources.

Method used

Design a video processing system, including client, object storage server and video processing server. The same video processing request is forwarded to the same video processing server through video identification. Caching and fragmented download technology are used to avoid repeated downloading of the same video. Video, improve processing speed.

Benefits of technology

It improves video processing speed, reduces traffic costs and business access difficulty. Through caching and fragmented download technology, it saves the time and resources for downloading complete videos, and achieves a more efficient video processing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116033187B
    Figure CN116033187B
Patent Text Reader

Abstract

The embodiments of the present invention provide a video processing system, method, device, electronic device and storage medium, which are applied to the field of computer applications, wherein the video processing system includes: a client, an object storage service and a video processing service, wherein the client is used to send a video processing request, the video processing request includes a video identifier of a video to be processed; the object storage service is used to receive the video processing request; determine the video processing service corresponding to the video identifier; forward the video processing request to the video processing service; the video processing service is used to receive the video processing request and obtain the processing result or the video to be processed corresponding to the video identifier based on the video identifier. The video processing system, method, device, electronic device and storage medium provided by the embodiments of the present invention can improve the video processing speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and in particular to a video processing system, method, device, electronic equipment and storage medium. Background Art

[0002] Object storage (OSS) is used to store a large number of videos produced by video services. In related technologies, if the upstream business needs to perform some processing operations on the videos, such as video screenshots, GIF (Image Interchange Format) extraction, etc., for each video request, the complete video needs to be downloaded from the object storage first, and then some processing operations can be performed on the video to obtain the video processing results, which will result in slower video processing speed. Summary of the invention

[0003] The purpose of the embodiments of the present invention is to provide a video processing system, method, device, electronic device and storage medium to improve the video processing speed. The specific technical solution is as follows:

[0004] In a first aspect, an embodiment of the present invention provides a video processing system, the system comprising: a client, an object storage service, and a video processing service;

[0005] The client is used to send a video processing request, where the video processing request includes a video identifier of a video to be processed;

[0006] The object storage service end is used to receive the video processing request; determine the video processing service end corresponding to the video identifier; and forward the video processing request to the video processing service end;

[0007] The video processing server is used to receive the video processing request and obtain the processing result or the video to be processed corresponding to the video identifier based on the video identifier.

[0008] Optionally, the object storage service client is specifically used to determine the storage location of the video to be processed according to the video identifier, and determine a video processing server whose distance to the storage location is within a preset range as the video processing server corresponding to the video identifier.

[0009] Optionally, the video processing request further includes video processing parameters;

[0010] The video processing server is specifically configured to obtain the first processing result from the result cache when the result cache contains the first processing result corresponding to the video identifier and the video processing parameter.

[0011] Optionally, the video processing server is specifically used to determine whether the video cache contains the video to be processed corresponding to the video identifier and the video processing parameters when the result cache does not contain the first processing result corresponding to the video identifier and the video processing parameters, and to obtain the video to be processed from the video cache when the video cache contains the video to be processed corresponding to the video identifier and the video processing parameters.

[0012] Optionally, the object storage service client is further configured to obtain an authorized address based on the storage location of the video to be processed, and forward the authorized address of the video to be processed to the video processing service client;

[0013] The video processing server is specifically configured to download the video to be processed from the authorized address when the video cache does not contain the video to be processed corresponding to the video identifier and the video processing parameter.

[0014] Optionally, the video processing server is specifically configured to segment the video to be processed in the authorized address according to the video processing parameter, obtain a video segment address, and download the video segment from the video segment address.

[0015] Optionally, the video processing server is further configured to process the video segment according to the video processing parameter to obtain a second processing result, and cache the second processing result in a result cache.

[0016] Optionally, the video processing server is specifically used to obtain a cache key value based on the video processing parameters and attribute information of the video to be processed, and obtain the first processing result from the result cache based on the cache key value, when the result cache contains the first processing result corresponding to the video identifier and the video processing parameters.

[0017] Optionally, the video processing parameter includes a video processing type;

[0018] The video processing server is specifically used to distribute the video processing request to the processing module corresponding to the video type; when the result cache contains the first processing result corresponding to the video identifier and the video processing parameters, the first processing result is obtained from the result cache through the processing module.

[0019] In a second aspect, an embodiment of the present invention further provides a video processing method, which is applied to a video processing system, wherein the video processing system includes an object storage service end and a video processing service end, and the method includes:

[0020] The object storage service receives a video processing request sent by a client; the video processing request includes a video identifier of a video to be processed; determines a video processing service corresponding to the video identifier; and forwards the video processing request to the video processing service;

[0021] The video processing server receives the video processing request sent by the object storage service client, and obtains a processing result or a to-be-processed video corresponding to the video identifier based on the video identifier.

[0022] Optionally, the determining the video processing server corresponding to the video identifier includes:

[0023] The object storage service client determines the storage location of the to-be-processed video according to the video identifier, and determines a video processing service client whose distance from the storage location is within a preset range as the video processing service client corresponding to the video identifier.

[0024] Optionally, the video processing request further includes video processing parameters; and obtaining the processing result or the video to be processed corresponding to the video identifier based on the video identifier includes:

[0025] When the result cache contains the first processing result corresponding to the video identifier and the video processing parameter, the video processing server obtains the first processing result from the result cache.

[0026] Optionally, obtaining the processing result or the to-be-processed video corresponding to the video identifier based on the video identifier includes:

[0027] When the result cache does not contain the first processing result corresponding to the video identifier and the video processing parameters, the video processing server determines whether the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters; when the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters, the video processing server obtains the to-be-processed video from the video cache.

[0028] Optionally, after determining the video processing server corresponding to the video identifier, the method further includes:

[0029] The object storage service client obtains an authorized address based on the storage location of the video to be processed, and forwards the authorized address of the video to be processed to the video processing service client;

[0030] The obtaining, based on the video identifier, a processing result or a video to be processed corresponding to the video identifier includes:

[0031] When the video cache does not contain the video to be processed corresponding to the video identifier and the video processing parameter, the video processing server downloads the video to be processed from the authorized address.

[0032] Optionally, downloading the video to be processed from the authorized address includes:

[0033] The video processing server segments the to-be-processed video in the authorized address according to the video processing parameters to obtain a video segment address; and downloads the video segment from the video segment address.

[0034] Optionally, after downloading the video segment from the video segment address, the method further includes:

[0035] The video processing server processes the video clip according to the video processing parameters to obtain a second processing result; and caches the second processing result in the result cache.

[0036] Optionally, when the video processing server includes the first processing result corresponding to the video identifier and the video processing parameter in a result cache, obtaining the first processing result from the result cache includes:

[0037] When the video processing server includes the first processing result corresponding to the video identifier and the video processing parameters in the result cache, the cache key value is obtained according to the video processing parameters and the attribute information of the video to be processed; and the first processing result is obtained from the result cache according to the cache key value.

[0038] Optionally, the video processing parameter includes a video processing type; when the video processing server includes the video identifier and a first processing result corresponding to the video processing parameter in a result cache, obtaining the first processing result from the result cache includes:

[0039] The video processing server distributes the video processing request to the processing module corresponding to the video type; when the result cache contains the first processing result corresponding to the video identifier and the video processing parameters, the first processing result is obtained from the result cache through the processing module.

[0040] In a third aspect, an embodiment of the present invention further provides a video processing device, which is applied to a video processing system, wherein the video processing system includes an object storage service end and a video processing service end, wherein the object storage module includes a first receiving module, a determining module, and a first forwarding module, and the video processing service end includes a second receiving module and an acquiring module, and the device includes:

[0041] The first receiving module is used to receive a video processing request sent by a client; the video processing request includes a video identifier of a video to be processed;

[0042] The determination module is used to determine the video processing server corresponding to the video identifier;

[0043] The first forwarding module is used to forward the video processing request to the video processing server;

[0044] The second receiving module is used to receive a video processing request sent by the object storage service;

[0045] The acquisition module is used to acquire the processing result or the to-be-processed video corresponding to the video identifier based on the video identifier.

[0046] Optionally, the determination module is specifically used to determine the storage location of the video to be processed according to the video identifier, and determine a video processing server whose distance to the storage location is within a preset range as the video processing server corresponding to the video identifier.

[0047] Optionally, the video processing request further includes video processing parameters; and the acquisition module includes:

[0048] The first acquisition submodule is configured to acquire the first processing result from the result cache when the result cache contains the first processing result corresponding to the video identifier and the video processing parameter.

[0049] Optionally, the acquisition module includes:

[0050] The second acquisition submodule is used to determine whether the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters when the result cache does not contain the first processing result corresponding to the video identifier and the video processing parameters; and to acquire the to-be-processed video from the video cache when the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters.

[0051] Optionally, the object storage service further includes a second forwarding module, and the device further includes:

[0052] The second forwarding module is used to obtain an authorized address based on the storage location of the video to be processed after determining the video processing server corresponding to the video identifier, and forward the authorized address of the video to be processed to the video processing server;

[0053] The acquisition module comprises:

[0054] The download submodule is used to download the video to be processed from the authorized address when the video cache does not contain the video to be processed corresponding to the video identifier and the video processing parameter.

[0055] Optionally, the download submodule is specifically configured to segment the to-be-processed video in the authorized address according to the video processing parameter to obtain a video segment address; and download the video segment from the video segment address.

[0056] Optionally, the acquisition module further includes:

[0057] The cache submodule is used for, after downloading the video segment from the video segment address, processing the video segment according to the video processing parameter to obtain a second processing result; and caching the second processing result in the result cache.

[0058] Optionally, the first acquisition submodule is specifically used to, when the result cache contains the first processing result corresponding to the video identifier and the video processing parameters, obtain a cache key value according to the video processing parameters and attribute information of the video to be processed; and obtain the first processing result from the result cache according to the cache key value.

[0059] Optionally, the video processing parameters include a video processing type; the first acquisition submodule is specifically used to distribute the video processing request to a processing module corresponding to the video type; when the result cache contains a first processing result corresponding to the video identifier and the video processing parameters, the first processing result is obtained from the result cache through the processing module.

[0060] In a fourth aspect, an embodiment of the present invention further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0061] Memory, used to store computer programs;

[0062] The processor is used to implement any of the above method steps when executing the program stored in the memory.

[0063] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above method steps is implemented.

[0064] In a sixth aspect, an embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above method steps.

[0065] In the technical solution of the embodiment of the present invention, the video processing system includes: a client, an object storage service and a video processing server; wherein the client is used to send a video processing request, the video processing request includes a video identifier of a video to be processed; the object storage service is used to receive the video processing request; determine the video processing server corresponding to the video identifier; forward the video processing request to the video processing server; the video processing server is used to receive the video processing request and obtain the processing result or the video to be processed corresponding to the video identifier based on the video identifier. When the client sends a video processing request, the object storage service can forward the video processing request with the same video identifier to the same video processing server according to the video identifier of the video to be processed, and use the same video processing server to process the same video to be processed, and can reuse the processing result or the video to be processed corresponding to the unified video identifier, thereby avoiding wasting time due to repeated downloading of the same video when processing the video to be processed, thereby improving the video processing speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0067] Figure 1 Schematic diagram of the first structure of the video processing system in the embodiment of the present invention.

[0068] Figure 2 The present invention is a flowchart of video processing steps performed by the object storage service end.

[0069] Figure 3 The figure is a flow chart of video processing steps executed by a video processing server in an embodiment of the present invention.

[0070] Figure 4 FIG. 2 is a schematic diagram of a second structure of a video processing system in an embodiment of the present invention.

[0071] Figure 5 Flow chart of a video processing method in an embodiment of the present invention.

[0072] Figure 6 FIG. 4 is a schematic diagram of the structure of a video processing device in an embodiment of the present invention.

[0073] Figure 7 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0074] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0075] When processing a video, for each video processing request, the traditional method requires downloading the entire video first, and then performing various video processing operations on the video to obtain the video processing result. Understandably, if multiple video processing requests are for the same video to be processed, then using the traditional method to process the video requires downloading the video to be processed once for each video processing request, that is, the same video to be processed is downloaded repeatedly, resulting in unnecessary time waste, which in turn leads to a longer video processing process and a slow video processing speed.

[0076] In order to improve the video processing speed, such as Figure 1 As shown, an embodiment of the present invention provides a video processing system, including: a client 101, an object storage service 102 and a video processing service 103.

[0077] Client 101, used to send a video processing request;

[0078] The video processing request includes the video identifier of the video to be processed.

[0079] The object storage service end 102 is used to receive a video processing request; determine a video processing service end 103 corresponding to the video identifier; and forward the video processing request to the video processing service end 103 .

[0080] The video processing server 103 is used to receive a video processing request and obtain a processing result or a video to be processed corresponding to the video identifier based on the video identifier.

[0081] In the technical solution of the embodiment of the present invention, when the client sends a video processing request, the object storage service end can forward the video processing request with the same video identifier to the same video processing server end according to the video identifier of the video to be processed, and use the same video processing server end to process the same video. The processing results or the video to be processed corresponding to the unified video identifier can be reused, thereby avoiding time-consuming repeated downloading of the same video when processing the video to be processed, thereby improving the video processing speed.

[0082] At the same time, using a unified video processing server to process video processing requests for videos to be processed with the same video ID can reduce the number of downloads of the same video, thereby reducing traffic costs. The object storage service client allocates a unified video processing server to various video processing requests with the same video ID, which can better standardize the processing interface and reduce the difficulty of business access.

[0083] Reference Figure 1 , a video processing system provided by an embodiment of the present invention is described in detail. The video processing system includes: a client 101, an object storage service 102 and a video processing service 103.

[0084] Client 101, used to send a video processing request;

[0085] The video processing request includes the video identifier of the video to be processed.

[0086] The client, which can also be referred to as Client, can send video processing requests through Hyper Text Transfer Protocol (HTTP), which can specifically include screenshot requests, reverse display requests, GIF extraction requests, etc. The video identifier can include region information. According to the received video processing request, the region information (region information) where the video is stored can be determined. It can be understood that the region information can also refer to the address of the video to be processed, that is, the storage location (video address) of the video to be processed. For example, in the request

[0087] http: / / bj.oss.XXX.storage / {bucket} / xx.mp4?x-oss-process=video / snapshot,t_1000_2000,f_jpg,w_800

[0088] In the example, http: / / bj.oss.XXX.storage / {bucket} / xx.mp4 indicates the video address of video xx.mp4, where {bucket} is the bucket name.

[0089] The object storage service end 102 is used to receive a video processing request; determine a video processing service end corresponding to the video identifier; and forward the video processing request to the video processing service end.

[0090] The object storage service end 102 may be an operation support system (OSS). OSS is an integrated information resource sharing support system of telecommunications operators. It is mainly composed of network management, system management, billing, business, accounting and customer service, and the systems are organically integrated through a unified information bus. It has the characteristics of multi-service, full-process, automatic, real-time, flexible and manageable. A large number of videos produced by video services can be stored in OSS. OSS can record the actual address, area, size and other information of the video, and can provide information support for subsequent video processing operations.

[0091] The object storage service end 102 is also used to authenticate the video processing request.

[0092] After receiving the video processing request sent by the client 101, it is necessary to authenticate the video processing request to verify whether the user who uses the client 101 to initiate the video processing request has the right to initiate the video processing request. Specifically, it can be based on the video processing type in the video processing request sent by the client 101, to verify whether the client 101 that initiates the request has the authority to perform the video processing operation.

[0093] In one practicable manner, for video screenshot requests, only users who meet specific conditions can initiate them, where the specific conditions may be that the user's login time is greater than a preset time, the user's age is greater than a preset value, etc. If the preset conditions are not met, the user will receive a prompt message indicating that the user has no permission, prompting the user that the screenshot failed.

[0094] If the user authentication fails, the object storage service 102 may return an authentication failure prompt message to the client 101, prompting the request initiator that the request initiator does not have permission to perform the video processing operation. The request initiator may continue the operation after obtaining permission.

[0095] The video identifier includes regional information. In one achievable method, in a video processing request, the regional information of the video to be processed points to region 1, such as Beijing, and the corresponding video processing server 103 can be the video processing server 103 of region 1, that is, the Beijing video processing server.

[0096] In one achievable manner, the object storage service end 102 is specifically used to determine the storage location of the video to be processed according to the video identifier, and determine the video processing service end 103 whose distance from the storage location is within a preset range as the video processing service end 103 corresponding to the video identifier.

[0097] It can be understood that according to the video identifier of the video to be processed, the storage location of the video to be processed can be determined, and the video processing server 103 corresponding to the video identifier can be a video processing server 103 whose distance from the storage location of the video to be processed is within a preset range, that is, it can be a video processing server 103 having the same area information as the video. At the same time, the video processing server 103 can be regarded as a video processing server closest to the video storage.

[0098] In actual applications, video processing requests are not one-time. If multiple requests are made for a video resource, in order to avoid video processing requests for the same video reaching different servers, resulting in unnecessary multiple downloads and wasting resources and time, in one feasible way, an Nginx proxy can be added in front of the video processing service.

[0099] Nginx (engine x) is a high-performance HTTP and reverse proxy web (Internet) server that occupies little memory and has strong concurrency capabilities.

[0100] After adding Nginx proxy, the URL_hash load balancing strategy is used to forward the same URL (Uniform Resource Locator System), that is, the video processing request for the same video, to the same server, that is, the same video processing server. According to the video ID, the video processing requests with the same video ID are dispatched to the same video processing server. Using the same video processing server to process the video processing requests for the same video can reduce traffic costs and increase download speed.

[0101] After determining the video processing server 103 corresponding to the video to be processed, the video processing request may be forwarded to the video processing server 103 so that the video processing server 103 executes the video processing process to obtain a processing result.

[0102] The video processing server 103 is used to receive a video processing request and obtain a processing result or a video to be processed corresponding to the video identifier based on the video identifier.

[0103] The video processing request may include video processing parameters. Taking the above request as an example,

[0104] http: / / bj.oss.XXX.storage / {bucket} / xx.mp4?x-oss-process=video / snapshot,t_1000_2000,f_jpg,w_800

[0105] Among them, x-oss-process=video / snapshot,t_1000_2000,f_jpg,w_800 represents the request parameters, corresponding to the request parameter format x-oss-process=video / {process},{extra_params}. {process} represents various processing types, and {extra_params} is the processing parameters corresponding to various processing types.

[0106] Based on this, x-oss-process=video / snapshot,t_1000_2000,f_jpg,w_800

[0107] It can be indicated that, for the video at the time of 1000 and 2000 milliseconds, the processing type is snapshot, that is, the processing operation of the video screenshot, and the result is in jpg (Joint Photographic Experts Group) format with a width of 800.

[0108] In one achievable manner, the processing result may be obtained from the result cache.

[0109] The video processing server 103 obtains the first processing result from the result cache when the result cache contains the first processing result corresponding to the video identifier and the video processing parameter.

[0110] The result cache is used to cache the results of executed video processing. Since the result of the processed video is generally much smaller than the unprocessed video, for example, video information can be a json (JavaScript Object Notation, JS object notation), a screenshot can be a picture, and a GIF extraction is a GIF composed of multiple pictures. Therefore, the result cache can use cloud storage to cache smaller processing results in the cloud.

[0111] The situation where the result cache contains the first processing result corresponding to the video identifier and the video processing parameters indicates that the processing operation has been completed before the current video processing request is initiated, and the first processing result corresponding to the video identifier and the video processing parameters in the result cache is the processing result obtained after the same operation was performed previously and cached in the result cache.

[0112] In one achievable method, the video processing server 103 is specifically used to distribute the video processing request to the processing module corresponding to the video type; when the result cache contains the first processing result corresponding to the video identifier and the video processing parameters, the first processing result is obtained from the result cache through the processing module.

[0113] The video processing parameters include the video processing type. After receiving the video processing request, the video processing server 103 determines the processing module corresponding to the video processing type according to the video processing parameters. For example, if the video processing type included in the received video processing request is video screenshot, the video processing request is distributed to the video screenshot processing module. If the video processing type included in the received video processing request is video reverse display, the video processing request is distributed to the video reverse display processing module, and so on. No more examples are given for the remaining video processing types and their corresponding processing modules.

[0114] In an example, the result caches corresponding to different processing modules may be different. Before obtaining the first processing result, the processing module may be determined first, and then the first processing result may be obtained from the result cache.

[0115] In one implementation, the video processing server 103 is specifically used to obtain a cache key value based on the video processing parameters and attribute information of the video to be processed, when the result cache contains a first processing result corresponding to the video identifier and the video processing parameters, and obtain the first processing result from the result cache based on the cache key value.

[0116] The video identifier may include the name of the video to be processed, and the video processing parameters include the video processing type and the time information to be processed, wherein the video processing type may be video screenshot, reverse display, GIF extraction, etc., and the time information to be processed may be a time point or a time period. For example, if the video processing type is video screenshot and the time information to be processed is 1000 milliseconds, it means that a screenshot of the video at 1000 milliseconds is taken. The attribute information of the video to be processed may be the inherent information of the video to be processed itself, such as the video name, video size, storage information, version information, etc.

[0117] According to the video processing parameters and the attribute information of the video to be processed, a cache key value can be obtained, and the first processing result can be obtained from the result cache according to the cache key value.

[0118] The cache key value, also called the cache key value, may include attribute information of the object storage service about the video to be processed, such as the bucket name, the video object name and object version, and the video processing parameters.

[0119] For example, a cache key value can be represented as:

[0120] bucket_xx / object_yy / version_zz / snapshot_100_200_100_....jpg

[0121] The attribute information of the video to be processed includes: the bucket name is bucket_xx, the video object name is object_yy, and the object version is version_zz. The video processing parameters include: the video processing operation type name is snapshot (screenshot), and the time information to be processed is 100_200_100.

[0122] When obtaining the first processing result, the first processing result corresponding to it can be determined from the result cache according to the video name in the cache key value, namely the video identifier, and the video processing operation type name and the time information to be processed, namely the video processing parameters.

[0123] In one achievable method, when the result cache does not contain the first processing result corresponding to the video identifier and the video processing parameters, the video processing server 103 determines whether the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters, and when the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters, obtains the to-be-processed video from the video cache.

[0124] If the result cache does not contain the video to be processed corresponding to the video identifier and video processing parameters, it means that the video processing request with the same content as the current video processing request has not been executed, that is, before the current video processing request is sent, the video processing server has not performed the same video processing operation on the video to be processed. For example, the content of this video processing request is to take a screenshot of the video to be processed at 2000 milliseconds, but the video processing operation has never been executed before, so after querying the result cache, the first processing result corresponding to the video identifier and video processing parameters cannot be obtained.

[0125] In this case, it can be determined whether the video cache contains a to-be-processed video corresponding to the video identifier and the video processing parameter.

[0126] The video cache is used to cache videos. Due to the variety of video processing types, although a certain video to be processed has not performed the video processing operation corresponding to this video processing request, it may have performed the video processing operations corresponding to other video processing requests. Therefore, the video to be processed can be cached in the video cache. For example, this video processing request is to take a screenshot of the video to be processed at 2000 milliseconds, while the previous video processing request was to take a screenshot of the video to be processed at 1000 milliseconds. In this case, the first processing result corresponding to this video processing request cannot be obtained from the result cache, but the video to be processed corresponding to this video processing request can be obtained from the video cache.

[0127] The video cache can cache videos in a local cache manner. It is understandable that when different video processing operations are performed on the same video to be processed, the video to be processed is directly obtained from the video cache. The video to be processed can be a video clip instead of a complete video, which can save the time consumed in obtaining the complete video during the video processing process and save traffic costs.

[0128] In an achievable manner, when the video cache does not contain the video to be processed corresponding to the video identifier and the video processing parameter, the video processing server 103 downloads the video to be processed from the authorized address.

[0129] The video processing server 103 downloads the video to be processed from the authorized address, which may specifically include segmenting the video to be processed in the authorized address according to the video processing parameters to obtain a video segment address, and downloading the video segment from the video segment address.

[0130] In this case, the object storage service end 102 is further used to obtain an authorized address based on the storage location of the video to be processed, and forward the authorized address of the video to be processed to the video processing service end.

[0131] like Figure 2 The step in which the object storage service end 102 forwards the authorized address of the video to be processed to the video processing service end 103 may include:

[0132] Step S201, request authentication.

[0133] The object storage service first authenticates the video processing request sent by the client 101. It verifies whether the video processing request is legal, that is, whether the client has the authority to initiate the video processing request.

[0134] Step S202, obtaining the video storage address.

[0135] Take the screenshot request initiated by client 101 through HTTP protocol as an example.

[0136] http: / / bj.oss.XXX.storage / {bucket} / xx.mp4?x-oss-process=video / snapshot,t_1000_2000,f_jpg,w_800

[0137] In the video processing request, http: / / bj.oss.XXX.storage / {bucket} / xx.mp4 indicates the video storage address of video xx.mp4. Based on the video processing request, the video storage address can be obtained.

[0138] Step S203: Generate an authorization address.

[0139] Understandably, the number of video processing requests is huge. If these requests are all for direct access to the video storage address, it will affect the security of the object storage service. Therefore, under normal circumstances, the video storage address is not allowed to be accessed externally, that is, external users do not have the authority to directly access the video storage address. Therefore, the object storage service generates a video authorization address based on the video storage address to authorize external users so that external users can access the video through the authorized address.

[0140] Specifically, an authorization parameter may be added after the storage address of the video to indicate that the video address has been authorized and the user may access it.

[0141] Step S204, request forwarding.

[0142] The video processing request and the obtained authorized address that can access the video to be processed are forwarded to the video processing server 103, which is a video processing server whose distance from the storage location of the video to be processed is within a preset range.

[0143] In actual application scenarios, there may be a situation where the video to be processed has never performed any video processing operations, that is, the result cache does not contain the first processing result corresponding to the video identifier and video processing parameters, and the video cache does not contain the video to be processed corresponding to the video identifier and video processing parameters. Therefore, in this case, the video to be processed needs to be downloaded.

[0144] When downloading, you can use the segmented download method to download only the segments corresponding to the video processing parameters of the video processing request in the video to be processed according to actual needs. Compared with downloading the entire video, it takes less time to download video segments, which can improve the video processing speed.

[0145] The video processing server 103 is further configured to process the video segment according to the video processing parameter to obtain a second processing result, and cache the second processing result in a result cache.

[0146] Specifically, when downloading a video segment, it is necessary to determine the required video segment and segment size based on the video processing request parameters, and determine the video segment address. Based on the attribute information of the video to be processed, the size of the complete video to be processed can be obtained. When the video to be processed is segmented, one percent of the size of the video to be processed can be used as the preset segment size. For example, in actual application scenarios, the minimum segment size is 4MB and the maximum is 50MB. Based on the time information to be processed in the video processing request, that is, the time information of the video segment to be processed, determine the segment interval where the video segment of the video to be processed is located, and use the address of the segment interval containing the video segment to be processed as the video segment address. The video segment address can be obtained by adding the corresponding target parameter to the authorized address, for example, using the start time and end time of the segment interval as the target parameter.

[0147] By obtaining the video to be processed in this way, what is downloaded is the video fragment instead of the complete video, which saves the time spent on downloading unnecessary video fragments in the complete video. This can increase the video processing speed, while also improving the response speed of the service and saving traffic costs.

[0148] The video processing server 103 is further configured to process the video segment according to the video processing parameter to obtain a second processing result, and cache the second processing result in a result cache.

[0149] Specifically, the video clip can be processed accordingly by the corresponding processing module according to the video processing type included in the video processing request, and the second processing result can be cached according to the cache key value. It can be understood that the second processing result can be cached asynchronously according to the cache key value, that is, the second processing result is cached in the result cache by the video object name, that is, the video identifier, and the video processing operation type name and the time information to be processed, that is, the video processing parameter.

[0150] It can be understood that the cached second processing result can be directly obtained after receiving the same video processing request for the same video to be processed next time.

[0151] For the data cached in the result cache and the video cache, the video processing server 103 is specifically used to obtain a first expiration data clearing time, and clear the processing results in the result cache that exceed the first expiration data clearing time; obtain a second expiration data clearing time, and clear the video data in the video cache that exceeds the second expiration data clearing time.

[0152] The total amount of videos is huge, and videos are also time-sensitive. It is understandable that the amount of video processing requests for specific videos may be different in different time periods. For example, during a festival, a large number of video processing requests for videos corresponding to the festival may be received, while at other times, there may be almost no video processing requests initiated for videos corresponding to the festival.

[0153] By setting a first expired data clearing time and a second expired data clearing time, expired data in the cache can be cleared regularly to release cache space, thereby achieving reuse of cache resources.

[0154] The first expired data clearing time and the second expired data clearing time may be the same or different, and are set according to actual conditions, and may be a few hours, a few days, or even a few months.

[0155] One way to achieve this is Figure 3 As shown, after receiving the request forwarded by the object storage service end 102, the steps performed by the video processing service end 103 may include:

[0156] Step S301, obtain the request key value.

[0157] After receiving the video processing request and authorization address sent by the object storage service 102, the request key value is obtained according to the video processing parameters and the video to be processed. The request key value corresponds to the cache key value, which is used to find the corresponding first processing result in the result cache.

[0158] Step S302, read the result cache.

[0159] Based on the request key value, it is obtained in the result cache 305, and based on the video identifier and the video processing parameters, it is searched in the result cache 305 whether there is a corresponding first processing result.

[0160] When the result cache 305 contains the first processing result, the first processing result is obtained; when the result cache 305 does not contain the first processing result, step S303 is executed.

[0161] Step S303, obtaining the video.

[0162] Acquiring the video may include acquiring the video from the video cache 306 and downloading a video segment of the video to be processed from the video storage 307. It is determined whether the video cache 306 contains the video to be processed. If the video cache 306 contains the video to be processed, the video to be processed is directly acquired from the video cache 306; if the video cache 306 does not contain the video to be processed, the video segment to be processed is determined based on the authorized address and the video processing parameters, and the video segment is downloaded from the video storage 307.

[0163] Step S304, processing the video.

[0164] According to the video processing type, corresponding video processing operations are performed on the acquired video or video clip to be processed, such as video screenshot, reverse display, GIF extraction, etc., and the processing results are cached in the result cache 305.

[0165] The technical solution provided by the embodiment of the present invention specifically illustrates three ways for the video processing server to obtain the processing result or the video to be processed corresponding to the video identifier based on the video identifier: directly obtaining the video processing result from the result cache; obtaining the video to be processed from the video cache; and obtaining the video fragment to be processed in a piecemeal download manner. Among them, directly obtaining the video processing result from the result cache saves the time for obtaining and processing the video; obtaining the video to be processed from the video cache and downloading the video fragment to be processed in pieces saves the time for downloading the complete video. It can be considered that all three methods can obtain the required video processing result or video to be processed without downloading the complete video, saving the time consumed in the video processing process, thus improving the video processing speed, and also reducing the traffic cost required for downloading the video.

[0166] In an optional embodiment, Figure 4 As shown, the process of video processing by the video processing system may include:

[0167] The client 101 sends a video processing request to the OSS service (Operation Support Systems) 401. The OSS service 401, as an object storage service end, after receiving the video processing request, determines the storage location of the video to be processed according to the video identifier, and determines the video processing service end whose distance from the storage location is within a preset range, such as Figure 4 As shown, the video processing server corresponds to the processing center, wherein the processing center 1 is the video processing server determined based on the current video processing request. After receiving the video processing request and the authorization address, the processing center 1 determines the type of video processing 402, and the video processing 402 corresponds to the processing module, and different video processing types correspond to different video processing 402.

[0168] The video processing 402 first accesses the result cache 305, obtains the processing result corresponding to the video processing request from the result cache 305, and when the processing result corresponding to the video processing request is not obtained from the result cache 305, the video cache 403 is accessed to determine whether the video cache 403 contains the video to be processed. If the video cache 403 contains the video to be processed, the video to be processed in the video cache is directly obtained to perform the video processing operation. If the video cache 403 does not contain the video to be processed, the required video segment to be processed is downloaded from the video storage 307 through the video download 404, and after the corresponding video processing operation is completed on the video segment to be processed, the video processing result is returned to the OSS service 401, and finally the OSS service 401 sends the video processing result to the client 101, so that the user who uses the client 101 to send the video processing request obtains the corresponding video processing result.

[0169] Correspondingly, when the video processing server determined based on the video processing request points to processing center 2...processing center n, the process of obtaining the video processing result is the same as when the video processing server determined based on the video processing request points to processing center 1, and will not be repeated here.

[0170] In actual application scenarios, some upstream services, such as obtaining video information services, video screenshot services, and video GIF extraction services, may belong to different departments, so it is necessary to deploy corresponding video processing services separately, resulting in more and more video processing interfaces. The technical solution provided by the embodiment of the present invention can avoid the problem of no unified standard due to different video processing types by establishing a unified video processing center and aggregating various video processing functions.

[0171] Specifically, the initiated video processing request may be standardized through a request specification (Request specification), and a processing parameter x-oss-process=video / {process} may be attached after the video address, where {process} indicates a video processing method.

[0172] For example, x-oss-process=video / snapshot,t_1000,w_200_h_100 means taking a screenshot of the video. The screenshot time is 1000 milliseconds and the image size is 200x100.

[0173] The response specification can be used to standardize the format of the content returned after video processing. When a video processing error is reported, all video processing types correspond to the same error return format. When responding normally, the required content is returned according to the preset format corresponding to the video processing type.

[0174] It can be understood that the object storage service also has unified request specifications for requests related to authentication, request headers, and domain names, and no examples are given here.

[0175] The technical solution provided by the embodiment of the present invention caches the video processing result in the result cache, and directly obtains the video processing result after receiving the same video processing request (the video processing request that has been processed before); caches the video to be processed in the video cache, and when the video processing result is not obtained from the result cache, directly obtains the cached video to be processed from the video cache; when the video to be processed is not obtained in the video cache, downloads the video based on the video storage address, and the video segment of the video to be processed is downloaded, that is, the video is downloaded in a fragmented manner. The above three methods avoid downloading the complete video and save the time spent in downloading the complete video, so that the video processing speed can be improved.

[0176] In addition, the unified video processing service can avoid the need for businesses to develop corresponding processing services themselves, and better standardize the processing interface, so that various video processing businesses can easily access the object storage service and process the videos therein. At the same time, since different businesses and different needs are unified in one service for processing, the difficulty of business access and the response time of video processing are also reduced. For different video processing types, you only need to modify the parameters and process the return results to implement the subsequent process.

[0177] By caching processing results and video resources, the same video does not need to be downloaded repeatedly, and the same processing request does not need to be processed again, which can reduce traffic costs. Setting regular clearing can also improve resource utilization.

[0178] like Figure 5As shown, an embodiment of the present invention provides a video processing method, which is applied to a video processing system. The video processing system includes an object storage service end and a video processing service end. The video processing method may include:

[0179] Step S501, the object storage service receives a video processing request sent by a client; the video processing request includes a video identifier of a video to be processed; a video processing service corresponding to the video identifier is determined; and the video processing request is forwarded to the video processing service.

[0180] Step S502: The video processing server receives a video processing request sent by the object storage service client, and obtains a processing result or a to-be-processed video corresponding to the video identifier based on the video identifier.

[0181] In the technical solution provided by the embodiment of the present invention, the object storage service end can forward the video processing request with the same video identifier to the same video processing service end according to the video identifier of the video to be processed, and use the same video processing service end to process the same video, thereby avoiding wasting time due to repeated downloading of the same video when processing the video to be processed, thereby improving the video processing speed.

[0182] Reference Figure 5 , the video processing method provided by the embodiment of the present invention is described in detail.

[0183] Step S501, the object storage service receives a video processing request sent by a client; the video processing request includes a video identifier of a video to be processed; a video processing service corresponding to the video identifier is determined; and the video processing request is forwarded to the video processing service.

[0184] The video identifier of the video to be processed may be the regional information of the video to be processed. For example, if the regional information of the video to be processed points to region 1, it can be considered that the regional information of the video processing server whose distance from the storage location of the video to be processed is within a preset range also points to region 1, that is, the video to be processed and the corresponding video processing server have the same regional information.

[0185] In one achievable manner, the object storage service determines the storage location of the video to be processed according to the video identifier, and determines the video processing service that is within a preset range from the storage location as the video processing service corresponding to the video identifier. That is, the video processing service that has the same area information as the video to be processed can be regarded as the video processing service that is closest to it.

[0186] The video processing request may also include video processing parameters of the video to be processed, and the video processing parameters of the video to be processed may include the video processing type, the time information to be processed, and various parameters related to the video processing result corresponding to the video processing type. For example, the video processing type may be video screenshot, reverse display, GIF extraction, etc., and the time information to be processed may be a time point or a time period.

[0187] For example, in

[0188] http: / / bj.oss.XXX.storage / {bucket} / xx.mp4?x-oss-process=video / snapshot,t_1000_2000,f_jpg,w_800

[0189] In the video processing request, http: / / bj.oss.XXX.storage / {bucket} / xx.mp4 indicates the video address of video xx.mp4, which can be considered as the video identifier of the video to be processed. x-oss-process=video / snapshot,t_1000_2000,f_jpg,w_800 indicates the video processing parameters, corresponding to the request parameter format x-oss-process=video / {process},{extra_params}, where {process} indicates various processing types and {extra_params} indicates processing parameters corresponding to various processing types.

[0190] Based on this, x-oss-process=video / snapshot,t_1000_2000,f_jpg,w_800 can indicate that the processing type for the video at the time of 1000,2000 milliseconds is snapshot processing operation, the result is in jpg format, and the width (w) is 800.

[0191] Step S502: The video processing server receives a video processing request sent by the object storage service client, and obtains a processing result or a to-be-processed video corresponding to the video identifier based on the video identifier.

[0192] There are three ways for the video processing server to obtain the processing result or the video to be processed corresponding to the video identifier: obtaining the video processing result from the result cache; obtaining the video to be processed from the video cache; and downloading the video to be processed from the authorized address.

[0193] In one achievable manner, when the result cache contains the first processing result corresponding to the video identifier and the video processing parameter, the video processing server obtains the first processing result from the result cache.

[0194] The result cache is used to cache video processing results. It is understandable that the number of video processing requests is huge, and video processing requests for the same video may be repeated. Therefore, if the result cache contains the first processing result corresponding to the video identifier and video processing parameters, it means that the processing operation has been completed before the current video processing request is initiated. The first processing result corresponding to the video identifier and video processing parameters in the result cache is the processing result obtained after the same operation was previously performed and cached in the result cache.

[0195] In one achievable manner, the method for obtaining the first processing result may include:

[0196] The video processing server distributes the video processing request to the processing module corresponding to the video type; when the result cache contains the first processing result corresponding to the video identifier and the video processing parameter, the first processing result is obtained from the result cache through the processing module.

[0197] The video processing parameters include the video processing type. After receiving the video processing request, the video processing server determines the processing module corresponding to the video processing type according to the video processing parameters. For example, if the video processing type included in the received video processing request is video screenshot, the video processing request is distributed to the video screenshot processing module; if the video processing type included in the received video processing request is video reverse display, the video processing request is distributed to the video reverse display processing module, and so on.

[0198] There are many types of video processing, so the types of corresponding video processing results are also different. For example, the types of processing results obtained by two video processing methods, video screenshot and GIF extraction, can be jpg type and gif type respectively. According to the video processing parameters, different processing modules can be assigned to different video processing types. The result caches corresponding to different processing modules can be different. Before obtaining the first processing result, the processing module can be determined first, and then the first processing result can be obtained from the result cache.

[0199] In one achievable manner, the method for obtaining the first processing result may include:

[0200] The video processing server obtains a cache key value according to the video processing parameters and attribute information of the video to be processed when the result cache contains a first processing result corresponding to the video identifier and the video processing parameters; and obtains the first processing result from the result cache according to the cache key value.

[0201] The cache key value, also known as the cache key value, may include video information about the video to be processed on the object storage service side, such as the bucket name, video object name and object version, as well as the video processing operation type name and the time information to be processed.

[0202] The cache key value, also called the cache key value, may include attribute information of the object storage service about the video to be processed, such as the bucket name, the video object name and object version, and the video processing parameters.

[0203] For example, a cache key value can be represented as:

[0204] bucket_xx / object_yy / version_zz / snapshot_100_200_100_....jpg

[0205] The attribute information of the video to be processed includes: the bucket name is bucket_xx, the video object name is object_yy, and the object version is version_zz. The video processing parameters include: the video processing operation type name is snapshot (screenshot), and the time information to be processed is 100_200_100.

[0206] The video identifier may include a video name. When obtaining the first processing result, the first processing result corresponding to the video identifier and the video processing operation type name and the time information to be processed, that is, the video processing parameters, may be determined from the result cache.

[0207] By using the result cache to store video processing results, after receiving the same video processing request on the video processing server, the video processing results can be directly obtained from the result cache without downloading the video and executing the video processing request. This can save the time spent on video downloading and video processing and improve the video processing speed.

[0208] In the case that the result cache does not contain the first processing result corresponding to the video identifier and the video processing parameter, obtaining the video processing result requires first obtaining the video to be processed, and then processing the video to be processed to obtain the video processing result.

[0209] In an achievable manner, the method for the video processing server to obtain the video to be processed from the video cache may include:

[0210] When the result cache does not contain the first processing result corresponding to the video identifier and the video processing parameters, the video processing server determines whether the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters. When the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters, the video processing server obtains the to-be-processed video from the video cache.

[0211] The video identifier may include a video name, and the video processing parameter may include a video processing type. If the result cache does not include the first processing result corresponding to the video identifier and the video processing parameter, it means that the video processing request received this time has not been executed before for the video to be processed, but it is understandable that due to the large number of video processing requests, the same video processing type may be executed for the same video.

[0212] For example, for screenshot requests for the same video to be processed, due to the different processing times included in the video processing parameters, the two video processing requests are different. It can be that the screenshot request for the video screenshot taken at 1000 milliseconds has been executed, and the first processing result can be obtained in the result cache, while the screenshot request for the video screenshot taken at 2000 milliseconds has not been executed, and the first processing result cannot be obtained in the result cache. However, it can be understood that when executing the screenshot request for the video screenshot taken at 1000 milliseconds, the video to be processed has been requested. Therefore, the video to be processed is cached in the video cache. When executing the screenshot request for the video screenshot taken at 2000 milliseconds, there is no need to download the complete video, and the video to be processed can be directly obtained from the video cache.

[0213] Therefore, it is possible to determine whether the video cache contains the video to be processed corresponding to the video identifier and the video processing parameters, so that when the video cache contains the video to be processed corresponding to the video identifier and the video processing parameters, the video to be processed is directly obtained from the video cache instead of downloading the complete video to be processed.

[0214] Directly obtaining the video to be processed from the video cache instead of downloading the complete video can save the download traffic cost and may obtain the video to be processed faster, thereby improving the video processing speed.

[0215] Correspondingly, when the video cache does not contain the to-be-processed video corresponding to the video identifier and the video processing parameter, obtaining the to-be-processed video requires downloading the video.

[0216] In one achievable manner, the method for the video processing server to obtain the video to be processed may include:

[0217] When the video cache does not contain the video to be processed corresponding to the video identifier and the video processing parameter, the video to be processed is downloaded from the authorized address.

[0218] The authorization address is determined by the object storage service based on the storage location of the video to be processed and sent to the video processing service. For example, the screenshot request initiated by the client through the HTTP protocol is

[0219] http: / / bj.oss.XXX.storage / {bucket} / xx.mp4?x-oss-process=video / snapshot,t_1000_2000,f_jpg,w_800

[0220] In the video processing request, http: / / bj.oss.XXX.storage / {bucket} / xx.mp4 indicates the video storage address of video xx.mp4. Based on the video processing request, the video storage address can be obtained.

[0221] Understandably, the number of video processing requests is huge. If these requests are all for direct access to the video storage address, it will affect the security of the object storage service. Therefore, under normal circumstances, the video storage address is not allowed to be accessed externally, that is, external users do not have the authority to directly access the video storage address. Therefore, the object storage service generates a video authorization address based on the video storage address to authorize external users so that external users can access the video through the authorized address.

[0222] Specifically, an authorization parameter may be added after the storage address of the video to indicate that the video address has been authorized and the user may access it.

[0223] In one achievable manner, the video processing server segments the to-be-processed video in the authorized address according to the video processing parameters to obtain a video segment address; and downloads the video segment from the video segment address.

[0224] When downloading, it can be downloaded in fragments. In the fragment downloading method, only the fragments corresponding to the video processing parameters of the video processing request in the video to be processed can be downloaded. Compared with downloading the complete video, the time required to download the video fragment is shorter, which can improve the video processing speed.

[0225] Specifically, when downloading a video segment, you need to determine the video segment address first. First, the video to be processed is segmented. One percent of the size of the video to be processed can be used as the preset segment size. In actual application scenarios, the minimum segment size is 4MB and the maximum is 50MB. After that, according to the video processing parameters in the video processing request, the time information of the video segment to be processed can be obtained, and then the segment interval where the video segment of the video to be processed is located can be determined. Finally, the address of the segment interval containing the video segment to be processed is used as the video segment address. The video segment address can be obtained by adding the corresponding target parameter to the authorized address, for example, the start time and end time of the segment interval are used as the target parameters.

[0226] Video processing operations are usually performed on only a part of the complete video, so the video can be divided into necessary video, that is, the video segment to be processed, and non-essential video. The video downloaded from the video segment address is the video segment to be processed, not the complete video. It can be understood that compared to downloading the complete video, downloading the video segment takes less time, thus avoiding the time wasted on downloading the non-essential part of the video to be processed.

[0227] After obtaining the video to be processed or the video segment of the video to be processed according to the video acquisition method provided in the above embodiment, a corresponding video processing operation is performed based on the video processing request to obtain a video processing result.

[0228] Specifically, the video segment is processed according to the video processing parameter to obtain a second processing result; and the second processing result is cached in a result cache.

[0229] Specifically, the video clip can be processed accordingly through the corresponding processing module according to the video processing type included in the video processing request, and the second processing result can be cached according to the cache key value. It can be understood that when the second processing result is cached, it can be cached according to the cache key value, that is, through the video object name, that is, the video identifier, and the video processing operation type name and the time information to be processed, that is, the video processing parameters, the second processing result is cached in the result cache.

[0230] It can be understood that the second processing result is also a video processing result, and can also be obtained as a processing result based on the video processing request.

[0231] For the data cached in the result cache and the video cache, the video processing server is specifically used to obtain a first expired data clearing time, and clear the processing results in the result cache that exceed the first expired data clearing time; obtain a second expired data clearing time, and clear the video data in the video cache that exceeds the second expired data clearing time.

[0232] The total amount of videos is huge, and videos are also time-sensitive. It is understandable that the amount of video processing requests for specific videos may be different in different time periods. For example, during a festival, a large number of video processing requests for videos corresponding to the festival may be received, while at other times, there may be almost no video processing requests initiated for videos corresponding to the festival.

[0233] The first expired data clearing time and the second expired data clearing time can be set. The first expired data clearing time and the second expired data clearing time can be the same or different. They are set according to actual conditions and can be a few hours, a few days, or even a few months.

[0234] In actual application scenarios, some upstream services, such as obtaining video information services, video screenshot services, and video GIF extraction services, may belong to different departments, so it is necessary to deploy corresponding video processing services separately, resulting in more and more video processing interfaces. The technical solution provided by the embodiment of the present invention can avoid the problem of no unified standard caused by different video processing types by establishing a unified video processing center and aggregating various video processing functions.

[0235] Specifically, the initiated video processing request may be standardized through a request specification (Request specification), and a processing parameter x-oss-process=video / {process} may be attached after the video address, where {process} indicates a video processing method.

[0236] For example, x-oss-process=video / snapshot,t_1000,w_200_h_100 means taking a screenshot of the video. The screenshot time is 1000 milliseconds and the image size is 200x100.

[0237] The response specification can be used to standardize the format of the content returned after video processing. When a video processing error is reported, all video processing types correspond to the same error return format. When responding normally, the required content is returned according to the preset format corresponding to the video processing type.

[0238] The technical solution provided by the embodiment of the present invention provides three methods for obtaining video processing results, all of which can avoid downloading the complete video, save the time consumed in downloading the complete video during the video processing process, speed up the video processing process, and thus improve the video processing speed.

[0239] like Figure 6As shown, an embodiment of the present invention provides a video processing device, which is applied to a video processing service system. The video processing service system includes an object storage service end and a video processing service end. The object storage module includes a first receiving module 601, a determining module 602 and a first forwarding module 603. The video processing service end includes a second receiving module 604 and an acquiring module 605. The device includes:

[0240] The first receiving module 601 is used to receive a video processing request sent by a client; the video processing request includes a video identifier of a video to be processed;

[0241] A determination module 602, used to determine a video processing server corresponding to the video identifier;

[0242] A first forwarding module 603, configured to forward the video processing request to the video processing server;

[0243] The second receiving module 604 is used to receive a video processing request sent by the object storage service;

[0244] The acquisition module 605 is used to acquire the processing result or the to-be-processed video corresponding to the video identifier based on the video identifier.

[0245] Optionally, the determination module 602 is specifically configured to determine the storage location of the video to be processed according to the video identifier, and determine a video processing server whose distance to the storage location is within a preset range as the video processing server corresponding to the video identifier.

[0246] Optionally, the video processing request also includes video processing parameters; the acquisition module 605 includes:

[0247] The first acquisition submodule is used to acquire the first processing result from the result cache when the result cache contains the first processing result corresponding to the video identifier and the video processing parameter.

[0248] Optionally, the acquisition module 605 includes:

[0249] The second acquisition submodule is used to determine whether the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters when the result cache does not contain the first processing result corresponding to the video identifier and the video processing parameters; and to obtain the to-be-processed video from the video cache when the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters.

[0250] Optionally, the object storage service further includes a second forwarding module, and the device further includes:

[0251] A second forwarding module is used to obtain an authorized address based on the storage location of the video to be processed after determining the video processing server corresponding to the video identifier, and forward the authorized address of the video to be processed to the video processing server;

[0252] The acquisition module 605 includes:

[0253] The download submodule is used to download the video to be processed from the authorized address when the video cache does not contain the video to be processed corresponding to the video identifier and the video processing parameters.

[0254] Optionally, the download submodule is specifically used to segment the to-be-processed video in the authorized address according to the video processing parameters to obtain a video segment address; and download the video segment from the video segment address.

[0255] Optionally, the acquisition module 605 further includes:

[0256] The cache submodule is used to process the video segment according to the video processing parameter after downloading the video segment from the video segment address to obtain a second processing result; and cache the second processing result in the result cache.

[0257] Optionally, the first acquisition submodule is specifically used to, when the result cache contains a first processing result corresponding to the video identifier and the video processing parameters, obtain a cache key value according to the video processing parameters and attribute information of the video to be processed; and obtain the first processing result from the result cache according to the cache key value.

[0258] Optionally, the video processing parameters include a video processing type; a first acquisition submodule is specifically used to distribute the video processing request to a processing module corresponding to the video type; when the result cache contains a first processing result corresponding to the video identifier and the video processing parameters, the first processing result is obtained from the result cache through the processing module.

[0259] In the technical solution provided by the embodiment of the present invention, after the first receiving module receives the video processing request, the determination module determines the video processing server corresponding to the video identifier of the video to be processed, so that when the first forwarding module forwards the video processing request, it can forward the video processing request for the same video to be processed to the same video processing server, and then after the second receiving module receives the forwarded video processing request, the acquisition module obtains the video processing request for the same video to be processed, without repeatedly downloading the same video to be processed, thereby avoiding the time wasted on downloading the same video, thereby improving the video processing speed.

[0260] The embodiment of the present invention further provides an electronic device, such as Figure 7As shown, it includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0261] Memory 703, used for storing computer programs;

[0262] The processor 701 is used to implement the method steps of the above-mentioned video processing method when executing the program stored in the memory 703.

[0263] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0264] The communication interface is used for communication between the above terminal and other devices.

[0265] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0266] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0267] In another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the video processing method described in any one of the above embodiments is implemented.

[0268] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the video processing method described in any one of the above embodiments.

[0269] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can 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 the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0270] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0271] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0272] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A video processing system, characterized in that: The system comprises: a client, an object storage service and a video processing service; The client is used to send a video processing request, where the video processing request includes a video identifier of a video to be processed; The object storage service end is used to receive the video processing request; determine the video processing service end corresponding to the video identifier; forward the video processing request to the video processing service end; wherein video processing requests with the same video identifier correspond to the same video processing service end; The video processing server is used to receive the video processing request and obtain the processing result or the video to be processed corresponding to the video identifier based on the video identifier.

2. The system according to claim 1, characterized in that The object storage service end is specifically used to determine the storage location of the to-be-processed video according to the video identifier, and determine a video processing service end whose distance from the storage location is within a preset range as the video processing service end corresponding to the video identifier.

3. The system according to claim 2, characterized in that The video processing request also includes video processing parameters; The video processing server is specifically configured to obtain the first processing result from the result cache when the result cache contains the first processing result corresponding to the video identifier and the video processing parameter.

4. The system according to claim 3, characterized in that The video processing server is specifically used to determine whether the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters when the result cache does not contain the first processing result corresponding to the video identifier and the video processing parameters, and to obtain the to-be-processed video from the video cache when the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters.

5. The system according to claim 4, characterized in that The object storage service end is further used to obtain an authorized address based on the storage location of the video to be processed, and forward the authorized address of the video to be processed to the video processing service end; The video processing server is specifically configured to download the video to be processed from the authorized address when the video cache does not contain the video to be processed corresponding to the video identifier and the video processing parameter.

6. The system according to claim 5, characterized in that The video processing server is specifically used to segment the to-be-processed video in the authorized address according to the video processing parameters, obtain a video segment address, and download the video segment from the video segment address.

7. The system according to claim 6, characterized in that The video processing server is further configured to process the video clip according to the video processing parameter to obtain a second processing result, and cache the second processing result in a result cache.

8. The system according to claim 3, characterized in that The video processing server is specifically used to obtain a cache key value according to the video processing parameters and the attribute information of the video to be processed, when the result cache contains the first processing result corresponding to the video identifier and the video processing parameters, and obtain the first processing result from the result cache according to the cache key value.

9. The system according to claim 3, characterized in that The video processing parameters include video processing type; The video processing server is specifically used to distribute the video processing request to the processing module corresponding to the video type; when the result cache contains the first processing result corresponding to the video identifier and the video processing parameters, the first processing result is obtained from the result cache through the processing module.

10. A video processing method, characterized in that: Applied to a video processing system, the video processing system includes an object storage service end and a video processing service end, the method includes: The object storage service receives a video processing request sent by a client; the video processing request includes a video identifier of a video to be processed; determines a video processing service corresponding to the video identifier; and forwards the video processing request to the video processing service; wherein video processing requests with the same video identifier correspond to the same video processing service; The video processing server receives the video processing request sent by the object storage service client, and obtains a processing result or a to-be-processed video corresponding to the video identifier based on the video identifier.

11. The method according to claim 10, characterized in that The step of determining the video processing server corresponding to the video identifier includes: The object storage service client determines the storage location of the to-be-processed video according to the video identifier, and determines a video processing service client whose distance from the storage location is within a preset range as the video processing service client corresponding to the video identifier.

12. The method according to claim 11, characterized in that The video processing request also includes video processing parameters; The obtaining, based on the video identifier, a processing result or a video to be processed corresponding to the video identifier includes: When the result cache contains the first processing result corresponding to the video identifier and the video processing parameter, the video processing server obtains the first processing result from the result cache.

13. The method according to claim 12, characterized in that The obtaining, based on the video identifier, a processing result or a video to be processed corresponding to the video identifier includes: When the result cache does not contain the first processing result corresponding to the video identifier and the video processing parameters, the video processing server determines whether the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters; when the video cache contains the to-be-processed video corresponding to the video identifier and the video processing parameters, the video processing server obtains the to-be-processed video from the video cache.

14. The method according to claim 13, characterized in that After determining the video processing server corresponding to the video identifier, the method further includes: The object storage service client obtains an authorized address based on the storage location of the video to be processed, and forwards the authorized address of the video to be processed to the video processing service client; The obtaining, based on the video identifier, a processing result or a video to be processed corresponding to the video identifier includes: When the video cache does not contain the video to be processed corresponding to the video identifier and the video processing parameter, the video processing server downloads the video to be processed from the authorized address.

15. The method according to claim 14, characterized in that The downloading of the to-be-processed video from the authorized address includes: The video processing server segments the to-be-processed video in the authorized address according to the video processing parameters to obtain a video segment address; and downloads the video segment from the video segment address.

16. The method according to claim 15, characterized in that After downloading the video segment from the video segment address, the method further includes: The video processing server processes the video clip according to the video processing parameters to obtain a second processing result; and caches the second processing result in the result cache.

17. The method according to claim 12, characterized in that When the video processing server includes the first processing result corresponding to the video identifier and the video processing parameter in the result cache, obtaining the first processing result from the result cache includes: When the video processing server includes the first processing result corresponding to the video identifier and the video processing parameters in the result cache, the cache key value is obtained according to the video processing parameters and the attribute information of the video to be processed; and the first processing result is obtained from the result cache according to the cache key value.

18. The method according to claim 12, characterized in that The video processing parameters include video processing type; When the video processing server includes the first processing result corresponding to the video identifier and the video processing parameter in the result cache, obtaining the first processing result from the result cache includes: The video processing server distributes the video processing request to the processing module corresponding to the video type; when the result cache contains the first processing result corresponding to the video identifier and the video processing parameters, the first processing result is obtained from the result cache through the processing module.

19. A video processing device, characterized in that: The device is applied to a video processing system, the video processing system includes an object storage service end and a video processing service end, the object storage service end includes a first receiving module, a determining module and a first forwarding module, the video processing service end includes a second receiving module and an acquiring module, and the device includes: The first receiving module is used to receive a video processing request sent by a client; the video processing request includes a video identifier of a video to be processed; The determination module is used to determine the video processing server corresponding to the video identifier; The first forwarding module is used to forward the video processing request to the video processing server; wherein the video processing requests with the same video identifier correspond to the same video processing server; The second receiving module is used to receive a video processing request sent by the object storage service; The acquisition module is used to acquire the processing result or the to-be-processed video corresponding to the video identifier based on the video identifier.

20. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 10-18 when executing a program stored in a memory.

21. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 10-18 are implemented.

Citation Information

Patent Citations

  • Data processing system, method and device

    CN112486074A