Video editing method and device, electronic equipment and storage medium

By introducing feature matching algorithms for video collaboration server and three-dimensional scale space, the problem that multiple users cannot collaborate in real time is solved, efficient video collaborative editing is achieved, and the efficiency of editing videos is improved.

CN119450110APending Publication Date: 2025-02-14CHINA MOBILE INTERNET CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411424294.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, multiple users are unable to collaborate in real time to edit videos, resulting in low efficiency in editing videos.

Method used

By introducing a video collaboration server into the video editing system, the first client and the second client are allowed to communicate in two-way, and videos are edited in real time. The video collaboration server creates a video collaboration version, and uses the feature matching algorithm of the three-dimensional scale space to identify conflicting video frames, generate conflicting video frame versions, and synchronizes them to the client for conflict processing.

Benefits of technology

It realizes real-time collaborative editing of videos by multiple users, improves the efficiency of editing videos, avoids the process of re-modification after editing by a single user, and improves the synchronization and efficiency of collaborative editing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450110A_ABST
    Figure CN119450110A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a video editing method and device, electronic equipment and a storage medium, and belongs to the technical field of video processing, and the method comprises the steps: obtaining a to-be-edited video, and sending a cooperation request to a second client, the cooperation request being used for requesting the second client to cooperatively edit the to-be-edited video, the first client and the second client are in two-way communication connection with the video cooperation server; receiving a video collaboration version created by the video collaboration server side for the to-be-edited video, editing the video collaboration version to obtain a first video editing frame version, and synchronizing the first video editing frame version to the video collaboration server side; receiving a conflict video frame version sent by the video cooperation server, wherein the conflict video frame version is obtained by matching the first video editing frame version and the second video editing frame version; the target video editing frame is determined through the conflict video frame version, and the target video version after editing the to-be-edited video is determined according to the target video editing frame, so that the video editing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Currently, in video creation, a large number of videos need to be edited and optimized, which is a relatively large workload. In related technologies, cloud disk products only support a single user to edit videos in real time, and other users can view the edited videos, or usually one user modifies and edits the video, and the next user modifies and edits the video. Multiple users cannot collaborate in real-time to edit videos, resulting in low efficiency in video editing. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a video editing method, device, electronic device and storage medium to solve the problem of low efficiency in editing videos.

[0004] To solve the above technical problems, the embodiments of the present application are implemented as follows: In a first aspect, an embodiment of the present application provides a video editing method, which is applied to a first client, comprising: obtaining a video to be edited, sending a collaboration request to a second client, the collaboration request being used to request the second client to collaboratively edit the video to be edited, wherein the first client and the second client are connected to a video collaboration server in a two-way communication manner; receiving a video collaboration version created by the video collaboration server for the video to be edited, editing the video collaboration version to obtain a first video editing frame version and synchronizing it to the video collaboration server; receiving a conflicting video frame version sent by the video collaboration server, the conflicting video frame version being obtained by matching the first video editing frame version and the second video editing frame version; wherein the second video editing frame version is a video editing frame version obtained by the second client editing the video collaboration version synchronized by the video collaboration server; determining a target video editing frame through the conflicting video frame version, and determining a target video version after editing the video to be edited according to the target video editing frame.

[0005] In a second aspect, an embodiment of the present application provides a video editing method, which is applied to a video collaboration server, including: obtaining a video to be edited corresponding to a first client, creating a video collaboration version based on the video to be edited, and synchronizing the video collaboration version to the first client and the second client invited to collaborate by the first client; receiving a first video editing frame version of the video collaboration version edited by the first client, and a second video editing frame version of the video collaboration version edited by the second client, and synchronizing them to the first client and the second client; according to the first video editing frame version and the second video editing frame version, identifying conflicting video frames through a feature matching algorithm based on a three-dimensional scale space, and in the presence of the conflicting video frames, generating a conflicting video frame version, and synchronizing the conflicting video frame version to the first client and the second client; receiving a first target video version obtained after the first client performs a conflict processing operation on the conflicting video frame version, and synchronizing the first target video version to the second client.

[0006] In a third aspect, an embodiment of the present application provides a video editing device, comprising: an acquisition module, used to acquire a video to be edited, and send a collaboration request to a second client, wherein the collaboration request is used to request the second client to collaboratively edit the video to be edited, wherein the first client and the second client are connected to a video collaboration server by two-way communication; a receiving module, used to receive a video collaboration version created by the video collaboration server for the video to be edited, edit the video collaboration version, obtain a first video editing frame version and synchronize it to the video collaboration server; a matching module, used to receive a conflicting video frame version sent by the video collaboration server, wherein the conflicting video frame version is obtained by matching the first video editing frame version and the second video editing frame version; wherein the second video editing frame version is a video editing frame version obtained by the second client editing the video collaboration version synchronized by the video collaboration server; a determination module, used to determine a target video editing frame through the conflicting video frame version, and determine a target video version after editing the video to be edited according to the target video editing frame.

[0007] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory electrically connected to the processor, the memory storing a computer program, and the processor being used to call and execute the computer program from the memory to implement the above-mentioned video editing method.

[0008] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program can be executed by a processor to implement the above-mentioned video editing method.

[0009] In a sixth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the above-mentioned video editing method.

[0010] In a seventh aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the above-mentioned video editing method is implemented.

[0011] By adopting the technical solution of the embodiment of the present application, the first client obtains the video to be edited and sends a collaboration request to the second client, wherein the collaboration request is used to request the second client to collaborate in editing the video to be edited, wherein the first client and the second client are connected to the video collaboration server by two-way communication; the first client receives the video collaboration version created by the video collaboration server for the video to be edited, edits the video collaboration version, obtains the first video editing frame version and synchronizes it to the video collaboration server; receives the conflicting video frame version sent by the video collaboration server, wherein the conflicting video frame version is obtained by matching the first video editing frame version and the second video editing frame version; wherein the second video editing frame version is the video editing frame version obtained by the second client editing the video collaboration version synchronized by the video collaboration server; the target video editing frame is determined through the conflicting video frame version, and the target video version after editing the video to be edited is determined according to the target video editing frame. It can be seen that after the first client obtains the edited video, it sends a collaboration request to the second client. The first client and the second client can establish a two-way communication connection with the video collaboration server, and can receive the video collaboration version created by the video collaboration server. The video collaboration server can match the video frames edited by the first client and the second client on the video collaboration version to obtain the conflicting video frame version. After the first client receives the conflicting video frame version, it determines the target video version, and the second client can edit the video without the user corresponding to the first client having to edit the video first. By connecting the video collaboration server with two-way communication, the first client can collaborate with the second client in real time to edit the video to be edited, and then determine the target video version, thereby improving the efficiency of video editing. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate one or more embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in one or more embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0013] Figure 1is a schematic flow chart of a video editing method according to an embodiment of the present application; Figure 2 is a schematic flow chart of a video editing method according to another embodiment of the present application; Figure 3 is a schematic flow chart of a video editing method according to another embodiment of the present application; Figure 4 is a schematic diagram of a video editing method according to an embodiment of the present application; Figure 5 is a schematic block diagram of a video editing device according to an embodiment of the present application; Figure 6 It is a hardware structure diagram of a video editing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0014] Embodiments of the present application provide a video editing method, device, electronic device, and storage medium to solve the problem of low efficiency in video editing.

