CN113132790B - Video dumping method and device - Google Patents

Video dumping method and device Download PDF

Info

Publication number
CN113132790B
CN113132790B CN201911415986.8A CN201911415986A CN113132790B CN 113132790 B CN113132790 B CN 113132790B CN 201911415986 A CN201911415986 A CN 201911415986A CN 113132790 B CN113132790 B CN 113132790B
Authority
CN
China
Prior art keywords
dump
information
video
transcoding
mobile storage
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
CN201911415986.8A
Other languages
Chinese (zh)
Other versions
CN113132790A (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.)
Zhuzhou CRRC Times Electric Co Ltd
Original Assignee
Zhuzhou CRRC Times Electric 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 Zhuzhou CRRC Times Electric Co Ltd filed Critical Zhuzhou CRRC Times Electric Co Ltd
Priority to CN201911415986.8A priority Critical patent/CN113132790B/en
Publication of CN113132790A publication Critical patent/CN113132790A/en
Application granted granted Critical
Publication of CN113132790B publication Critical patent/CN113132790B/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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/432Content retrieval operation from a local storage medium, e.g. hard-disk
    • H04N21/4325Content retrieval operation from a local storage medium, e.g. hard-disk by playing back content from the storage medium
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/482End-user interface for program selection
    • H04N21/4825End-user interface for program selection using a list of items to be played back in a given order, e.g. playlists

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention provides a video dumping method, which comprises a scanning step, an importing step, a transcoding step and an uploading step; wherein for each mobile storage device, the scanning step comprises: scanning the mobile storage device to acquire video information of video files stored in the mobile storage device, and recording the video information and dump state information of each video file as dump information in a corresponding dump information table in response to acquiring the video information of all the video files; the leading-in step comprises: importing the dump state information into a local memory for the scanned video file; the transcoding step comprises: transcoding dump state information into a video file which is successfully imported according to a preset format; the uploading step comprises: and uploading the video file with the dump state information of which the transcoding is successful to a server. The invention also provides a video dumping device for realizing the video dumping method. The invention can track the dumping progress of the video file through the dumping information table and the dumping state information in the dumping information table, thereby improving the dumping efficiency.

Description

