CN118042191B - Method and device for improving success rate of sending video material by media platform - Google Patents

Method and device for improving success rate of sending video material by media platform Download PDF

Info

Publication number
CN118042191B
CN118042191B CN202410429711.4A CN202410429711A CN118042191B CN 118042191 B CN118042191 B CN 118042191B CN 202410429711 A CN202410429711 A CN 202410429711A CN 118042191 B CN118042191 B CN 118042191B
Authority
CN
China
Prior art keywords
video
oss
task
media platform
basic information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410429711.4A
Other languages
Chinese (zh)
Other versions
CN118042191A (en
Inventor
荆岩瑞
崔然
寇振芳
苗宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oneweb Beijing Technology Co ltd
Original Assignee
Oneweb Beijing Technology Co ltd
Filing date
Publication date
Application filed by Oneweb Beijing Technology Co ltd filed Critical Oneweb Beijing Technology Co ltd
Priority to CN202410429711.4A priority Critical patent/CN118042191B/en
Publication of CN118042191A publication Critical patent/CN118042191A/en
Application granted granted Critical
Publication of CN118042191B publication Critical patent/CN118042191B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention provides a method, a device and electronic equipment for improving the success rate of sending video materials by a media platform, belonging to the technical field of image processing, wherein the method comprises the following steps: storing the video uploaded by the user to an alicloud OSS; acquiring original video basic information stored in an alicloud OSS through a get request/urlx-OSS-process=video/info, and calculating a first feature matrix U1 of the original video based on the original video basic information; comparing the basic information of the video with the requirement of the media platform, if the basic information does not pass through, acquiring negative feedback information M of the media platform aiming at the original video, simultaneously transmitting a video processing task to an Arian OSS, and acquiring a task id returned by the Arian OSS; and re-sending the processed video address url' to the media platform so as to check whether the processed video accords with the requirement of the media platform. The scheme can improve the success rate of video transmission of the media platform.

Description

Method and device for improving success rate of sending video material by media platform
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for improving a success rate of sending video materials by a media platform, and an electronic device.
Background
The requirements of the media platform for uploading video mainly cover the following aspects:
Video format: different media platforms may have different requirements for video formats. Common video formats such as MP4, MOV, FLV, etc. may all be widely accepted, but some platforms may only support specific formats. Therefore, the format supported by the target platform needs to be confirmed before uploading, and corresponding transcoding processing is performed.
Video size and duration: most platforms have limitations on the size and duration of the uploaded video file. For example, some platforms may require video files that do not exceed a certain size (e.g., 500 MB) and that are within a certain range (e.g., not more than 5 minutes). Video beyond these limits may not be uploaded or successfully transcoded.
Video definition and scale: media platforms typically require video to have some definition, such as High Definition (HD) or higher. In addition, the proportion of video is also an important factor, and common proportions include 9:16 (vertical screen), 16:9 (horizontal screen), 1:1 (square screen), and the like. An undesirable video may be stretched or compressed during playback.
Metadata and tags: to optimize the search and recommendation effects of videos, media platforms typically require that the uploader provide metadata (e.g., title, description, keywords, etc.) and tags for the video. This information helps the platform better understand and categorize the video content to recommend it to interested users.
Once a user-produced video does not meet the requirements of the media platform, specialized software is required for modifying the video processing and integrating video processing tools into web projects is difficult, resulting in more time being spent by the user modifying the video.
The above problems are to be solved.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a method, an apparatus, and an electronic device for improving a success rate of sending video materials by a media platform, which at least partially solve the problems existing in the prior art.
In a first aspect, an embodiment of the present invention provides a method for improving a success rate of sending video materials by a media platform, including:
storing the video uploaded by the user to an Arin cloud OSS, and acquiring an address url of an original video stored in the Arin cloud OSS;
acquiring original video basic information stored in an alicloud OSS through a get request/urlx-OSS-process=video/info, and calculating a first feature matrix U1 of the original video based on the original video basic information;
Comparing the basic information of the video with the requirement of the media platform, if the basic information does not pass through, acquiring negative feedback information M of the media platform aiming at the original video, simultaneously transmitting a video processing task to an Arian OSS, and acquiring a task id returned by the Arian OSS;
Based on the task ID, periodically inquiring the task state in a preset time period until all tasks corresponding to the task ID are processed, acquiring a processed video address url', and extracting basic information of the processed video so as to calculate a second feature matrix U2 corresponding to the processed video based on the basic information of the processed video;
And extracting a third feature matrix U3 corresponding to the negative feedback information M, and after SAM (U2, U3) < SAM (U1, U3) is satisfied, retransmitting the processed video address url' to the media platform to check whether the processed video accords with the requirement of the media platform, wherein SAM () is a similarity calculation function.
According to a specific implementation manner of the embodiment of the present disclosure, the storing the video uploaded by the user to the ali cloud OSS and obtaining the address url of the original video stored in the ali cloud OSS includes:
creating an OSS account on the Arian cloud and creating a socket for storing video files;
installing a corresponding Arian OSS SDK according to the language used by the back-end service;
In the alicloud OSS console, a pair ACCESSKEYID and ACCESSKEYSECRET is created for the account number and configured in the backend service to enable access to the OSS;
in the back-end service, an interface is created for receiving the video file uploaded by the user, and after uploading the video to the back-end service, the back-end service uploads the video file to the alicloud OSS.
According to a specific implementation manner of the embodiment of the present disclosure, the storing the video uploaded by the user to the ali cloud OSS, and obtaining the address url of the original video stored in the ali cloud OSS, further includes:
After the video file is successfully uploaded to the OSS, the URL of the file is obtained by calling the related method in the OSS SDK, and the URL is generated based on the socket name, the file path and the domain name of the OSS.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining, through get request/urlx-os-process=video/info, the original video basic information stored in the alicloud OSS includes:
Determining a complete URL of a video file on an Arin cloud OSS, and analyzing an OSS domain name, a socket name and a path of the video file contained in the URL;
adding x-oss-process=video/info after URL specifies the video processing operation desired to be performed, and thus obtains video information.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining, through get request/urlx-os-process=video/info, the original video basic information stored in the alicloud OSS further includes:
sending a get request to the URL using an HTTP client;
Acquiring a response in the form of a character string in a JSON format, and analyzing the character string in the JSON format to acquire the basic information of an original video;
when the socket sets private access control, acquiring temporary access credentials through the SDK of the Arian OSS.
According to a specific implementation manner of the embodiment of the present disclosure, the comparing basic information of a video with requirements of a media platform, if not, obtaining negative feedback information M of the media platform for the original video, and simultaneously sending a video processing task to an alicloud OSS, and obtaining a task id returned by the alicloud OSS, includes:
Comparing the acquired video information with the requirements of the media platform to check whether the format, resolution and duration of the video meet the uploading standard of the media platform;
if the video does not meet the requirement of the media platform, generating a processing task containing a processing instruction by utilizing a video processing function provided by an Arian OSS, wherein the processing instruction comprises transcoding parameters, a clipping range and watermark pictures;
and after the video processing task is successfully sent, acquiring a task ID returned by the Arian OSS so as to conveniently use the task ID to inquire the task state or wait for the completion of the task.
According to a specific implementation manner of the embodiment of the present disclosure, the step of periodically querying the task state within a preset period of time based on the task ID until all tasks corresponding to the task ID are processed and completed includes:
Constructing a get_task_status function, an is_task_final function and a poll_task_status function, wherein the get_task_status function sends a GET request to an API of the Arian OSS to acquire a task state, and the is_task_final function judges whether the task is completed or not according to state information returned by the API, and the poll_task_status function uses a cycle to query the task state at regular time until the task is completed or a preset timeout time is exceeded.
According to a specific implementation manner of the embodiment of the present disclosure, the sending the processed video address url' to the media platform again to check whether the processed video meets the requirement of the media platform includes:
After the video processing task is completed, acquiring the URL' of the processed video file through the API of the Arian OSS;
According to an API or an uploading interface provided by the media platform, the URL' of the processed video file is sent to the media platform for verification;
if the video fails the verification, an error message is recorded and the relevant personnel is notified.
In a second aspect, an embodiment of the present invention provides an apparatus for improving a success rate of sending video material by a media platform, including:
The storage module is used for storing the video uploaded by the user to the Arin cloud OSS and acquiring an address url of an original video stored in the Arin cloud OSS;
The acquisition module acquires original video basic information stored in an alicloud OSS through a get request/urlx-OSS-process=video/info, and calculates a first feature matrix U1 of the original video based on the original video basic information;
The comparison module is used for comparing the basic information of the video with the requirement of the media platform, if the basic information of the video does not pass through the requirement, acquiring negative feedback information M of the media platform aiming at the original video, simultaneously sending a video processing task to the Arian OSS, and acquiring a task id returned by the Arian OSS;
The query module is used for periodically querying the task state within a preset time period based on the task ID until all tasks corresponding to the task ID are processed, acquiring a processed video address url', extracting the basic information of the processed video, and calculating a second feature matrix U2 corresponding to the processed video based on the basic information of the processed video;
And the sending module is used for extracting a third feature matrix U3 corresponding to the negative feedback information M, and sending the processed video address url' to the media platform again after the SAM (U2, U3) is less than the SAM (U1, U3) so as to check whether the processed video accords with the requirement of the media platform or not, wherein SAM () is a similarity calculation function.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of improving the success rate of sending video material by the media platform in any one of the implementations of the foregoing Ren Di or first aspect.
In a fourth aspect, embodiments of the present invention further provide a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of improving the success rate of sending video material by a media platform in the foregoing first aspect or any implementation manner of the first aspect.
In a fifth aspect, embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of improving the success rate of sending video material by a media platform in any one of the implementations of the first aspect or the first aspect.
The scheme for improving the success rate of the media platform for sending the video material in the embodiment of the application comprises the following steps: storing the video uploaded by the user to an Arin cloud OSS, and acquiring an address url of an original video stored in the Arin cloud OSS; acquiring original video basic information stored in an alicloud OSS through a get request/urlx-OSS-process=video/info, and calculating a first feature matrix U1 of the original video based on the original video basic information; comparing the basic information of the video with the requirement of the media platform, if the basic information does not pass through, acquiring negative feedback information M of the media platform aiming at the original video, simultaneously transmitting a video processing task to an Arian OSS, and acquiring a task id returned by the Arian OSS; based on the task ID, periodically inquiring the task state in a preset time period until all tasks corresponding to the task ID are processed, acquiring a processed video address url', and extracting basic information of the processed video so as to calculate a second feature matrix U2 corresponding to the processed video based on the basic information of the processed video; and extracting a third feature matrix U3 corresponding to the negative feedback information M, and after SAM (U2, U3) < SAM (U1, U3) is satisfied, retransmitting the processed video address url' to the media platform to check whether the processed video accords with the requirement of the media platform, wherein SAM () is a similarity calculation function. By the scheme of the application, the success rate of sending the video material by the media platform can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for improving a success rate of sending video materials by a media platform according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method for improving the success rate of sending video material by a media platform according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for improving a success rate of sending video materials by a media platform according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should also be noted that the illustrations provided in the following embodiments merely illustrate the basic concepts of the disclosure by way of illustration, and only the components related to the disclosure are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided in order to provide a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the disclosure provides a method for improving the success rate of a media platform for transmitting video materials. The method for improving the success rate of sending video materials by the media platform according to the embodiment may be performed by a computing device, where the computing device may be implemented as software, or as a combination of software and hardware, and the computing device may be integrally provided in a server, a terminal device, or the like.
Referring to fig. 1 and 2, an embodiment of the present disclosure provides a method for improving a success rate of transmitting video material by a media platform, including:
S101, storing the video uploaded by the user to an Arian cloud OSS, and acquiring an address url of an original video stored in the Arian cloud OSS.
Storing the video uploaded by the user to an alicloud OSS (object storage service), and acquiring an address URL of an original video stored in the alicloud OSS, may include the steps of:
Based on the OSS account created on the ali cloud, a socket (storage space) is created. And configuring the access rights of the socket to ensure that the file is authorized to be uploaded and accessed. ACCESSKEYID and ACCESSKEYSECRET are acquired, resulting in credentials for authentication.
In applications, the video is uploaded to the temporary storage location of the server through a front-end interface or API and ensures that the front-end to server transfer is secure (e.g., using HTTPS).
In the process of transferring the video from the temporary storage to the alicloud OSS, writing codes at a server side to read the video files in the temporary storage, initializing an OSS client by using an SDK (such as a Python SDK, a node. Js SDK, and the like) of the alicloud OSS, configuring ACCESSKEYID and ACCESSKEYSECRET, and uploading the video files to a designated socket by using an API of the OSS client.
After the upload is successful, the OSS returns a metadata object about the uploaded file, from which the access URL of the video can be obtained, for example, the URL may be a URL of HTTPS protocol.
S102, acquiring original video basic information stored in an Arian OSS through a get request/urlx-OSS-process=video/info, and calculating a first feature matrix U1 of the original video based on the original video basic information.
To obtain the original video basic information stored in the alicloud OSS through GET request/urlx-OSS-process=video/info, URL needs to be replaced to be the complete access path of the video file in the alicloud OSS. This request triggers the server-side video processing function of the OSS to return basic information about the video, such as duration, format, size, etc.
For this purpose, a complete access path of the video file in the alicloud OSS needs to be acquired. For example, this may be a URL of the HTTPS protocol, which may be in the format of, as an alternative: https:// you-bucket-name. Oss-cn-hangzhou. Aliyuncs. Com/you-video-file.mp 4.
Is x-oss-process=video/info added after the URL of the video to trigger the process flow of video information acquisition. The complete URL will be similar to https:// you-bucket-name. Os-cn-hangzhou. Aliyuncs. Com/you-video-file. Mp4 x-os-process = video/info.
A GET request is initiated to this URL using an HTTP client (e.g., a URL library in a curl, browser, or other programming language). The alicloud OSS returns a response in XML or JSON format containing the video base information. Information of interest may be obtained by parsing this response.
To calculate its first feature matrix U1 based on the basic information of the original video, it is necessary to determine the basic information of the original video, which may include the duration, frame rate, resolution, color distribution, audio features, etc. of the video.
Specifically, basic information of the original video, such as duration, frame rate, resolution, etc., may be collected, further, key frames of the video may be extracted, visual features such as color distribution, texture, etc., and if the video contains audio, audio features such as volume, tone, spectrum, etc. may be extracted.
Based on the collected data, values or vectors representing video features are extracted, which can be used directly for numeric features (e.g., duration, frame rate). For image or audio features, extraction using specific algorithms or tools, such as color histograms, SIFT features, MFCC (Mel frequency cepstral coefficients), etc., is required.
Converting the extracted features into a uniform format or dimension, if the dimensions of the different features are different, it is contemplated that they may be converted to the same scale using normalization or normalization methods. The encoded features are combined into a matrix, wherein each row represents a feature vector and each column represents a feature dimension. Thus, the construction of the first feature matrix U1 of the original video is completed.
And S103, comparing the basic information of the video with the requirement of the media platform, if the basic information of the video does not pass through, acquiring negative feedback information M of the media platform aiming at the original video, simultaneously transmitting a video processing task to the Arian OSS, and acquiring a task id returned by the Arian OSS.
And comparing the basic information of the video with the requirements of the media platform, and if the basic information of the video does not accord with the requirements of the media platform, acquiring negative feedback information M of the media platform aiming at the original video, wherein the negative feedback information M comprises the format aiming at the aspect of the original video content does not accord with the requirements of the media platform.
The processing tasks may be sent through the video processing functions of the alicloud OSS. This process involves analyzing the video information, determining if transcoding, cropping, or other processing is required, then sending a corresponding processing request to the OSS, and obtaining the returned task ID.
Specifically, the video basic information stored in the alicloud OSS may be obtained through GET request/urlx-OSS-process=video/info. And comparing the acquired video information (such as resolution, code rate, format and the like) with the requirements of the media platform. If the video information does not meet the requirements of the platform, processing is required.
The video processing operations that need to be performed, such as transcoding, cropping, resolution adjustment, etc., are determined according to the requirements of the media platform. The alicloud OSS provides rich video processing functions, which can be implemented by constructing corresponding processing instructions.
And sending the video processing task to the OSS by using the API or the SDK of the Ariycloud OSS. This typically involves specifying parameters such as the path of the source video file, the processing instructions, and the path of the target output file. After receiving the processing task, the OSS returns a task ID or an identification of the processing task. This ID needs to be saved for subsequent queries of the processing progress or result, e.g., OSS may be polled for progress or result of processing tasks based on the returned task ID.
S104, based on the task ID, the task state is queried in a preset time period, until all tasks corresponding to the task ID are processed, a processed video address url' is obtained, and basic information of the processed video is extracted, so that a second feature matrix U2 corresponding to the processed video is calculated based on the basic information of the processed video.
A timer (e.g., a time. Sleep in Python or a timed task of a thread/process pool) may be used to periodically query the task state, and the interval of the queries may be adjusted as desired.
According to the API document of the Arian OSS, a request for inquiring the task state is constructed, and a GET request can be sent to a specific OSS API endpoint and the task ID is taken as a parameter.
And analyzing the response returned by the OSS to acquire the state information of the task. Typically, the response will include the status of the task (e.g., processing, finished, failed, etc.). And judging whether the task is finished or not according to the returned task state. If the task is still in process, continuing to wait and periodically inquiring; and if the task is completed, acquiring the processed video address url'.
If an abnormal condition (e.g., network error, OSS return error status code, etc.) is encountered during the query, appropriate error handling, such as retries, logging, etc., is required. If the task has not completed within a preset period of time, timeout processing logic may be set, such as notifying the user, logging an error, etc.
The second feature matrix may be constructed by a method similar to the first feature matrix U1, and will not be described here.
S105, extracting a third feature matrix U3 corresponding to the negative feedback information M, and after SAM (U2, U3) < SAM (U1, U3) is satisfied, sending the processed video address url' to the media platform again to check whether the processed video accords with the requirement of the media platform, wherein SAM () is a similarity calculation function.
To extract the third feature matrix U3 corresponding to the negative feedback information M, the negative feedback information needs to be converted into a numerical value or vector form for further analysis and processing.
The negative feedback information M may be cleaned and preprocessed to remove extraneous information, punctuation marks, stop words, etc. Negative feedback is converted into a uniform format, such as text strings.
Based on the content of the negative feedback, a value or vector is extracted that can represent its characteristics. Text may be converted to numerical vectors using text processing techniques such as bag of words models, TF-IDF (word frequency-inverse document frequency), word2vec, etc. If the negative feedback contains emotional tendency or strength information, this information may also be included as part of feature extraction.
The extracted features are encoded into a uniform format or dimension for subsequent processing. If different feature extraction methods are used, they need to be converted to the same dimension or feature fusion. The encoded features are combined into a matrix, wherein each row represents a negatively fed-back feature vector and each column represents a feature dimension. This matrix is the third feature matrix U3 corresponding to the negative feedback information M.
The similarity value ζ 1 between the second feature matrix U2 and the third feature matrix U3 can be calculated by the matrix similarity calculation function SAM ():
ξ1=SAM(U2, U3)
Further, the similarity value ζ 2 between the first feature matrix U2 and the third feature matrix U3 may be calculated by the matrix similarity calculation function SAM ():
ξ2=SAM(U1, U3)
When ζ 1 is smaller than ζ 2, consider that the processed video can meet the modified requirement, and send the processed video address URL to the media platform again to check whether the video meets the platform requirement
The sending of the processed video address URL to the media platform again to check whether the video meets the platform requirement may include the following steps:
and acquiring a verification video interface provided by the media platform and related requirements thereof. This typically includes the end point of the API, the request method (GET or POST), request parameters (e.g., video URL, verification parameters, etc.), and request header information (e.g., authentication information).
The HTTP client (e.g., a library of requests from Python) is used to send a validation request to the API endpoint of the media platform. The processed video address URL needs to be part of the request parameters.
Once a response is received from the media platform, it needs to be parsed to obtain the verification result. The response is typically a JSON object that contains the status of the check (success or failure) and other relevant information (e.g., failure cause, video details, etc.).
According to the verification result, corresponding processing can be performed:
If the verification is successful: the video meets the requirements of the media platform and can be subjected to subsequent operations, such as video release or notification to related personnel.
If the verification fails: the video does not meet the requirement of the media platform, the failure reasons need to be checked, and corresponding processing is carried out according to the reasons. This may include reprocessing the video, modifying the video information, or contacting technical support of the media platform.
In sending the check request and parse response, network errors, API errors, or other anomalies may be encountered. For this purpose, error handling and retry logic is provided to ensure that effective handling can be performed in the event of a problem.
According to a specific implementation manner of the embodiment of the present disclosure, the storing the video uploaded by the user to the ali cloud OSS and obtaining the address url of the original video stored in the ali cloud OSS includes:
creating an OSS account on the Arian cloud and creating a socket for storing video files;
installing a corresponding Arian OSS SDK according to the language used by the back-end service;
In the alicloud OSS console, a pair ACCESSKEYID and ACCESSKEYSECRET is created for the account number and configured in the backend service to enable access to the OSS;
in the back-end service, an interface is created for receiving the video file uploaded by the user, and after uploading the video to the back-end service, the back-end service uploads the video file to the alicloud OSS.
According to a specific implementation manner of the embodiment of the present disclosure, the storing the video uploaded by the user to the ali cloud OSS, and obtaining the address url of the original video stored in the ali cloud OSS, further includes:
After the video file is successfully uploaded to the OSS, the URL of the file is obtained by calling the related method in the OSS SDK, and the URL is generated based on the socket name, the file path and the domain name of the OSS.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining, through get request/urlx-os-process=video/info, the original video basic information stored in the alicloud OSS includes:
Determining a complete URL of a video file on an Arin cloud OSS, and analyzing an OSS domain name, a socket name and a path of the video file contained in the URL;
adding x-oss-process=video/info after URL specifies the video processing operation desired to be performed, and thus obtains video information.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining, through get request/urlx-os-process=video/info, the original video basic information stored in the alicloud OSS further includes:
sending a get request to the URL using an HTTP client;
Acquiring a response in the form of a character string in a JSON format, and analyzing the character string in the JSON format to acquire the basic information of an original video;
when the socket sets private access control, acquiring temporary access credentials through the SDK of the Arian OSS.
According to a specific implementation manner of the embodiment of the present disclosure, the comparing basic information of a video with requirements of a media platform, if not, obtaining negative feedback information M of the media platform for the original video, and simultaneously sending a video processing task to an alicloud OSS, and obtaining a task id returned by the alicloud OSS, includes:
Comparing the acquired video information with the requirements of the media platform to check whether the format, resolution and duration of the video meet the uploading standard of the media platform;
if the video does not meet the requirement of the media platform, generating a processing task containing a processing instruction by utilizing a video processing function provided by an Arian OSS, wherein the processing instruction comprises transcoding parameters, a clipping range and watermark pictures;
and after the video processing task is successfully sent, acquiring a task ID returned by the Arian OSS so as to conveniently use the task ID to inquire the task state or wait for the completion of the task.
According to a specific implementation manner of the embodiment of the present disclosure, the step of periodically querying the task state within a preset period of time based on the task ID until all tasks corresponding to the task ID are processed and completed includes:
Constructing a get_task_status function, an is_task_final function and a poll_task_status function, wherein the get_task_status function sends a GET request to an API of the Arian OSS to acquire a task state, and the is_task_final function judges whether the task is completed or not according to state information returned by the API, and the poll_task_status function uses a cycle to query the task state at regular time until the task is completed or a preset timeout time is exceeded.
According to a specific implementation manner of the embodiment of the present disclosure, the sending the processed video address url' to the media platform again to check whether the processed video meets the requirement of the media platform includes:
After the video processing task is completed, acquiring the URL' of the processed video file through the API of the Arian OSS;
According to an API or an uploading interface provided by the media platform, the URL' of the processed video file is sent to the media platform for verification;
if the video fails the verification, an error message is recorded and the relevant personnel is notified.
Corresponding to the above method embodiment, referring to fig. 3, the embodiment of the present invention further discloses a device 30 for improving the success rate of sending video materials by a media platform, including:
The storage module 301 stores the video uploaded by the user to the ali cloud OSS and acquires the address url of the original video stored in the ali cloud OSS;
The acquisition module 302 acquires the original video basic information stored in the alicloud OSS through a get request/urlx-OSS-process=video/info, and calculates a first feature matrix U1 of the original video based on the original video basic information;
The comparison module 303 compares the basic information of the video with the requirement of the media platform, if the basic information does not pass through, negative feedback information M of the media platform aiming at the original video is obtained, meanwhile, a video processing task is sent to the Arian OSS, and a task id returned by the Arian OSS is obtained;
the query module 304 is used for periodically querying the task state within a preset time period based on the task ID until all tasks corresponding to the task ID are processed, acquiring a processed video address url', extracting the basic information of the processed video, and calculating a second feature matrix U2 corresponding to the processed video based on the basic information of the processed video;
the sending module 305 extracts the third feature matrix U3 corresponding to the negative feedback information M, and sends the processed video address url' to the media platform again after SAM (U2, U3) < SAM (U1, U3) is satisfied, so as to verify whether the processed video meets the requirement of the media platform, where SAM () is a similarity calculation function.
Referring to fig. 4, an embodiment of the present invention also provides an electronic device 60, including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of improving the success rate of delivering video material by the media platform in the foregoing method embodiments.
Embodiments of the present invention also provide a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the foregoing method embodiments.
Embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of improving the success rate of delivering video material by a media platform in the foregoing method embodiments.
Referring now to fig. 4, a schematic diagram of an electronic device 60 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 4, the electronic device 60 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic device 60 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 shows the electronic device 60 with various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (8)

1. A method for improving the success rate of transmitting video material by a media platform, comprising:
storing the video uploaded by the user to an Arin cloud OSS, and acquiring an address url of an original video stored in the Arin cloud OSS;
acquiring original video basic information stored in an alicloud OSS through a get request/urlx-OSS-process=video/info, and calculating a first feature matrix U1 of the original video based on the original video basic information;
comparing the basic information of the video with the requirement of the media platform, if the basic information does not pass, acquiring negative feedback information M of the media platform aiming at the original video, simultaneously transmitting a video processing task to an Arian OSS, and acquiring a task id returned by the Arian OSS, wherein the method comprises the following steps: comparing the acquired video information with the requirements of the media platform to check whether the format, resolution and duration of the video meet the uploading standard of the media platform; if the video does not meet the requirement of the media platform, generating a processing task containing a processing instruction by utilizing a video processing function provided by an Arian OSS, wherein the processing instruction comprises transcoding parameters, a clipping range and watermark pictures; after the video processing task is successfully sent, acquiring a task ID returned by the Arian OSS so as to use the task ID to inquire the task state or wait for the completion of the task;
Based on the task ID, periodically inquiring the task state in a preset time period until all tasks corresponding to the task ID are processed, acquiring a processed video address url', and extracting basic information of the processed video so as to calculate a second feature matrix U2 corresponding to the processed video based on the basic information of the processed video;
Extracting a third feature matrix U3 corresponding to the negative feedback information M, and after SAM (U2, U3) < SAM (U1, U3) is satisfied, re-sending the processed video address url' to the media platform to check whether the processed video accords with the requirement of the media platform, wherein SAM () is a similarity calculation function; wherein the method comprises the steps of
The obtaining, through get request/urlx-OSS-process=video/info, the original video basic information stored in the alicloud OSS includes: determining a complete URL of a video file on an Arin cloud OSS, and analyzing an OSS domain name, a socket name and a path of the video file contained in the URL; adding x-oss-process=video/info after URL specifies the video processing operation desired to be performed, and thus obtains video information.
2. The method of claim 1, wherein storing the video uploaded by the user to the ali cloud OSS and obtaining an address url of an original video stored in the ali cloud OSS comprises:
creating an OSS account on the Arian cloud and creating a socket for storing video files;
installing a corresponding Arian OSS SDK according to the language used by the back-end service;
In the alicloud OSS console, a pair ACCESSKEYID and ACCESSKEYSECRET is created for the account number and configured in the backend service to enable access to the OSS;
in the back-end service, an interface is created for receiving the video file uploaded by the user, and after uploading the video to the back-end service, the back-end service uploads the video file to the alicloud OSS.
3. The method of claim 2, wherein the storing the video uploaded by the user to the ali cloud OSS and obtaining the address url of the original video stored in the ali cloud OSS further comprises:
After the video file is successfully uploaded to the OSS, the URL of the file is obtained by calling the related method in the OSS SDK, and the URL is generated based on the socket name, the file path and the domain name of the OSS.
4. The method of claim 1, wherein the obtaining the original video base information stored in the alicloud OSS via the get request/urlx-OSS-process = video/info, further comprises:
sending a get request to the URL using an HTTP client;
Acquiring a response in the form of a character string in a JSON format, and analyzing the character string in the JSON format to acquire the basic information of an original video;
when the socket sets private access control, acquiring temporary access credentials through the SDK of the Arian OSS.
5. The method of claim 1, wherein the periodically querying the task state for a preset period of time based on the task ID until all tasks corresponding to the task ID are processed, comprises:
Constructing a get_task_status function, an is_task_final function and a poll_task_status function, wherein the get_task_status function sends a GET request to an API of the Arian OSS to acquire a task state, and the is_task_final function judges whether the task is completed or not according to state information returned by the API, and the poll_task_status function uses a cycle to query the task state at regular time until the task is completed or a preset timeout time is exceeded.
6. The method of claim 5, wherein resending the processed video address url' to the media platform to verify whether the processed video meets the requirements of the media platform, comprising:
After the video processing task is completed, acquiring the URL' of the processed video file through the API of the Arian OSS;
According to an API or an uploading interface provided by the media platform, the URL' of the processed video file is sent to the media platform for verification;
if the video fails the verification, an error message is recorded and the relevant personnel is notified.
7. An apparatus for increasing the success rate of a media platform for delivering video material, comprising:
The storage module is used for storing the video uploaded by the user to the Arin cloud OSS and acquiring an address url of an original video stored in the Arin cloud OSS;
The acquisition module acquires original video basic information stored in an alicloud OSS through a get request/urlx-OSS-process=video/info, and calculates a first feature matrix U1 of the original video based on the original video basic information;
The comparison module compares the basic information of the video with the requirement of the media platform, if the basic information does not pass through, negative feedback information M of the media platform aiming at the original video is obtained, meanwhile, a video processing task is sent to an alicloud OSS, and a task id returned by the alicloud OSS is obtained, and the comparison module comprises the following steps: comparing the acquired video information with the requirements of the media platform to check whether the format, resolution and duration of the video meet the uploading standard of the media platform; if the video does not meet the requirement of the media platform, generating a processing task containing a processing instruction by utilizing a video processing function provided by an Arian OSS, wherein the processing instruction comprises transcoding parameters, a clipping range and watermark pictures; after the video processing task is successfully sent, acquiring a task ID returned by the Arian OSS so as to use the task ID to inquire the task state or wait for the completion of the task;
The query module is used for periodically querying the task state within a preset time period based on the task ID until all tasks corresponding to the task ID are processed, acquiring a processed video address url', extracting the basic information of the processed video, and calculating a second feature matrix U2 corresponding to the processed video based on the basic information of the processed video;
The sending module extracts a third feature matrix U3 corresponding to the negative feedback information M, and after SAM (U2, U3) < SAM (U1, U3) is met, the processed video address url' is sent to the media platform again so as to check whether the processed video accords with the requirement of the media platform, and SAM () is a similarity calculation function; wherein the method comprises the steps of
The obtaining, through get request/urlx-OSS-process=video/info, the original video basic information stored in the alicloud OSS includes: determining a complete URL of a video file on an Arin cloud OSS, and analyzing an OSS domain name, a socket name and a path of the video file contained in the URL; adding x-oss-process=video/info after URL specifies the video processing operation desired to be performed, and thus obtains video information.
8. An electronic device, the electronic device comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of improving the success rate of delivering video material by a media platform as claimed in any one of the preceding claims 1 to 6.
CN202410429711.4A 2024-04-10 Method and device for improving success rate of sending video material by media platform Active CN118042191B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410429711.4A CN118042191B (en) 2024-04-10 Method and device for improving success rate of sending video material by media platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410429711.4A CN118042191B (en) 2024-04-10 Method and device for improving success rate of sending video material by media platform

Publications (2)

Publication Number Publication Date
CN118042191A CN118042191A (en) 2024-05-14
CN118042191B true CN118042191B (en) 2024-06-21

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2840106A1 (en) * 2012-04-24 2013-10-31 Tencent Technology (Shenzhen) Company Limited Offline download method, multimedia file download method and system thereof
CN105824932A (en) * 2016-03-18 2016-08-03 浪潮软件集团有限公司 Archive system for storing OSS based on Aliskiu object

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2840106A1 (en) * 2012-04-24 2013-10-31 Tencent Technology (Shenzhen) Company Limited Offline download method, multimedia file download method and system thereof
CN105824932A (en) * 2016-03-18 2016-08-03 浪潮软件集团有限公司 Archive system for storing OSS based on Aliskiu object

Similar Documents

Publication Publication Date Title
JP6935523B2 (en) Methods and systems for displaying contextually relevant information about media assets
KR101977516B1 (en) Media distribution and management platform
US8166076B2 (en) Digital media metadata management
US20140149893A1 (en) System and method for visual analysis of on-image gestures
US9405813B1 (en) Media device knowledge base
CN106657257B (en) Method and apparatus for generating audio and video for interactive multimedia application
WO2017080167A1 (en) Video pushing method and system for third party
US9189484B1 (en) Automatic transcoding of a file uploaded to a remote storage system
WO2022041982A1 (en) Data recommendation method and apparatus, computer device, and storage medium
US8718378B2 (en) Image topological coding for visual search
CN103369367A (en) System and method to improve user experience with streaming content
CN101909047B (en) Method and device for acquiring multimedia programs
CN110807009B (en) File processing method and device
CN111883131A (en) Voice data processing method and device
KR101129380B1 (en) Apparatus of providing digital contents with external storage device and metadata, and method thereof
CN118042191B (en) Method and device for improving success rate of sending video material by media platform
US10176257B2 (en) Interactive video distribution system with content similarity matching
US20140351838A1 (en) System and method for providing a secure access-controlled enterprise content repository
CN118042191A (en) Method and device for improving success rate of sending video material by media platform
RU2530671C1 (en) Checking method of web pages for content in them of target audio and/or video (av) content of real time
CN111611420B (en) Method and device for generating image description information
US9055295B2 (en) Transcoding queue management
US20160105731A1 (en) Systems and methods for identifying and acquiring information regarding remotely displayed video content
JP2020173776A (en) Method and device for generating video
CN117155891B (en) Method and device for sending messages on multiple social media platforms by one key

Legal Events

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