[0015] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0016] The video editing method provided in the embodiment of the present application can be executed by an electronic device, or by software installed in the electronic device. Specifically, the electronic device can be a terminal device or a server device. Among them, the terminal device can include a smart phone, a laptop computer, a smart wearable device, a vehicle terminal, etc., and the server device can include an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.

[0017] In the following, in conjunction with the accompanying drawings, a video editing method provided by an embodiment of the present application is described in detail through specific embodiments and application scenarios.

[0018] Figure 1 A schematic flow chart of a video editing method provided by an embodiment of the present invention is shown, which is applied to a first client, and the method comprises the following steps: S102: Obtain the video to be edited, and send a collaboration request to the second client.

[0019] The collaboration request is used to request the second client to collaboratively edit the video to be edited, wherein the first client and the second client are connected to the video collaboration server in a two-way communication manner.

[0020] After the user of the first client obtains the video to be edited through the first client, the user initiates a collaboration request to the second client to invite the user corresponding to the second client to edit the video to be edited. The first client may obtain the video to be edited from the cloud disk, and the second client includes one or more clients, which are not specifically limited here.

[0021] The two-way communication connection includes a real-time two-way communication websocket connection.

[0022] The video collaboration server can be in the cloud. By deploying a server that executes video collaboration service processing on the video collaboration server, various information such as video, voice, speech presentation, text, etc. can be interacted with in multiple parties to meet users' needs for cross-space communication and collaboration.

[0023] It should be noted that when the first client initiates a collaboration request, it can also create a workspace, create a workgroup in the workspace, copy the video collaboration version to the workspace, and assign operating permissions to the workspace. Only users with such operating permissions can manipulate the first client, wherein the video collaboration version is sent by the video collaboration server. The video collaboration server will also allocate memory space on the corresponding server to create corresponding folders for storing the video version information sent by the first client and the second client, or for storing edited video frame version information, etc. After the second client agrees to join the collaboration request, the second client will also create a workspace, create a workgroup in the workspace, copy the video collaboration version to the workspace, and assign operating permissions to the workspace. The corresponding user information will also be updated in the workspace. Among them, the workgroup can store the video frame information of the video frame to be edited.

[0024] S104, receiving a video collaboration version created by the video collaboration server for the video to be edited, editing the video collaboration version, obtaining a first video editing frame version, and synchronizing it to the video collaboration server.

[0025] The video collaboration version includes a video version including information of each video frame in the video obtained after the video collaboration server decodes the video to be edited.

[0026] After the first client sends the collaboration request, it receives the video collaboration version created by the video collaboration server for the video to be edited according to the video collaboration server connected in a two-way communication manner. The video collaboration version is a video collaboration baseline version, that is, a video collaboration version including basic video frame information of each video to be edited.

[0027] The first video editing frame version includes a new version created by a user corresponding to the first client after editing a video frame of the current video to be edited or a group of video frames of the video to be edited through the first client. The first video editing frame version includes a video frame or a video frame group consisting of multiple video frames, without specific limitation. Specifically, 0.1 is added to the version number of the video frame metadata to generate a new frame storage file, namely the first edited video frame version, which is stored in the working group of the first client. The new frame storage file also includes status information of the video editing process, namely the editing status added to the video frame of the video to be edited, and the start time and end time of editing the current frame group.

[0028] The first client edits the video on the video collaboration version, wherein the editing process is in the working area of ​​the first client, and the edited first video edit frame version is stored in the working area of ​​the first client. The video collaboration server based on the two-way communication connection synchronizes the first video edit version to the video collaboration server, so that the video collaboration server can synchronize the first video edit version to the second client.

[0029] S106: Receive a conflicting video frame version sent by the video collaboration server, where the conflicting video frame version is obtained by matching the first video editing frame version with the second video editing frame version.

[0030] The second video editing frame version is a video editing frame version obtained by the second client performing editing processing according to the video collaboration version synchronized with the video collaboration server.

[0031] The second video editing frame version includes a video collaboration version synchronized by the video collaboration server received after the second client joins the collaboration request, a new version created after editing the video to be edited on the video collaboration version, and stored in the workspace corresponding to the second client.

[0032] Since the first client can edit the video to be edited and the second client can also edit the video to be edited, there will be video frames with inclusion relationships or conflicting video frames. The video collaboration server matches the first video editing frame version with the second video editing frame version to determine the conflicting video frames in the videos to be edited edited by the first client and the second client, and generates a conflicting video frame version.

[0033] It should be noted that when there is no flush-in video frame version, the first video editing frame version and the second video editing frame version have an inclusion or being included relationship, and the video frames edited in the first video editing frame version and the second video editing frame version can be merged to obtain a merged video frame version.

[0034] S108, determining a target video editing frame through the conflicting video frame version, and determining a target video version after editing the video to be edited according to the target video editing frame.

[0035] By obtaining the conflicting video frame version, the user determines the target video editing frame through the first client, that is, selects the conflicting video frame from the conflicting video frame version, and through the first client corresponding to the user's selection processing, determines the target video editing frame from multiple conflicting video frames, and replaces the video frame at the corresponding position in the video collaboration version with the target video editing frame to obtain the target video version after the editing processing of the video to be edited.

[0036] By adopting the technical solution of the embodiment of the present application, the first client obtains the video to be edited and sends a collaboration request to the second client, wherein the collaboration request is used to request the second client to collaborate in editing the video to be edited, wherein the first client and the second client are connected to the video collaboration server by two-way communication; the first client receives the video collaboration version created by the video collaboration server for the video to be edited, edits the video collaboration version, obtains the first video editing frame version and synchronizes it to the video collaboration server; receives the conflicting video frame version sent by the video collaboration server, wherein the conflicting video frame version is obtained by matching the first video editing frame version and the second video editing frame version; wherein the second video editing frame version is the video editing frame version obtained by the second client editing the video collaboration version synchronized by the video collaboration server; the target video editing frame is determined through the conflicting video frame version, and the target video version after editing the video to be edited is determined according to the target video editing frame. It can be seen that after the first client obtains the edited video, it sends a collaboration request to the second client. The first client and the second client can establish a two-way communication connection with the video collaboration server, and can receive the video collaboration version created by the video collaboration server. The video collaboration server can match the video frames edited by the first client and the second client on the video collaboration version to obtain the conflicting video frame version. After the first client receives the conflicting video frame version, it determines the target video version, and the second client can edit the video without the user corresponding to the first client having to edit the video first. By connecting the video collaboration server with two-way communication, the first client can collaborate with the second client in real time to edit the video to be edited, and then determine the target video version, thereby improving the efficiency of video editing.

[0037] In one embodiment, the method may further perform the following step A: Step A: When the first client edits the video collaboration version, the status information of the second client editing the video collaboration version is received from the video collaboration server.

[0038] After the second client receives the video collaboration version synchronized by the video collaboration server connected to the communication, it can edit the video frame on the video collaboration version and obtain the status information of the video frame editing process. The status information includes the new version information that the second client will create based on the video frame or a group of frames of the currently edited video to be edited, that is, the version number of the video collaboration version in the metadata is increased by 0.1, and a new frame storage file is generated and stored in the work interval corresponding to the second client, and the editing status, editing start time and editing end time of the current video frame group are added to the video frame group in the frame storage file. The second client synchronizes the status information to the first client through the video collaboration server.