Video dumping method and device
Technical Field
The present invention relates to data dump mechanisms, and in particular, to a video dump method and a video dump apparatus.
Background
In order to enable analysts at all levels of the locomotive depot to retrieve and analyze video files recorded on the electric locomotive, the video files on the locomotive need to be collected into a server for centralized management. Before the crew member travels, the mobile storage device is inserted into the locomotive video recording system as a video storage device. After the locomotive is powered on, the locomotive video recording equipment starts the video recording work and stores the generated video file into the mobile storage equipment. When the crew leaves the duty, the mobile storage device with the video file is submitted to a duty leaving point, and the video file in the mobile storage device is dumped by a special person.
The current locomotive video dumping mode is as follows: the method comprises the steps that special workers collect mobile storage devices of the attendance points, the collected mobile storage devices are inserted into a video dumping client one by one, video files in the mobile storage devices are all copied to a local disk of the client, dumping software is started to transcode and upload the video files on the disk, and manual operation software is needed to dump a next file after dumping one file each time.
When a worker dumps a video, in order to timely recycle a mobile storage device for storing the video, the video file in the mobile storage device is generally copied to a dumping client, and then dumping software is started to execute transcoding and uploading operations, so that the whole dumping process consumes a long time, and the operation procedure is complicated. If the dumping process is interrupted due to an abnormal condition in the dumping process, the interrupted operation is required to be repeatedly executed manually, so that the dumping efficiency of the video is seriously reduced, and a large amount of manpower is wasted.
Therefore, there is a need for a video dumping method and a video dumping apparatus, which are capable of automatically dumping a video file in a mobile storage device without manual intervention and supporting a breakpoint resume function, so as to effectively improve the efficiency of video dumping.
Disclosure of Invention
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
In order to solve the above problems, the present invention provides a video dumping method, which specifically includes a scanning step, an importing step, a transcoding step, and an uploading step; wherein, for each of the mobile storage devices,
the scanning step includes: scanning the mobile storage device to acquire video information of each video file stored in the mobile storage device, and recording dump information of each video file in a corresponding dump information table in response to acquiring the video information of all the video files, wherein the dump information comprises the video information of the video files and dump state information with an initial value of being the scanned dump state information;
the step of introducing comprises: importing the dump state information into a local memory for the scanned video file, and updating the dump state information according to the import result;
the transcoding step comprises: transcoding the dump state information into a video file which is successfully imported according to a preset format, and updating the dump state information according to a transcoding result;
the uploading step comprises: and uploading the video file with the dump state information as the successfully transcoded video file to a server.
In an embodiment of the above video dumping method, optionally, the scanning step and the importing step of each mobile storage device are executed in a first thread, the transcoding step of each mobile storage device is executed in a second thread, and the uploading step of each mobile storage device is executed in a third thread; wherein
In response to the presence of a plurality of mobile storage devices, the first thread, the second thread, and the third thread are in parallel.
In an embodiment of the above video dumping method, optionally, in response to the presence of at least one mobile storage device, the scanning step and the importing step of all the mobile storage devices are processed in parallel; wherein, for each of the mobile storage devices,
importing the dump state information into a local storage for the scanned video file further comprises: in response to the fact that at least one piece of dump state information is judged to be dump information which is scanned and finished in the dump information table, importing each piece of video file which is scanned and finished in the dump state information into the local memory in sequence;
updating the dump state information according to the import result further comprises: and updating each piece of dump state information into import success or import failure according to the import result.
In an embodiment of the video dumping method, optionally, for each mobile storage device, the importing step further includes: and in response to the import success of all the video files in the mobile storage device, formatting the mobile storage device.
In an embodiment of the above video dumping method, optionally, for each mobile storage device,
scanning the mobile storage device to obtain video information of each video file stored in the mobile storage device further comprises: acquiring a video file list in the mobile storage device, wherein the video file list comprises file names and storage paths of all video files, judging whether the file names and the storage paths of all the video files are legal or not, and acquiring video information of all the legal video files;
recording dump information of each video file in the corresponding dump information table further comprises: and in response to the video information of all the legal video files being acquired, recording dump information of each legal video file in a corresponding dump information table.
In an embodiment of the foregoing video dumping method, optionally, in response to the presence of at least one mobile storage device, processing the transcoding steps of the mobile storage devices one by one includes:
a transcoding step 1: reading dump information tables of each mobile storage device, and judging whether dump information tables with each piece of dump state information being successfully imported exist;
and a transcoding step 2: in response to the existence of at least one dump information table in which each piece of dump state information is successfully imported, acquiring one dump information table in which each piece of dump state information is successfully imported;
and a transcoding step 3: sequentially transcoding the video file corresponding to each piece of dump information in the acquired dump information table according to the preset format, and updating dump state information of the video file into successful transcoding or failed transcoding according to a transcoding result; and
in response to completing the transcoding step 3, the above transcoding steps 1 to 3 are repeated.
In an embodiment of the video dump method, optionally, the dump information table includes a first dump information sub-table and a second dump information sub-table; wherein
In response to acquiring the video information of all the video files, recording dump information of each video file in a corresponding dump information table further comprises: in response to the video information of all the video files being obtained, respectively recording dump information of each video file in a corresponding first dump information sub-table and a corresponding second dump information sub-table;
the step of introducing further comprises: importing the video file with dump state information of which the scanning is finished into the local memory based on the first sub-table of dump information, and updating the dump state information in the first sub-table of dump information;
the transcoding step further comprises: transcoding the dump state information into a video file which is successfully imported according to a preset format based on the first dump information sub-table, updating the dump state information into a second dump information sub-table in response to successful transcoding, and deleting corresponding dump information from the first dump information sub-table;
the uploading step comprises: and uploading the video file with the dump state information being successfully transcoded to the server based on the second dump information sub-table.
In an embodiment of the above video dumping method, optionally, in response to the presence of at least one mobile storage device, the step of processing the uploads of the mobile storage devices one by one includes:
uploading step 1: reading a second dump information sub-table of each mobile storage device, and judging whether a second dump information sub-table with each piece of dump state information being successful in transcoding exists;
and an uploading step 2: in response to the existence of at least one second dump information sub-table with each piece of dump state information being successful in transcoding, acquiring one second dump information sub-table with each piece of dump state information being successful in transcoding;
and an uploading step 3: sequentially uploading the video file corresponding to each dump information in the acquired second dump information sub-table to the server; and
and responding to the completion of the uploading step 3, and repeating the uploading steps 1 to 3.
In an embodiment of the video dump method, optionally, the uploading step 3 further includes: and uploading each piece of dump state information as the video file which is transcoded successfully to the server in sequence, and updating the dump state information of the video file into upload success or upload failure in the second dump information sub-table according to an upload result.
In an embodiment of the video dump method, optionally, the uploading step 3 further includes:
in response to that the dump state information of the video file is successfully uploaded, deleting dump information corresponding to the video file in the second dump information sub-table, and deleting the video file in the local memory;
in response to that the dump state information of the video file is uploading failure, repeatedly uploading the video file to the server until uploading is successful within a preset frequency range, or the repeated frequency exceeds the preset frequency range, and outputting error reporting information;
and in response to that no dump information exists in the second dump information sub-table, judging that the uploading step 3 is completed.
In an embodiment of the video dump method, optionally, the dump information table is stored in a SQlite database.
The invention also provides a video dumping device, which specifically comprises:
a local memory; and
a processor coupled to the local memory, the processor configured to:
executing a scanning step, an importing step, a transcoding step and an uploading step; wherein, for each externally connected mobile storage device,
the step of performing the scanning comprises: scanning the mobile storage device to acquire video information of each video file stored in the mobile storage device, and recording dump information of each video file in a corresponding dump information table stored in the local storage in response to the acquisition of the video information of all the video files, wherein the dump information comprises the video information of the video files and dump state information with an initial value of being completed by scanning;
the step of executing the importing comprises: importing the dump state information into the local memory for the scanned video file, and updating the dump state information according to the import result;
the transcoding step comprises: transcoding the dump state information into a video file which is successfully imported according to a preset format, and updating the dump state information according to a transcoding result;
the uploading step comprises: and uploading the video file with the dump state information as the successfully transcoded video file to a server.
In an embodiment of the video dumping apparatus, optionally, the processor executes the scanning step and the importing step of each mobile storage device in a first thread, the processor executes the transcoding step of each mobile storage device in a second thread, and the processor executes the uploading step of each mobile storage device in a third thread; wherein
In response to the presence of multiple mobile storage devices, the first thread, the second thread, and the third thread are concurrent.
In an embodiment of the above video dumping apparatus, optionally, in response to the existence of at least one mobile storage device, the processor processes the scanning step and the importing step of all the mobile storage devices in parallel; wherein, for each of the mobile storage devices,
the step of the processor importing the dump state information into a local memory for the scanned video file further comprises: in response to the fact that at least one piece of dump state information is judged to be dump information which is scanned and finished in the dump information table, importing each piece of video file which is scanned and finished in the dump state information into the local memory in sequence;
the processor updating the dump state information according to the import result further comprises: and updating each piece of dump state information into import success or import failure according to the import result.
In an embodiment of the video dump apparatus, optionally, for each mobile storage device, the executing, by the processor, the importing step further includes: and responding to the condition that all video files in the mobile storage device are successfully imported, and formatting the mobile storage device.
In an embodiment of the above video dumping apparatus, optionally, for each mobile storage device,
the scanning, by the processor, of the mobile storage device to obtain the video information of each video file stored in the mobile storage device further includes: acquiring a video file list in the mobile storage device, wherein the video file list comprises file names and storage paths of all video files, judging whether the file names and the storage paths of all the video files are legal or not, and acquiring video information of all the legal video files;
the processor records dump information of each video file in a corresponding dump information table, and the method further comprises the following steps: and in response to the video information of all the legal video files being acquired, recording dump information of each legal video file in a corresponding dump information table.
In an embodiment of the video dumping apparatus, optionally, in response to the presence of at least one mobile storage device, the processor processes the transcoding steps of the mobile storage devices one by one, including:
a transcoding step 1: reading dump information tables of each mobile storage device, and judging whether dump information tables with each piece of dump state information being successfully imported exist;
and a transcoding step 2: in response to the existence of at least one dump information table in which each piece of dump state information is successfully imported, acquiring one dump information table in which each piece of dump state information is successfully imported;
and a transcoding step 3: sequentially transcoding the video file corresponding to each piece of dump information in the acquired dump information table according to the preset format, and updating dump state information of the video file into successful transcoding or failed transcoding according to a transcoding result; and
in response to completing the transcoding step 3, the above transcoding steps 1 to 3 are repeated.
In an embodiment of the video dump device, optionally, the dump information table stored in the local memory includes a first dump information sub-table and a second dump information sub-table; wherein
In response to acquiring the video information of all the video files, the recording, by the processor, dump information of each video file in a corresponding dump information table further includes: in response to the video information of all the video files being obtained, respectively recording dump information of each video file in a corresponding first dump information sub-table and a corresponding second dump information sub-table;
the processor executing the importing step further comprises: importing the video file with dump state information of which the scanning is finished into the local memory based on the first sub-table of dump information, and updating the dump state information in the first sub-table of dump information;
the processor executing the transcoding step further comprises: transcoding the dump state information into a video file which is successfully imported according to a preset format based on the first dump information sub-table, updating the dump state information into a second dump information sub-table in response to successful transcoding, and deleting corresponding dump information from the first dump information sub-table;
the processor executing the uploading step includes: and uploading the video file with the dump state information being successfully transcoded to the server based on the second dump information sub-table.
In an embodiment of the video dumping apparatus, optionally, in response to the presence of at least one mobile storage device, the step of processing, by the processor, the upload of each mobile storage device one by one includes:
uploading step 1: reading a second dump information sub-table of each mobile storage device, and judging whether a second dump information sub-table with each piece of dump state information being successful in transcoding exists;
and an uploading step 2: in response to the existence of at least one second dump information sub-table with each piece of dump state information being successful in transcoding, acquiring one second dump information sub-table with each piece of dump state information being successful in transcoding;
and an uploading step 3: sequentially uploading the video file corresponding to each dump information in the acquired second dump information sub-table to the server; and
and responding to the completion of the uploading step 3, and repeating the uploading steps 1 to 3.
In an embodiment of the video dump device, optionally, the processor executing the uploading step 3 further includes: and sequentially uploading each video file with dump state information of which the transcoding is successful to the server, and updating the dump state information of the video file into upload success or upload failure in the second dump information sub-table according to an upload result.
In an embodiment of the video dump device, optionally, the processor executing the uploading step 3 further includes:
in response to that the dump state information of the video file is successfully uploaded, deleting dump information corresponding to the video file in the second dump information sub-table, and deleting the video file in the local memory;
in response to that the dump state information of the video file is uploading failure, repeatedly uploading the video file to the server until uploading is successful within a preset frequency range, or the repeated frequency exceeds the preset frequency range, and outputting error reporting information;
and in response to that no dump information exists in the second dump information sub-table, judging that the uploading step 3 is completed.
In an embodiment of the above video dump device, optionally, the dump information table is stored in a SQlite database in the local memory.
The present invention also provides a computer readable medium, on which computer readable instructions are stored, said computer readable instructions, when executed by a processor, implementing the steps in any one of the embodiments of the video dumping method as described above.
According to the video dumping method and the video dumping device provided by the invention, the video file in the mobile storage equipment can be automatically imported into the dumping device, the transcoding uploading operation is automatically executed, manual intervention is not needed, and the dumping information table and the dumping state information therein support the breakpoint continuous transmission function, namely in the process of dumping videos of a batch, due to abnormal conditions such as client power failure, manual forced software closing, network interruption and the like, the dumping process is interrupted, the current dumping state and progress can be automatically stored in the dumping information table, after the abnormal problem is solved, the last dumping progress can be continuously dumped continuously, the whole dumping process is not needed to be started from the beginning, and manual intervention is not needed, so that the video dumping efficiency is effectively improved.
Drawings
The above features and advantages of the present disclosure will be better understood upon reading the detailed description of embodiments of the disclosure in conjunction with the following drawings. In the drawings, components are not necessarily drawn to scale, and components having similar relative characteristics or features may have the same or similar reference numerals.
FIG. 1 shows a flow chart of a video dump method provided in accordance with the present invention.
FIG. 2 is a flowchart illustrating the scan import step in the video dump method provided by the present invention.
Fig. 3 shows a flowchart of the transcoding step in the video dumping method provided by the present invention.
FIG. 4 is a flow chart showing the uploading step in the video dumping method provided by the present invention.
FIG. 5 is a schematic diagram showing the structure of a video dump device provided by the present invention.
Detailed Description
The following description is presented to enable any person skilled in the art to make and use the invention and is incorporated in the context of a particular application. Various modifications, as well as various uses in different applications will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to a wide range of embodiments. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
In the following detailed description, numerous specific details are set forth in order to provide a more thorough understanding of the invention. It will be apparent, however, to one skilled in the art that the practice of the invention may not necessarily be limited to these specific details. In other instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention.
The reader's attention is directed to all papers and documents which are filed concurrently with this specification and which are open to public inspection with this specification, and the contents of all such papers and documents are incorporated herein by reference. All the features disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. Thus, unless expressly stated otherwise, each feature disclosed is one example only of a generic series of equivalent or similar features.
Note that where used, the designations left, right, front, back, top, bottom, positive, negative, clockwise, and counterclockwise are used for convenience only and do not imply any particular fixed orientation. In fact, they are used to reflect the relative position and/or orientation between various parts of the object. Furthermore, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
It is noted that, where used, further, preferably, still further and more preferably is a brief introduction to the exposition of the alternative embodiment on the basis of the preceding embodiment, the contents of the further, preferably, still further or more preferably back band being combined with the preceding embodiment as a complete constituent of the alternative embodiment. Several further, preferred, still further or more preferred arrangements of the belt after the same embodiment may be combined in any combination to form a further embodiment.
The invention is described in detail below with reference to the figures and specific embodiments. It is noted that the aspects described below in connection with the figures and the specific embodiments are only exemplary and should not be construed as imposing any limitation on the scope of the present invention.
Referring to fig. 1, a video dump method provided by the present invention will be understood, as shown in fig. 1, the video dump method includes, for each mobile storage device, a scanning step S110: scanning the mobile storage device to acquire video information of each video file stored in the mobile storage device; in response to the video information of all the video files being acquired, recording the video information and dump state information of each video file as dump information in a corresponding dump information table; step S120 includes an introduction step: importing the dump state information into a local memory for the scanned video file, and updating the dump state information according to the import result; step S130, transcoding step: transcoding the dump state information into a video file which is successfully imported according to a preset format, and updating the dump state information according to a transcoding result; and step S140, uploading step: and uploading the video file with the dump state information of which the transcoding is successful to a server.
Specifically, when scanning a mobile storage device (e.g., a common usb disk), the video dumping method provided by the present invention analyzes video information (locomotive model number, recording time, video channel number, file source path, file destination path, etc.) corresponding to all video files, stores the video information in a data table of the SQLite database in a data table record form, and maintains a video processing status field (i.e., dumping status information) for each video information record, where the field describes the current processing status of each video file, and includes: the video dumping method provided by the invention can update the corresponding processing state in a data table in real time when the video file completes the processing of one link.
If the problems of interrupted execution of the video dumping method, network interruption, power failure of a dumping client device and the like occur during dumping, so that the dumping process is interrupted, and after the video dumping method is restarted, the current processing state of each video file can be acquired from a dumping information table of the database, so that the dumping progress before restarting can be continued to be dumped continuously.
For the sake of efficiency improvement, the video dumping method provided by the invention has three processing threads to be executed in parallel respectively. Wherein, the scanning and importing step is processed in the first thread, the transcoding step is processed in the second thread, and the uploading step is processed in the third thread.
For the scanning and importing steps processed by the first thread, multiple batches of videos can be processed simultaneously, in the present invention, a batch refers to all video files in one mobile storage device, that is, the scanning and importing steps of video files of multiple mobile storage devices are processed in parallel in the first thread. For the second and third threads, each thread processes only one batch of video at a time.
Each video dump processing thread interacts through a dump information table in the SQLite database, each record in the dump information table corresponds to one video file, and each record comprises a plurality of fields: video file path, video file name, channel number, locomotive model number, locomotive number, process state (i.e., dump state information), etc.
Fig. 2 to fig. 4 respectively show schematic diagrams of a first thread, a second thread and a third thread processing scanning import step, a transcoding step and an uploading step provided by the present invention.
First, please refer to fig. 2 to further understand the above steps S110 and S120. For the first thread, in response to detecting that the mobile storage device is externally connected in step S201, step S202 is executed to obtain the video list of the mobile storage device. Here, it can be understood that, since the plurality of mobile storage devices are processed in parallel in the first thread, the scan import steps of steps S201 to S212 may be performed for the mobile storage device as long as the mobile storage device inserts the dump device.
In step S202, by acquiring the video list of the mobile storage device, the related information of all video files stored in the mobile storage device can be acquired. Subsequently, in step S203, it is determined whether the video file stored in the mobile storage device contains a legal video. For the shot driving recording video of the locomotive, the naming mode of the video file and the stored directory structure of the video file have the specification requirements, and the video which is out of specification can be judged as an illegal file. Only if there is a legal video in the mobile storage device, step S204 is executed to parse the video information of the video file. The video information of the video file as described above may include locomotive model number, recording time, video channel number, file source path, file destination path, and the like.
Subsequently, in step S205, the video information is collectively transferred to a dump information table. More specifically, in an embodiment, a dump information table may be preset in the SQLite database, in response to sensing that the external mobile storage device is connected in step S201, and after the video information of all the video files is analyzed in step S204, the video information of all the video files may be uniformly and simultaneously stored in the corresponding dump information table, so as to ensure that all the legal video files of the mobile storage device are recorded in the dump information table. Meanwhile, for each dump information stored in the dump information table, the video information and dump state information of the video file are further included. In step S205, the dump state information of each video file is updated together to scan completion.
That is, for the dump information table pre-stored in the SQLite database, after step S205 is executed, either dump information (including video information and dump state information shown as scan completed) of all video files corresponding to the mobile storage device is included, or no information about the mobile storage device is included, which indicates that the scan has failed.
In an embodiment, it can be understood that a dump information general table is preset in the SQLite database in advance, video information of video files of all mobile storage devices is stored in one table, and by setting a drive letter, a plurality of sub-tables corresponding to different mobile storage devices can be extracted from the dump information general table according to the same drive letter, that is, dump information with the same drive letter information can be considered to form a sub-table corresponding to one mobile storage device.
In response to completion of step S205, i.e., the entire scanning step can be considered to be completed, the importing step is then performed. Specifically, the importing step may include, in step S206, extracting dump state information of each video file one by one, and if there is a video file whose dump state information is completely scanned, executing step S207 to import the video file into the local storage. It is understood that, in the first thread, although the scan import step between the plurality of mobile storage devices is processed in parallel, the import step is processed in series with respect to the video file inside one mobile storage device.
After step S207 is executed, step S208 is further executed: and judging whether the import is successful, and in response to the successful import, updating dump state information into a successful import in step S209, otherwise, updating dump state information into a failed import in step S210.
Further, in response to determining that all the video files have been imported in step S211, that is, the dump state information of all the video files is import success or import failure, or that there is no scan completion state in the dump state information of all the video files, it is determined that all the videos have been imported, and in step S212, the scan import operation of the batch is ended.
In one embodiment, for each mobile storage device, the importing step further includes: and in response to that the dump state information of all the video files in the mobile storage device is successfully imported, formatting the mobile storage device, so that the mobile storage device can be transferred out as soon as possible for the next use. In the above embodiment, after the mobile storage device is formatted in the importing step, the method further includes storing the specified authorization file in the mobile storage device. The authorization file refers to a file required by the locomotive video recording equipment, and when the locomotive video recording equipment identifies that the authorization file with the specified format exists in the inserted mobile storage equipment, the locomotive video recording equipment can actively store the recorded video file into the mobile storage equipment according to the configuration information in the authorization file.
In another embodiment, in response to the existence of the video information with the import failure, the video dumping method provided by the invention further comprises submitting the video information with the import failure to a server for a worker to troubleshoot the relevant problems. It should be noted that in the context of the present invention, uploading refers to storing the transcoded video file and video information in a preset area of the server for the staff to work normally. Unlike uploading in the context of the present application, the above-mentioned submission to the server is directed to storing the problematic data in another predetermined area of the server, specifically for the staff to troubleshoot the errors.
And in response to submitting the relevant data of the video information with the import failure to the server, deleting the piece of video information and the relevant data thereof from a video dump table of a local memory of the video dump device. Further, in response to the video information with the import failure, the mobile storage device may be selected not to be formatted, so that the relevant data of the video file which cannot be successfully imported can be retrieved by the staff.
Referring to fig. 3 for further understanding of the transcoding step S130 in the video dump method provided by the present invention, the whole transcoding step is started in response to step S301. First, step S302 is executed to read the database, specifically, to read the dump information table corresponding to each mobile storage device stored in the database.
In step S303, it is determined whether there is a batch that is completely imported, and it should be noted that all videos in one mobile storage device are in one batch, and there may be only a few video files in one batch, or several hundred video files in one batch. A video dumping device has a plurality of USB interfaces and can be simultaneously inserted into a plurality of U disks (namely, mobile storage equipment), the dumping device can simultaneously scan and import a plurality of U disks, all video information records are stored in a database in a scanning stage, the video dumping device is set to be in a scanning state, and corresponding database records can be set to be in an import completion state only when video files are copied to the dumping device from the U disks. When all the videos in one of the U disks are completely imported, the import of the videos corresponding to the batch is completed. The batch of video will enter the next process "transcoding". In step S303, for the dump information table of each mobile storage device, sequentially determining whether each piece of dump state information in the dump information table is successfully imported, and in response to that each piece of dump state information in the dump information table is successfully imported, determining that the dump information table is a dump information table in which each piece of dump state information is successfully imported, and determining that there is a batch in which the import is successful.
It can be understood that, since the video information that failed to be imported is deleted from the dump information table in the importing step, it can be determined that the batch has completed importing by determining that all dump state information is successful in importing.
In response to determining that there are lots for which import is complete, step S304 is performed to obtain a dump information table of one of the lots. Since the three links of scanning, importing, transcoding and uploading are executed in parallel, and the efficiency is inconsistent, there is a phenomenon that transcoding is slow, but videos of multiple U disks are already imported and are all waiting to be transcoded, but transcoding is performed batch by batch every time transcoding is performed, so step S304 of "obtaining video information of one batch" may exist.
Then, step S305 is executed to extract dump state information, and as described above, before step S305 is executed, the dump state information should only be successfully imported, and in order to further ensure the robustness of the above method, it is still determined in step S306 whether the dump state information of each video file is successfully imported or not.
In response to the determination in step S306 that the dump state information corresponding to the video file is successfully imported, execute step S307: the video file is transcoded in a predetermined format.
Further, after step S307 is executed, step S308 needs to be further executed to determine whether the transcoding is successful. In response to the determination of successful transcoding in step S308, step S309 is executed, and the dump state information is updated to be successful transcoding, otherwise step S310 is executed, and the dump state information is updated to be unsuccessful transcoding.
Further, in response to determining that all the video files are transcoded in step S311, that is, the dump state information of all the video files is successful in transcoding or failed in transcoding, or that there is no status of successful import or failed import in the dump state information of all the video files, it is determined that all the videos are transcoded, and in step S312, the transcoding operation of the batch is ended.
In the foregoing embodiment, in response to the transcoding failure, the video dumping method provided by the present invention further includes submitting the video information that has failed to be transcoded and the original video file before being transcoded to a server, so that a worker may troubleshoot related problems. It should be noted that in the context of the present invention, uploading refers to storing the transcoded video file and video information in a preset area of the server for the staff to work normally. Unlike uploading in the context of the present application, the above-mentioned submission to the server is directed to storing the problematic data in another predetermined area of the server, specifically for the staff to troubleshoot the errors.
And in response to submitting the relevant data of the video information with the transcoding failure to the server, deleting the piece of video information from a video dump table of a local memory of the video dump device, and deleting a video file corresponding to the piece of video information from the local memory of the video dump device.
Referring to fig. 4, the uploading step of step S140 in the video dump method provided by the present invention is further understood, and the whole uploading step is started in response to step S401. First, step S402 is executed to read the database, specifically, to read the dump information table corresponding to each mobile storage device stored in the database.
In step S403, it is determined whether there are transcoding completed batches, and it should be noted that all videos in one mobile storage device are in one batch, and there may be only a few video files in one batch, or several hundred video files in one batch. A video dumping device has a plurality of USB interfaces, and can be simultaneously inserted into a plurality of U disks (namely, mobile storage equipment). When all videos in one of the U disks are transcoded, the transcoding of the videos corresponding to the batch is completed. The video of this batch will enter the next process "upload". In step S403, for the dump information table of each mobile storage device, sequentially determining whether each piece of dump state information in the dump information table is successfully transcoded, and in response to that each piece of dump state information in the dump information table is successfully transcoded, determining that the dump information table is a dump information table in which each piece of dump state information is transcoded, and determining that there is a batch in which transcoding is completed.
It can be understood that, since the video information that failed in transcoding is deleted from the dump information table in the transcoding step, it can be determined that the batch has completed transcoding by determining that all dump state information is successful.
In response to determining that there are transcoding-completed batches, step S304 is executed to obtain a dump information table of one of the batches. Since the three links of scanning, importing, transcoding and uploading are executed in parallel and are inconsistent in efficiency, there may be a phenomenon that uploading is slow, but videos of multiple U disks have already been transcoded and are all waiting to be uploaded, but each time uploading is performed, transcoding is performed batch by batch, so there may be a step S404 of "obtaining video information of one batch".
Then, step S405 is executed to upload the video files to the server one by one. It can be understood that, here, uploading refers to storing the video file and the video information after the transcoding is successful in a preset area of the server for a worker to work normally. If the video file which is not successfully imported or transcoded exists, the related data of the video file is submitted and stored in another preset area of the server, so that a worker of the server can check the video file with problems.
Further, after step S405 is executed, step S406 needs to be further executed to determine whether the uploading is successful. In response to the determination of successful uploading in step S406, step S407 is executed, the dump state information is updated to be successful uploading, otherwise step S408 is executed, the dump state information is updated to be unsuccessful uploading, and the file with unsuccessful uploading is repeatedly uploaded until successful uploading is performed, or step S409 is executed because the number of times of repetition exceeds the predetermined number of times, and error reporting information is output. Because the number of times of repeated uploading exceeds the preset number, the reason causing the uploading failure can be inferred to be a network error, and therefore after the uploading fails for a plurality of times, the uploading is suspended and the error is reported, so that a user can check the reason causing the uploading failure.
Further, in response to that it is determined in step S410 that all the video files have been uploaded, that is, the dump state information of all the video files is upload success, or that there is no transcoding success or transcoding failure state in the dump state information of all the video files, it is determined that all the videos have been uploaded, and in step S411, the uploading of the batch is finished.
Preferably, in another embodiment provided by the present invention, the dump information table includes a first dump information sub-table and a second dump information sub-table; wherein, in response to acquiring the video information of all the video files, recording dump information of each video file in the corresponding dump information table further comprises: and in response to the video information of all the video files being acquired, respectively recording dump information of each video file in the corresponding first dump information sub-table and second dump information sub-table.
The importing step S120 further includes: and importing the dump state information into the local memory for the scanned video file based on the first sub-table of dump information, and updating the dump state information in the first sub-table of dump information.
The transcoding step S130 further includes: and transcoding the dump state information into a video file which is successfully imported according to a preset format based on the first dump information sub-table, updating the dump state information into a second dump information sub-table in response to successful transcoding, and deleting corresponding dump information from the first dump information sub-table. In this embodiment, as shown in step S311 in fig. 3, it may be determined whether all the video files are transcoded in a manner of determining whether the first transcoding information sub-table is an empty table. In this embodiment, by completing the transcoding step, the first transcoding information sub-table is set to be empty, and the next time the corresponding mobile storage device scans, the dump information of the video file can be imported.
The uploading step S140 further includes: and uploading the video file with the dump state information of which the transcoding is successful to the server based on a second dump information sub-table. That is, in step S403 shown in fig. 4, it is determined whether there is a batch that is successfully transcoded according to the second dump information sub-table.
Further, in the above embodiment, preferably, in response to that there is dump information whose dump state information is successful in uploading in the second dump information sub-table, the dump information is deleted in the second dump information sub-table, and the video file corresponding to the dump information is deleted in the local storage.
In the above embodiment, step S410 shown in fig. 4 may determine that all the video files have been uploaded completely by determining that there is no dump information in the second dump information sub-table.
Accordingly, a specific embodiment of specific steps in the video dumping method provided by the present invention has been described in detail based on fig. 2-4. It is understood that the dump information table in the present invention is stored in the database, and particularly, in one embodiment, the database is the SQLite database. The SQLite is a light database, does not need to be installed and configured, is simple to operate and is easy to integrate into an application program. In other embodiments, other databases, such as an access database, may be selected as desired.
The video dumping method provided by the invention writes the state information updated by each operation of the video into the database instead of the memory in real time, and can ensure that the information is not lost even if the software is closed. Therefore, when the video dumping method is abnormally interrupted and recovered, the completed processing links of the files in the database are read first, and then the operation of the next link is carried out, so that the video files do not need to be processed from the beginning.
For example, if it is found that there is no dump information in a certain dump information table when the dump information table in the database is read, and it is detected that the mobile storage device corresponding to the dump information table is still externally connected to the video dump device, it indicates that the mobile storage device corresponding to the dump information table does not complete the scanning step.
If dump information exists in a certain dump information table when the dump information table in the database is read, and dump state information exists in the dump information table and is dump information after scanning is completed, it is indicated that the batch corresponding to the dump information table is not completely imported.
In the above preferred embodiment, because there is the first sub-table of dump information and the second sub-table of dump information, as long as the dump state information is updated in the first sub-table of dump information to be successful in transcoding, the dump information corresponding to the dump state information will be deleted from the first sub-table of dump information. If the dump state information stored in a certain first dump information table is successfully imported when the dump information table in the database is read, the batch corresponding to the dump information table is in the transcoding step.
In the above preferred embodiment, as long as all dump state information in the second dump information sub-table is judged to be successfully transcoded, it is indicated that the batch corresponding to the dump information table is in the uploading step.
That is to say, according to the video dumping method provided by the invention, the SQLite database is used for storing all relevant attributes of the video file, so that even under the condition of disconnecting from the server, the dumping operations of scanning, importing and transcoding can be normally executed. The invention uses the dump state information field of the video file in the data table to store the current dump state of the video file, if the dump is interrupted due to various reasons in the dump process, the dump can be effectively recovered to the dump state and the dump progress before closing after the dump is restarted, and the dump is not required to be started from the beginning. When the video is scanned, the files of the mobile storage device and the local storage are compared, so that the phenomenon of repeated import of the video files is avoided, and the dumping efficiency is improved. The invention can track the problems existing in the dumping process of each batch of video files.
Accordingly, the video dump method provided by the present invention has been described. The invention also provides a video dumping device, please refer to fig. 5, and fig. 5 shows a schematic diagram of the video dumping device. As shown in FIG. 5, video dump device 500 includes a processor 510 and a memory 520. The processor 510 of the video dumping apparatus 500 can implement the video dumping method described above when executing the computer program stored in the memory 520, for which reference is made to the description of the video dumping method, which is not repeated herein.
Moreover, it can be understood that the memory 520 provided by the present invention corresponds to the above-mentioned local memory, and is used for storing the video file imported from the mobile storage device, and is used for storing the database where each dump information table is located, so as to ensure that various state information in the dump information table is not lost. Even if the video dumping method is forced to be interrupted, the related operation does not need to be started from the beginning, the same operation can be prevented from being repeatedly executed, and the dumping efficiency is improved.
According to the video dumping method and the video dumping device provided by the invention, the video file in the mobile storage equipment can be automatically imported into the dumping device, the transcoding uploading operation can be automatically executed, manual intervention is not needed, the dumping information table and the dumping state information therein support the breakpoint continuous transmission function, namely, in the process of dumping videos of a batch, due to abnormal conditions such as interruption of a client, manual forced software closing, network interruption and the like, the dumping process is interrupted, the current dumping state and progress can be automatically stored in the dumping information table, after the abnormal problem is solved, the last dumping progress can be continued to dump continuously, the whole process does not need to be started from the beginning, and manual intervention is not needed, so that the video dumping efficiency is effectively improved.
The video dumping method and the video dumping device provided by the invention have been described. The present invention also provides a computer storage medium having a computer program stored thereon, which when executed by a processor implements the steps of the video dump method as described above. For details, please refer to the above description about the video dump method, which is not repeated herein.
The various illustrative logical modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk (disk) and disc (disc), as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks (disks) usually reproduce data magnetically, while discs (discs) reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. It is to be understood that the scope of the invention is to be defined by the appended claims and not by the specific constructions and components of the embodiments illustrated above. Those skilled in the art can make various changes and modifications to the embodiments within the spirit and scope of the present invention, and these changes and modifications also fall within the scope of the present invention.

