CN115150386A - Method and device for uploading video to open platform, storage medium and electronic equipment - Google Patents

Method and device for uploading video to open platform, storage medium and electronic equipment Download PDF

Info

Publication number
CN115150386A
CN115150386A CN202210570849.7A CN202210570849A CN115150386A CN 115150386 A CN115150386 A CN 115150386A CN 202210570849 A CN202210570849 A CN 202210570849A CN 115150386 A CN115150386 A CN 115150386A
Authority
CN
China
Prior art keywords
video
upload
token
uploading
open platform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210570849.7A
Other languages
Chinese (zh)
Other versions
CN115150386B (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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202210570849.7A priority Critical patent/CN115150386B/en
Publication of CN115150386A publication Critical patent/CN115150386A/en
Application granted granted Critical
Publication of CN115150386B publication Critical patent/CN115150386B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present disclosure provides a method, an apparatus, a computer program product, a non-transitory computer-readable storage medium, and an electronic device for uploading a video to an open platform, the open platform including a first application programming interface for video uploading, the method comprising: acquiring an uploading token, wherein the uploading token has a mapping relation with a first type of parameter required for triggering video uploading operation; calling the first application programming interface and transmitting the upload token to perform a video upload operation. According to the embodiment provided by the disclosure, the uploading capability of the video file can be provided for the third-party application program through the software development kit which can be integrated by the front end of the third-party application program, and the technical cost of the third-party application program is reduced.

Description

Method and device for uploading video to open platform, storage medium and electronic equipment
Technical Field
The present disclosure relates generally to the field of computer technology, and more particularly, to a method, apparatus, computer program product, non-transitory computer-readable storage medium, and electronic device for uploading a video to an open platform.
Background
This section is intended to introduce a selection of aspects of the art, which may be related to various aspects of the present disclosure that are described and/or claimed below. This section is believed to be helpful in providing background information to facilitate a better understanding of the various aspects of the present disclosure. Accordingly, it should be understood that these statements are to be read in this light, and not as admissions of prior art.
The open platform refers to a software system, which makes the third party Application program increase the functions of the software system or use the resources of the software system by disclosing the Application Programming Interface (API) or functions of the software system without changing the source code of the software system. The video uploading process generally includes initializing a video file during video uploading, and for a larger video file, performing fragmentation and aggregation processing on the video file in order to improve the uploading success rate. The current main implementation form is that the open platform provides an HTTP interface (an open API interface), and the server side of the third party interacts through a call to the server side of the open platform.
However, the implementation of video uploading through the server-side API interaction manner may occupy server bandwidth and storage space of a third-party application program, and increase the third-party technical cost.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a computer program product, a non-transitory computer-readable storage medium, and an electronic device for uploading a video to an open platform, so as to reduce the technical cost of a third-party application in a video uploading process.
According to a first aspect of the present disclosure, there is provided a method for uploading a video to an open platform, the open platform including a first application programming interface for video uploading, the method including: acquiring an uploading token, wherein the uploading token has a mapping relation with a first type of parameter required for triggering video uploading operation; calling the first application programming interface and transmitting the upload token to perform a video upload operation.
According to a second aspect of the present disclosure, there is provided a method for uploading a video to an open platform, where the open platform includes a third application programming interface for uploading video fragments and a fourth application programming interface for synthesizing video fragments, and the method includes: acquiring an uploading token, wherein the uploading token has a mapping relation with a third type of parameters required for triggering the uploading operation of the video fragments and a fourth type of parameters required for triggering the synthesis operation of the video fragments; calling the third application programming interface and transmitting the uploading token to execute video fragment uploading operation; calling the fourth application programming interface and passing in the upload token to perform a video slice composition operation.
According to a third aspect of the present disclosure, there is provided an apparatus for uploading a video to an open platform, the open platform including a first application programming interface for video uploading, the apparatus including: the acquisition module is configured to acquire an uploading token, wherein the uploading token has a mapping relation with a first type of parameter required for triggering a video uploading operation; a calling module configured to call the first application programming interface and pass in the upload token to perform a video upload operation.
According to a fourth aspect of the present disclosure, there is provided an apparatus for uploading a video to an open platform, where the open platform includes a third application programming interface for uploading video slices and a fourth application programming interface for synthesizing video slices, the apparatus includes: the acquisition module acquires an uploading token, wherein the uploading token has a mapping relation with a third type of parameters required for triggering the uploading operation of the video fragments and a fourth type of parameters required for triggering the synthesis operation of the video fragments; a first calling module configured to call the third application programming interface and to pass the upload token in order to perform a video fragment upload operation; a second calling module configured to call the fourth application programming interface and pass the upload token in to perform a video tile composition operation.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising program code instructions which, when executed by a computer, cause the computer to perform the method according to the first aspect of the present disclosure.
According to a sixth aspect of the present disclosure, there is provided a computer program product comprising program code instructions which, when executed by a computer, cause the computer to perform the method according to the second aspect of the present disclosure.
According to a seventh aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to the first aspect of the present disclosure.
According to an eighth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to the second aspect of the present disclosure.
According to a ninth aspect of the present disclosure, there is provided an electronic device comprising: a processor, a memory in electronic communication with the processor; and instructions stored in the memory and executable by the processor to cause the electronic device to perform the method according to the first aspect of the disclosure.
According to a tenth aspect of the present disclosure, there is provided an electronic device comprising: a processor, a memory in electronic communication with the processor; and instructions stored in the memory and executable by the processor to cause the electronic device to perform the method according to the second aspect of the disclosure.
According to the embodiments provided by the disclosure, the uploading capability of the video file can be provided for the third-party application program through the software development kit which can be integrated by the front end of the third-party application program, and the technical cost of the third-party application program is reduced.
It should be understood that the statements herein are not intended to identify key or essential features of the claimed subject matter, nor are they intended to be used as an aid in determining the scope of the claimed subject matter, alone.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts. Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
Fig. 1 shows a schematic system architecture diagram of a method for uploading a video to an open platform, to which an embodiment of the present disclosure may be applied.
Fig. 2 shows a flow diagram of one example of a method of uploading video to an open platform according to the present disclosure.
Fig. 3 illustrates an example interaction flow of a method of uploading video to an open platform according to an embodiment of the present disclosure.
Fig. 4 shows a flowchart schematic of yet another example of a method of uploading video to an open platform according to the present disclosure.
Fig. 5 illustrates yet another example interaction flow of a method of uploading video to an open platform in accordance with an embodiment of the present disclosure.
Fig. 6 illustrates one example of a flow of authenticating an upload token internally of an open platform according to the present disclosure.
Fig. 7 shows one example of a method of uploading a video to an open platform according to an embodiment of the present disclosure.
Fig. 8 illustrates an example interaction flow of a method of uploading video to an open platform, in accordance with an embodiment of the present disclosure.
Fig. 9 shows a flowchart schematic of yet another example of a method of uploading video to an open platform according to the present disclosure.
Fig. 10 illustrates yet another example interaction flow of a method of uploading video to an open platform in accordance with an embodiment of the present disclosure.
Fig. 11 illustrates one example of a flow of authenticating an upload token inside an open platform according to the present disclosure.
Fig. 12 illustrates an example flow of a method of generating an upload token in various embodiments of the present disclosure.
Fig. 13 illustrates an exemplary block diagram of an apparatus for uploading video to an open platform according to an embodiment of the present disclosure.
Fig. 14 is an exemplary block diagram of an apparatus for uploading video to an open platform according to an embodiment of the present disclosure.
FIG. 15 shows a schematic block diagram of an example electronic device 1100 that may be used to implement embodiments of the present disclosure.
Detailed description of the invention
The present disclosure now will be described more fully hereinafter with reference to the accompanying drawings. The present disclosure may, however, be embodied in many alternate forms and should not be construed as limited to the embodiments set forth herein. Accordingly, while the disclosure is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that there is no intention to limit the disclosure to the specific forms disclosed, but on the contrary, the disclosure is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the disclosure as defined by the appended claims.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the teachings of the present disclosure.
Some examples are described herein in connection with block diagrams and/or flowchart illustrations, where each block represents a circuit element, a module, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in other implementations, the functions noted in the blocks may occur out of the order noted. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
Reference herein to "according to.. Examples" or "in.. Examples" means that a particular feature, structure, or characteristic described in connection with the examples can be included in at least one implementation of the present disclosure. The appearances of the phrase "according to.. Example" or "in.. Example" in various places herein are not necessarily all referring to the same example, nor are separate or alternative examples necessarily mutually exclusive of other examples.
Fig. 1 shows a schematic system architecture diagram of a method for uploading a video to an open platform, to which an embodiment of the present disclosure may be applied. As shown in fig. 1, the system architecture 100 may include a server 101 of a third party application, a terminal device 102 on which the third party application is installed, and an open platform server 103. The terminal device 102 may interact with the server 101 via a network, for example, the terminal device 102 may send a request to upload a video file to the server 101 via the network. The server 103 may interact with the server 101 over a network, for example, the server 101 may send parameters associated with a video upload task to the server 103 over the network. The server 103 may provide various types of services, for example, the server 103 may generate an upload token (described in detail below) based on received parameters associated with the video upload task. The server 103 may also provide various types of API interfaces to provide corresponding capability support, e.g., the server 103 may provide a video file upload interface to provide video file upload capabilities to the terminal device 102.
The server 101 or the server 103 may be hardware or software. When the server 101 or the server 103 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 101 or the server 103 is software, it may be implemented as a plurality of pieces of software or software modules, or may be implemented as a single piece of software or software module.
It should be noted that the method for uploading a video to an open platform provided by the embodiment of the present disclosure may be executed by the terminal device 102. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative, and that any number of terminal devices, networks, and servers may be present, as desired for an implementation.
In examples of the disclosure, the front-end may refer to content that a user of the terminal device 102 in fig. 1 browses on a web page or an application, and the back-end (also referred to as a server-end) may refer to content that is not visible to the user of the terminal device 102 on a website or an application. The back-end may provide data interaction to handle the corresponding business logic, typically including function implementation, access to data, and the like. For convenience of description, front-end, terminal, and terminal devices may be used interchangeably herein, and back-end, server, and server may be used interchangeably herein.
An example of a method for uploading a video to an open platform according to an embodiment of the present disclosure is described below with reference to fig. 2. As shown in fig. 2, the method 200 for uploading a video to an open platform includes:
step S202: acquiring an uploading token, wherein the uploading token has a mapping relation with a first type of parameter required for triggering a video uploading operation.
Step S204: calling the first application programming interface and transmitting the upload token to perform a video upload operation.
In this example, the open platform may provide a Software Development Kit (SDK) for video upload to provide video upload capability support to third party applications. The third party application may populate the invocation parameters to invoke the video upload capabilities of the open platform according to the SDK protocol specification of the open platform. In this example, the terminal device 102 in fig. 1 may assemble a Uniform Resource Locator (URL) according to the SDK protocol specification of the open platform, and obtain the required capability by sending an HTTP request to the open platform. In this example, the SDK of the open platform may include a first application programming interface for video upload, and the terminal device 102 in fig. 1 may obtain the video upload capability provided by the open platform by calling the first application programming interface. Illustratively, the first application programming interface may be an upload interface for a single small video file (e.g., a file of no more than 100M).
In this example, the terminal device 102 in fig. 1 calls the first application programming interface to fill in the call parameter as the upload token. The upload token is a random character string generated by the open platform server in the interaction of video file upload, for example, the upload token may be an address index of a storage space. In this example, the first type of parameters include parameters required by the open platform to trigger a video uploading process of the open platform, such as a storage space path (parameter name: upos _ uri) allocated by the open platform, a unique identifier (parameter name: filename) of the open platform for a video file, a unique identifier (parameter name: upload _ id) of the open platform for a video file uploading action, and the like. In this example, the upload token may identify a first type parameter. In some examples, the first type of parameter also includes an identification of the third party application (parameter name: client _ id). In this example, the first type of parameters are mapped into the upload token and returned to the third-party application program, so that the complexity of the parameters of the interaction between the third-party application program and the open platform interface can be effectively reduced, and the data security risk is reduced.
In this example, the terminal device 102 in fig. 1 may also pass a binary stream of the video file (i.e., video content) into the first application programming interface when the first application programming interface is invoked.
Fig. 3 illustrates an example interaction flow of a method of uploading a video to an open platform according to an embodiment of this disclosure. As shown in fig. 3, the method for uploading a video to an open platform includes:
in step 1, the three-party server (i.e., the server of the third-party application program in the present disclosure) returns the upload token generated by the open platform server to the three-party front end (i.e., the front end of the third-party application program in the present disclosure). The uploading token and the first type of parameters required by triggering the video uploading process of the open platform have a mapping relation.
In step 2, the three-party front end calls the SDK of the open platform and fills parameters. The parameters populated here include the upload token. The SDK here includes a first application programming interface (e.g., the video file upload interface in fig. 3) for video upload.
And 3, calling a video file uploading interface of the open platform server by the three-party front end. And the open platform server analyzes the first type of parameters required by triggering the video uploading process according to the uploading token and executes the video uploading operation.
And 4, returning a message body by the open platform server according to the execution condition of the video uploading operation in the steps 5 and 4. The message body may include three types of parameters, which are { code, message, data }, where code is 0 indicating successful upload, code is other values indicating failure upload, message is a pattern description, and data is data (e.g., an upload token).
According to the method for uploading the video to the open platform, provided by the embodiment of the disclosure, the front-end user of the third-party application program can directly upload the video file to the open platform through the software development kit which can be integrated by the front end of the third-party application program, without occupying the server bandwidth and the storage space of the third-party application program, so that the technical cost of the third-party application program is reduced.
Fig. 4 shows a flowchart schematic of yet another example of a method of uploading video to an open platform according to the present disclosure.
As shown in fig. 4, the method 400 for uploading a video to an open platform includes:
step S402: generating a second type of parameter associated with a video upload task, wherein the upload token is generated by the open platform based on the second type of parameter.
In this example, the terminal device in fig. 1 may generate a second type of parameter associated with the video upload task. The video upload task may include which front-end user to upload videos, which video files to upload by the front-end user, and the like. The second type of parameter is associated with the current video upload task, and the second type of parameter may include an authorization token (parameter name) of the front end user, a file name (parameter name) of the video, and the like. The front-end user can select the local video file to be uploaded currently, and after clicking the upload button, the front end can generate the second type of parameters.
In this example, the open platform may generate the upload token according to the second type of parameters. For example, the open platform may authenticate the authorization token of the front-end user, generate a random string (i.e., an upload token) to identify the address index of the storage space after the authentication is passed, then generate a mapping between the second type of parameters and the random string and assemble the second type of parameters into a data structure to be stored in the memory of the open platform.
In some examples, the open platform further comprises a second application programming interface for performing video uploading preprocessing, and the uploading token is generated by the application server side by calling the second application programming interface and transmitting the second type of parameters. In this example, the video upload pre-processing operation may include initializing a video file, and the server 101 in fig. 1 may obtain the capability of initializing the video file provided by the open platform by calling the second application programming interface. In this example, the server 101 in fig. 1 may assemble a URL according to the second api protocol specification, and obtain the capability to initialize the video file by sending an HTTP request to the open platform. Illustratively, the second application programming interface protocol specification includes a request URL, a URL parameter (e.g., access _ token), a Body parameter (e.g., name), and the like.
Step S404: acquiring an uploading token, wherein the uploading token has a mapping relation with a first type of parameter required for triggering a video uploading operation.
Step S406: calling the first application programming interface and transmitting the upload token to perform a video upload operation.
Fig. 5 illustrates yet another example interaction flow of a method of uploading a video to an open platform in accordance with an embodiment of the present disclosure. As shown in fig. 5, the method for uploading a video to an open platform includes:
in step 1, after the user of the three-party front end selects the local video file and clicks the upload button, the three-party front end can generate the second type of parameters, call the three-party server and transmit the second type of parameters. The second type of parameter may include an authorization token (parameter name: access _ token) of the front-end user, a file name (parameter name: name) of the video, and the like.
In step 2, the three-party service end can call a video file uploading preprocessing interface of the open platform. The open platform may generate an upload token according to the second type of parameters. For example, the open platform may authenticate the authorization token of the front-end user, generate a random string (i.e., an upload token) to identify the address index of the storage space after the authentication is passed, then generate a mapping between the second type of parameters and the random string and assemble the second type of parameters into a data structure to be stored in the memory of the open platform.
And 3, returning an uploading token to the three-party server through the message body by the open platform server.
And 4, the three-party service end returns the uploading token generated by the open platform service end to the three-party front end. The uploading token and the first type of parameters required by triggering the video uploading process of the open platform have a mapping relation.
In step 5, the three-party front end calls the SDK of the open platform and fills in parameters. The parameters filled in here include the upload token. The SDK here includes a first application programming interface (e.g., the video file upload interface in fig. 5) for video upload.
And 6, calling a video file uploading interface by the open platform server. And the open platform server analyzes the first type of parameters required by triggering the video uploading process according to the uploading token and executes the video uploading operation.
And 7, 8, returning a message body by the open platform server according to the execution condition of the video uploading operation.
In some optional examples, the upload token may have a physical validity period, and the open platform further authenticates the upload token to determine that the upload token is within the physical validity period before the open platform performs the video upload operation. Alternatively, the upload token may set a short physical validity period, such as one or two days. Fig. 6 illustrates one example of a flow of authenticating an upload token inside an open platform according to the present disclosure. Step 3 "call video file upload interface" in fig. 6, and the incoming upload token "corresponds to step 3" call video file upload interface "in fig. 3, and step 3" return message body "in fig. 6 corresponds to step 3" return message body "in fig. 3, and the description about step 3 and step 4 in fig. 6 can be referred to the above description in connection with fig. 3.
As shown in fig. 6, the open platform may include a video cloud platform, an authorization service platform. In step 3-1, the video cloud platform may invoke an upload token authentication interface of the authorization service platform. At step 3-2, the authorization service platform may read the first type of parameter from a storage element (e.g., redis) and authenticate the upload token to determine that the upload token is within the physical validity period. In step 3-3, if the upload token is in the physical validity period, the authorization service platform may return a message body about successful authentication and a first type parameter. The first type of parameters are parameters necessary for the video cloud platform to perform a video uploading operation. In steps 3-4, the video cloud platform performs a video upload operation according to the first type of parameters and the binary stream of the video file (transmitted in step 3).
In other examples, the upload token also has a legal expiration date, and the open platform further authenticates the upload token to determine that the upload token is within the legal expiration date before the open platform performs the video upload operation. In some scenarios, when the upload token is still in the physical validity period, the front-end user may actively cancel the current video upload operation, and at this time, the open platform should interrupt the current video upload operation to avoid legal risks. Based on the method, a legal validity period can be set for the uploading token, and when the uploading token is in the legal validity period, the front-end user continues to authorize the current video uploading operation; and when the uploading token is not in the legal validity period, the front-end user cancels the continuous authorization of the current video uploading operation. In this example, the process of authenticating the legal validity period of the upload token is similar to the process of authenticating the physical validity period of the upload token, which can be seen in detail in the description related to fig. 6.
According to the method for uploading the video to the open platform, the important data of the third-party application program can be protected at the server side through the uploading token with the short validity period, and the risk of data safety is reduced.
An example of a method for uploading a video to an open platform according to an embodiment of the present disclosure is described below with reference to fig. 7. As shown in fig. 7, the method 700 for uploading a video to an open platform includes:
step S702: and acquiring an uploading token, wherein the uploading token has a mapping relation with a third type of parameters required for triggering the uploading operation of the video fragments and a fourth type of parameters required for triggering the video synthesis operation.
Step S704: and calling the third application programming interface and transmitting the uploading token to execute the video fragment uploading operation.
Step S706: calling the fourth application programming interface and passing in the upload token to perform a video slice composition operation.
In this example, the open platform may provide a software development kit for video upload to provide video upload capability support to third party applications. The third party application may fill in call parameters to call the video upload capability of the open platform according to the SDK protocol specification of the open platform. In this example, the terminal device 102 in fig. 1 can assemble the uniform resource locator according to the SDK protocol specification of the open platform, and obtain the required capability by sending an HTTP request to the open platform. In this example, the SDK of the open platform may include a third application programming interface for uploading video fragments and a fourth application programming interface for synthesizing video fragments, and the terminal device 102 in fig. 1 may obtain the video fragment uploading capability provided by the open platform by calling the third application programming interface, and obtain the video fragment synthesizing capability provided by the open platform by calling the fourth application programming interface. Illustratively, the third application programming interface may be an upload interface for larger video files (e.g., files exceeding 100M).
In this example, the terminal device 102 in fig. 1 calls the third application programming interface and the fourth application programming interface to fill in the call parameter as the upload token. The upload token is a random character string generated by the open platform server in the interaction of video file upload, for example, the upload token may be an address index of a storage space. In this example, the third type of parameters include parameters required by the open platform to trigger the video fragment uploading process of the open platform, such as a storage space path allocated by the open platform (parameter name: upos _ uri), a unique identifier of the open platform to a video file (parameter name: filename), a unique identifier of the open platform to a video fragment file uploading action (parameter name: upload _ id), and the like. In this example, the upload token may identify a third class of parameters. In an example, the fourth type of parameters include parameters required by the open platform to trigger a video fragment composition process of the open platform, such as a storage space path (parameter name: upos _ uri) allocated by the open platform, a unique identifier (parameter name: filename) of the open platform for a video file, a unique identifier (parameter name: upload _ id) of the open platform for uploading a video fragment file, a unique identifier (parameter name: UID) of the open platform for a user, and the like.
In some examples, the third class of parameters and the fourth class of parameters also include an identification of the third party application (parameter name: client _ id). In this example, the third-class parameters and the fourth-class parameters are mapped into the upload token and returned to the third-party application program, so that the complexity of the interaction between the third-party application program and the open platform interface can be effectively reduced, and the data security risk is reduced.
In this example, the terminal device 102 in fig. 1 may also transfer a video clip number (parameter name: part _ number), a binary stream of a video clip file (i.e., video content), and so on to the third application programming interface when the third application programming interface is called.
Fig. 8 illustrates an example interaction flow of a method of uploading video to an open platform, in accordance with an embodiment of the present disclosure. As shown in fig. 8, the method for uploading a video to an open platform includes:
in step 1, the three-party service end returns an upload token generated by the open platform service end to the three-party front end. The uploading token has a mapping relation with a third type of parameters required for triggering the uploading operation of the video fragments and a fourth type of parameters required for triggering the video synthesis operation.
In step 2, the three-party front end calls the SDK of the open platform and fills parameters. The parameters filled in here include the upload token. The SDK here includes a third application programming interface (e.g., the video file fragment upload interface in fig. 8) for uploading video fragments and a fourth application programming interface (e.g., the video file fragment composition interface in fig. 8) for synthesizing video fragments.
And 3, locally slicing the video file by the three-party front end. In this example, the SDK includes a function or function to slice the video file, and the SDK performs a slicing operation of the local video file through step 3.
And step 4, calling a video file fragment uploading interface of the open platform server by the three-party front end. And the open platform server analyzes the third type of parameters required by triggering the video fragment uploading process according to the uploading token and executes the video fragment uploading operation.
And 5, returning a message body by the open platform server according to the execution condition of the video fragment uploading operation. The message body may include three types of parameters, which are { code, message, data }, where code is 0 indicating successful upload, code is other values indicating failure upload, message is a pattern description, and data is data (e.g., an upload token).
And (5) circularly executing the steps 4 and 5 until all the video fragment uploading operations are finished, and entering the step 6.
And 7, calling a video file fragmentation synthesis interface of the open platform server by the three-party front end. And the open platform server analyzes the fourth type of parameters required by triggering the video fragment synthesis process according to the uploading token and executes the video fragment synthesis operation.
And 8, the open platform server returns a message body according to the execution condition of the video fragment composition operation.
According to the method for uploading the video to the open platform, the front-end user of the third-party application program can directly upload the video file to the open platform through the software development kit which can be integrated by the front end of the third-party application program, the server bandwidth and the storage space of the third-party application program are not occupied, and the technical cost of the third-party application program is reduced.
Fig. 9 shows a flowchart schematic of yet another example of a method of uploading video to an open platform according to the present disclosure.
As shown in fig. 9, the method 900 for uploading a video to an open platform includes:
step S902: generating a second type of parameter associated with a video upload task, wherein the upload token is generated by the open platform based on the second type of parameter.
In this example, the terminal device in fig. 1 may generate a second type of parameter associated with the video upload task. The video upload task may include which front-end user to upload videos, which video files to upload by the front-end user, and the like. The second type of parameter is associated with the current video upload task, and the second type of parameter may include an authorization token (parameter name) of the front end user, a file name (parameter name) of the video, and the like. The front-end user can select the local video file to be uploaded currently, and after clicking the upload button, the front end can generate the second type of parameters.
In this example, the open platform may generate the upload token according to the second type of parameters. For example, the open platform may authenticate the authorization token of the front-end user, generate a random string (i.e., an upload token) to identify the address index of the storage space after the authentication is passed, then generate a mapping between the second type of parameters and the random string and assemble the second type of parameters into a data structure to be stored in the memory of the open platform.
In some examples, the open platform further comprises a second application programming interface for performing video uploading preprocessing, and the uploading token is generated by the application server side by calling the second application programming interface and transmitting the second type of parameters. In this example, the video upload pre-processing operation may include initializing a video file, and the server 101 in fig. 1 may obtain the capability of initializing the video file provided by the open platform by calling the second application programming interface. In this example, the server 101 in fig. 1 may assemble a URL according to the second api protocol specification, and obtain the capability to initialize the video file by sending an HTTP request to the open platform. Illustratively, the second application programming interface protocol specification includes a request URL, a URL parameter (e.g., access _ token), a Body parameter (e.g., name), and the like.
Step S904: and acquiring an uploading token, wherein the uploading token has a mapping relation with a third type of parameters required for triggering the uploading operation of the video fragments and a fourth type of parameters required for triggering the video synthesis operation.
Step S906: and calling the third application programming interface and transmitting the uploading token to execute the video fragment uploading operation.
Step S908: calling the fourth application programming interface and passing in the upload token to perform a video slice composition operation.
Fig. 10 illustrates yet another example interaction flow of a method of uploading video to an open platform in accordance with an embodiment of the present disclosure. As shown in fig. 10, the method for uploading a video to an open platform includes:
in step 1, after the user at the front end selects the local video file and clicks the upload button, the front end can generate the second type of parameters, call the three-party server and transmit the second type of parameters. The second type of parameter may include an authorization token (parameter name: access _ token) of the front-end user, a file name (parameter name: name) of the video, and the like.
In step 2, the three-party service end can call a video file uploading preprocessing interface of the open platform. The open platform may generate an upload token according to the second type of parameters. For example, the open platform may authenticate the authorization token of the front-end user, generate a random string (i.e., an upload token) to identify the address index of the storage space after the authentication is passed, then generate a mapping between the second type of parameters and the random string and assemble the second type of parameters into a data structure to be stored in the memory of the open platform.
And 3, returning an uploading token to the three-party server through the message body by the open platform server.
And 4, the three-party service end returns the uploading token generated by the open platform service end to the three-party front end. The uploading token has a mapping relation with a third type of parameters required for triggering the uploading operation of the video fragments and a fourth type of parameters required for triggering the video synthesis operation.
In step 5, the three-party front end calls the SDK of the open platform and fills in parameters. The parameters filled in here include the upload token. The SDK here includes a third application programming interface (e.g., the video file fragment upload interface in fig. 10) for uploading video fragments and a fourth application programming interface (e.g., the video file fragment composition interface in fig. 10) for synthesizing video fragments.
In step 6, the three-party front end performs slicing operation on the video file locally. In this example, the SDK includes a function or function to slice the video file, and the SDK performs a slicing operation of the local video file through step 3.
And 7, calling a video file fragment uploading interface of the open platform server by the three-party front end. And the open platform server analyzes the third type of parameters required by triggering the video fragment uploading process according to the uploading token and executes the video fragment uploading operation.
And 8, returning a message body by the open platform server according to the execution condition of the video fragment uploading operation. The message body may include three types of parameters, which are { code, message, data }, where code is 0 to indicate successful uploading, code is other values to indicate failed uploading, message is a document description, and data is data (e.g., an upload token).
And (7) circularly executing the steps (7) and (8) until all the video fragment uploading operations are finished, and entering the step (9).
In the 10 th step, the three-party front end calls a video file fragmentation synthesis interface of the open platform service end. And the open platform server analyzes the fourth type of parameters required by triggering the video fragment synthesis process according to the uploading token and executes the video fragment synthesis operation.
In step 11, the open platform server returns a message body according to the execution condition of the video fragment composition operation.
In some optional examples, the upload token may have a physical validity period, and the open platform further authenticates the upload token to determine that the upload token is within the physical validity period before the open platform performs the video file fragmentation upload operation or the video file fragmentation composition operation. Alternatively, the upload token may set a short physical validity period, such as one or two days. Fig. 11 shows one example of a flow of authenticating an upload token inside an open platform according to the present disclosure. The 4 th step "call video file fragment upload interface, the incoming upload token" in fig. 11 corresponds to the 4 th step "call video file fragment upload interface" in fig. 8, the 5 th step "return message body" in fig. 11 corresponds to the 5 th step "return message body" in fig. 8, the 7 th step "call video file fragment composition interface" in fig. 11 corresponds to the 7 th step "call video file fragment composition interface" in fig. 8, the 8 th step "return message body" in fig. 11 corresponds to the 8 th step "return message body" in fig. 8, and the descriptions about the 4 th step, the 5 th step, the 7 th step, and the 8 th step in fig. 11 can be referred to the related descriptions in conjunction with fig. 8.
As shown in fig. 11, the open platform may include an interface service platform, a video cloud platform, and an authorization service platform. In step 4-1, the video cloud platform may invoke an upload token authentication interface of the authorization service platform. At step 4-2, the authorization service platform may read the third class of parameters from a storage element (e.g., redis) and authenticate the upload token to determine that the upload token is within the physical validity period. In step 4-3, if the upload token is within the physical validity period, the authorization service platform may return a message body about successful authentication and a third type parameter. The third type of parameters are parameters necessary for the video cloud platform to execute the video file fragment uploading operation. In steps 4-4, the video cloud platform executes the video uploading operation according to the third type parameters and the binary stream of the video file fragment (transmitted in step 4).
In step 7-1, the interface service platform may invoke an upload token authentication interface of the authorization service platform. At step 7-2, the authorization service platform may read the fourth type parameter from a storage element (e.g., redis) and authenticate the upload token to determine that the upload token is within the physical validity period. In step 7-3, if the upload token is in the physical validity period, the authorization service platform may return a message body about successful authentication. In steps 7-4, the interface service platform may call a video file fragment composition interface of the video cloud platform and transfer the upload token. In steps 7-5, the video cloud platform may invoke an upload token authentication interface of the authorization service platform. At steps 7-6, the authorization service platform may read the fourth type parameter from a storage element (e.g., redis) and authenticate the upload token to determine that the upload token is within the physical validity period. In steps 7-7, if the upload token is in the physical validity period, the authorization service platform may return a message body about successful authentication and a fourth type parameter. In steps 7-8, the video cloud platform performs video file fragment composition (i.e., video composition in fig. 11) according to the fourth type of parameters. In steps 7-9, the video cloud platform may return a message body about success or failure of the video file composition.
In other examples, the upload token also has a legal expiration date, and the open platform further authenticates the upload token to determine that the upload token is within the legal expiration date before the open platform performs the video file fragmentation upload operation or the video file fragmentation composition operation. In some scenes, when the uploading token is still in the physical validity period, the front-end user may actively cancel the current video file fragment uploading operation or the video file fragment synthesizing operation, and at this time, the open platform should interrupt the current video file fragment uploading operation or the video file fragment synthesizing operation to avoid legal risks. Based on the method, a legal validity period can be set for the uploading token, and when the uploading token is in the legal validity period, the front-end user continues to authorize the current video file fragment uploading operation or the video file fragment synthesizing operation; and when the uploading token is not in the legal validity period, the front-end user cancels the continuous authorization of the current video file fragment uploading operation or the video file fragment synthesizing operation. In this example, the process of authenticating the legal validity period of the upload token is similar to the process of authenticating the physical validity period of the upload token, as described in detail in connection with fig. 11.
According to the method for uploading the video to the open platform, the important data of the third-party application program can be protected at the server side through the uploading token with the short validity period, and the risk of data safety is reduced.
In some optional examples, the method of uploading a video to an open platform shown in fig. 7 or fig. 9 further includes: and slicing the video and generating a fifth type of parameter associated with the video slice uploading task. The video clip upload task may include which video file clip is currently to be uploaded, and the content of the video file clip. In this example, the fifth type reference may include a video slice number (parameter name), a video slice binary data stream. In this example, the fifth type of parameters may be passed into the open platform at step 4 in fig. 8 or into the open platform at step 7 in fig. 10.
Fig. 12 illustrates an example flow of a method of generating an upload token in various embodiments of the present disclosure. As shown in fig. 12, in step 1, the three-party service end may call a video file upload preprocessing interface, and transfer parameters client _ id, access _ take, and name; in step 2, the interface service platform of the open platform may call a getUploadToken method of the authorization service platform, and introduce parameters client _ id, access _ token, and name; in step 3, the authorization service platform authenticates the access _ token and analyzes the parameter UID; in the 4 th step, the authorization service platform generates an upload token; in the 5 th step, the authorization service platform generates and maps parameters client _ id, access _ token, name, UID and an uploading token, and writes the parameters client _ id, access _ token, name, UID and uploading token into the redis; in step 6, the authorization service platform returns an upload token; in the 7 th step, calling a video file uploading preprocessing interface of the video cloud platform, and transmitting an uploading token; in the 8 th step, the video cloud platform calls an uploading token authentication interface of the authorization service platform; in step 9, reading parameters (including client _ id, UID and name) required for executing the uploading preprocessing operation of the video file from the redis; authenticating the upload token to determine that the upload token is in a physical validity period and/or a legal validity period, in step 10; in the 11 th step, the authorization service platform returns parameters (including client _ id, UID and name) required for executing the uploading preprocessing operation of the video file; in the 12 th step, the video cloud platform executes initialization operation on the video file, and generates a first type of parameters required for executing the video file uploading operation or generates a third type of parameters required for executing the video file fragment uploading operation and a fourth type of parameters (including upos _ uri, upload _ id, cid and filename) required for executing the video file fragment synthesizing operation; in the 13 th step, the token is bound and uploaded by client _ id, UID, name, upos _ uri, upload _ id, cid and filename; in step 14, updating the parameters into the content of the upload token binding, and writing the parameters into the redis; in step 15, the updated upload token is returned.
Fig. 13 illustrates an exemplary block diagram of an apparatus for uploading video to an open platform according to an embodiment of the present disclosure. As shown in fig. 13, the open platform includes a first application programming interface for video uploading, and the apparatus 1300 includes: an obtaining module 1301 configured to obtain an upload token, where the upload token has a mapping relationship with a first type of parameter required for triggering a video upload operation; a calling module 1302 configured to call the first application programming interface and pass the upload token in to perform a video upload operation.
According to the device for uploading the video to the open platform, which is provided by the embodiment of the disclosure, the uploading capability of the video file is provided for the third-party application program through the software development kit which can be integrated by the front end of the third-party application program, so that the technical cost of the third-party application program is reduced.
It should be understood that the various modules of the apparatus 1300 shown in fig. 13 may correspond to the various steps in the method 200 described with reference to fig. 2. Thus, the operations, features and advantages described above with respect to the method 200 are equally applicable to the apparatus 1300 and the modules included therein. Certain operations, features and advantages may not be described in detail herein for the sake of brevity.
In some examples, the apparatus 1300 further comprises: a generation module configured to generate a second type of parameter associated with a video upload task, wherein the upload token is generated by the open platform based on the second type of parameter.
In some examples, the second type of parameter includes an authorization token for an application user, a filename of the video.
In some examples, the first type of parameter includes an identification of an application, a path of a storage space, and an identification of the video upload operation.
In some examples, the open platform further comprises a second application programming interface for performing video upload preprocessing, and the upload token is generated by the application server side by calling the second application programming interface and inputting the second type parameter.
In some examples, the upload token is a random string with address indexing functionality.
In some examples, the upload token has a physical expiration date, and the open platform further authenticates the upload token to determine that the upload token is within the physical expiration date prior to the open platform performing the video upload operation.
In some examples, the upload token also has a legal expiration date, and the open platform further authenticates the upload token to determine that the upload token is within the legal expiration date before the open platform performs a video upload operation.
Fig. 14 illustrates an exemplary block diagram of an apparatus for uploading video to an open platform according to an embodiment of the present disclosure. As shown in fig. 14, the open platform includes a third application programming interface for uploading video fragments and a fourth application programming interface for synthesizing video fragments, and the apparatus 1400 includes: an obtaining module 1401, configured to obtain an upload token, where the upload token has a mapping relationship with a third type of parameter required for triggering a video segment upload operation and a fourth type of parameter required for triggering a video segment composition operation; a first calling module 1402 configured to call the third application programming interface and to transfer the upload token in order to perform a video fragment upload operation; a second calling module 1403 configured to call the fourth application programming interface and pass the upload token in to perform a video slice composition operation.
According to the device for uploading the video to the open platform, which is provided by the embodiment of the disclosure, the uploading capacity of the video file can be provided for the third-party application program through the software development kit which can be integrated by the front end of the third-party application program, and the technical cost of the third-party application program is reduced.
It should be understood that the various modules of the apparatus 1400 shown in fig. 14 may correspond to the various steps in the method 400 described with reference to fig. 4. Thus, the operations, features and advantages described above with respect to the method 400 are equally applicable to the apparatus 1400 and the modules included therein. Certain operations, features and advantages may not be described in detail herein for the sake of brevity.
In some examples, the apparatus 1400 further comprises: a first generation module configured to generate a second type of parameter associated with a video upload task, wherein the upload token is generated by the open platform based on the second type of parameter.
In some examples, the second type of parameter includes an authorization token of an end user of an application, a filename of the video.
In some examples, the third type of parameter or the fourth type of parameter includes an identification of an application program, a path of a storage space, and an identification of the video slice upload operation.
In some examples, the apparatus further comprises: a second generation module configured to slice the video and generate a fifth type of parameter associated with the video slice upload task, the first invocation module being further configured to: and calling the third application programming interface and transmitting the uploading token and the fifth type parameters to execute video fragment uploading operation.
In some examples, the fifth type of parameter includes a video slice number and a video slice.
In some examples, the open platform further comprises a second application programming interface for performing video upload preprocessing, and the upload token is generated by the application server side by calling the second application programming interface and inputting the second type parameter.
In some examples, the upload token is a random string with address indexing functionality.
In some examples, the upload token has a physical validity period, and the open platform further authenticates the upload token to determine that the upload token is within the physical validity period prior to the open platform performing a video shard upload operation or performing a video shard composition operation.
In some examples, the upload token also has a legal validity period, and the open platform further authenticates the upload token to determine that the upload token is within the legal validity period prior to the open platform performing a video shard upload operation or performing a video shard composition operation.
FIG. 15 shows a schematic block diagram of an example electronic device 1500 that may be used to implement embodiments of the present disclosure. Referring to fig. 15, a block diagram of a structure of an electronic device 1500, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein. As shown in fig. 15, the electronic device 1500 includes a calculation unit 1501 which can perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM) 1502 or a computer program loaded from a storage unit 1508 into a Random Access Memory (RAM) 1503. In the RAM 1503, various programs and data necessary for the operation of the device 1500 can also be stored. The calculation unit 1501, the ROM 1502, and the RAM 1503 are connected to each other by a bus 1504. An input/output (I/O) interface 1505 is also connected to bus 1504. Various components in device 1500 connect to I/O interface 1505, including: an input unit 1506 such as a keyboard, a mouse, and the like; an output unit 1507 such as various types of displays, speakers, and the like; a storage unit 1508, such as a magnetic disk, optical disk, or the like; and a communication unit 1509 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 1509 allows the device 1500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 1501 may be various general and/or special purpose processing components having processing and computing capabilities. Some examples of the computation unit 1501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computation chips, various computation units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 1501 executes the respective methods and processes described above, such as a method of uploading a video to an open platform. For example, in some embodiments, the method of uploading video to an open platform may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 1508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 1500 via the ROM 1502 and/or the communication unit 1509. When the computer program is loaded into RAM 1503 and executed by computing unit 1501, one or more steps of the method of uploading video to an open platform described above may be performed. Alternatively, in other embodiments, the computing unit 1501 may be configured to perform the method of uploading video to an open platform in any other suitable manner (e.g., by means of firmware).
The various illustrative logics, logical blocks, modules, circuits, and algorithm processes described in connection with the aspects disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. Interchangeability of hardware and software has been described generally in terms of their functionality, and illustrated in the various illustrative components, blocks, modules, circuits, and processes described above. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system.
The hardware and data processing devices used to implement the various illustrative logics, logical blocks, modules, and circuits described in connection with the aspects disclosed herein may be implemented or performed with a general purpose single-or multi-chip processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor or any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. In some aspects, the specific processes and methods may be performed by circuitry that is specific to a given function.
In one or more aspects, the functions described may be implemented in hardware, digital electronic circuitry, computer software, firmware, including the structures disclosed in this specification and their equivalents, or any combination thereof. Aspects of the subject matter described in this specification can also be implemented as one or more computer programs, i.e., one or more modules of computer program instructions, encoded on a computer storage medium for execution by, or to control the operation of, data processing apparatus.
If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. The processes of a method or algorithm disclosed herein may be implemented in a software module executable by a processor, which may reside on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that can transfer a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. Disk (Disk) and disc (disc), as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy Disk and blu-ray disc where disks (disks) usually reproduce data magnetically, while discs (discs) reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media. Additionally, the operations of a method or algorithm may be provided as one or any combination or set of codes and instructions on a machine-readable medium and a computer-readable medium, which may be incorporated into a computer program product.
All the embodiments in the disclosure are described in a related manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, apparatus embodiments, device embodiments, computer-readable storage medium embodiments, and computer program product embodiments are described for simplicity as they are substantially similar to method embodiments, where relevant, reference may be made to some descriptions of method embodiments.