[0039] After the first client receives the status information of the second client synchronized by the video collaboration server, it can view the status information of the editing process of the video to be edited by the second client, and the first client can continue to edit the video to be edited on the video collaboration version without affecting the editing process status of the video to be edited by the second client on its internal video collaboration version. It should be understood that when the second client edits the video frame on the video collaboration version, it can also view the status information of the editing process of the video to be edited by the first client, and the second client can continue to edit the video to be edited on the video collaboration version.

[0040] In this embodiment, when the first client is editing the video to be edited on the video collaboration version, it can receive the status information of the second client editing the video frame on its corresponding video collaboration version synchronized by the video collaboration server. Although the first client can always receive the status information of the second client's editing of the video to be edited, the editing of the video to be edited by the first client is not affected. It can be seen that the second client and the first client can edit the video to be edited at the same time, and receive the editing status of the video to be edited by other clients through the video collaboration server.

[0041] In one embodiment, when receiving the video collaboration version created by the video collaboration server for the video to be edited (ie, S104), the following step B may be performed: Step B: receiving the video collaboration version after the video collaboration server decodes the video to be edited.

[0042] The video collaboration server obtains the video to be edited through the cloud, and synchronizes the video collaboration version to the first client and the second client. The video collaboration version includes all video frame information after decoding the video to be edited.

[0043] Specifically, after the first client obtains the video to be edited and creates a collaboration task, the video collaboration server obtains the video to be edited from the cloud, such as copying the video to be edited selected by the user corresponding to the first client from the cloud disk directory to the workspace directory of the video collaboration server. The collaboration task includes the first client initiating a collaboration request to the second client and creating a workspace, etc. The video collaboration server decodes the obtained video to be edited and obtains a video collaboration version of the decoded video to be edited.

[0044] The decoding process of the video to be edited includes: the video collaboration server decodes the video to be edited to obtain each frame in the video to be edited, inserts the version number, frame number, frame rate, timestamp, modification date, modifier (wherein, the modifier includes obtaining the user information of the user corresponding to the client currently editing the video to be edited, and the modifier after the conflicting video frames are merged is the modifier of the final version of the video frame, generally the user information of the user corresponding to the first client initiating the collaboration task), operation method, creates a frame baseline version, i.e., a directory of the video collaboration version, and stores each frame separately as an independent image format (Portable Network Graphics, PNG) file, creates version log information, i.e., version log information of the video collaboration version, writes the version log into a database, the version log includes the file name, user, operation method, creation time, last submission time, last submission user, and file version number of the video collaboration version; creates frame version log information, writes the frame-by-frame version log into a database, the frame-by-frame version log includes the file name, frame number, frame version, frame rate, timestamp, submitter, submission date, and operation method of the frame version of each video frame. Among them, after the first client and the second client subsequently edit the video to be edited, the version log information and the frame version log information can be synchronously recorded in the version log information and the frame version log information of the video collaboration server. It should be understood that the video version log information and the video frame version log information updated by the first client and the second client based on the collaborative video version can also be correspondingly stored in the work group of the work interval.

[0045] In this embodiment, the video collaboration version received by the first client is all the video frame information in the video to be edited after the video service protocol decodes the video to be edited, and both the first client and the second client can edit each video frame in the video to be edited on the video collaboration version. In addition, the video collaboration server can also record the video version log information and video frame log information of the video frame modifications made by the first client and the second client.

[0046] In one embodiment, a conflicting video frame version sent by a video collaboration server is received, where the conflicting video frame version is obtained by matching a first video editing frame version with a second video editing frame version (ie, S106), and the following step C may be performed: Step C: receiving the conflicting video frame version created by the video collaboration server, where the conflicting video frame version is obtained by the video collaboration server identifying the conflicting video frame through a feature matching algorithm.

[0047] Among them, the feature matching algorithm is a method of obtaining feature points of video frames corresponding to the first video editing frame version and the second video editing frame version in the constructed three-dimensional scale space, and obtaining a feature point list after matching the feature points. The feature point list is used to identify the conflicting video frames and normal video frames corresponding to the feature points.

[0048] The video collaboration server introduces a feature matching algorithm to match the feature points in the first video editing frame version and the second video editing frame version to obtain a feature point list, and determines the conflicting video frame and the normal video frame based on the feature point list. Through the identified conflicting video frame, the information of the conflicting video frame is written into the working interval of the video collaboration server to form a conflicting video frame version. Specifically, a new frame version information is created in the video collaboration server, and the frame version log information corresponding to the conflicting video frame version is written into the database. For example, when the user performs conflict processing, the operation mode in the metadata of the conflicting video frame of the conflicting part will be rewritten as conflict conflict. After the user resolves the conflict, the operation mode will be changed to merge merge, and the start and end subscripts and timestamp information of the conflicting video frame will be written, and then the conflicting video frame version will be created in the video collaboration server, so that the conflicting video frame version can be synchronized to the first client and the second client.

[0049] The feature matching algorithm specifically includes that in the process of detecting the features of the video frame, the traditional two-dimensional scale space construction method is no longer used, but the three-dimensional scale space construction method with the time dimension added is adopted. Based on the three-dimensional scale space, a three-dimensional differential Gaussian is constructed, and based on the direction allocation method of the three-dimensional scale space, accurate feature point information is obtained, and a feature point list is formed according to the feature point information in the first video editing frame version and the second video editing frame version, and feature point matching is performed through the feature point list.

[0050] Preferably, when the video collaboration server matches the first video editing frame version and the second video editing frame version based on the feature matching algorithm of the three-dimensional scale space to obtain a normal video frame version, the first video editing frame version and the second video editing frame version are merged to obtain a target video version. The normal video version includes a situation where there are no conflicting video frames in the first video editing frame version and the second video editing frame version.

[0051] In this embodiment, the first client receives the conflicting video frame version synchronized by the video collaboration server. The video collaboration server can obtain feature points in the first video editing frame version and the second video editing frame version through a three-dimensional feature matching algorithm, and form a feature point list based on the feature point information. Based on the feature point list, the conflicting video frames and normal video frames in the first video editing frame version and the second video editing frame version are identified, and then the conflicting video frame version is created. Video collaboration service processing through a feature matching algorithm in a three-dimensional scale space can more accurately identify conflicting video frames.

[0052] In one embodiment, the target video editing frame is determined by the conflicting video frame version, and the target video version after the editing process of the video to be edited is determined according to the target video editing frame (ie, S108), and the following steps D1-D2 may be performed: Step D1: Respond to the user's conflict handling operation on the conflicting video frame version to obtain the target video editing frame.

[0053] The conflict handling operation includes a user's selection operation on a first video editing frame version and a second video editing frame version synchronized with the video collaboration server.

[0054] After the first client receives the conflicting video frame version synchronized by the video collaboration server, the conflicting video frame version is displayed on the editor, and the user corresponding to the first client selects the video frame in the conflicting video frame version. The first client responds to the user's conflict handling operation and determines the video frame selected by the user as the target video editing frame.

[0055] The determined target video editing frame is synchronized to the video collaboration server. The video collaboration server re-encodes the video to be edited according to the user's operation mode, the start and end subscripts of the conflicting video frames, and the timestamp information, generates a video frame version including the target video editing frame, and synchronizes it to all clients that collaborate on the video to be edited, i.e., the second client, and overwrites the video frame corresponding to the target video editing frame in the video collaboration version of the second client.