Claims (21)

1. A video dumping method is characterized by comprising a scanning step, an importing step, a transcoding step and an uploading step; wherein, for each of the mobile storage devices,
the scanning step includes: scanning the mobile storage device to acquire video information of each video file stored in the mobile storage device, and in response to acquiring the video information of all the video files, respectively recording dump information of each video file in a corresponding first dump information sub-table and a corresponding second dump information sub-table, wherein the dump information comprises the video information of the video files and dump state information with an initial value of the video files being the completion of scanning;
the step of importing comprises: importing the dump state information into a local memory for the scanned video file based on the first dump information sub-table, and updating the dump state information in the first dump information sub-table according to the import result;
the transcoding step comprises: transcoding the dump state information into a video file which is successfully imported based on the first sub-table of the dump information according to a preset format, updating the dump state information into a second sub-table of the dump information in response to successful transcoding, and deleting corresponding dump information from the first sub-table of the dump information so as to update the dump state information according to a transcoding result;
the uploading step comprises: and uploading the video file with the dump state information of which the transcoding is successful to a server based on the second dump information sub-table.
2. The video dumping method of claim 1, wherein the scanning step and the importing step of each mobile storage device are performed at a first thread, the transcoding step of each mobile storage device is performed at a second thread, and the uploading step of each mobile storage device is performed at a third thread; wherein
In response to there being multiple mobile storage devices, the first thread, the second thread, and the third thread are concurrent.
3. The video dumping method of claim 1 or 2, wherein the scanning step and the importing step of all the mobile storage devices are processed in parallel in response to the presence of at least one mobile storage device; wherein, for each of the mobile storage devices,
importing the dump state information into a local storage for the scanned video file further comprises: in response to the fact that at least one piece of dump state information is judged to be dump information which is scanned and finished in the first dump information sub-table, sequentially importing all the video files which are scanned and finished in the dump state information into the local memory;
updating the dump state information according to the import result further comprises: and updating each piece of dump state information into import success or import failure according to the import result.
4. The video dumping method of claim 3, wherein for each mobile storage device, said importing step further comprises: and in response to the import success of all the video files in the mobile storage device, formatting the mobile storage device.
5. The video dumping method of claim 3, wherein for each mobile storage device,
scanning the mobile storage device to obtain video information of each video file stored in the mobile storage device further comprises: acquiring a video file list in the mobile storage device, wherein the video file list comprises file names and storage paths of all video files, judging whether the file names and the storage paths of all the video files are legal or not, and acquiring video information of all the legal video files;
recording dump information of each video file in the corresponding first dump information sub-table and second dump information sub-table further comprises: and respectively recording dump information of all legal video files in the corresponding first dump information sub-table and second dump information sub-table in response to the video information of all legal video files being acquired.
6. The video dumping method of claim 1 or 2, wherein the transcoding step of each mobile storage device is processed one by one in response to the presence of at least one mobile storage device, comprising:
a transcoding step 1: reading the first dump information sub-table of each mobile storage device, and judging whether each piece of dump state information is the first dump information sub-table which is successfully imported;
and a transcoding step 2: in response to the existence of at least one first dump information sub-table with each dump state information being successfully imported, acquiring one first dump information sub-table with each dump state information being successfully imported;
and a transcoding step 3: sequentially transcoding the video file corresponding to each piece of dump information in the acquired first sub-table of the dump information according to the preset format, and updating dump state information of the video file into successful transcoding or unsuccessful transcoding according to a transcoding result; and
in response to completing the transcoding step 3, repeating the transcoding steps 1 to 3.
7. The video dumping method of claim 1 or 2, wherein the step of processing the uploads of the mobile storage devices one by one in response to the presence of at least one mobile storage device comprises:
uploading step 1: reading a second dump information sub-table of each mobile storage device, and judging whether a second dump information sub-table with each piece of dump state information being successful in transcoding exists;
and an uploading step 2: in response to the existence of at least one second dump information sub-table with each piece of dump state information being successful in transcoding, acquiring one second dump information sub-table with each piece of dump state information being successful in transcoding;
and an uploading step 3: sequentially uploading the video file corresponding to each dump information in the obtained second dump information sub-table to the server; and
in response to completing the uploading step 3, repeating the uploading steps 1 to 3.
8. The video dump method of claim 7,
the uploading step 3 further comprises: and sequentially uploading each video file with dump state information of which the transcoding is successful to the server, and updating the dump state information of the video file into upload success or upload failure in the second dump information sub-table according to an upload result.
9. The video dumping method of claim 7, wherein said uploading step 3 further comprises:
in response to that the dump state information of the video file is successfully uploaded, deleting dump information corresponding to the video file in the second dump information sub-table, and deleting the video file in the local memory;
responding to uploading failure of the dump state information of the video file, repeatedly uploading the video file to the server until uploading is successful within a preset frequency range, or the repeated frequency exceeds the preset frequency range, and outputting error reporting information;
and in response to that dump information does not exist in the second dump information sub-table, judging that the uploading step 3 is finished.
10. The video dump method of any one of claims 1-9, wherein the dump information table is stored in a SQlite database.
11. A video dump device, comprising:
a local memory; and
a processor coupled to the local memory, the processor configured to:
executing a scanning step, an importing step, a transcoding step and an uploading step; wherein, for each externally connected mobile storage device,
performing the scanning step includes: scanning the mobile storage device to acquire video information of each video file stored in the mobile storage device, and in response to acquiring the video information of all the video files, respectively recording dump information of each video file in a corresponding first dump information sub-table and a corresponding second dump information sub-table stored in the local storage, wherein the dump information comprises the video information of the video files and dump state information with initial values as scanning completion;
the step of executing the importing comprises: importing the dump state information into the local memory for the scanned video file based on the first dump information sub-table, and updating the dump state information in the first dump information sub-table according to an import result;
the transcoding step comprises: transcoding the dump state information into a video file which is successfully imported based on the first sub-table of the dump information according to a preset format, updating the dump state information into a second sub-table of the dump information in response to successful transcoding, and deleting corresponding dump information from the first sub-table of the dump information so as to update the dump state information according to a transcoding result;
the uploading step comprises: and uploading the video file with the dump state information of which the transcoding is successful to a server based on the second dump information sub-table.
12. The video dumping apparatus of claim 11, wherein said processor performs the scanning step and the importing step for each mobile storage device in a first thread, said processor performs the transcoding step for each mobile storage device in a second thread, and said processor performs the uploading step for each mobile storage device in a third thread; wherein
In response to there being multiple mobile storage devices, the first thread, the second thread, and the third thread are concurrent.
13. The video dumping apparatus of claim 11 or 12, wherein said processor concurrently processes the scanning step and the importing step of all the mobile storage devices in response to the presence of at least one mobile storage device; wherein, for each of the mobile storage devices,
the processor importing the dump state information into a local memory for the scanned video file further comprises: in response to the fact that at least one piece of dump state information is judged to be dump information which is scanned and finished in the first dump information sub-table, sequentially importing all the video files which are scanned and finished in the dump state information into the local memory;
the processor updating the dump state information according to the import result further comprises: and updating each piece of dump state information into import success or import failure according to the import result.
14. The video dump apparatus of claim 13, wherein for each mobile storage device, the processor performing the importing step further comprises: and responding to the condition that all video files in the mobile storage device are successfully imported, and formatting the mobile storage device.
15. The video dump apparatus of claim 13 wherein, for each mobile storage device,
the processor scanning the mobile storage device to obtain the video information of each video file stored in the mobile storage device further comprises: acquiring a video file list in the mobile storage device, wherein the video file list comprises file names and storage paths of all video files, judging whether the file names and the storage paths of all the video files are legal or not, and acquiring video information of all the legal video files;
the processor records dump information of each video file in the corresponding first dump information sub-table and second dump information sub-table, further comprising: and in response to the video information of all the legal video files being obtained, respectively recording dump information of each legal video file in the corresponding first dump information sub-table and second dump information sub-table.
16. The video dumping apparatus of claim 11 or 12, wherein said processor processes the transcoding steps of the respective mobile storage devices one by one in response to the presence of at least one mobile storage device, comprising:
a transcoding step 1: reading the first dump information sub-table of each mobile storage device, and judging whether each piece of dump state information is the first dump information sub-table which is successfully imported;
and a transcoding step 2: responding to at least one first dump information sub-table in which dump state information is successfully imported, and acquiring one first dump information sub-table in which dump state information is successfully imported;
and a transcoding step 3: sequentially transcoding the video file corresponding to each piece of dump information in the acquired first sub-table of the dump information according to the preset format, and updating dump state information of the video file into successful transcoding or unsuccessful transcoding according to a transcoding result; and
in response to completing the transcoding step 3, repeating the transcoding steps 1 to 3.
17. The video dumping apparatus of claim 11 or 12, wherein said processor processes the uploading steps of each mobile storage device one by one in response to the existence of at least one mobile storage device, comprising:
uploading step 1: reading a second dump information sub-table of each mobile storage device, and judging whether a second dump information sub-table with each piece of dump state information being successful in transcoding exists;
and an uploading step 2: in response to the existence of at least one second dump information sub-table with each piece of dump state information being successful in transcoding, acquiring one second dump information sub-table with each piece of dump state information being successful in transcoding;
and an uploading step 3: sequentially uploading the video file corresponding to each dump information in the acquired second dump information sub-table to the server; and
in response to completing the uploading step 3, repeating the uploading steps 1 to 3.
18. The video dump apparatus of claim 17 wherein,
the processor executing the uploading step 3 further comprises: and sequentially uploading each video file with dump state information of which the transcoding is successful to the server, and updating the dump state information of the video file into upload success or upload failure in the second dump information sub-table according to an upload result.
19. The video dump apparatus of claim 17, wherein the processor executing the uploading step 3 further comprises:
in response to that the dump state information of the video file is successfully uploaded, deleting dump information corresponding to the video file in the second dump information sub-table, and deleting the video file in the local memory;
responding to uploading failure of the dump state information of the video file, repeatedly uploading the video file to the server until uploading is successful within a preset frequency range, or the repeated frequency exceeds the preset frequency range, and outputting error reporting information;
and in response to that dump information does not exist in the second dump information sub-table, judging that the uploading step 3 is finished.
20. The video dump apparatus as claimed in any one of claims 11-19, wherein said dump information table is stored in a SQlite database in said local memory.
21. A computer readable medium having stored thereon computer readable instructions, which when executed by a processor, carry out the steps of the video dumping method of any of claims 1-10.
CN201911415986.8A 2019-12-31 2019-12-31 Video dumping method and device Active CN113132790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911415986.8A CN113132790B (en) 2019-12-31 2019-12-31 Video dumping method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911415986.8A CN113132790B (en) 2019-12-31 2019-12-31 Video dumping method and device

