CN113347451A - Video uploading method and device, electronic equipment and computer readable storage medium - Google Patents

Video uploading method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113347451A
CN113347451A CN202110626997.1A CN202110626997A CN113347451A CN 113347451 A CN113347451 A CN 113347451A CN 202110626997 A CN202110626997 A CN 202110626997A CN 113347451 A CN113347451 A CN 113347451A
Authority
CN
China
Prior art keywords
video
uploaded
uploading
central server
list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110626997.1A
Other languages
Chinese (zh)
Other versions
CN113347451B (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.)
Ping An Securities Co Ltd
Original Assignee
Ping An Securities 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 Ping An Securities Co Ltd filed Critical Ping An Securities Co Ltd
Priority to CN202110626997.1A priority Critical patent/CN113347451B/en
Publication of CN113347451A publication Critical patent/CN113347451A/en
Application granted granted Critical
Publication of CN113347451B publication Critical patent/CN113347451B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2181Source of audio or video content, e.g. local disk arrays comprising remotely distributed storage units, e.g. when movies are replicated over a plurality of video servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/222Secondary servers, e.g. proxy server, cable television Head-end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/23418Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics

Abstract

The invention relates to a video processing technology in artificial intelligence, and discloses a video uploading method, which comprises the following steps: acquiring an original video list of a sub server and a summary video list of a central server; identifying video names with the same fields in the original video list and the summarized video list, and calculating the similarity between the original video with the same fields corresponding to the video names in the sub-servers and the summarized video with the same fields corresponding to the video names in the central server; collecting the names of the original videos with the similarity smaller than a preset similarity threshold value in the sub servers into a video list to be uploaded; and updating the name and the format of the video to be uploaded in the video list to be uploaded, and uploading the updated video to be uploaded to the central server. In addition, the invention also relates to a block chain technology, and the original video can be stored in the block chain node. The invention can reduce the error rate of video data migration and improve the efficiency of video data migration.

Description