[0056] As an example, the conflicting video frame versions include video frame V1 in the first video editing frame version and video frame V2 in the second video editing frame version. There is a conflict between V1 and V2, that is, the video frame modified by the first client is V1, and the video frame modified by the second client is V2, but V1 and V2 are the same video frame in the initial video to be edited. After the first client receives V1 and V2, it selects a more ideal video frame and uses it as the target video editing frame.

[0057] It should be noted that the conflicting video frame version includes one or more pairs, so the conflicting video frame can be a video frame or a group of video frames, that is, a video frame group. For example, the conflict handling operation includes comparing each conflicting video frame with the local video, the local video frame is such as V1, the conflicting video frame is such as V2, and the conflicting video frame may also be V3. Then the user can determine the target video editing frame by selecting the operation. When V1 is selected as the target video editing frame, the information of V1 is overwritten to the position of the video frame corresponding to V1 in the first client video collaboration version. When V2 is selected as the target video editing frame, the information of V2 is overwritten to the position of the video frame corresponding to V1 in the first client video collaboration version. When V3 is selected as the target video editing frame, the information of V3 is overwritten to the position of the video frame corresponding to V1 in the first client video collaboration version. V1, V2, and V3 can also be merged and processed as the target video editing frame to cover the position of the video frame corresponding to V1 in the first client video collaboration version. Among them, the target video editing frame can cover the corresponding position in the video collaboration version, and can also cover the corresponding position in the first video editing frame version. It should be understood that after overwriting, a new video frame version or video version may be generated and stored in the working interval.

[0058] Step D2: Replace the target video editing frame at the corresponding position in the video collaboration version of the first client with the target video editing frame to obtain a complete video, and encode the complete video to obtain the target video version, which is synchronized to the video collaboration server based on the target video version.

[0059] When the first client receives the conflicting video frame version sent by the video collaboration server, since the conflicting video frame version has the video frame number corresponding to the conflicting video frame, it can automatically locate the corresponding position of the conflicting video frame in the video collaboration version of the first client and the first video editing frame version, and can replace the video frame at that position with the target video editing frame selected by the user to form a new complete video, and obtain the target video version by encoding the complete video.

[0060] The first client synchronizes the target video version to the video collaboration server, which synchronizes the target video frame version to the second client and overwrites it, and synchronizes the target video version as the final video version to the user space in the cloud disk for all users to play.

[0061] In this embodiment, the first client responds to the user's conflict view processing operation, determines the target video editing frame, automatically replaces the video frame at the corresponding position in the video collaboration version of the first client with the target video editing frame, forms a complete video, encodes the complete video through the first client, obtains the target video version, and the first client synchronizes the target editing video frame and the target video version to the video collaboration server, which updates all internal information about the video and video frame and synchronizes it to the second client. It can realize real-time collaborative processing of the video to be edited by multiple users, and improve the efficiency of video editing.

[0062] Figure 2 A schematic flow chart of a video editing method provided by another embodiment of the present invention is shown, which is applied to a video collaboration server. The method comprises the following steps: S202, obtaining the to-be-edited video corresponding to the first client, creating a video collaboration version according to the to-be-edited video, and synchronizing the video collaboration version to the first client and the second client invited to collaborate by the first client.

[0063] After the first client obtains the video to be edited from the cloud, the video collaboration server also obtains the video to be edited corresponding to the first client, and creates a video collaboration version in the working area of ​​the video collaboration server based on the obtained video to be edited. The video collaboration version includes all video frame information after decoding the video to be edited, and writes each video frame information into the database. The video collaboration version is described in detail above and will not be elaborated on here.

[0064] The video collaboration server synchronizes the video collaboration version to the first client and the second client, wherein the second client includes one or more clients, the video collaboration server and the first client are connected in real-time two-way communication, and the video collaboration server and the second client are also connected in real-time two-way communication.

[0065] S204, receiving a first video editing frame version edited by the first client on the video collaboration version and a second video editing frame version edited by the second client on the video collaboration version, and synchronizing them to the first client and the second client.

[0066] After synchronizing the video collaboration version to the first client and the second client according to step S202, the first video editing frame version of the video collaboration version edited and processed by the first client and the second video editing frame version of the video collaboration version edited and processed by the second client are obtained. The video collaboration server can synchronize the first video editing frame version to the second client, and can also synchronize the second video editing frame version to the first client, so that the first client and the second client can see the editing status and editing results of the video to be edited by other clients while editing the video to be edited.

[0067] S206, identifying conflicting video frames according to the first video editing frame version and the second video editing frame version through a feature matching algorithm based on a three-dimensional scale space, generating conflicting video frame versions when conflicting video frames exist, and synchronizing the conflicting video frame versions to the first client and the second client.

[0068] A conflicting video frame refers to a situation where a video frame edited in a first video editing frame version and a video frame edited in a second video editing frame version have the same frame. A conflicting video frame version is constructed based on the video frame version information of the video frame edited in the first video editing frame version and the video frame edited in the second video editing frame version.

[0069] The video collaboration server identifies conflicting video frames in the first video editing frame version and the second video editing frame version through a feature matching algorithm in a three-dimensional scale space, constructs a conflicting video frame version if there are conflicting video frames, and synchronizes the conflicting video frame version to all clients.

[0070] S208, receiving a first target video version obtained after the first client performs a conflict handling operation on the conflicting video frame version, and synchronizing the first target video version to the second client.

[0071] By adopting the technical solution of the embodiment of the present application, when the method is applied to the video collaboration server, the video collaboration server can perform video collaboration service processing, specifically, create a video collaboration version according to the video to be edited for the client to edit the video to be edited, and can also receive the first video editing frame version and the second video editing frame version after the first client and the second client edit the video to be edited, and identify the conflicting video frame to construct the conflicting video frame version, and synchronize the first video editing frame version, the second video editing frame version and the conflicting video frame version to the first client and the second client, remind the client that receives the conflicting video frame version that there is a conflicting video frame version, and receive the first target video version obtained after the first client performs a conflict processing operation on the conflicting video frame version, and synchronize the first target video version to the second client. The first client and the second client can edit the video to be edited at the same time, and can synchronize the editing information of the video to be edited by the first client and the second client, and then identify the existing conflicting video frames through the feature matching algorithm of the three-dimensional scale space, realize multi-person collaborative editing of the video, solve the conflict problem in the process of multi-person online real-time collaborative video, and improve the efficiency of video editing.

[0072] In one embodiment, the conflicting video frames are identified by a feature matching algorithm based on a three-dimensional scale space (ie, S206), and the following steps E1-E2 may also be performed: Step E1: Synchronize the first video edited frame version and the second video edited frame version to the first client and the second client by using a feature matching algorithm based on a three-dimensional scale space, when no conflicting video frames are identified.

[0073] The case where no conflicting video frame is identified specifically includes a case where the same video frame is not edited in the first video editing frame version and the second video editing frame version.

[0074] Step E2: receiving the second target video version sent by the first client, and synchronizing the second target video version to the second client; the second target video version is obtained by the first client merging the first video edited frame version and the second video edited frame version.

