CN109788251B - Video processing method, device and storage medium - Google Patents

Video processing method, device and storage medium Download PDF

Info

Publication number
CN109788251B
CN109788251B CN201910052420.7A CN201910052420A CN109788251B CN 109788251 B CN109788251 B CN 109788251B CN 201910052420 A CN201910052420 A CN 201910052420A CN 109788251 B CN109788251 B CN 109788251B
Authority
CN
China
Prior art keywords
file
analysis
file identifier
server
analysis task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910052420.7A
Other languages
Chinese (zh)
Other versions
CN109788251A (en
Inventor
晋兆龙
简宏伟
邵强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Keda Technology Co Ltd
Original Assignee
Suzhou Keda Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Keda Technology Co Ltd filed Critical Suzhou Keda Technology Co Ltd
Priority to CN201910052420.7A priority Critical patent/CN109788251B/en
Publication of CN109788251A publication Critical patent/CN109788251A/en
Application granted granted Critical
Publication of CN109788251B publication Critical patent/CN109788251B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application relates to a video processing method, a video processing device and a storage medium, which belong to the technical field of computers, and the method comprises the following steps: acquiring a first file identifier of a target video file; determining whether the target video file indicated by the first file identification is uploaded; when the target video file indicated by the first file identification is uploaded, acquiring a first analysis task of the target video file, wherein the first analysis task comprises a network address of the target video file; sending the first analysis task to a first server so that the first server can determine whether the first analysis task is executed or not, and returning a last execution result when the first analysis task is executed; the problem that the storage resource of the second server and the bandwidth resource of the transmission target video file are wasted due to the fact that the second server repeatedly receives the same target video file uploaded by the electronic equipment can be solved; the storage resources of the second server and the bandwidth resources of the transmission target video file can be saved.

Description

Video processing method, device and storage medium
Technical Field
The application relates to a video processing method, a video processing device and a storage medium, and belongs to the technical field of computers.
Background
With the popularization of the application of security monitoring systems, video resources uploaded by each video acquisition end are more and more, and corresponding video resources needing to be analyzed are more and more.
Currently, the methods for analyzing video resources include: the client uploads the video resource to be analyzed to a storage server; and the analysis server analyzes the video resources in the storage server according to the analysis requirement.
However, depending on the analysis requirements of the video resource, the same video resource may be uploaded to the storage server by the client many times, such as: the analysis requirement 1 is that the video resource x is analyzed according to the analysis algorithm type A; the analysis requirement 2 is to analyze the video resource x by using the analysis algorithm type B, and at this time, the client needs to upload the video resource x to the storage server twice, which may cause problems such as waste of storage resources in the storage server, and consumption of bandwidth resources when transmitting the same video resource for multiple times.
Disclosure of Invention
The application provides a video processing method, a video processing device and a storage medium, which can solve the problem that the storage resource of a second server and the bandwidth resource of a transmission target video file are wasted due to the fact that the second server repeatedly receives the same target video file uploaded by electronic equipment. The application provides the following technical scheme:
in a first aspect, a video processing method is provided, and the method includes:
acquiring a first file identifier of a target video file;
determining whether the target video file indicated by the first file identification is uploaded;
when a target video file indicated by the first file identification is uploaded, acquiring a first analysis task of the target video file, wherein the first analysis task comprises a network address of the target video file;
and sending the first analysis task to a first server so that the first server can determine whether the first analysis task is executed or not, and returning a last execution result when the first analysis task is executed.
Optionally, the method further comprises:
when the target video file indicated by the first file identification is not uploaded, uploading the target video file to a second server;
generating a second analysis task according to the network address of the target video file returned by the second server;
sending the second analysis task to the first server; for the first server to determine whether the second analysis task has been executed, and return a last execution result when the second analysis task has been executed.
Optionally, the determining whether the target video file indicated by the first file identifier is uploaded includes:
sending the first file identification to a second server, wherein the first file identification is used for the second server to detect whether a second file identification of the uploaded video file comprises a file identification which is the same as the first file identification; when the second file identifier comprises a file identifier which is the same as the first file identifier, determining that the target video file indicated by the first file identifier is uploaded, and returning to the network address; and when the second file identifier does not comprise the file identifier which is the same as the first file identifier, determining that the target video file indicated by the first file identifier is not uploaded, and returning an un-uploaded response.
Optionally, the acquiring the first analysis task of the video to be uploaded includes:
acquiring the type of an analysis algorithm and a network address of the video to be uploaded;
and generating the first analysis task according to the analysis algorithm type, the network address and the first file identifier.
In a second aspect, a video processing method is provided, the method comprising:
receiving an analysis task sent by electronic equipment, wherein the analysis task is used for analyzing a target video file uploaded by the electronic equipment;
detecting whether the analysis task has been performed;
and when the analysis task is executed, sending a last execution result to the electronic equipment.
Optionally, the method further comprises:
when the analysis task is not executed, sending the analysis task to a third server; the analysis task is used for the third server to perform corresponding analysis on the target video file;
and receiving and storing an execution result obtained after the third server executes the analysis task.
Optionally, the analysis task includes a network address, an analysis algorithm type, and a first file identifier of the target video file;
the detecting whether the analysis task is executed comprises:
detecting whether a third file identifier of the analyzed video file comprises a file identifier which is the same as the first file identifier, and whether an analysis algorithm type corresponding to the third file identifier comprises an analysis algorithm type in the analysis task;
when the third file identifier comprises a file identifier which is the same as the first file identifier, and an analysis algorithm type corresponding to the third file identifier comprises an analysis algorithm type in the analysis task, determining whether the analysis task is executed;
and when the third file identifier does not comprise the file identifier which is the same as the first file identifier, or the third file identifier comprises the file identifier which is the same as the first file identifier and the analysis algorithm type corresponding to the third file identifier does not comprise the analysis algorithm type in the analysis task, determining that the analysis task is not executed.
In a third aspect, a video processing apparatus is provided, the apparatus comprising:
the identification acquisition module is used for acquiring a first file identification of the target video file;
the uploading determining module is used for determining whether the target video file indicated by the first file identification is uploaded;
the task acquisition module is used for acquiring a first analysis task of the target video file when the target video file indicated by the first file identifier is uploaded, wherein the first analysis task comprises a network address of the target video file;
and the task sending module is used for sending the first analysis task to a first server so that the first server can determine whether the first analysis task is executed or not, and returning a last execution result when the first analysis task is executed.
In a fourth aspect, there is provided a video processing apparatus, the apparatus comprising:
the task receiving module is used for receiving an analysis task sent by the electronic equipment, and the analysis task is used for analyzing a target video file uploaded by the electronic equipment;
an execution determination module to detect whether the analysis task has been executed;
and the result returning module is used for sending the last execution result to the electronic equipment when the analysis task is executed.
In a fifth aspect, there is provided a video processing apparatus, the apparatus comprising a processor and a memory; the memory stores a program, which is loaded and executed by the processor to implement the video processing method of the first aspect; alternatively, the video processing method according to the second aspect is implemented.
In a sixth aspect, there is provided a computer-readable storage medium having a program stored therein, the program being loaded and executed by the processor to implement the video processing method of the first aspect; alternatively, the video processing method according to the second aspect is implemented.
The beneficial effect of this application lies in: acquiring a first file identifier of a target video file; determining whether the target video file indicated by the first file identification is uploaded; when the target video file indicated by the first file identification is uploaded, acquiring a first analysis task of the target video file, wherein the first analysis task comprises a network address of the target video file; sending the first analysis task to a first server so that the first server can determine whether the first analysis task is executed or not, and returning a last execution result when the first analysis task is executed; the problem that the storage resource of the second server and the bandwidth resource of the transmission target video file are wasted due to the fact that the second server repeatedly receives the same target video file uploaded by the electronic equipment can be solved; the electronic equipment determines whether the target video file indicated by the analysis task is uploaded before sending the analysis task, and does not send the target video resource to the second server repeatedly when the target video file is uploaded, so that the storage resource of the second server and the bandwidth resource for transmitting the target video file can be saved.
In addition, receiving an analysis task sent by the electronic equipment through the first server; determining whether the analysis task has been performed; when the analysis task is executed, the analysis result is directly returned to the electronic equipment, so that the problem that the running resources and the execution time are wasted due to the fact that a third server analyzes the same analysis task for multiple times can be solved; for the same analysis task, the third server only needs to analyze once, and the first servers of other same analysis tasks can directly return the last execution result, so that the execution time of the analysis task can be saved, and the running resources of the third server can be saved.
The foregoing description is only an overview of the technical solutions of the present application, and in order to make the technical solutions of the present application more clear and clear, and to implement the technical solutions according to the content of the description, the following detailed description is made with reference to the preferred embodiments of the present application and the accompanying drawings.
Drawings
Fig. 1 is a schematic structural diagram of a video processing system according to an embodiment of the present application;
fig. 2 is a flowchart of a video processing method according to an embodiment of the present application;
fig. 3 is a flowchart of a method for determining whether a target video file indicated by a first file identifier has been uploaded according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for performing corresponding analysis on a target video file according to an analysis task according to an embodiment of the present application;
FIG. 5 is a block diagram of a video processing device provided by an embodiment of the present application;
FIG. 6 is a block diagram of a video processing device provided by an embodiment of the present application;
fig. 7 is a block diagram of a video processing apparatus according to an embodiment of the present application.
Detailed Description
The following detailed description of embodiments of the present application will be described in conjunction with the accompanying drawings and examples. The following examples are intended to illustrate the present application but are not intended to limit the scope of the present application.
Fig. 1 is a schematic structural diagram of a video processing system according to an embodiment of the present application, and as shown in fig. 1, the system at least includes: electronic device 110, first server 120, second server 130, and third server 140.
The electronic device 110 is configured to obtain a target video file to be uploaded, and submit an analysis task for analyzing the target video file to the first server 120. The electronic device 110 may be a mobile phone, a computer, a tablet computer, or other terminal; alternatively, it may be a server; the target video file acquired by the electronic device 110 may be pre-stored, or may be acquired and sent by an acquisition device in real time, and the type of the electronic device 110 and the source of the target video file are not limited in this embodiment.
The analysis task is used to instruct the third server 140 to analyze the target video file uploaded by the electronic device.
Illustratively, the process of the electronic device 110 sending the analysis task includes: the electronic device 110 acquires a first file identifier of a target video file; determining whether the target video file indicated by the first file identification is uploaded; when the target video file indicated by the first file identification is uploaded, acquiring a first analysis task of the target video file; sending the first analysis task to the first server 120; when the target video file indicated by the first file identifier is not uploaded, uploading the target video file to the second server 130; generating a second analysis task according to the network address of the target video file returned by the second server 130; the second analysis task is sent to the first server 120.
Wherein the first file identifier is used to uniquely identify the target video file, and the first file identifier may be a hash value calculated for the target video file based on a Message Digest Algorithm (MD 5); or, the name, number, and collection date of the target video file, and the type of the first file identifier is not limited in this embodiment.
The first analysis task includes a network address of the target video file. The first server 120 is configured to determine whether the first analysis task has been executed, and return a last execution result of the first analysis task when the first analysis task has been executed.
The second analysis task includes a network address of the target video file. The first server 120 is further configured to determine whether the second analysis task has been executed, and return a last execution result of the second analysis task when the second analysis task has been executed.
Optionally, the electronic device 110 is connected to the first server 120 and the second server 130 respectively through wired or wireless communication.
Schematically, fig. 1 illustrates an example in which the electronic device 110 accesses a public network through a data boundary transmission monitoring private network proxy server, a security boundary access platform connected to the data boundary transmission monitoring private network proxy server, and a data boundary transmission monitoring private network proxy server connected to the security boundary access platform, and the first server 120 and the second server 130 access the public network, so as to implement the communication connection between the electronic device 110 and the first server 120 and the second server 130. The security boundary access platform is used for providing security of an internal network and an access function of an external network; the data boundary transmission monitoring private network proxy server is used for providing access service for the third-party non-standard platform. Of course, the electronic device 110 may also directly access the public network to establish the communication connection with the first server 120 and the second server 130, and the embodiment does not limit the manner in which the electronic device 110 establishes the communication connection with the first server 120 and the second server 130.
The second server 130 may be an independent server host, or may be a server cluster, and the embodiment does not limit the type of the second server 130. The second server 130 is used for managing the target video file uploaded by the electronic device 110. The second server may also be referred to as a storage server, a storage platform, etc., and the present embodiment does not limit the name of the second server 130.
Illustratively, the second server 130 is configured to receive the first file identifier sent by the electronic device 110; detecting whether a second file identifier of the uploaded video file comprises a file identifier which is the same as the first file identifier; when the second file identification comprises a file identification which is the same as the first file identification, determining that the target video file indicated by the first file identification is uploaded, and returning to the network address; and when the second file identifier does not comprise the file identifier which is the same as the first file identifier, determining that the target video file indicated by the first file identifier is not uploaded, and returning an un-uploaded response.
Wherein the network address is an address at which the second server 130 stores the target video file.
The first server 120 may be an independent server host, or may be a server cluster, and the embodiment does not limit the type of the first server 120. The first server 120 is used to manage the analysis tasks sent by the electronic device 110. First server 120 and second server 130 may belong to the same server host; alternatively, the servers may belong to different server hosts, which is not limited in this embodiment. The first server 120 may also be referred to as an intelligent management server, an intelligent management platform, etc., and the name of the first server 120 is not limited in this example.
Illustratively, the first server 120 receives the analysis task sent by the electronic device; detecting whether the analysis task has been executed; when the analysis task is executed, sending a last execution result to the electronic device 110; transmitting the analysis task to the third server 140 when the analysis task is not executed; and receiving and storing an execution result obtained after the third server 140 executes the analysis task.
And the analysis task is used for the third server to perform corresponding analysis on the target video file.
Optionally, the first server 120 may also include other functions, such as: sending a function of analyzing a task to the third servers 140 based on a load balancing principle, thereby ensuring load balancing of each third server 140; for another example: a data updating function, namely deleting the analysis tasks which are not improved within a preset time length, inserting the newly submitted analysis tasks, modifying and inquiring the uploaded analysis tasks, and the like; for another example: carrying out resource monitoring on the node server and sending a monitoring result to the monitoring client; when the resource utilization rate is higher than a preset value, sending alarm prompt information and the like to the monitoring client; for another example: a function of realizing Time synchronization between a node server and a Network Time Protocol (NTP) server, and the like. The functions of the first server 120 are not listed here.
Optionally, the first server 120 and the third server 140 are connected by wired or wireless communication. Illustratively, the first server 120 is communicatively coupled to the third server 140 via a public network.
The third server 140 may be an independent server host, or may also be a server cluster, and the embodiment does not limit the type of the third server 140. Third server 140 may be hosted on the same server as first server 120 and second server 130; alternatively, the servers may belong to different server hosts, which is not limited in this embodiment. The third server 140 may also be referred to as an intelligent analysis server, an analysis platform, etc., and the name of the third server 140 is not limited in this embodiment.
The third server 140 is configured to analyze the target video file according to the analysis task sent by the first server 120.
Illustratively, the analysis task includes a network address of the target video file and an analysis algorithm type; the third server 140 obtains the target video file according to the network address after receiving the analysis task, and performs corresponding analysis on the target video file by using the analysis algorithm type.
Fig. 2 is a flowchart of a video processing method according to an embodiment of the present application, and this embodiment takes the application of the method to the video processing system shown in fig. 1 as an example for description. The method at least comprises the following steps:
in step 201, an electronic device obtains a first file identifier of a target video file.
In this application, the file identifier is used to uniquely identify the target video file, and the file identifier may be a hash value calculated for the target video file based on a Message Digest Algorithm (MD 5); or, the name, number, and collection date of the target video file, and the type of the file identifier is not limited in this embodiment. Illustratively, in the present embodiment, the file identification is exemplified as the hash value calculated based on MD5, so that once the target video file is changed, the hash value is also changed. The file identification comprises a first file identification.
Optionally, after the target video file is acquired, the electronic device decodes the target video file, so as to acquire the encoding information of the target video file and the video frame data of the target video file. The encoding information includes, but is not limited to, an encoder used by the target video file, so that the third server can determine a corresponding decoder according to the encoder, and the efficiency of determining the decoder when the third server analyzes the target video file is improved, thereby improving the efficiency of video analysis. Video frame data includes, but is not limited to: and the frame rate, the resolution, the size and other information of the target video file can reduce the analysis amount of the third server and improve the analysis speed of the third server on the target video file.
In step 202, the electronic device determines whether the target video file indicated by the first file identifier is already uploaded.
Optionally, when the target video file indicated by the first file identifier is uploaded, step 203 is executed; when the target video file indicated by the first file identification is not uploaded, uploading the target video file to a second server; generating a second analysis task according to the network address of the target video file returned by the second server; and sending the second analysis task to the first server. The first server is used for determining whether the second analysis task is executed or not and returning a last execution result when the second analysis task is executed.
Optionally, the second analysis task includes, but is not limited to: the method comprises the steps of obtaining a network address, a first file identifier and an analysis algorithm type by the electronic equipment. Of course, the second analysis task may also include other information such as encoding information, video frame data, and the like, and the content included in the second analysis task is not limited in this embodiment.
Optionally, the electronic device may further set an upper limit of an uploading speed when the target video file is uploaded, so that a problem that the target video file is uploaded to occupy an excessively wide bandwidth, thereby affecting other transmission tasks, can be avoided.
Referring to fig. 3, the electronic device determines whether the target video file indicated by the first file identifier has been uploaded, including steps 31-36:
and step 31, the electronic equipment sends the first file identifier to the second server.
The second server is used for storing the video files uploaded by the electronic equipment and establishing a corresponding relation between each video file and the second file identifier of the video file.
Step 32, the second server receives the first file identifier and detects whether the second file identifier of the uploaded video file comprises the file identifier which is the same as the first file identifier; when the second file identifier includes the file identifier identical to the first file identifier, executing step 33; when the second file identifier does not include the same file identifier as the first file identifier, step 34 is performed.
Because the target video file has the unique first file identifier, if the second file identifier stored in the second server includes the first file identifier, it indicates that the second server has previously received the target video file, that is, the target video file has been uploaded.
And step 33, when the second file identifier includes the file identifier same as the first file identifier, determining that the target video file indicated by the first file identifier is uploaded, and returning the network address to the electronic device by the second server.
The network address is used to indicate the storage address of the target video file.
And step 34, the electronic device receives the network address of the target video file, determines that the target video file indicated by the first file identifier is uploaded, and ends the process.
And step 35, when the second file identifier does not include the file identifier which is the same as the first file identifier, determining that the target video file indicated by the first file identifier is not uploaded, and returning an un-uploaded response to the electronic equipment by the second server.
And step 36, the electronic device receives the response of not uploading, determines that the target video file indicated by the first file identifier is not uploaded, and ends the process.
Of course, the electronic device may also determine whether the target video file indicated by the first file identifier has been uploaded in other manners, such as: the second server synchronizes a second file identifier of the uploaded video file to the electronic equipment every preset time, the electronic equipment determines whether the received second file identifier comprises a first file identifier, and determines that a target video file indicated by the first file identifier is uploaded when the second file identifier comprises the first file identifier; and when the second file identification does not comprise the first file identification, determining that the target video file indicated by the first file identification is not uploaded.
Step 203, when the target video file indicated by the first file identifier is uploaded, acquiring a first analysis task of the target video file.
Wherein the first analysis task comprises a network address of the target video file.
The electronic equipment acquires a first analysis task, comprising: acquiring the type of an analysis algorithm and a network address of a video to be uploaded; and generating a first analysis task according to the analysis algorithm type, the network address and the first file identifier.
Optionally, the electronic device displays an analysis algorithm type selection control in the user interface; and acquiring the analysis algorithm type according to the triggering operation acted on the analysis algorithm type selection control. Such as: the analysis algorithm type selection controls displayed in the user interface include: the analysis algorithm type obtained when the trigger operation acting on the general bayonet analysis algorithm control is received is the general bayonet analysis algorithm; the type of the analysis algorithm obtained when the triggering operation acting on the video abstract analysis algorithm control is received is a video abstract analysis algorithm; the type of the analysis algorithm obtained when the trigger operation acting on the personnel checkpoint analysis algorithm control is received is a personnel checkpoint analysis algorithm; the type of the analysis algorithm obtained when the trigger operation acting on the vehicle bayonet analysis algorithm control is received is a vehicle bayonet analysis algorithm; the type of the analysis algorithm obtained when the trigger operation acting on the face analysis algorithm control is received is a face analysis algorithm.
The network address is sent by a second server for storing the target video file.
The method comprises the steps of generating a first analysis task according to an analysis algorithm type, a network address and a first file identifier, and carrying the analysis algorithm type, the network address and the first file identifier in the first analysis task. Optionally, the first analysis task may also include other information, such as: the present embodiment does not limit the content included in the first analysis task, such as the encoding information of the target video file, the video frame data, and other information.
Step 204, the electronic device sends the first analysis task to the first server, so that the first server determines whether the first analysis task has been executed, and returns a last execution result when the first analysis task has been executed.
Optionally, a task sending control is displayed in a user interface of the electronic device, and the electronic device sends the acquired first analysis task to the first server when receiving a trigger operation acting on the task sending control.
In step 205, the first server receives an analysis task sent by the electronic device.
The analysis task is used for analyzing the target video file uploaded by the electronic equipment. Alternatively, the analysis task may be a first analysis task; alternatively, it may be a second analysis task.
In step 206, the first server checks whether the analysis task has been executed.
Optionally, the analysis task includes a network address of the target video file, an analysis algorithm type, and a first file identifier; the first server is used for managing the analysis tasks sent by each electronic device and storing the corresponding relation among the third file identification, the analysis algorithm type and the execution result of the analyzed video file. At this time, the first server detects whether the analysis task is executed, including: detecting whether a third file identifier of the analyzed video file comprises a file identifier which is the same as the first file identifier, and whether an analysis algorithm type corresponding to the third file identifier comprises an analysis algorithm type in an analysis task; when the third file identifier comprises a file identifier which is the same as the first file identifier, and the analysis algorithm type corresponding to the third file identifier comprises an analysis algorithm type in the analysis task, determining whether the analysis task is executed; and when the third file identifier does not comprise the file identifier which is the same as the first file identifier, or the third file identifier comprises the file identifier which is the same as the first file identifier and the analysis algorithm type corresponding to the third file identifier does not comprise the analysis algorithm type in the analysis task, determining that the analysis task is not executed.
Optionally, step 207 is performed when the analysis task has been executed; when the analysis task is not executed, sending the analysis task to a third server; correspondingly, the third server performs corresponding analysis on the target video file after receiving the analysis task, and sends an execution result to the first server; and the first server receives and stores an execution result obtained after the third server executes the analysis task. And the analysis task is used for the third server to perform corresponding analysis on the target video file.
Referring to fig. 4, the third server performs corresponding analysis on the target video file according to the analysis task, including steps 41-51:
step 41, an analysis task sent by the first server is obtained.
Step 42, determining whether the type of the analysis algorithm in the analysis task is a universal bayonet analysis algorithm; when the analysis algorithm type is a universal bayonet analysis algorithm, step 43 is executed; when the analysis algorithm type is not a generic bayonet analysis algorithm, step 44 is performed.
And 43, calling a decoder to analyze the video data in the target video file, analyzing the video data obtained by analysis by using a universal bayonet analysis algorithm, and ending the process.
Optionally, the analysis task received by the third server includes encoding information of the target video file, and the third server invokes a corresponding decoder to parse the target video file according to an encoder indicated by the encoding information.
Optionally, the third server may also invoke different decoders one by one to parse the target video file, and stop until parsing is successful.
And when the third server calls the decoder to analyze the video data in the target video file, the third server can perform operations such as decoding and/or transcoding and the like on the target video file.
Step 44, determining whether the type of the analysis algorithm in the analysis task is a video abstract analysis algorithm; when the analysis algorithm type is a video summary analysis algorithm, step 45 is executed; when the analysis algorithm type is not a video summary analysis algorithm, step 46 is performed.
And step 45, calling a decoder to analyze the video data in the target video file, analyzing the video data obtained by analyzing by using a video abstract analysis calculation, and ending the process.
Step 46, determining whether the type of the analysis algorithm in the analysis task is a personnel checkpoint analysis algorithm; when the analysis algorithm type is a personnel checkpoint analysis algorithm, executing step 47; when the analysis algorithm type is not a personnel checkpoint analysis algorithm, step 48 is performed.
And step 47, calling a decoder to analyze the video data in the target video file, analyzing the video data obtained by analysis by using a personnel checkpoint analysis algorithm, and ending the process.
Step 48, determining whether the type of the analysis algorithm in the analysis task is a vehicle gate analysis algorithm; when the analysis algorithm type is a vehicle bayonet analysis algorithm, executing step 49; when the type of analysis algorithm is not a vehicle bayonet analysis algorithm, step 50 is performed.
And 49, calling a decoder to analyze the video data in the target video file, analyzing the video data obtained by analysis by using a vehicle bayonet analysis algorithm, and ending the process.
Step 50, determining whether the type of the analysis algorithm in the analysis task is a human face analysis algorithm; when the analysis algorithm type is a face analysis algorithm, step 51 is executed; step 41 is performed again when the analysis algorithm type is not a face analysis algorithm.
And step 51, calling a decoder to analyze the video data in the target video file, and analyzing the video data obtained by analyzing by using a face analysis algorithm.
Step 207, when the analysis task is executed, the first server sends the last execution result to the electronic device.
Since the third server returns the execution result to the first server after the analysis task is executed, the first server stores the execution result corresponding to the analysis task when the analysis task is executed, and at this time, the execution result can be directly returned to the electronic device, thereby improving the analysis speed of the analysis task.
In summary, in the video processing method provided in this embodiment, the first file identifier of the target video file is obtained; determining whether the target video file indicated by the first file identification is uploaded; when the target video file indicated by the first file identification is uploaded, acquiring a first analysis task of the target video file, wherein the first analysis task comprises a network address of the target video file; sending the first analysis task to a first server so that the first server can determine whether the first analysis task is executed or not, and returning a last execution result when the first analysis task is executed; the problem that the storage resource of the second server and the bandwidth resource of the transmission target video file are wasted due to the fact that the second server repeatedly receives the same target video file uploaded by the electronic equipment can be solved; the electronic equipment determines whether the target video file indicated by the analysis task is uploaded before sending the analysis task, and does not send the target video resource to the second server repeatedly when the target video file is uploaded, so that the storage resource of the second server and the bandwidth resource for transmitting the target video file can be saved.
In addition, receiving an analysis task sent by the electronic equipment through the first server; determining whether the analysis task has been performed; when the analysis task is executed, the analysis result is directly returned to the electronic equipment, so that the problem that the running resources and the execution time are wasted due to the fact that a third server analyzes the same analysis task for multiple times can be solved; for the same analysis task, the third server only needs to analyze once, and the first servers of other same analysis tasks can directly return the last execution result, so that the execution time of the analysis task can be saved, and the running resources of the third server can be saved.
Optionally, the step 201 and 204 may be implemented separately as an embodiment of the method on the electronic device side; steps 205-207 may be implemented separately as a first server-side embodiment of the method.
Fig. 5 is a block diagram of a video processing apparatus according to an embodiment of the present application, and the present application takes the electronic device 110 applied to the video processing system shown in fig. 1 as an example for explanation. The device at least comprises the following modules: an identity acquisition module 510, an upload determination module 520, a task acquisition module 530, and a task transmission module 540.
An identifier obtaining module 510, configured to obtain a first file identifier of a target video file;
an upload determination module 520, configured to determine whether the target video file indicated by the first file identifier is uploaded;
a task obtaining module 530, configured to obtain a first analysis task of a target video file when the target video file indicated by the first file identifier is uploaded, where the first analysis task includes a network address of the target video file;
the task sending module 540 is configured to send the first analysis task to a first server, so that the first server determines whether the first analysis task has been executed, and returns a last execution result when the first analysis task has been executed.
For relevant details reference is made to the above-described method embodiments.
Fig. 6 is a block diagram of a video processing apparatus according to an embodiment of the present application, and this embodiment takes the first server 120 applied in the video processing system shown in fig. 1 as an example for explanation. The device at least comprises the following modules: a task receiving module 610, an execution determining module 620 and a result returning module 630.
The task receiving module 610 is configured to receive an analysis task sent by an electronic device, where the analysis task is used to analyze a target video file uploaded by the electronic device;
an execution determination module 620 for detecting whether the analysis task has been executed;
a result returning module 630, configured to send a last execution result to the electronic device when the analysis task is executed.
For relevant details reference is made to the above-described method embodiments.
It should be noted that: in the video processing apparatus provided in the above embodiment, when performing video processing, only the division of the above functional modules is taken as an example, and in practical applications, the above functions may be distributed by different functional modules as needed, that is, the internal structure of the video processing apparatus may be divided into different functional modules to complete all or part of the above described functions. In addition, the video processing apparatus and the video processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments in detail and are not described herein again.
Fig. 7 is a block diagram of a video processing apparatus provided in an embodiment of the present application, which may be an apparatus of the electronic device 110 in the video processing system shown in fig. 1; alternatively, the first server 120. The apparatus includes at least a processor 701 and a memory 702.
Processor 701 may include one or more processing cores, such as: 4 core processors, 8 core processors, etc. The processor 701 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 701 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 702 may include one or more computer-readable storage media, which may be non-transitory. Memory 702 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 702 is used to store at least one instruction for execution by processor 701 to implement a video processing method as provided by method embodiments herein.
In some embodiments, the video processing apparatus may further include: a peripheral interface and at least one peripheral. The processor 701, memory 702, and peripheral interface may be connected by bus or signal lines. Each peripheral may be connected to the peripheral interface via a bus, signal line, or circuit board. Illustratively, peripheral devices include, but are not limited to: radio frequency circuit, touch display screen, audio circuit, power supply, etc.
Of course, the video processing apparatus may also include fewer or more components, which is not limited in this embodiment.
Optionally, the present application further provides a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the video processing method of the above method embodiment.
Optionally, the present application further provides a computer product, which includes a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the video processing method of the above-mentioned method embodiment.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. A method of video processing, the method comprising:
acquiring a first file identifier of a target video file;
determining whether the target video file indicated by the first file identification is uploaded;
when a target video file indicated by the first file identifier is uploaded, acquiring a first analysis task of the target video file, wherein the first analysis task comprises a network address of the target video file, an analysis algorithm type and the first file identifier;
sending the first analysis task to a first server, so that after receiving the first analysis task, the first server detects whether a third file identifier of an analyzed video file comprises a file identifier which is the same as the first file identifier, and whether an analysis algorithm type corresponding to the third file identifier comprises an analysis algorithm type in the analysis task; when the third file identifier comprises a file identifier which is the same as the first file identifier and the analysis algorithm type corresponding to the third file identifier comprises the analysis algorithm type in the analysis task, determining that the first analysis task is executed and returning the last execution result; the first server is used for managing the analysis tasks sent by each electronic device and storing the corresponding relation among the third file identification of the analyzed video file, the analysis algorithm type and the execution result.
2. The method of claim 1, further comprising:
when the target video file indicated by the first file identification is not uploaded, uploading the target video file to a second server;
generating a second analysis task according to the network address of the target video file returned by the second server;
and sending the second analysis task to the first server so that the first server can determine whether the second analysis task is executed or not, and returning a last execution result when the second analysis task is executed.
3. The method of claim 1, wherein the determining whether the target video file indicated by the first file identifier has been uploaded comprises:
sending the first file identification to a second server, wherein the first file identification is used for the second server to detect whether a second file identification of the uploaded video file comprises a file identification which is the same as the first file identification; when the second file identifier comprises a file identifier which is the same as the first file identifier, determining that the target video file indicated by the first file identifier is uploaded, and returning to the network address; and when the second file identifier does not comprise the file identifier which is the same as the first file identifier, determining that the target video file indicated by the first file identifier is not uploaded, and returning an un-uploaded response.
4. The method according to any one of claims 1 to 3, wherein the first analysis task of acquiring the video to be uploaded comprises:
acquiring the type of an analysis algorithm and a network address of the video to be uploaded;
and generating the first analysis task according to the analysis algorithm type, the network address and the first file identifier.
5. A video processing method, for use in a first server for managing analysis tasks sent by respective electronic devices, the method comprising:
receiving an analysis task sent by electronic equipment, wherein the analysis task is used for analyzing a target video file uploaded by the electronic equipment;
detecting whether the analysis task has been performed;
when the analysis task is executed, sending a last execution result to the electronic equipment;
the analysis task comprises a network address, an analysis algorithm type and a first file identifier of the target video file; the first server stores the corresponding relation among the third file identification of the analyzed video file, the type of the analysis algorithm and the execution result; the detecting whether the analysis task is executed comprises:
detecting whether a third file identifier of the analyzed video file comprises a file identifier which is the same as the first file identifier, and whether an analysis algorithm type corresponding to the third file identifier comprises an analysis algorithm type in the analysis task;
and when the third file identifier comprises the file identifier which is the same as the first file identifier, and the analysis algorithm type corresponding to the third file identifier comprises the analysis algorithm type in the analysis task, determining that the analysis task is executed.
6. The method of claim 5, further comprising:
when the analysis task is not executed, sending the analysis task to a third server; the analysis task is used for the third server to perform corresponding analysis on the target video file;
and receiving and storing an execution result obtained after the third server executes the analysis task.
7. The method of claim 5,
the detecting whether the analysis task is executed further comprises:
and when the third file identifier does not comprise the file identifier which is the same as the first file identifier, or the third file identifier comprises the file identifier which is the same as the first file identifier and the analysis algorithm type corresponding to the third file identifier does not comprise the analysis algorithm type in the analysis task, determining that the analysis task is not executed.
8. A video processing apparatus, characterized in that the apparatus comprises:
the identification acquisition module is used for acquiring a first file identification of the target video file;
the uploading determining module is used for determining whether the target video file indicated by the first file identification is uploaded;
the task obtaining module is used for obtaining a first analysis task of the target video file when the target video file indicated by the first file identifier is uploaded, wherein the first analysis task comprises a network address of the target video file, an analysis algorithm type and the first file identifier;
the task sending module is used for sending the first analysis task to a first server so that the first server can detect whether a third file identifier of an analyzed video file comprises a file identifier which is the same as the first file identifier or not after receiving the first analysis task, and whether an analysis algorithm type corresponding to the third file identifier comprises an analysis algorithm type in the analysis task or not; when the third file identifier comprises a file identifier which is the same as the first file identifier and the analysis algorithm type corresponding to the third file identifier comprises the analysis algorithm type in the analysis task, determining that the first analysis task is executed and returning the last execution result; the first server is used for managing the analysis tasks sent by each electronic device and storing the corresponding relation among the third file identification of the analyzed video file, the analysis algorithm type and the execution result.
9. A video processing apparatus for use in a first server for managing analysis tasks transmitted by respective electronic devices, the apparatus comprising:
the task receiving module is used for receiving an analysis task sent by the electronic equipment, and the analysis task is used for analyzing a target video file uploaded by the electronic equipment;
an execution determination module to detect whether the analysis task has been executed;
the result returning module is used for sending a last execution result to the electronic equipment when the analysis task is executed;
the analysis task comprises a network address, an analysis algorithm type and a first file identifier of the target video file; the first server stores the corresponding relation among the third file identification of the analyzed video file, the type of the analysis algorithm and the execution result; the execution determining module is configured to detect whether a third file identifier of the analyzed video file includes a file identifier that is the same as the first file identifier, and whether an analysis algorithm type corresponding to the third file identifier includes an analysis algorithm type in the analysis task;
and when the third file identifier comprises the file identifier which is the same as the first file identifier, and the analysis algorithm type corresponding to the third file identifier comprises the analysis algorithm type in the analysis task, determining that the analysis task is executed.
10. A video processing apparatus, characterized in that the apparatus comprises a processor and a memory; the memory has stored therein a program that is loaded and executed by the processor to implement the video processing method according to any one of claims 1 to 4; or implementing a video processing method according to any of claims 5 to 7.
11. A computer-readable storage medium, characterized in that the storage medium has stored therein a program for implementing the video processing method according to any one of claims 1 to 4 when executed by a processor; or implementing a video processing method according to any of claims 5 to 7.
CN201910052420.7A 2019-01-21 2019-01-21 Video processing method, device and storage medium Active CN109788251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910052420.7A CN109788251B (en) 2019-01-21 2019-01-21 Video processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910052420.7A CN109788251B (en) 2019-01-21 2019-01-21 Video processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN109788251A CN109788251A (en) 2019-05-21
CN109788251B true CN109788251B (en) 2021-02-23

Family

ID=66500994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910052420.7A Active CN109788251B (en) 2019-01-21 2019-01-21 Video processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN109788251B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111460217A (en) * 2020-03-31 2020-07-28 苏州科达科技股份有限公司 Video retrieval system and method for operating a video retrieval system
CN112015535B (en) * 2020-08-28 2023-09-08 苏州科达科技股份有限公司 Task processing method, device, electronic equipment and storage medium
CN113992687B (en) * 2021-12-28 2022-04-08 浙江宇视科技有限公司 Intelligent service cluster scheduling method and device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7631336B2 (en) * 2004-07-30 2009-12-08 Broadband Itv, Inc. Method for converting, navigating and displaying video content uploaded from the internet to a digital TV video-on-demand platform
CN102681867A (en) * 2011-12-15 2012-09-19 中兴通讯股份有限公司 Video analysis task processing method and device
CN104331325B (en) * 2014-11-25 2017-08-25 深圳市信义科技有限公司 A kind of multi-element intelligent video resource scheduling system analyzed based on resource detection and dispatching method
CN106649721B (en) * 2016-12-22 2021-06-22 创新科技术有限公司 File duplicate removal method and device
CN109151059A (en) * 2018-09-27 2019-01-04 乐蜜有限公司 A kind of file uploading method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109788251A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN113568884B (en) File management method and device, electronic equipment and storage medium
CN111008075B (en) Load balancing system, method, device, equipment and medium
US20170163479A1 (en) Method, Device and System of Renewing Terminal Configuration In a Memcached System
CN109788251B (en) Video processing method, device and storage medium
CN103237060B (en) A kind of data object acquisition, Apparatus and system
CN110297944B (en) Distributed XML data processing method and system
US9801146B2 (en) Terminal and synchronization control method among terminals
WO2021237433A1 (en) Message pushing method and apparatus, and electronic device and computer-readable medium
CN112261094A (en) Message processing method and proxy server
CN112437047A (en) Remote server management method, system and related device
CN114675983A (en) Business data processing method and device, storage medium and electronic equipment
US10938773B2 (en) Method and apparatus for synchronizing contact information and medium
CN109710502B (en) Log transmission method, device and storage medium
CN111767558A (en) Data access monitoring method, device and system
CN112073488A (en) Method and device for processing request
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN114268799B (en) Streaming media transmission method and device, electronic equipment and medium
CN104079368B (en) A kind of the test data transmission method and server of application software
CN114884805A (en) Data transmission method, device, terminal and storage medium
CN113157475A (en) Log processing method and device, storage medium and electronic equipment
CN113094131A (en) Prompt resource display method, device, terminal, server and storage medium
CN114172978A (en) Multi-protocol equipment access method and related device
CN108805741B (en) Fusion method, device and system of power quality data
CN110768855B (en) Method and device for testing linkmzation performance
CN113076380A (en) Data synchronization method, device, system, equipment and storage medium

Legal Events

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