Claims (26)

1. A method of uploading a video to an open platform, the open platform including a first application programming interface to conduct video uploading, the method comprising:
acquiring an uploading token, wherein the uploading token has a mapping relation with a first type of parameter required for triggering video uploading operation;
calling the first application programming interface and transmitting the upload token to perform a video upload operation.
2. The method of claim 1, further comprising:
generating a second type of parameter associated with a video upload task, wherein the upload token is generated by the open platform based on the second type of parameter.
3. The method of claim 2, wherein the second type of parameter comprises an authorization token for an application user, a filename of the video.
4. The method of claim 1, wherein the first type of parameter comprises an identification of an application, a path of storage space, and an identification of the video upload operation.
5. The method of claim 2, wherein the open platform further comprises a second application programming interface for video upload preprocessing, and the upload token is generated by the application server side by calling the second application programming interface and importing the second type of parameters.
6. The method of claim 1, wherein the upload token is a random string with address indexing functionality.
7. The method of claim 6, wherein the upload token has a physical expiration date, the upload token being further authenticated by the open platform to determine that the upload token is within the physical expiration date prior to the open platform performing the video upload operation.
8. The method of claim 7, wherein the upload token further has a legal expiration date, the upload token being further authenticated by the open platform to determine that the upload token is within the legal expiration date before the open platform performs a video upload operation.
9. A method for uploading a video to an open platform, the open platform comprising a third application programming interface for uploading video fragments and a fourth application programming interface for compositing video fragments, the method comprising:
acquiring an uploading token, wherein the uploading token has a mapping relation with a third type of parameters required for triggering video fragment uploading operation and a fourth type of parameters required for triggering video synthesis operation;
calling the third application programming interface and transmitting the uploading token to execute video fragment uploading operation;
calling the fourth application programming interface and passing in the upload token to perform a video slice composition operation.
10. The method of claim 9, further comprising:
generating a second type of parameter associated with a video upload task, wherein the upload token is generated by the open platform based on the second type of parameter.
11. The method of claim 10, wherein the second type of parameters includes an authorization token for an end user of an application, a filename of the video.
12. The method of claim 9, wherein the third type of parameter or the fourth type of parameter comprises an identification of an application program, a path of a storage space, and an identification of the video slice upload operation.
13. The method of claim 9, further comprising:
slices the video and generates a fifth type of parameters associated with the video slice upload task,
the calling the third application programming interface and transmitting the upload token to perform a video fragment upload operation comprises:
and calling the third application programming interface and transmitting the uploading token and the fifth type parameters to execute the video fragment uploading operation.
14. The method of claim 13, wherein the fifth type of parameter comprises a video slice number and a video slice.
15. The method of claim 10, wherein the open platform further comprises a second application programming interface for video upload preprocessing, and the upload token is generated by the application server side by calling the second application programming interface and importing the second type of parameters.
16. The method of claim 9, wherein the upload token is a random string with address indexing functionality.
17. The method of claim 16, wherein the upload token has a physical validity period, the upload token being further authenticated by the open platform to determine that the upload token is within the physical validity period prior to the open platform performing a video shard upload operation or performing a video shard composition operation.
18. The method of claim 17, wherein the upload token further has a legal expiration date, and the open platform further authenticates the upload token to determine that the upload token is within the legal expiration date before the open platform performs a video shard upload operation or performs a video shard composition operation.
19. An apparatus for uploading video to an open platform, the open platform including a first application programming interface for video uploading, the apparatus comprising:
the acquisition module is configured to acquire an uploading token, wherein the uploading token has a mapping relation with a first type of parameter required for triggering a video uploading operation;
a calling module configured to call the first application programming interface and pass in the upload token to perform a video upload operation.
20. An apparatus for uploading video to an open platform, the open platform including a third application programming interface for uploading video slices and a fourth application programming interface for compositing video slices, the apparatus comprising:
the acquisition module acquires an uploading token, wherein the uploading token has a mapping relation with a third type of parameters required for triggering video fragment uploading operation and a fourth type of parameters required for triggering video fragment synthesizing operation;
a first calling module configured to call the third application programming interface and to pass the upload token in to perform a video fragment upload operation;
a second calling module configured to call the fourth application programming interface and pass the upload token in to perform a video tile composition operation.
21. A computer program product comprising program code instructions which, when executed by a computer, cause the computer to carry out the method of at least one of claims 1 to 8.
22. A computer program product comprising program code instructions which, when executed by a computer, cause the computer to carry out the method of at least one of claims 9 to 18.
23. A non-transitory computer-readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to at least one of claims 1 to 8.
24. A non-transitory computer-readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to at least one of claims 9 to 18.
25. An electronic device, comprising:
a processor for processing the received data, wherein the processor is used for processing the received data,
a memory in electronic communication with the processor; and
instructions stored in the memory and executable by the processor to cause the electronic device to perform the method of at least one of claims 1 to 8.
26. An electronic device, comprising:
a processor for processing the received data, wherein the processor is used for processing the received data,
a memory in electronic communication with the processor; and
instructions stored in the memory and executable by the processor to cause the electronic device to perform the method of at least one of claims 9 to 18.
CN202210570849.7A 2022-05-24 2022-05-24 Method and device for uploading video to open platform, storage medium and electronic equipment Active CN115150386B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210570849.7A CN115150386B (en) 2022-05-24 2022-05-24 Method and device for uploading video to open platform, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210570849.7A CN115150386B (en) 2022-05-24 2022-05-24 Method and device for uploading video to open platform, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115150386A true CN115150386A (en) 2022-10-04
CN115150386B CN115150386B (en) 2024-03-22