[0075] After the video collaboration server synchronizes the first video editing frame version and the second video editing frame version to the first client and the second client, it can receive the second target video version obtained by the first client merging the first video editing frame version and the second video editing frame version, wherein the merging process includes merging the video frames in the edited video frame version to obtain the target video editing frame, and then encoding the target video editing frame to obtain the second target video version. The first client can write the version information of the second target video version into the working interval of the first client.

[0076] The merging process specifically includes, when there are no conflicting video frames, after the first client receives the first video editing frame version and the second video editing frame version, replacing the video frames at the corresponding positions in the video collaboration version with the editing frames in the second video editing frame version, and at the same time, replacing the video frames at the corresponding positions in the video collaboration version with the editing frames in the first video editing frame version, to obtain a second target video version including the updated latest version.

[0077] After receiving the second target video version, the video collaboration server synchronizes the second target video frame to the second client.

[0078] In this embodiment, when the video collaboration server fails to identify conflicting video frames through the feature matching algorithm, the first video editing frame version and the second video editing frame version are directly synchronized to the first client and the second client, and the first client merges the first video editing frame version and the second video editing frame version, and the video collaboration server receives the merged second target video version. If there are no conflicting video frames in the edited video frames of the video to be edited by the first client and the second client, the complete video edited by the first client and the second client in real time can be merged and processed. By simultaneously editing the video to be edited by the first client and the second client, the efficiency of editing the video to be edited is improved.

[0079] In one embodiment, the conflicting video frames are identified by a feature matching algorithm based on a three-dimensional scale space (ie, S206 ), and the following steps F1-F2 may be performed: Step F1: Introduce the time scale into the two-dimensional scale space and construct the three-dimensional scale space through the three-dimensional Gaussian function.

[0080] Scale space is a multi-scale representation method for representing image features. In traditional scale space theory, different scales are represented by smoothing the image using a Gaussian function. Since the Gaussian function is scale invariant, it can effectively extract blur and detail information in the image. By smoothing the image at different scales, features of different sizes in the image can be obtained.

[0081] Gaussian functions are widely used in the field of statistics to describe normal distribution. Among them, the traditional two-dimensional Gaussian function is mainly used to describe the distribution of data on a plane, and the three-dimensional Gaussian function is used to describe the distribution of data in three-dimensional space.

[0082] The video collaboration server constructs a three-dimensional scale space and introduces the time scale as the third dimension to realize the feature detection of video frames in continuous time. Among them, the time scale considers the frame rate of the video frame. Since the time interval of each video frame is not continuous but discrete, the time interval between two video frames can be the frame rate (F) frames / second. In actual video analysis, for the time scale, we are often more concerned about the range of frames rather than the actual time distance between each video frame. Therefore, we can associate time and frame rate to define a time scale parameter (s_t) associated with the number of frames.

[0083] Specifically, the formula of the three-dimensional Gaussian function considering the frame rate can be defined as: [G(x,y,t,s,s_t)=\frac{1}{(2\pi)^{3 / 2}s^{3 / 2}s_t^{1 / 2}}\exp\left(-\frac{x^2+y^2}{2s^2}-\frac{(t\Deltat)^2}{2s_t^2}\right)].

[0084] Where: x and y represent the position of the pixel in each video frame; s is the spatial scale parameter; s_t is the temporal scale parameter, which represents the number of video frames within a set time; t represents the index of the frame, rather than a continuous time value; \Delta t represents the time interval between two video frames, which is related to the frame rate (F).

[0085] The three-dimensional scale space expression corresponding to the three-dimensional Gaussian function is: [L(x,y,t,s,s_t)=G(x,y,t,s,s_t)*I(x,y,t)].

[0086] Among them, L(x,y,t,s,s_t) represents the defined three-dimensional scale space; G(x,y,t,s,s_t) represents the three-dimensional Gaussian function defined above; I(x,y,t) represents the specific position information of each video frame in the three-dimensional scale space; * represents convolution. This three-dimensional scale space expression takes into account the frame rate and time scale of the video, and provides a reasonable scale space representation for analyzing video sequences. Among them, the video sequence is the sorted sequence of each frame in the video. It should be understood that each frame of each video will have a sequential encoding.

[0087] Step F2: Based on the three-dimensional scale space, three-dimensional Gaussian filtering is used to calculate differential Gaussian values, extreme points are determined according to the differential Gaussian values, and the extreme points are determined as key points, wherein the video frames corresponding to the key points are conflicting video frames.

[0088] Based on the three-dimensional scale space constructed above, the differential Gaussian value is calculated using three-dimensional Gaussian filtering, which can be specifically divided into the following steps: (1) 3D Gaussian filtering: Apply 3D Gaussian filtering to the video (V(x,y,t)) for each predefined spatial scale (s) and temporal scale (s_t). [L(x,y,t;s,s_t)=G(x,y,t;s,s_t)*V(x,y,t)], where * represents convolution, G is a 3D Gaussian function, and V(x,y,t) represents the spatial and temporal correlation function.

[0089] (2) Construction of Difference of Gaussians (DoG): The difference of the Gaussian filtered video is calculated between each continuous spatial scale (s) and temporal scale (s_t).

[0090] For example, for adjacent scales (s_1,s_2) and (s_{t1},s_{t2}), the DoG is: [D(x,y,t;s_1,s_2,s_{t1},s_{t2})=L(x,y,t;s_2,s_{t2})-L(x,y,t;s_1,s_{t1})].

[0091] Among them, t1 and t2 represent time periods; s_1, s_2 represent continuous scale spaces; s_{t1}, s_{t2} represent the number of video frames in a continuous time period.

[0092] It can be seen that in the three-dimensional scale space, multiple differential Gaussian values ​​are obtained by constructing differential Gaussian calculations, wherein each differential Gaussian value corresponds to a different scale pair.

[0093] The extreme points are determined according to the differential Gaussian values, and the extreme points are determined as key points. Specifically, the key points are detected according to the constructed differential Gaussian, where the key points are local extreme points. The extreme points are the brightest or darkest among all their neighbors. In the three-dimensional scale space, the neighbors of a pixel include its neighbors in space (x, y) and time (t). The extreme points may correspond to some meaningful structures, such as corners or other features.

[0094] In the scale space of DoG, extreme points are determined by calculating differential Gaussian values. When there are extreme points, that is, key points, in a video frame, the video frame is determined as a conflicting video frame.

[0095] Finally, the key points are refined and described. Specifically, edge response is eliminated, sub-pixel precision adjustment of key point positioning is performed, and a unique descriptor, i.e., feature descriptor, is generated for each key point. The descriptor is used to describe the characteristics of the key points, such as the position, scale, direction and other information of the key points.

[0096] In this embodiment, by introducing the time scale in the three-dimensional scale space and constructing a differential Gaussian in the three-dimensional scale space, the complexity of the time dimension is increased compared to the traditional two-dimensional control, making the key points of detection more accurate, thereby improving the certainty of identifying conflicting video frames.

[0097] In one embodiment, after the extreme value point is determined as the key point (ie, step F2), the following steps G1-G3 may be performed: Step G1: In a three-dimensional scale space, feature points of video frames corresponding to the first video editing frame version and the second video editing frame version are obtained, wherein the feature points include key points.

[0098] Feature points include pixels in each frame of video, and feature points also include key points.