Video uploading method and device, electronic equipment and computer readable storage medium
Technical Field
The invention relates to the technical field of video processing in artificial intelligence, in particular to a video uploading method and device, electronic equipment and a computer readable storage medium.
Background
For example, when an early company is established, since a complete video storage system is not established between the sub-business department and the headquarters yet, the video generated by the business of the sub-business department cannot be transmitted to the headquarters in time, and therefore, after a healthy video storage system is established between the sub-business department and the headquarters in the later period, the video generated by the business of the sub-business department needs to be transmitted to the video storage system of the headquarters in time.
However, when video data is transmitted at present, a mode of manually screening videos is usually adopted, that is, whether a video needs to be migrated is determined by browsing videos by a worker, and if the video needs to be migrated, the video is transmitted.
Disclosure of Invention
The invention provides a video uploading method, a video uploading device, electronic equipment and a computer readable storage medium, and mainly aims to reduce the error rate of video data migration and improve the efficiency of video data migration.
In order to achieve the above object, the present invention provides a video uploading method, including:
acquiring an original video list of a sub server and a summary video list of a central server;
identifying video names with the same fields in the original video list and the summarized video list, and calculating the similarity between the original video with the same fields corresponding to the video names in the sub-servers and the summarized video with the same fields corresponding to the video names in the central server;
collecting the names of the original videos with the similarity smaller than a preset similarity threshold value in the sub servers into a list of videos to be uploaded;
and updating the name and the format of the video to be uploaded in the video list to be uploaded, and uploading the updated video to be uploaded to the central server.
Optionally, the uploading the updated to-be-uploaded video to the central server includes:
acquiring a data transmission request head of an HTTP (hyper text transport protocol) protocol for communication between the central server and the sub-server;
adding an extension field in the data transmission request header, wherein the extension field comprises a transmission interface state field of the central server;
calling a data transmission interface of the central server to send a data transmission request by using the data transmission request head added with the extension field;
and receiving a data transmission instruction returned by the central server based on the data transmission request, and uploading the video to be uploaded to the central server according to the data transmission instruction.
Optionally, the uploading the video to be uploaded to the central server according to the data transmission instruction includes:
acquiring the state of the transmission interface state field contained in the data transmission instruction, and if the state of the transmission interface state field is False, uploading the video to be uploaded to the central server after waiting for a preset time;
and acquiring the state of the transmission interface state field contained in the data transmission instruction, and immediately uploading the video to be uploaded to the central server if the state of the transmission interface state field is True.
Optionally, the extension field further includes a timestamp field, and uploading the to-be-uploaded video to the central server after waiting for a preset time includes:
and acquiring a quartz timing task program, setting the timing time in the quartz timing task program as the time represented by the timestamp field, and uploading the video to be uploaded to the central server when the timing time is reached.
Optionally, after the updated list of videos to be uploaded is uploaded to the central server, the method further includes:
numbering all uploaded videos, and collecting the numbered contents into a number set;
randomly extracting a preset number of target video numbers from the number set;
starting a target video file corresponding to the target video number, and checking whether the target video file can be played or not;
and if the target video file can not be played, sending a video error reminding message.
Optionally, the calculating a similarity between the original video with the video name with the same field corresponding to the sub-server and the summarized video with the video name with the same field corresponding to the central server includes:
and performing similarity calculation on the videos named with the same field in the original video list and the summarized video list by using an information abstract algorithm to obtain a similarity result.
Optionally, the aggregating the names of the original videos of which the similarity is smaller than the preset similarity threshold in the sub server into a to-be-uploaded video list includes:
comparing the similarity result with a preset similarity threshold, if the similarity result is greater than the preset similarity threshold, determining that the contents of two video files with the same field name are consistent, determining the video file in the sub-server as a video to be uploaded, and deleting the original video with the same field file name in the sub-server;
and if the similarity result is smaller than a preset similarity threshold, determining the video file in the sub-server as a video to be uploaded, and renaming the two video files.
In order to solve the above problem, the present invention further provides a video uploading apparatus, including:
the video acquisition module is used for acquiring an original video list of the sub-server and a summary video list of the central server;
the similarity calculation module is used for identifying the video names with the same fields in the original video list and the summarized video list and calculating the similarity between the original video with the same fields corresponding to the video names in the sub-servers and the summarized video with the same fields corresponding to the video names in the central server;
the video collecting module is used for collecting the names of the original videos with the similarity smaller than a preset similarity threshold value in the sub server into a video list to be uploaded;
and the video uploading module is used for updating the name and the format of the video to be uploaded in the video list to be uploaded and uploading the updated video to be uploaded to the central server.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the video uploading method.
In order to solve the above problem, the present invention also provides a computer-readable storage medium including a storage data area storing created data and a storage program area storing a computer program; wherein the computer program, when executed by a processor, implements a video upload method as described in any of the above.
According to the embodiment of the invention, the similarity of the original video list of the sub-server and the videos in the summarized video list of the central server is calculated, the videos in the original video list are selectively uploaded according to the similarity, repeated uploading of the videos is prevented, and the error rate of data migration is reduced. Therefore, the video uploading method, the video uploading device and the computer readable storage medium provided by the invention can reduce the error rate of video data migration and improve the efficiency of video data migration.
Drawings
Fig. 1 is a schematic flowchart of a video uploading method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a video uploading apparatus according to an embodiment of the present invention;
fig. 3 is a schematic internal structural diagram of an electronic device implementing a video uploading method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The execution subject of the video uploading method provided by the embodiment of the present application includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the video uploading method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
The invention provides a video uploading method. Fig. 1 is a schematic flow chart of a video uploading method according to an embodiment of the present invention. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the video uploading method includes:
and S1, acquiring the original video list of the sub-server and the summary video list of the central server.
In this embodiment of the present invention, the central server and the sub-servers may be Tomcat servers, aws cloud servers, weblogic servers, or the like, and may be used for data storage, the number of the central server is one, and the number of the sub-servers may be one or more.
In addition, in the embodiment of the present invention, the sub-server may include a block chain, where the block chain includes a plurality of nodes for storing the original video. By utilizing the high throughput of the block chain, the video acquisition efficiency can be improved. Optionally, in the embodiment of the present invention, the java statements are used to obtain original videos on the child servers, and the original videos are collected into the original video list, and all summarized videos on the central server are obtained and collected into the summarized video list.
S2, identifying the video names with the same fields in the original video list and the summary video list, and calculating the similarity between the original video with the same fields corresponding to the video names in the sub-servers and the summary video with the same fields corresponding to the video names in the central server.
In the embodiment of the invention, the preset automatic comparison program is used for identifying the video names with the same fields in the original video list and the summarized video list, and the automatic comparison program can be written in java computer language and is used for traversing the original video list and the summarized video list and searching the program naming the videos with the same fields.
Specifically, the original video list and the summarized video list are input into the automatic comparison program, the automatic comparison program traverses the original video list or the summarized video list, and searches in another video list according to the video name obtained by traversing in one of the video lists, so as to obtain the video names named in the two video lists and having the same field.
Optionally, in another embodiment of the present invention, an information summarization algorithm is used to perform similarity calculation on videos named with the same field in an original video list and a summarized video list, where the information summarization algorithm is used to calculate MD5 values of different video files with the same video name, and further determine whether the contents of the different video files are consistent according to the MD5 value.
Specifically, the information summarization algorithm may be implemented by an MD5 value calculator, and the MD5 value calculator is a tool that can calculate a video MD5 value, and can compare MD5 values to confirm similarity of video files.
Optionally, in another embodiment of the present invention, the following similarity calculation function is used to perform similarity calculation on different video files with the same video name and the same field, so as to obtain a similarity result:
Simtopic=Pearson(TPS,TPT)
wherein, TPTFor any original video in the original video list, TPSAnd naming the summarized video with the same field file in the summarized video list and the original video list, wherein Pearson is similarity operation.
And S3, collecting the names of the original videos of which the similarity is smaller than a preset similarity threshold value in the sub servers into a video list to be uploaded.
In this embodiment, the videos to be uploaded in the to-be-uploaded video list are videos that are stored in the sub-server and do not exist in the central server.
In an optional embodiment of the present invention, after performing MD5 value calculation on video files with the same field name, if the MD5 values of the two video files are the same, it indicates that the contents of the two video files are the same, the video file in the sub-server is not determined as a video to be uploaded, and the original video with the same field name in the sub-server can be deleted; if the MD5 values of two video files are not the same, the video file in the child server is determined to be the video to be uploaded, and the two video files may be renamed.
Or, in another optional embodiment of the present invention, when the video files with the same field name complete similarity calculation to obtain a similarity result, comparing the similarity result with a preset similarity threshold, if the similarity result is greater than the preset similarity threshold, determining that the contents of the two video files with the same field name are consistent, determining the video file in the sub-server as a video to be uploaded, and deleting the original video with the same field file name in the sub-server; and if the similarity result is smaller than a preset similarity threshold, determining the video file in the sub-server as a video to be uploaded, and renaming the two video files.
In the embodiment, the names of the original videos of which the similarity is smaller than the preset similarity threshold in the sub-server are collected into the video list to be uploaded, so that non-repeated videos in the original video list and the collected video list can be screened out, repeated uploading of the videos is avoided, and the video uploading efficiency is improved.
And S4, performing name updating and format updating on the to-be-uploaded video in the to-be-uploaded video list, and uploading the updated to-be-uploaded video to the central server.
In the embodiment of the present invention, the name of the to-be-uploaded video in the to-be-uploaded video list is updated as follows: timestamp + service type + video name + video type.
Wherein the time stamp can be determined according to the date of uploading the video, the service type is manually input by service personnel, and the video type comprises but is not limited to: MP4, AVI, WMV.
The embodiment updates the video format in the video list to be uploaded, is favorable for classified storage of videos, and is convenient for quick search when calling is needed.
Further, the uploading the updated to-be-uploaded video to the central server includes:
acquiring a data transmission request head of an HTTP (hyper text transport protocol) protocol for communication between the central server and the sub-server;
adding an extension field in the data transmission request header, wherein the extension field comprises a transmission interface state field of the central server;
calling a data transmission interface of the central server to send a data transmission request by using the data transmission request head added with the extension field;
and receiving a data transmission instruction returned by the central server based on the data transmission request, and uploading the video to be uploaded to the central server according to the data transmission instruction.
In detail, the transport interface status field of the central server is diff-tag, and its value can be represented by boolean value False or True.
And after receiving a call request of the data transmission request head, the central server judges the state of the current data transmission interface, if the interface state is unavailable, assigns the transmission interface state field diff-tag in the extension field to False, if the interface state is available, assigns the transmission interface state field diff-tag in the extension field to True, and returns a data transmission instruction containing the transmission interface state field diff-tag in the extension field after the assignment of the transmission interface state field diff-tag in the extension field is completed.
Further, the uploading the video to be uploaded to the central server according to the data transmission instruction includes:
acquiring the state of the transmission interface state field contained in the data transmission instruction, and if the state of the transmission interface state field is False, uploading the video to be uploaded to the central server after waiting for a preset time;
and acquiring the state of the transmission interface state field contained in the data transmission instruction, and immediately uploading the video to be uploaded to the central server if the state of the transmission interface state field is True.
Further, the extension field further includes a timestamp field, and uploading the to-be-uploaded video to the central server after waiting for a preset time includes:
and acquiring a quartz timing task program, setting the timing time in the quartz timing task program as the time represented by the timestamp field, and uploading the video to be uploaded to the central server when the timing time is reached.
Wherein, the timestamp field is date-tag, which identifies the start time of video uploading.
Preferably, after the updated list of videos to be uploaded is uploaded to the central server, the method further includes:
numbering all uploaded videos, and collecting the numbered contents into a number set;
randomly extracting a preset number of target video numbers from the number set;
starting a target video file corresponding to the target video number, and checking whether the target video file can be played or not;
and if the target video file can not be played, sending a video error reminding message.
Further, if the target video file can be played, it is determined that the verification is completed.
The embodiment of the invention can ensure the playability of the uploaded video by checking the video after the uploading is finished.
According to the embodiment of the invention, the similarity of the original video list of the sub-server and the videos in the summarized video list of the central server is calculated, the videos in the original video list are selectively uploaded according to the similarity, repeated uploading of the videos is prevented, and the error rate of data migration is reduced. Therefore, the video uploading method, the video uploading device and the computer readable storage medium provided by the invention can reduce the error rate of video data migration and improve the efficiency of video data migration.
Fig. 2 is a schematic block diagram of a video uploading apparatus according to the present invention.
The video uploading apparatus 100 of the present invention can be installed in an electronic device. According to the implemented functions, the video uploading device may include a video acquisition module 101, a similarity calculation module 102, a video aggregation module 103, and a video uploading module 104. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the video acquiring module 101 is configured to acquire an original video list of the sub server and a summary video list of the central server;
the similarity calculation module 102 is configured to identify video names with the same field in the original video list and the summarized video list, and calculate a similarity between the original video with the same field corresponding to the video name in the sub-server and the summarized video with the same field corresponding to the video name in the central server;
the video collecting module 103 is configured to collect names of original videos in the sub-servers, of which the similarity is smaller than a preset similarity threshold, into a to-be-uploaded video list;
the video uploading module 104 is configured to update the name and the format of the to-be-uploaded video in the to-be-uploaded video list, and upload the updated to-be-uploaded video to the central server.
In detail, the specific implementation of each module of the device for extracting and generating the text content in the image is as follows:
the video obtaining module 101 is configured to obtain an original video list of the sub server and a summary video list of the central server.
In this embodiment of the present invention, the central server and the sub-servers may be Tomcat servers, aws cloud servers, weblogic servers, or the like, and may be used for data storage, the number of the central server is one, and the number of the sub-servers may be one or more.
In addition, in the embodiment of the present invention, the sub-server may include a block chain, where the block chain includes a plurality of nodes for storing the original video. By utilizing the high throughput of the block chain, the video acquisition efficiency can be improved. Optionally, in this embodiment of the present invention, the video obtaining module 101 obtains original videos on the sub servers by using java statements, and collects the original videos into the original video list, and obtains all summarized videos on the central server, and collects the summarized videos into the summarized video list.
The similarity calculation module 102 is configured to identify video names with the same field in the original video list and the summarized video list, and calculate a similarity between the original video with the same field corresponding to the video name in the sub-server and the summarized video with the same field corresponding to the video name in the central server.
In the embodiment of the invention, the preset automatic comparison program is used for identifying the video names with the same fields in the original video list and the summarized video list, and the automatic comparison program can be written in java computer language and is used for traversing the original video list and the summarized video list and searching the program naming the videos with the same fields.
Specifically, the original video list and the summarized video list are input into the automatic comparison program, the automatic comparison program traverses the original video list or the summarized video list, and searches in another video list according to the video name obtained by traversing in one of the video lists, so as to obtain the video names named in the two video lists and having the same field.
Optionally, in another embodiment of the present invention, an information summarization algorithm is used to perform similarity calculation on videos named with the same field in an original video list and a summarized video list, where the information summarization algorithm is used to calculate MD5 values of different video files with the same video name, and further determine whether the contents of the different video files are consistent according to the MD5 value.
Specifically, the information summarization algorithm may be implemented by an MD5 value calculator, and the MD5 value calculator is a tool that can calculate a video MD5 value, and can compare MD5 values to confirm similarity of video files.
Optionally, in another embodiment of the present invention, the following similarity calculation function is used to perform similarity calculation on different video files with the same video name and the same field, so as to obtain a similarity result:
Simtopic=Pearson(TPS,TPT)
wherein, TPTFor any original video in the original video list, TPSAnd naming the summarized video with the same field file in the summarized video list and the original video list, wherein Pearson is similarity operation.
The video aggregation module 103 is configured to aggregate names of the original videos of which the similarity is smaller than a preset similarity threshold in the sub server into a to-be-uploaded video list.
In this embodiment, the videos to be uploaded in the to-be-uploaded video list are videos that are stored in the sub-server and do not exist in the central server.
In an optional embodiment of the present invention, after performing MD5 value calculation on video files with the same field name, if the MD5 values of the two video files are the same, it indicates that the contents of the two video files are the same, the video file in the sub-server is not determined as a video to be uploaded, and the original video with the same field name in the sub-server can be deleted; if the MD5 values of two video files are not the same, the video file in the child server is determined to be the video to be uploaded, and the two video files may be renamed.
Or, in another optional embodiment of the present invention, when the video files with the same field name complete similarity calculation to obtain a similarity result, comparing the similarity result with a preset similarity threshold, if the similarity result is greater than the preset similarity threshold, determining that the contents of the two video files with the same field name are consistent, determining the video file in the sub-server as a video to be uploaded, and deleting the original video with the same field file name in the sub-server; and if the similarity result is smaller than a preset similarity threshold, determining the video file in the sub-server as a video to be uploaded, and renaming the two video files.
In the embodiment, the names of the original videos of which the similarity is smaller than the preset similarity threshold in the sub-server are collected into the video list to be uploaded, so that non-repeated videos in the original video list and the collected video list can be screened out, repeated uploading of the videos is avoided, and the video uploading efficiency is improved.
The video uploading module 104 is configured to update the name and the format of the to-be-uploaded video in the to-be-uploaded video list, and upload the updated to-be-uploaded video to the central server.
In the embodiment of the present invention, the updating and format updating of the name of the to-be-uploaded video in the to-be-uploaded video list are as follows: timestamp + service type + video name + video type.
Wherein the time stamp can be determined according to the date of uploading the video, the service type is manually input by service personnel, and the video type comprises but is not limited to: MP4, AVI, WMV.
The embodiment updates the video format in the video list to be uploaded, is favorable for classified storage of videos, and is convenient for quick search when calling is needed.
Further, the video uploading module 104 includes:
the updating unit is used for carrying out name updating and format updating on the video to be uploaded in the video list to be uploaded;
the data acquisition unit is used for acquiring a data transmission request head of an HTTP (hyper text transport protocol) protocol communicated between the central server and the sub-server;
a data extension unit, configured to add an extension field in the header of the data transmission request, where the extension field includes a transmission interface status field of the central server;
the request sending unit is used for calling a data transmission interface of the central server to send a data transmission request by utilizing the data transmission request head part added with the extension field;
and the video uploading unit is used for receiving a data transmission instruction returned by the central server based on the data transmission request and uploading the video to be uploaded to the central server according to the data transmission instruction.
In detail, the transport interface status field of the central server is diff-tag, and its value can be represented by boolean value False or True.
And after receiving a call request of the data transmission request head, the central server judges the state of the current data transmission interface, if the interface state is unavailable, assigns the transmission interface state field diff-tag in the extension field to False, if the interface state is available, assigns the transmission interface state field diff-tag in the extension field to True, and returns a data transmission instruction containing the transmission interface state field diff-tag in the extension field after the assignment of the transmission interface state field diff-tag in the extension field is completed.
Further, the video uploading unit includes:
a state obtaining unit, configured to obtain a state of the transmission interface state field included in the data transmission instruction;
the first uploading unit is used for uploading the video to be uploaded to the central server after waiting for a preset time when the state of the transmission interface state field is False;
and the second uploading unit is used for immediately uploading the video to be uploaded to the central server when the state of the transmission interface state field is True.
Further, the extension field further includes a timestamp field, and uploading the to-be-uploaded video to the central server after waiting for a preset time includes:
and acquiring a quartz timing task program, setting the timing time in the quartz timing task program as the time represented by the timestamp field, and uploading the video to be uploaded to the central server when the timing time is reached.
Wherein, the timestamp field is date-tag, which identifies the start time of video uploading.
Preferably, the apparatus further comprises a verification module for:
after the updated video list to be uploaded is uploaded to the central server, numbering all the uploaded videos, and collecting the numbered contents into a numbered set;
randomly extracting a preset number of target video numbers from the number set;
starting a target video file corresponding to the target video number, and checking whether the target video file can be played or not;
and if the target video file can not be played, sending a video error reminding message.
Further, if the target video file can be played, it is determined that the verification is completed.
The embodiment of the invention can ensure the playability of the uploaded video by checking the video after the uploading is finished.
According to the embodiment of the invention, the similarity of the original video list of the sub-server and the videos in the summarized video list of the central server is calculated, the videos in the original video list are selectively uploaded according to the similarity, repeated uploading of the videos is prevented, and the error rate of data migration is reduced. Therefore, the video uploading device provided by the invention can reduce the error rate of video data migration and improve the efficiency of video data migration.
Fig. 3 is a schematic structural diagram of an electronic device implementing the video uploading method according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a video upload program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as a code of the video upload program 12, but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., executing a video upload program, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The video upload program 12 stored in the memory 11 of the electronic device 1 is a combination of instructions that, when executed in the processor 10, enable:
acquiring an original video list of a sub server and a summary video list of a central server;
identifying video names with the same fields in the original video list and the summarized video list, and calculating the similarity between the original video with the same fields corresponding to the video names in the sub-servers and the summarized video with the same fields corresponding to the video names in the central server;
collecting the names of the original videos with the similarity smaller than a preset similarity threshold value in the sub servers into a list of videos to be uploaded;
and updating the name and the format of the video to be uploaded in the video list to be uploaded, and uploading the updated video to be uploaded to the central server.
According to the embodiment of the invention, the similarity of the original video list of the sub-server and the videos in the summarized video list of the central server is calculated, the videos in the original video list are selectively uploaded according to the similarity, repeated uploading of the videos is prevented, and the error rate of data migration is reduced. Therefore, the video uploading computer readable storage medium provided by the invention can reduce the error rate of video data migration and improve the efficiency of video data migration.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any accompanying claims should not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for uploading video, the method comprising:
acquiring an original video list of a sub server and a summary video list of a central server;
identifying video names with the same fields in the original video list and the summarized video list, and calculating the similarity between the original video with the same fields corresponding to the video names in the sub-servers and the summarized video with the same fields corresponding to the video names in the central server;
collecting the names of the original videos with the similarity smaller than a preset similarity threshold value in the sub servers into a list of videos to be uploaded;
and updating the name and the format of the video to be uploaded in the video list to be uploaded, and uploading the updated video to be uploaded to the central server.
2. The video uploading method of claim 1, wherein the uploading the updated video to be uploaded to the central server comprises:
acquiring a data transmission request head of an HTTP (hyper text transport protocol) protocol for communication between the central server and the sub-server;
adding an extension field in the data transmission request header, wherein the extension field comprises a transmission interface state field of the central server;
calling a data transmission interface of the central server to send a data transmission request by using the data transmission request head added with the extension field;
and receiving a data transmission instruction returned by the central server based on the data transmission request, and uploading the video to be uploaded to the central server according to the data transmission instruction.
3. The video uploading method according to claim 2, wherein the uploading the video to be uploaded to the central server according to the data transmission instruction comprises:
acquiring the state of the transmission interface state field contained in the data transmission instruction, and if the state of the transmission interface state field is False, uploading the video to be uploaded to the central server after waiting for a preset time;
and acquiring the state of the transmission interface state field contained in the data transmission instruction, and immediately uploading the video to be uploaded to the central server if the state of the transmission interface state field is True.
4. The video uploading method of claim 3, wherein the extension field further comprises a timestamp field, and the uploading the video to be uploaded to the central server after waiting the preset time comprises:
and acquiring a quartz timing task program, setting the timing time in the quartz timing task program as the time represented by the timestamp field, and uploading the video to be uploaded to the central server when the timing time is reached.
5. The video uploading method according to any of claims 1 to 4, wherein after the uploading the updated video list to be uploaded to the central server, the method further comprises:
numbering all uploaded videos, and collecting the numbered contents into a number set;
randomly extracting a preset number of target video numbers from the number set;
starting a target video file corresponding to the target video number, and checking whether the target video file can be played or not;
and if the target video file can not be played, sending a video error reminding message.
6. The video uploading method of claim 1, wherein said calculating the similarity between the original video with the same field video name corresponding to the sub-server and the summarized video with the same field video name corresponding to the central server comprises:
and performing similarity calculation on the videos named with the same field in the original video list and the summarized video list by using an information abstract algorithm to obtain a similarity result.
7. The video uploading method according to claim 6, wherein the aggregating the names of the original videos with similarity smaller than a preset similarity threshold in the sub-server into a list of videos to be uploaded comprises:
comparing the similarity result with a preset similarity threshold, if the similarity result is greater than the preset similarity threshold, determining that the contents of two video files with the same field name are consistent, determining the video file in the sub-server as a video to be uploaded, and deleting the original video with the same field file name in the sub-server;
and if the similarity result is smaller than a preset similarity threshold, determining the video file in the sub-server as a video to be uploaded, and renaming the two video files.
8. A video uploading apparatus, the apparatus comprising:
the video acquisition module is used for acquiring an original video list of the sub-server and a summary video list of the central server;
the similarity calculation module is used for identifying the video names with the same fields in the original video list and the summarized video list and calculating the similarity between the original video with the same fields corresponding to the video names in the sub-servers and the summarized video with the same fields corresponding to the video names in the central server;
the video collecting module is used for collecting the names of the original videos with the similarity smaller than a preset similarity threshold value in the sub server into a video list to be uploaded;
and the video uploading module is used for updating the name and the format of the video to be uploaded in the video list to be uploaded and uploading the updated video to be uploaded to the central server.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the video upload method of any of claims 1 to 7.
10. A computer-readable storage medium comprising a storage data area storing created data and a storage program area storing a computer program; wherein the computer program when executed by a processor implements the video upload method of any of claims 1 to 7.
CN202110626997.1A 2021-06-04 2021-06-04 Video uploading method and device, electronic equipment and computer readable storage medium Active CN113347451B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110626997.1A CN113347451B (en) 2021-06-04 2021-06-04 Video uploading method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110626997.1A CN113347451B (en) 2021-06-04 2021-06-04 Video uploading method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113347451A true CN113347451A (en) 2021-09-03
CN113347451B CN113347451B (en) 2023-02-03