Family

ID=83405863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210570849.7A Active CN115150386B (en) 2022-05-24 2022-05-24 Method and device for uploading video to open platform, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115150386B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468518A (en) * 2014-11-10 2015-03-25 腾讯科技(深圳)有限公司 Service management method, device and system
US20150156281A1 (en) * 2013-12-04 2015-06-04 Facebook, Inc. Uploading and Transcoding Media Files
WO2015131936A1 (en) * 2014-03-05 2015-09-11 2Kb Beteiligungs Gmbh System providing web-based online video streaming
CN107465958A (en) * 2017-09-07 2017-12-12 北京奇虎科技有限公司 A kind of video sharing method, apparatus, electronic equipment and medium
US20220029808A1 (en) * 2020-07-26 2022-01-27 Akeyless Secuirity LTD. System, Product and Method for Providing Secured Access to Data
CN114329290A (en) * 2021-12-15 2022-04-12 北京科东电力控制系统有限责任公司 Capability opening platform and authorized access method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150156281A1 (en) * 2013-12-04 2015-06-04 Facebook, Inc. Uploading and Transcoding Media Files
WO2015131936A1 (en) * 2014-03-05 2015-09-11 2Kb Beteiligungs Gmbh System providing web-based online video streaming
CN104468518A (en) * 2014-11-10 2015-03-25 腾讯科技(深圳)有限公司 Service management method, device and system
CN107465958A (en) * 2017-09-07 2017-12-12 北京奇虎科技有限公司 A kind of video sharing method, apparatus, electronic equipment and medium
US20220029808A1 (en) * 2020-07-26 2022-01-27 Akeyless Secuirity LTD. System, Product and Method for Providing Secured Access to Data
CN114329290A (en) * 2021-12-15 2022-04-12 北京科东电力控制系统有限责任公司 Capability opening platform and authorized access method thereof