[0099] The three-dimensional scale space includes a spatial scale and a temporal scale, and feature points of video frames corresponding to the first video editing frame version and the second video editing frame version are obtained to facilitate subsequent matching of feature points.

[0100] Step G2: Create a three-dimensional direction histogram by calculating the gradient operator of the feature points, and determine the direction in the direction histogram that is greater than a threshold height as the main direction of the direction histogram.

[0101] The calculation of the gradient operator includes: calculating the spatial and temporal gradients of each feature point. The specific calculation code can be expressed as: [ \ (x,y,t)=\left(\frac{\partial L}{\partial x},\frac{\partialL}{\partial y},\frac{\partial L}{\partial t}\right)].

[0102] Based on the acquired feature points and the corresponding gradient operators, a three-dimensional directional histogram is created to quantify the direction of the gradient. The directional histogram is created in a local neighborhood, and each gradient contributes a vote proportional to its magnitude and the weight of the distance to the feature point.

[0103] When the direction of the local maximum in the local area of ​​the directional histogram is greater than the direction of the threshold height, the direction of the local maximum is determined as the main direction of the directional histogram. The threshold height can be 80%, etc., and is not specifically limited.

[0104] Step G3: assigning a main direction to the feature point according to the main direction of the direction histogram, generating a feature descriptor of the feature point based on the feature point after the main direction is assigned, so as to identify the conflicting video frame based on the feature descriptor.

[0105] According to the main direction of the direction histogram, a main direction is assigned to each feature point, where each feature point may generate multiple key points, each key point corresponds to a different main direction, and can generate key points with specified positions, scales and directions, thereby ensuring that the obtained key points and feature descriptors corresponding to the feature points are invariant to the rotation and scale transformation of the video frame image.

[0106] Based on constructing feature points with directions in the three-dimensional scale space, and determining feature descriptors according to feature information used to describe the feature points in the three-dimensional space, the steps of generating the feature descriptors may include the following: (1) Selecting a neighborhood: For each feature point with a determined direction, select a three-dimensional neighborhood of appropriate size. The size of the neighborhood may be proportional to the scale of the feature point. For example, the larger the scale, the larger the selected neighborhood.

[0107] (2) Rotate to main direction: Rotate the selected neighborhood to the main direction of the feature point. In the feature descriptor, the main direction of the feature point is always the same, which is used to ensure that the feature descriptor is rotationally invariant.

[0108] (3) Calculate local gradients: Calculate the three-dimensional gradient of the feature point pixels in each video frame in the rotated neighborhood, which can provide direction and amplitude information for each feature point.

[0109] (4) Create feature descriptor histogram: Divide the rotated neighborhood into several small sub-blocks (e.g., 4x4x4 sub-blocks). For each sub-block, create a three-dimensional direction histogram, similar to the above three-dimensional direction histogram allocation step, and concatenate the values ​​of the direction histogram of each sub-block to form the final feature descriptor of the feature point.

[0110] (5) Normalized feature descriptors: In order to ensure that the feature descriptors are robust to brightness changes, the feature descriptors are usually normalized so that the total length of the feature descriptors is 1, reducing the impact of local contrast changes on the feature descriptors, thereby improving the robustness of feature matching.

[0111] It should be understood that in order to increase the robustness of feature matching, some other steps may be taken, such as performing threshold processing on the value of the feature descriptor or using other techniques to reduce the dimension of the feature descriptor.

[0112] In this embodiment, the video collaboration server obtains the feature points of the video frames corresponding to the first video editing frame version and the second video editing frame version, calculates the gradient operator of the feature points in the three-dimensional scale space to determine the direction histogram, and then determines the direction of the feature points. It can use rotation invariance to determine the specific feature points edited in the edited video frame, so that the unedited feature points in the edited video frame remain unchanged. Generate feature descriptors of feature points for identifying conflicting video frames based on feature point matching, which can ensure that other feature points remain unchanged when identifying key points corresponding to conflicting videos.

[0113] In one embodiment, based on the feature descriptor, the conflicting video frame is identified (i.e., step G3), the following steps G31-G32 may be performed: Step G31: According to the feature descriptors, the feature points are matched using a random sampling consensus algorithm to obtain a feature point list of the video frames corresponding to the first video editing frame version and the second video editing frame version. The feature point list includes feature descriptors of all feature points in the video frames.

[0114] By using the random sampling consensus algorithm RANSAC, the feature point list is generated by obtaining the feature descriptors corresponding to the feature points in each video frame, which can effectively fit the model and eliminate the wrong feature matching points in the feature point matching. The information of the feature points in the feature point list includes the relative position and dynamic information of each feature point between consecutive video frames. Based on the information of the feature points in the feature point list, the movement trajectory of the feature points, as well as the speed and acceleration information of the movement can also be obtained.

[0115] Step G32: Identify conflicting video frames based on the feature point list.

[0116] Specifically, the feature point lists of the corresponding video frames in the first video editing frame version and the second video editing frame version are compared to determine whether there is a conflict in the time of the video frame versions. When all the feature point information in the feature point list does not have a containment and being contained relationship, and the comparison results of all features are completely different, it indicates that there is an editing conflict, and the video frame with the editing conflict is determined as a conflicting video frame; otherwise, the video frame group can be regarded as a non-conflicting video frame group including normal video frames.

[0117] In this embodiment, feature points of video frames in the first video editing frame version and the second video editing frame version are matched through feature descriptors and using a random sampling consensus algorithm to obtain a feature point list. Conflicting video frames are identified based on the feature point list, which can quickly and accurately determine the conflicting video frames.

[0118] Figure 3 is a schematic flow chart of a video editing method according to another embodiment of the present application, such as Figure 3 As shown, the method comprises the following steps: S301, the first client obtains the video to be edited from the cloud disk, creates a collaboration task, and sends a collaboration request to the first client.

[0119] S302: The second client receives the collaboration request and joins the collaborative task of editing the video to be edited.

[0120] S303, after the first client creates a collaboration task, the video collaboration server obtains the to-be-edited video corresponding to the first client from the cloud disk.

[0121] S304: The video collaboration server decodes the video to be edited to obtain a video collaboration version, and sends the video collaboration version to the first client and the second client.

[0122] Among them, the video collaboration server is communicatively connected to the first client and the second client.

[0123] S305, the first client edits the video to be edited on the video collaboration version to obtain a first video editing frame version, and the second client edits the video to be edited on the video collaboration version to obtain a second video editing frame version.

[0124] S306: The first client and the second client synchronize the corresponding first video editing frame version and second video editing frame version to the video collaboration server, respectively.

[0125] S307, the video collaboration server determines a feature matching algorithm using the construction method of the three-dimensional scale space.

[0126] S308: The video collaboration server determines whether there are conflicting video frames between the first video editing frame version and the second video editing frame version through a feature matching algorithm.

[0127] S309: In the case where there are conflicting video frames, generate conflicting video frame versions, and synchronize the conflicting video frame versions to the first client and the second client.

[0128] S310: The first client performs a conflict processing operation on the conflicting video frame to obtain a target video editing frame.

[0129] When there are no conflicting video frames, the first client merges the edited video frames in the first video editing frame version and the second video editing frame version to obtain a target video editing frame.

[0130] S311, the first client automatically identifies the position of the target video editing frame on the video collaboration version, and replaces the video frame at the position with the target video editing frame to generate the target video version.