Publications (2)

Publication Number Publication Date
CN113132790A CN113132790A (en) 2021-07-16
CN113132790B true CN113132790B (en) 2022-06-17

Family

ID=76769129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911415986.8A Active CN113132790B (en) 2019-12-31 2019-12-31 Video dumping method and device

Country Status (1)

Country Link
CN (1) CN113132790B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113490012B (en) * 2021-07-26 2023-06-23 南京炫佳网络科技有限公司 Preemptive injection method, preemptive injection device, server and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101977218A (en) * 2010-10-20 2011-02-16 深圳市融创天下科技发展有限公司 Internet playing file transcoding method and system
US8479242B1 (en) * 2006-05-04 2013-07-02 Google Inc. Video storage and distribution
CN105049913A (en) * 2015-06-30 2015-11-11 株洲南车时代电气股份有限公司 Locomotive on-board video data downloading and storing method
CN107888942A (en) * 2017-11-24 2018-04-06 河南蓝信软件有限公司 A kind of video data shared system and method
CN207623957U (en) * 2017-11-27 2018-07-17 郑州畅想高科股份有限公司 A kind of audio, video data intelligence dump apparatus

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7971223B2 (en) * 2008-03-25 2011-06-28 Seachange International, Inc. Method and system of queued management of multimedia storage
US20170123713A1 (en) * 2015-10-30 2017-05-04 Imagine Communications Corp. Device and process for data storage and read/write efficiency
CN105898448A (en) * 2015-12-14 2016-08-24 乐视云计算有限公司 Submission method and device of transcoding attribute information
CN105828117A (en) * 2016-03-02 2016-08-03 乐视云计算有限公司 Video automatic push method based on user behavior analysis and video automatic push device thereof
CN108583592A (en) * 2017-12-30 2018-09-28 西安市地下铁道有限责任公司 A kind of subway service on buses or trains job information acquisition intelligent detecting method
JP7162288B2 (en) * 2018-03-23 2022-10-28 株式会社ユピテル System, video recording system and program, etc.
CN108965446A (en) * 2018-07-27 2018-12-07 安徽安为科技有限公司 Based on WIFI yard large capacity file dumping system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8479242B1 (en) * 2006-05-04 2013-07-02 Google Inc. Video storage and distribution
CN101977218A (en) * 2010-10-20 2011-02-16 深圳市融创天下科技发展有限公司 Internet playing file transcoding method and system
CN105049913A (en) * 2015-06-30 2015-11-11 株洲南车时代电气股份有限公司 Locomotive on-board video data downloading and storing method
CN107888942A (en) * 2017-11-24 2018-04-06 河南蓝信软件有限公司 A kind of video data shared system and method
CN207623957U (en) * 2017-11-27 2018-07-17 郑州畅想高科股份有限公司 A kind of audio, video data intelligence dump apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
机车运用信息综合联动分析系统;曾佑恒等;《机车电传动》;20181110(第06期);第119-122页 *