Also Published As

Publication number Publication date
CN115150386B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
US11121873B2 (en) System and method for hardening security between web services using protected forwarded access tokens
CN108681853B (en) Logistics information transmission method, system and device based on block chain
CN111163130B (en) Network service system and data transmission method thereof
CN106027608B (en) A kind of picture upload method, client and server
CN111404695B (en) Token request verification method and device
CN112785408A (en) Account checking method and device based on Hash
CN113179282A (en) Method and device for merging account numbers and server
CN111259411B (en) Block chain management method, device, electronic equipment and readable storage medium
CN115150386B (en) Method and device for uploading video to open platform, storage medium and electronic equipment
WO2020257123A1 (en) Systems and methods for blockchain-based authentication
CN116502283A (en) Privacy data processing method and device
CN113192520B (en) Audio information processing method and device, electronic equipment and storage medium
CN112699366B (en) Cross-platform login-free secure communication method and device and electronic equipment
CN114254178A (en) Video redirection method and device based on virtual machine
CN112788341B (en) Video information processing method, multimedia information processing method, device and electronic equipment
US10756907B2 (en) Authenticity verification of messages
US20230275741A1 (en) Tamper-resistant data encoding secure against unbounded polynomial size attack complexity
CN114091119A (en) Information processing method, information processing device, electronic equipment and computer readable storage medium
CN112511510B (en) Authorization authentication method, system, electronic equipment and readable storage medium
CN113553569B (en) Single sign-on method, system and terminal of Syngnathus system based on proxy server
CN115473646A (en) Authority information transmission method and device, electronic equipment and storage medium
CN117834619A (en) Login method, login device, login equipment and storage medium
CN117580002A (en) Service handling method, system and device based on mobile terminal information distribution
CN116136844A (en) Entity identification information generation method, device, medium and electronic equipment
CN117579245A (en) Security authentication method, device and storage medium

Legal Events

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