[0131] S312, the first client synchronizes the target video version to the video collaboration server, which then synchronizes the target video version to the second client.

[0132] The specific process from S301 to S312 has been described in detail in the above embodiment and will not be repeated here.

[0133] In summary, as an example, Figure 4 As shown, the first client starts triggering and creates a collaboration task, and then invites the second client to join the collaboration task. After the first client creates the collaboration task, the video collaboration server creates a video collaboration version, which is synchronized to the first client and the second client through a real-time two-way communication connection. After the first client and the second client receive the video collaboration version, they edit the video frames on the video collaboration version to obtain the first video editing frame version and the second video editing frame version, and synchronize them to the video collaboration server. At the same time, the first client and the second client can receive the editing status and editing results of each other's edited videos in real time. The video collaboration server compares the received first video editing frame version and the second video editing frame version to determine whether there are conflicting frames. In the case where there is no conflict frame, the information of the non-conflict frame is synchronized to the first client and the second client, and the first client merges the video frames of the first video editing frame version and the second video editing frame version, and the merged video collaboration version obtained after the merge is the target video version; when there is a conflict frame, the video collaboration server creates a conflict frame version, and synchronizes the conflict frame version to the first client and the second client, and the first client receives the user's conflict handling operation to obtain the target video editing frame, and the conflict handling operation includes editing the conflict frame and overwriting the conflict video frame with the corresponding edited video frame in the first video editing frame version; according to the target video editing frame, the first client converts the video frame at the corresponding position in the video collaboration version, and re-encodes the video to construct the target video version. The target video version is synchronized to the video collaboration server, and the video collaboration server synchronizes the target video version to the second client and the cloud. The user corresponding to the first client does not need to edit the video first before the second client can edit it. Through the two-way communication connection to the video collaboration server, the first client can collaborate with the second client to edit the video to be edited in real time, and then determine the target video version, which improves the efficiency of video editing.

[0134] In summary, specific embodiments of the present subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recorded in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing can be advantageous.

[0135] Figure 5 FIG. 1 is a schematic diagram of the structure of a video editing device according to an embodiment of the present invention. Figure 5 As shown, the video editing device includes: an acquisition module 51, a receiving module 52, a matching module 53 and a determination module 54: The acquisition module 51 is used to acquire the video to be edited and send a collaboration request to the second client, where the collaboration request is used to request the second client to collaboratively edit the video to be edited, wherein the first client and the second client are connected to the video collaboration server in a two-way communication manner; A receiving module 52 is used to receive a video collaboration version created by the video collaboration server for the video to be edited, edit the video collaboration version, obtain a first video editing frame version, and synchronize it to the video collaboration server; The matching module 53 is used to receive the conflicting video frame version sent by the video collaboration server, where the conflicting video frame version is obtained by matching the first video editing frame version and the second video editing frame version; wherein the second video editing frame version is the video editing frame version obtained by the second client after editing and processing according to the video collaboration version synchronized by the video collaboration server; The determination module 54 is used to determine the target video editing frame through the conflicting video frame version, and determine the target video version after the editing process of the video to be edited according to the target video editing frame.

[0136] In one embodiment, the device further includes an editing module, which is specifically used to: when the first client edits the video collaboration version, receive status information of the second client editing the video collaboration version synchronized by the video collaboration server.

[0137] In one embodiment, the receiving module 52 is specifically used to receive a video collaboration version after the video collaboration server decodes the video to be edited; wherein, the video collaboration server obtains the video to be edited through the cloud, and synchronizes the video collaboration version to the first client and the second client, and the video collaboration version includes all video frame information after the video to be edited is decoded.

[0138] In one embodiment, the matching module 53 is specifically used to receive a conflicting video frame version created by a video collaboration server, where the conflicting video frame version is obtained by the video collaboration server identifying the conflicting video frame through a feature matching algorithm; wherein the feature matching algorithm is a method for obtaining feature points of video frames corresponding to the first video editing frame version and the second video editing frame version in a constructed three-dimensional scale space, and matching the feature points to obtain a feature point list, and the feature point list is used to identify the conflicting video frames and normal video frames corresponding to the feature points.

[0139] In one embodiment, the determination module 54 specifically includes: A processing unit, configured to respond to a conflict handling operation of a conflicting video frame version by a user, and obtain a target video editing frame, wherein the conflict handling operation includes a selection operation of a first video editing frame version and a second video editing frame version synchronized by a video collaboration server. The encoding unit is used to replace the video frame at the corresponding position of the target video editing frame in the video collaboration version of the first client with the target video editing frame to obtain the complete video, and encode the complete video to obtain the target video version, so as to synchronize it to the video collaboration server based on the target video version.

[0140] By adopting the technical solution of the embodiment of the present application, the first client obtains the video to be edited and sends a collaboration request to the second client, wherein the collaboration request is used to request the second client to collaborate in editing the video to be edited, wherein the first client and the second client are connected to the video collaboration server in a two-way communication manner; the first client receives the video collaboration version created by the video collaboration server for the video to be edited, edits the video collaboration version, obtains the first video editing frame version and synchronizes it to the video collaboration server; receives the conflicting video frame version sent by the video collaboration server, wherein the conflicting video frame version is the conflicting video frame version obtained by matching the first video editing frame version and the second video editing frame version; wherein the second video editing frame version is the video editing frame version obtained by editing the second client according to the video collaboration version synchronized by the video collaboration server; the target video editing frame is determined through the conflicting video frame version, and the target video version after editing the video to be edited is determined according to the target video editing frame. It can be seen that after the first client obtains the edited video, it sends a collaboration request to the second client. The first client and the second client can establish a two-way communication connection with the video collaboration server, and can receive the video collaboration version created by the video collaboration server. The video collaboration server can match the video frames edited by the first client and the second client on the video collaboration version to obtain the conflicting video frame version. After the first client receives the conflicting video frame version, it determines the target video version, and the second client can edit the video without the user corresponding to the first client having to edit the video first. By connecting the video collaboration server with two-way communication, the first client can collaborate with the second client in real time to edit the video to be edited, and then determine the target video version, thereby improving the efficiency of video editing.

[0141] Those skilled in the art should understand that Figure 5 The video editing device in can be used to implement the video editing method described above, and the detailed description thereof should be similar to the description of the method part above. To avoid tediousness, it will not be repeated here.

[0142] Based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the above-mentioned video editing method. Figure 6 A schematic diagram of the structure of an electronic device for implementing various embodiments of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include a processor (processor) 610, a communication interface (Communications Interface) 620, a memory (memory) 630 and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call a computer program stored in the memory 630 and executable on the processor 610 to perform the following steps: Obtain the video to be edited, and send a collaboration request to the second client, where the collaboration request is used to request the second client to collaboratively edit the video to be edited, wherein the first client and the second client are connected to the video collaboration server in a two-way communication manner; Receive a video collaboration version created by the video collaboration server for the video to be edited, edit the video collaboration version, obtain a first video editing frame version, and synchronize it to the video collaboration server; Receive a conflicting video frame version sent by the video collaboration server, where the conflicting video frame version is obtained by matching the first video editing frame version with the second video editing frame version; wherein the second video editing frame version is a video editing frame version obtained by the second client performing editing processing according to the video collaboration version synchronized by the video collaboration server; The target video editing frame is determined through the conflicting video frame version, and the target video version after the editing process of the video to be edited is determined according to the target video editing frame.