Also Published As

Publication number Publication date
CN113132790A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
US9582408B1 (en) System and method for optimizing testing of software production incidents
US20030030733A1 (en) System and method for synchronization of media data
CN111104445A (en) Data synchronization method, device and equipment
CN110737584A (en) Service data testing method and device based on block chain and computer equipment
US20090063527A1 (en) Processing of database statements with join predicates on range-partitioned tables
US20150293816A1 (en) Data processing method and apparatus
CN108108431B (en) Data synchronization method and system
CN105554044A (en) Method and apparatus for synchronizing object in local object storage node
CN113688045B (en) Automatic checking method and device for binary interface compatibility
CN113132790B (en) Video dumping method and device
CN112445702A (en) Automatic testing method and system based on ant colony algorithm
CN114564446A (en) File storage method, device, system and storage medium
CN114860506A (en) Linux file system repairing method, system, device and storage medium
CN112818937A (en) Excel file identification method and device, electronic equipment and readable storage medium
CN112799945B (en) Batch file verification method and device
CN113626232B (en) Method, device, equipment and readable medium for checking server log
CN114546957A (en) Intelligent centralized data processing service platform
CN104753659A (en) Method, device and system for multiple network element data synchronized load
CN113902531A (en) Automatic generation system, method, electronic device and storage medium for bid document
CN110474869B (en) Application system upgrading method and device under internal and external network isolation environment
CN116719824A (en) Data management method and related device
CN115563211A (en) Data synchronization method and device, electronic equipment and storage medium
CN116010393A (en) Data management method, system, equipment and medium
CN116048973A (en) Interface testing method, device and equipment based on API expansion
CN112965741A (en) Method and device for identifying changed program

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