Family

ID=77475296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110626997.1A Active CN113347451B (en) 2021-06-04 2021-06-04 Video uploading method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113347451B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116743746A (en) * 2023-05-31 2023-09-12 黑龙江熵减网络信息技术有限公司 Network information sharing system and method based on artificial intelligence

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095824A (en) * 2013-01-09 2013-05-08 广东一一五科技有限公司 File uploading control method and system
US20140122451A1 (en) * 2012-10-29 2014-05-01 Dropbox, Inc. System and method for preventing duplicate file uploads from a mobile device
CN104811742A (en) * 2015-04-28 2015-07-29 无锡天脉聚源传媒科技有限公司 Video data storage method and device
US20180034940A1 (en) * 2016-07-27 2018-02-01 Beijing Xiaomi Mobile Software Co., Ltd. Method, apparatus and system for uploading a file
CN111294613A (en) * 2020-02-20 2020-06-16 北京奇艺世纪科技有限公司 Video processing method, client and server
CN112333291A (en) * 2021-01-06 2021-02-05 北京东方通软件有限公司 File retransmission prevention method
CN112416306A (en) * 2020-11-23 2021-02-26 平安普惠企业管理有限公司 Multi-application dependency tree generation method and device, electronic equipment and computer medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140122451A1 (en) * 2012-10-29 2014-05-01 Dropbox, Inc. System and method for preventing duplicate file uploads from a mobile device
CN103095824A (en) * 2013-01-09 2013-05-08 广东一一五科技有限公司 File uploading control method and system
CN104811742A (en) * 2015-04-28 2015-07-29 无锡天脉聚源传媒科技有限公司 Video data storage method and device
US20180034940A1 (en) * 2016-07-27 2018-02-01 Beijing Xiaomi Mobile Software Co., Ltd. Method, apparatus and system for uploading a file
CN111294613A (en) * 2020-02-20 2020-06-16 北京奇艺世纪科技有限公司 Video processing method, client and server
CN112416306A (en) * 2020-11-23 2021-02-26 平安普惠企业管理有限公司 Multi-application dependency tree generation method and device, electronic equipment and computer medium
CN112333291A (en) * 2021-01-06 2021-02-05 北京东方通软件有限公司 File retransmission prevention method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116743746A (en) * 2023-05-31 2023-09-12 黑龙江熵减网络信息技术有限公司 Network information sharing system and method based on artificial intelligence