[0143] By adopting the technical solution of the embodiment of the present application, the first client obtains the video to be edited and sends a collaboration request to the second client, wherein the collaboration request is used to request the second client to collaborate in editing the video to be edited, wherein the first client and the second client are connected to the video collaboration server by two-way communication; the first client receives the video collaboration version created by the video collaboration server for the video to be edited, edits the video collaboration version, obtains the first video editing frame version and synchronizes it to the video collaboration server; receives the conflicting video frame version sent by the video collaboration server, wherein the conflicting video frame version is obtained by matching the first video editing frame version and the second video editing frame version; wherein the second video editing frame version is the video editing frame version obtained by the second client editing the video collaboration version synchronized by the video collaboration server; the target video editing frame is determined through the conflicting video frame version, and the target video version after editing the video to be edited is determined according to the target video editing frame. It can be seen that after the first client obtains the edited video, it sends a collaboration request to the second client. The first client and the second client can establish a two-way communication connection with the video collaboration server, and can receive the video collaboration version created by the video collaboration server. The video collaboration server can match the video frames edited by the first client and the second client on the video collaboration version to obtain the conflicting video frame version. After the first client receives the conflicting video frame version, it determines the target video version, and the second client can edit the video without the user corresponding to the first client having to edit the video first. By connecting the video collaboration server with two-way communication, the first client can collaborate with the second client in real time to edit the video to be edited, and then determine the target video version, thereby improving the efficiency of video editing.

[0144] The specific execution steps can refer to the various steps of the above-mentioned video editing method embodiment, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.

[0145] It should be noted that the electronic devices in the embodiments of the present application include: servers, terminals, or other devices except terminals.

[0146] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0147] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).

[0148] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.

[0149] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned video editing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0150] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0151] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned video editing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0152] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0153] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the processor is used to run the program or instructions to implement the various processes of the above-mentioned product recommendation method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0154] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0155] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0156] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A video editing method, characterized in that: Applied to a first client, the method includes: Acquire the video to be edited, and send a collaboration request to the second client, wherein the collaboration request is used to request the second client to collaboratively edit the video to be edited, wherein the first client and the second client are connected to the video collaboration server in a two-way communication manner; Receiving a video collaboration version created by the video collaboration server for the video to be edited, editing the video collaboration version to obtain a first video editing frame version and synchronizing it to the video collaboration server; Receive a conflicting video frame version sent by the video collaboration server, where the conflicting video frame version is obtained by matching the first video editing frame version and the second video editing frame version; wherein the second video editing frame version is a video editing frame version obtained by the second client performing editing processing according to the video collaboration version synchronized by the video collaboration server; A target video editing frame is determined through the conflicting video frame version, and a target video version after editing the video to be edited is determined according to the target video editing frame.

2. The method according to claim 1, characterized in that: The method further comprises: When the first client edits the video collaboration version, the status information of the second client editing the video collaboration version synchronized by the video collaboration server is received.

3. The method according to claim 1, characterized in that The receiving a video collaboration version created by the video collaboration server for the video to be edited includes: Receive the video collaboration version after the video collaboration server decodes the video to be edited; wherein, the video collaboration server obtains the video to be edited through the cloud, and synchronizes the video collaboration version to the first client and the second client, and the video collaboration version includes all video frame information after the video to be edited is decoded.

4. The method according to claim 1, characterized in that The receiving the conflicting video frame version sent by the video collaboration server includes: Receive the conflicting video frame version created by the video collaboration server, wherein the conflicting video frame version is obtained by the video collaboration server identifying the conflicting video frame through a feature matching algorithm; wherein the feature matching algorithm is a method for obtaining feature points of video frames corresponding to the first video editing frame version and the second video editing frame version in a constructed three-dimensional scale space, and obtaining a feature point list after matching the feature points, and the feature point list is used to identify the conflicting video frames and normal video frames corresponding to the feature points.

5. The method according to claim 1, characterized in that The step of determining a target video editing frame by using the conflicting video frame version, and determining a target video version after editing the video to be edited according to the target video editing frame, comprises: In response to a conflict handling operation of the user on the conflicting video frame version, the target video editing frame is obtained, wherein the conflict handling operation includes a selection operation performed by the user on the first video editing frame version and the second video editing frame version synchronized with the video collaboration server; Replace the video frame at the corresponding position of the target video editing frame in the video collaboration version of the first client with the target video editing frame to obtain a complete video, and encode the complete video to obtain a target video version, so as to synchronize it to the video collaboration server based on the target video version.

6. A video editing method, characterized in that: Applied to a video collaboration server, the method includes: Acquire the video to be edited corresponding to the first client, create a video collaboration version according to the video to be edited, and synchronize the video collaboration version to the first client and the second client invited to collaborate by the first client; Receiving a first video editing frame version edited by the first client on the video collaboration version and a second video editing frame version edited by the second client on the video collaboration version, and synchronizing the two versions to the first client and the second client; According to the first video edited frame version and the second video edited frame version, a conflicting video frame is identified by a feature matching algorithm based on a three-dimensional scale space, and if the conflicting video frame exists, a conflicting video frame version is generated, and the conflicting video frame version is synchronized to the first client and the second client; A first target video version is received after the first client performs a conflict handling operation on the conflicting video frame version, and the first target video version is synchronized to the second client.

7. The method according to claim 6, characterized in that The method of identifying conflicting video frames by using a feature matching algorithm based on a three-dimensional scale space also includes: By using a feature matching algorithm based on a three-dimensional scale space, when the conflicting video frame is not identified, synchronizing the first video edited frame version and the second video edited frame version to the first client and the second client; A second target video version sent by the first client is received, and the second target video version is synchronized to the second client; the second target video version is obtained by the first client by merging the first video editing frame version and the second video editing frame version.

8. The method according to claim 6, characterized in that The method of identifying conflicting video frames by using a feature matching algorithm based on a three-dimensional scale space includes: Introducing a time scale into a two-dimensional scale space, and constructing the three-dimensional scale space through a three-dimensional Gaussian function; Based on the three-dimensional scale space, a differential Gaussian value is calculated using a three-dimensional Gaussian filter, an extreme point is determined according to the differential Gaussian value, and the extreme point is determined as a key point, wherein the video frame corresponding to the key point is the conflict video frame.

9. The method according to claim 8, characterized in that After determining the extreme point as a key point, the method further comprises: In the three-dimensional scale space, acquiring feature points of video frames corresponding to the first video editing frame version and the second video editing frame version, wherein the feature points include the key points; Creating a three-dimensional direction histogram by calculating the gradient operator of the feature point, and determining a direction in the direction histogram that is greater than a threshold height as a main direction of the direction histogram; According to the main direction of the direction histogram, a main direction is assigned to the feature point, and based on the feature point after the main direction is assigned, a feature descriptor of the feature point is generated, so as to identify the conflicting video frame based on the feature descriptor.

10. The method according to claim 9, characterized in that The identifying the conflicting video frame based on the feature descriptor comprises: According to the feature descriptors, the feature points are matched using a random sampling consensus algorithm to obtain a feature point list of video frames corresponding to the first video editing frame version and the second video editing frame version, wherein the feature point list includes the feature descriptors of all feature points in the video frames; The conflicting video frames are identified based on the feature point list.