Also Published As

Publication number Publication date
CN113347451B (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN112653760B (en) Cross-server file transmission method and device, electronic equipment and storage medium
CN111880948A (en) Data refreshing method and device, electronic equipment and computer readable storage medium
CN114398194A (en) Data collection method and device, electronic equipment and readable storage medium
CN112256783A (en) Data export method and device, electronic equipment and storage medium
CN114881616A (en) Business process execution method and device, electronic equipment and storage medium
CN113347451B (en) Video uploading method and device, electronic equipment and computer readable storage medium
CN114844844A (en) Delay message processing method, device, equipment and storage medium
CN111858604B (en) Data storage method and device, electronic equipment and storage medium
CN112948380A (en) Data storage method and device based on big data, electronic equipment and storage medium
CN112104662A (en) Far-end data read-write method, device, equipment and computer readable storage medium
CN113254446B (en) Data fusion method, device, electronic equipment and medium
CN115145870A (en) Method and device for positioning reason of failed task, electronic equipment and storage medium
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN113469649A (en) Project progress analysis method and device, electronic equipment and storage medium
CN114626103A (en) Data consistency comparison method, device, equipment and medium
CN114490137A (en) Service data real-time statistical method and device, electronic equipment and readable storage medium
CN114547011A (en) Data extraction method and device, electronic equipment and storage medium
CN112416306A (en) Multi-application dependency tree generation method and device, electronic equipment and computer medium
CN112685384A (en) Data migration method and device, electronic equipment and storage medium
CN113326421B (en) Data identification method and device for record carrier, electronic equipment and storage medium
CN112417300A (en) Product vulnerability scheme query method and device, electronic equipment and storage medium
CN114598624A (en) Cluster monitoring method and device, electronic equipment and readable storage medium
CN113452768A (en) Data reminding method, device, equipment and storage medium based on associated equipment
CN111639262A (en) Data pushing method and device and computer readable storage medium
CN114138316A (en) Incremental package generation and downloading method and device, electronic equipment and readable 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