CN117459590A - Video file uploading stream recycling method and device, storage medium and related equipment - Google Patents

Video file uploading stream recycling method and device, storage medium and related equipment Download PDF

Info

Publication number
CN117459590A
CN117459590A CN202311413045.7A CN202311413045A CN117459590A CN 117459590 A CN117459590 A CN 117459590A CN 202311413045 A CN202311413045 A CN 202311413045A CN 117459590 A CN117459590 A CN 117459590A
Authority
CN
China
Prior art keywords
file
uploading
video file
address
monitoring equipment
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.)
Pending
Application number
CN202311413045.7A
Other languages
Chinese (zh)
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.)
Tianyi Shilian Technology Co ltd
Original Assignee
Tianyi Digital Life Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianyi Digital Life Technology Co Ltd filed Critical Tianyi Digital Life Technology Co Ltd
Priority to CN202311413045.7A priority Critical patent/CN117459590A/en
Publication of CN117459590A publication Critical patent/CN117459590A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5683Storage of data provided by user terminals, i.e. reverse caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0847Transmission error
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterised by resources being split in blocks or fragments

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

According to the video file uploading flow recovery method, the device, the storage medium and the related equipment, when the monitoring equipment is detected to upload the video file to the uploading address issued in advance, the uploaded video file can be stored into the memory first, and when the uploading link interruption is detected before the uploading process is finished, part of the video file stored in the memory is uploaded into the storage pool corresponding to the uploading address; therefore, when the video file is uploaded, only one TCP link is established, the video file at the monitoring equipment side is uploaded to the cloud end in a one-time uploading mode, and therefore the uploading flow of the monitoring equipment is simplified.

Description

Video file uploading stream recycling method and device, storage medium and related equipment
Technical Field
The application relates to the technical field of software development, in particular to a video file uploading flow recovery method, a device, a storage medium and related equipment.
Background
With the continuous progress of technology, the popularization of bandwidth, video monitoring is increasingly and widely penetrating into various fields of education, government, entertainment, medical treatment, hotels, sports, security and the like. The method requires that the all-day video file of the monitoring equipment, particularly the file when the network is disconnected and the power is off, can be completely stored in the cloud.
At present, a target video file to be uploaded is generally cut according to a certain rule to obtain a plurality of fragments, then each fragment file is independently uploaded, after all fragments are successfully uploaded, all fragments are finally combined into one file, and the success of uploading is indicated after the file is uploaded. The method for uploading the fragments has more interaction, firstly, the files are cut, and then each fragment is uploaded once, so that the side docking cost and the error probability of the monitoring equipment are increased; in addition, if the network is unstable, the data being uploaded is lost, if the data volume is wanted to be lost, the fragments are required to be small enough, but the smaller fragments can cause the larger fragments, the larger the number of fragments, the larger the uploading times, and the docking cost and the error probability can be increased.
Disclosure of Invention
The purpose of the present application is to at least solve one of the above technical drawbacks, and in particular, to a technical drawback that in the prior art, a slice uploading method is used to upload a video file, which increases the side docking cost and the error probability of the monitoring device.
The application provides a video file uploading stream recycling method, which comprises the following steps:
when the monitoring equipment is detected to upload video files to an uploading address issued in advance, the uploaded video files are stored in a memory, and when the uploading link interruption is detected before the uploading process is finished, part of the video files stored in the memory are uploaded to a storage pool corresponding to the uploading address;
and generating file index information between the monitoring equipment and the partial video files according to the corresponding relation between the monitoring equipment and the uploading address and the corresponding relation between the partial video files and the storage pool, and writing the file index information into a file index library.
Optionally, before detecting that the monitoring device uploads the video file to the uploading address issued in advance, the method further includes:
responding to an uploading address acquisition request sent by monitoring equipment, and transmitting a designated number of uploading addresses to the monitoring equipment so that the monitoring equipment can select an unexpired uploading address uploading video file from the transmitted uploading addresses;
Wherein each upload address corresponds to a storage pool.
Optionally, the responding to the upload address obtaining request sent by the monitoring device sends a designated number of upload addresses to the monitoring device, including:
receiving an uploading address acquisition request sent by monitoring equipment, wherein the uploading address acquisition request comprises equipment IP, equipment ID and uploading address quantity;
resolving the province code corresponding to the equipment IP, and after distributing a designated number of storage pools according to the province code and the uploading address number, generating uploading addresses corresponding to each storage pool, wherein the uploading addresses at least comprise uploading expiration time;
and transmitting each uploading address to the monitoring equipment, and recording the corresponding relation between the equipment ID and each uploading address.
Optionally, the generating file index information between the monitoring device and the partial video file according to the corresponding relation between the monitoring device and the uploading address and the corresponding relation between the partial video file and the storage pool includes:
determining the corresponding relation between the monitoring equipment and the partial video file according to the corresponding relation between the monitoring equipment and the uploading address and the corresponding relation between the partial video file and the storage pool;
Acquiring equipment and file information according to the corresponding relation between the monitoring equipment and the partial video file;
and generating file index information between the monitoring equipment and the partial video file according to the equipment and the file information.
Optionally, the obtaining the device and the file information according to the correspondence between the monitoring device and the partial video file includes:
determining file information of the partial video file, wherein the file information at least comprises a storage pool ID, a file size, a start time, an end time and a status code of a storage pool in which the partial video file is positioned;
and acquiring equipment and file information corresponding to the monitoring equipment and the file information according to the corresponding relation between the monitoring equipment and the partial video file.
Optionally, the determining the file information of the partial video file includes:
determining a storage pool ID of a storage pool in which the partial video file is located;
determining the file size and status code of the partial video file;
determining the receiving time of the partial video file, and taking the receiving time as the starting time of the partial video file;
Determining the ending time of the partial video file according to the starting time and the video duration of the partial video file;
and taking the storage pool ID, the file size, the status code, the starting time and the ending time as file information of the partial video file.
Optionally, the method further comprises:
receiving a file index creation request submitted by the monitoring equipment;
when the file index information corresponding to the file index creation request is not stored in the file index library, the file index information corresponding to the file index creation request is created and then written into the file index library;
and when detecting that the file index information corresponding to the file index creation request is stored in the file index library, returning a file index created instruction to the monitoring equipment.
The application also provides a video file uploads and cuts off recovery unit, include:
the video file storage module is used for storing the uploaded video file into a memory when detecting that the monitoring equipment uploads the video file to an uploading address issued in advance, and uploading part of the video file stored in the memory into a storage pool corresponding to the uploading address when detecting that the uploading link is interrupted before the uploading process is finished;
And the file index creation module is used for generating file index information between the monitoring equipment and the partial video files according to the corresponding relation between the monitoring equipment and the uploading address and the corresponding relation between the partial video files and the storage pool, and writing the file index information into a file index library.
The present application also provides a storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the video file upload stream reclamation method as in any of the above embodiments.
The present application also provides a computer device comprising: one or more processors, and memory;
the memory has stored therein computer readable instructions which, when executed by the one or more processors, perform the steps of the video file upload stream reclamation method as in any of the above embodiments.
From the above technical solutions, the embodiments of the present application have the following advantages:
according to the video file uploading flow recovery method, the device, the storage medium and the related equipment, when the monitoring equipment is detected to upload the video file to the uploading address issued in advance, the uploaded video file can be stored into the memory first, and when the uploading link interruption is detected before the uploading process is finished, part of the video file stored in the memory is uploaded into the storage pool corresponding to the uploading address; therefore, when the video file is uploaded, only one TCP link is established, the video file at the monitoring equipment side is uploaded to the cloud end in a one-time uploading mode, and therefore the uploading process of the monitoring equipment is simplified.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a schematic flow chart of a video file uploading stream recycling method according to an embodiment of the present application;
FIG. 2 is a system architecture diagram of a video file uploading stream recycling process according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a video file uploading and flow recovery device according to an embodiment of the present application;
fig. 4 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
At present, a target video file to be uploaded is generally cut according to a certain rule to obtain a plurality of fragments, then each fragment file is independently uploaded, after all fragments are successfully uploaded, all fragments are finally combined into one file, and the success of uploading is indicated after the file is uploaded. The method for uploading the fragments has more interaction, firstly, the files are cut, and then each fragment is uploaded once, so that the side docking cost and the error probability of the monitoring equipment are increased; in addition, if the network is unstable, the data being uploaded is lost, if the data volume is wanted to be lost, the fragments are required to be small enough, but the smaller fragments can cause the larger fragments, the larger the number of fragments, the larger the uploading times, and the docking cost and the error probability can be increased.
Based on this, the following technical solutions are proposed in the present application, see specifically below:
in one embodiment, as shown in fig. 1, fig. 1 is a flow chart of a video file uploading stream recycling method provided in the embodiment of the present application; the application provides a video file uploading stream recycling method, which can comprise the following steps:
s110: when the monitoring equipment is detected to upload the video file to the uploading address issued in advance, the uploaded video file is stored in the memory, and when the uploading link interruption is detected before the uploading process is finished, part of the video file stored in the memory is uploaded to a storage pool corresponding to the uploading address.
In this step, the monitoring device may send an upload address acquisition request to the cloud in advance, and the cloud may issue a corresponding upload address according to the upload address acquisition request sent by the monitoring device, so that after the monitoring device acquires the upload address, the monitoring device may send the video file to the acquired upload address when uploading the video file, and thus may upload the video file to the cloud for storage. And when uploading the video file between the monitoring equipment and the cloud, only one TCP link is established, and the video file at the monitoring equipment side is uploaded to the cloud in a one-time uploading mode, so that the uploading flow of the monitoring equipment is simplified.
Further, when detecting that the monitoring device uploads the video file to the uploading address issued in advance, in order to prevent the situation that the video file is lost due to the interruption of uploading link, the video file can be stored in the memory without directly uploading the video file to the corresponding uploading address, and the video file stored in the memory is not lost due to the interruption of uploading link. Therefore, even if the uploading link interruption is detected before the video file uploading process is finished, the video file stored in the memory can still be uploaded to the storage pool corresponding to the uploading address for disc landing, so that the uploaded video file is stored to the greatest extent.
It can be understood that the above-mentioned interruption of uploading link refers to interruption of uploading link caused by network disconnection, power failure, network jitter, etc. of the monitoring device, at this time, the monitoring device cannot continue uploading video files, or the uploaded video files have a certain defect due to network jitter, etc. In order to prevent an uploaded video file from being not saved due to an uploading link interruption, the method and the device propose that when detecting that the monitoring equipment uploads the video file to an uploading address issued in advance, the uploaded video file is saved into a memory, so that the uploaded video file is saved by utilizing the function of instant storage of the memory.
S120: and generating file index information between the monitoring equipment and the partial video files according to the corresponding relation between the monitoring equipment and the uploading address and the corresponding relation between the partial video files and the storage pool, and writing the file index information into a file index library.
In this step, the uploaded video file is saved in the memory through S110, and when the uploading link interruption is detected before the uploading process is finished, after uploading a part of the video file saved in the memory to the storage pool corresponding to the uploading address, the present application may further generate file index information between the monitoring device and the part of the video file according to the corresponding relationship between the monitoring device and the uploading address when uploading the video file and the corresponding relationship between the part of the video file and the storage pool when saving the part of the video file, and write the file index information into the file index library, so that a user may log in the file index library and view the video file at the abnormal time end of the monitoring device according to the ID of the monitoring device or the file name of the part of the video file.
Specifically, after uploading a part of video files to a storage pool corresponding to an uploading address, the method can also establish file index information of the part of video files, and write the file index information into a file index library so that a user can search the part of video files in the file index library. Further, in order to facilitate the user to search the part of video files in the file index library, the application can generate the corresponding relation between the monitoring device and the part of video files according to the corresponding relation between the monitoring device and the uploading address and the corresponding relation between the part of video files and the storage pool, and then construct file index information between the monitoring device and the part of video files, so that after the file index information is written into the file index library, the user can check the video files at the abnormal time end of the monitoring device through the ID of the monitoring device and the file name of the part of video files.
Further, since the partial video file stored in the present application may be a video file that is about to be uploaded, a video file that has just been uploaded may be a video file that has just been uploaded, or a video file that is at the time of uploading a partial video file. Therefore, the file size, the starting time, the ending time and the like of the part of video file can be generated when the file index information is generated, so that when a user searches the part of video file through the file index library, whether the file is to be re-recorded or not can be determined according to the file index information of the part of video file; in addition, the uploading address and the partial video file are analyzed, the file index information of the partial video file and the file index information of the monitoring equipment are written into the file index library, and the monitoring equipment can further upload the video file at the moment, so that the normal uploading flow of the monitoring equipment is not influenced by the video flow break recovery flow.
In the above embodiment, when the monitoring device is detected to upload the video file to the uploading address issued in advance, the uploaded video file may be saved in the memory first, and when the uploading link interruption is detected before the uploading process is finished, part of the video file saved in the memory is uploaded to the storage pool corresponding to the uploading address; therefore, when the video file is uploaded, only one TCP link is established, the video file at the monitoring equipment side is uploaded to the cloud end in a one-time uploading mode, and therefore the uploading process of the monitoring equipment is simplified.
In one embodiment, before detecting that the monitoring device uploads the video file to the upload address issued in advance in S110, the method may further include:
s101: responding to an uploading address acquisition request sent by monitoring equipment, and transmitting a designated number of uploading addresses to the monitoring equipment so that the monitoring equipment can select an unexpired uploading address uploading video file from the transmitted uploading addresses; wherein each upload address corresponds to a storage pool.
In this embodiment, before uploading a video file to a previously issued upload address, the monitoring device may send an upload address acquisition request to the cloud, where the cloud may respond to the upload address acquisition request and issue a specified number of upload addresses to the monitoring device, so that the monitoring device may select an unexpired upload address from the issued upload addresses to upload the video file.
In the application, the monitoring device can send the uploading address obtaining request to the cloud end for a plurality of times, so that the cloud end can determine the number of uploading addresses to be issued according to the number of the uploading address obtaining requests, then send the uploading addresses with the appointed number to the monitoring device, the monitoring device can store the uploading addresses with the appointed number in the local queue after receiving the uploading addresses with the appointed number, and when a video file needs to be uploaded, the monitoring device can take one uploading address from the local queue and judge whether the uploading address is out of date, if the uploading address is not out of date, the monitoring device uploads the file with the uploading address, and if the uploading address is out of date, the monitoring device is discarded. When the uploading addresses cached in the local queue are too few or no uploading addresses exist, the monitoring device can continuously send an uploading address obtaining request to the cloud to update the local queue. Therefore, when the monitoring equipment uploads the video file, the uploading address is only required to be obtained in the local queue, and the uploading address is not required to be obtained from the cloud end when the video file is uploaded each time, so that the video uploading time is saved and the video uploading flow is simplified.
In addition, when the cloud end in the application generates the uploading address corresponding to the uploading address acquisition request, the storage pool corresponding to the uploading address acquisition request can be determined first, generally one uploading address acquisition request corresponds to one storage pool, then the corresponding uploading address is generated according to the storage pool, and therefore each uploading address corresponds to one storage pool, and part of video files can be stored in the corresponding storage pool according to the uploading address.
In one embodiment, in response to the upload address acquisition request sent by the monitoring device in S101, issuing a specified number of upload addresses to the monitoring device may include:
s1011: receiving an uploading address acquisition request sent by monitoring equipment, wherein the uploading address acquisition request comprises equipment IP, equipment ID and uploading address quantity;
resolving the province code corresponding to the equipment IP, and after distributing a designated number of storage pools according to the province code and the uploading address number, generating uploading addresses corresponding to each storage pool, wherein the uploading addresses at least comprise uploading expiration time;
and transmitting each uploading address to the monitoring equipment, and recording the corresponding relation between the equipment ID and each uploading address.
In this embodiment, when the cloud end issues an upload address acquisition request with a specified number to the monitoring device according to an upload address acquisition request sent by the monitoring device, the upload address acquisition request sent by the monitoring device may be parsed first to acquire a device IP, a device ID and the number of upload addresses included in the upload address acquisition request, then the device IP is parsed to determine a provincial code corresponding to the device IP, and then after a storage pool with a specified number is allocated according to the provincial code and the number of upload addresses, an upload address corresponding to each storage pool is generated, and the upload address includes at least an upload expiration time, so that the monitoring device may determine whether the upload address is expired according to the upload expiration time of the acquired upload address.
The generated uploading addresses can be sent to the monitoring device, so that the monitoring device can be stored in the local queue. The method and the device can record the corresponding relation between the equipment ID and each uploading address, so that corresponding file index information can be generated according to the corresponding relation between the equipment ID and each uploading address.
Illustratively, as shown in the following table 1 and table 2, where table 1 does not store a pool information table, table 2 is a relationship between a device and an uploading address, in this application, different storage pools correspond to different storage pool IDs, storage pool domain names, storage pool AK, storage pool SK and storage pool socket, after a provincial code corresponding to the device IP is obtained, a designated number of storage pools can be allocated according to the provincial code and the number of uploading addresses, and then a pre-signed uploading address is generated according to an object storage S3 protocol, and a table shown in table 2 is formed after the correspondence between the device IDs and each uploading address is recorded, where in table 2, the device IDs, the storage pool objectids and the uploading expiration time are recorded, so that corresponding file index information can be generated through the information recorded in table 2.
Table 1 pool information table
Table 2 device and upload address relation
In one embodiment, in S120, generating file index information between the monitoring device and the partial video file according to the correspondence between the monitoring device and the uploading address and the correspondence between the partial video file and the storage pool may include:
s121: and determining the corresponding relation between the monitoring equipment and the partial video file according to the corresponding relation between the monitoring equipment and the uploading address and the corresponding relation between the partial video file and the storage pool.
S122: and acquiring equipment and file information according to the corresponding relation between the monitoring equipment and the partial video file.
S123: and generating file index information between the monitoring equipment and the partial video file according to the equipment and the file information.
In this embodiment, when generating the file index information between the monitoring device and the partial video file, the corresponding relationship between the monitoring device and the partial video file may be determined according to the corresponding relationship between the monitoring device and the uploading address and the corresponding relationship between the partial video file and the storage pool, then the device and the file information are acquired according to the corresponding relationship, and finally the file index information between the monitoring device and the partial video file is generated according to the device and the file information.
It can be understood that, because the file addresses and the storage pools of the application are in one-to-one correspondence, when the application determines the correspondence between the monitoring device and the uploading address and the correspondence between the partial video files and the storage pools, the correspondence between the monitoring device and the partial video files can be determined, so that the device information of the monitoring device and the file information of the partial video files in the correspondence can be acquired and summarized into the device and the file information, and then the application can construct the file index information according to the device and the file information. Illustratively, as shown in table 3, table 3 is a device video index table in the file index library of the present application, where the device video index table stores a plurality of file index information, each file index information at least includes a device ID, a file name, a storage pool ID, a storage pool object, and information about whether to complement, so that a user can determine the storage pool ID and the storage pool object of the searched video file through the device ID or the file name in the device video index table, and then view the relevant video file according to the storage pool ID and the storage pool object, and the user can also view whether to complement the relevant video file according to the information about whether to complement the column.
Table 3 device video index table
In one embodiment, in S122, obtaining the device and the file information according to the correspondence between the monitoring device and the partial video file may include:
s1221: and determining file information of the partial video file, wherein the file information at least comprises a storage pool ID, a file size, a start time, an end time and a status code of a storage pool where the partial video file is located.
S1222: and acquiring equipment and file information corresponding to the monitoring equipment and the file information according to the corresponding relation between the monitoring equipment and the partial video file.
In this embodiment, when the present application determines the correspondence between the monitoring device and the uploading address and the correspondence between the partial video file and the storage pool, the correspondence between the monitoring device and the partial video file may be determined, so that the device information of the monitoring device and the file information of the partial video file in the correspondence may be acquired and summarized into the device and the file information.
Specifically, the present application may first determine file information of a portion of video files, where the file information includes, but is not limited to, a storage pool ID, a file size, a start time, an end time, and a status code of a storage pool where the portion of video files are located, where the status code may be used to distinguish from a complete video file, and may be used to extract equipment and file information for stop-repair, and write the extracted equipment and file information into an equipment video index table.
After determining the file information of the partial video file, the method can acquire the equipment ID of the monitoring equipment and the file name of the partial video file according to the corresponding relation between the monitoring equipment and the partial video file, and then combine the equipment ID and the file name of the partial video file with the file information of the partial video file to generate corresponding equipment and file information.
In one embodiment, determining the file information of the partial video file in S1221 may include:
s12211: and determining the storage pool ID of the storage pool where the partial video file is located.
S12212: and determining the file size and the status code of the partial video file.
S12213: and determining the receiving time of the partial video file, and taking the receiving time as the starting time of the partial video file.
S12214: and determining the ending time of the partial video file according to the starting time and the video duration of the partial video file.
S12215: and taking the storage pool ID, the file size, the status code, the starting time and the ending time as file information of the partial video file.
In this embodiment, when determining the file information of the partial video file, the present application may determine a storage pool ID, a file size, a status code, a start time, an end time, and the like of the storage pool in which the partial video file is located, and then use the determined related information as the file information of the partial video file.
The file duration of the partial video file can be obtained by adopting a ffmpeg tool, and the start time of the partial video file can be obtained by using the time of the data packet received by the server, and the end time=the start time+the file duration, so that the file information of the partial video file can be obtained. Illustratively, as shown in table 4, table 4 shows the storage pool re-entry file information, table 4 shows the file information related to a portion of the video file, including but not limited to storage pool objectId, storage pool ID, start time, end time, re-entry status code.
Table 4 storage pool complement file information
In one embodiment, the method may further comprise:
s130: and receiving a file index creation request submitted by the monitoring equipment.
S131: when the file index information corresponding to the file index creation request is not stored in the file index library, the file index information corresponding to the file index creation request is created and then written into the file index library.
S132: and when detecting that the file index information corresponding to the file index creation request is stored in the file index library, returning a file index created instruction to the monitoring equipment.
In this embodiment, the cloud may periodically and actively acquire file information of a part of the video files and device information of monitoring devices corresponding to the part of the video files to form devices and file information, and then create file index information according to the devices and the file information and write the file index information into the file index library. The monitoring device can also submit a file index creation request to the cloud, so that the cloud can create corresponding file index information according to the cloud index creation request and write the file index information into the file index library.
Further, since the cloud end can actively create file index information at regular time, after receiving a file index creation request submitted by the monitoring device, the cloud end can detect whether file index information corresponding to the file index creation request is stored in the file index library, if not, the file index information corresponding to the file index creation request is created and then written into the file index library, and if so, a file index created instruction is returned to the monitoring device, so that the monitoring device does not need to continuously submit the file index creation request to the cloud end, and the cloud end does not need to establish the file index information again.
In addition, when a file index creation request sent by a monitoring device is received and file index information corresponding to the file index creation request is not detected to be stored in a file index library, if a plurality of partial video files corresponding to the monitoring device are provided, corresponding file index information can be created for each partial video file respectively, so that the creation efficiency of the file index is improved.
The video file uploading stream recycling process of the present application will be described by a specific example. Specifically, as shown in fig. 2, fig. 2 is a system architecture diagram of a video file uploading and stream recycling process according to an embodiment of the present application; the cloud server of the application can comprise an uploading address module, an uploading module, a data analysis module and a file index creation module; the uploading address module is responsible for issuing a pre-signed one-time uploading address to the monitoring equipment and recording the relation between the monitoring equipment and the uploading address; the uploading module is in charge of receiving the video file uploaded by the monitoring equipment, storing the video file into the S3 storage when the uploading is successful, extracting the fragment file uploaded into the memory when the uploading is failed (uploading link is interrupted), analyzing the video file, archiving the video file into the S3 storage, and outputting file information of the interruption supplementary record; the data analysis module is responsible for analyzing the video which fails to be uploaded by the uploading module and writing the video into the file index library, and mainly comprises equipment for analyzing the uploading address module and uploading address information, and the supplementary record file information of the uploading module, and after the supplementary record equipment and the supplementary record file information are output, the file index creating module is called to generate file index information; the file index creating module is responsible for creating file index information of the monitoring equipment, supporting the monitoring equipment to submit a file index creating request and supporting the platform to submit the created index file.
For example, the present application may first configure an available upload module and insert storage pool information into the storage pool information table, such as storage pool ID, storage pool AK, storage pool SK, storage pool domain name, storage pool bucket, etc.
Secondly, the monitoring equipment carries equipment ID, the equipment IP, the number of uploading addresses and other information to an uploading address module to acquire the uploading addresses with the specified number, the uploading address module shunts to the most suitable storage pool according to the related information, and generates uploading addresses, uploading signatures and other information by using the shunted storage pool information, and writes the information into the corresponding relation between the equipment and the uploading addresses.
And the monitoring equipment selects one of the acquired uploading addresses for use, judges whether the uploading addresses are out of date, uses the uploading addresses if the uploading addresses are not out of date, and takes a batch of uploading addresses again after the uploading addresses are out of date. And uploading the recorded 5-minute video file to a corresponding address at one time, and buffering the file in a memory after the uploading module receives the file. If the network cable is unplugged during 3 minutes of recording, the uploading module detects the uploading link interruption, 3 minutes of video in the memory is exported from the memory to the local hard disk, video information is analyzed, 3 minutes of video is written into the object storage, and the information is written into the storage pool complement file information table.
And finally, the data analysis module periodically searches out the equipment needing to be subjected to the supplementary recording and the corresponding file information from the address relation and the supplementary recording file information of the storage pool of the analysis equipment, and then creates a file index module to create an index by utilizing the corresponding information, so that the video file can be prevented from being lost to the greatest extent, and a user can check the video file at the abnormal time end of the equipment through the file index library.
The video file uploading stream recycling device provided in the embodiment of the present application is described below, and the video file uploading stream recycling device described below and the video file uploading stream recycling method described above may be referred to correspondingly.
In one embodiment, as shown in fig. 3, fig. 3 is a schematic structural diagram of a video file uploading and flow recovery device provided in the embodiment of the present application; the application also provides a video file uploading stream recycling device, which comprises a video file storage module 210 and a file index creation module 220, and specifically comprises the following steps:
the video file storage module 210 is configured to store an uploaded video file in a memory when detecting that the monitoring device uploads the video file to an upload address issued in advance, and upload a portion of the video file stored in the memory to a storage pool corresponding to the upload address when detecting that the upload link is interrupted before the upload process is completed.
The file index creating module 220 is configured to generate file index information between the monitoring device and the partial video file according to a corresponding relationship between the monitoring device and the uploading address and a corresponding relationship between the partial video file and the storage pool, and write the file index information into a file index library.
In the above embodiment, when the monitoring device is detected to upload the video file to the uploading address issued in advance, the uploaded video file may be saved in the memory first, and when the uploading link interruption is detected before the uploading process is finished, part of the video file saved in the memory is uploaded to the storage pool corresponding to the uploading address; therefore, when the video file is uploaded, only one TCP link is established, the video file at the monitoring equipment side is uploaded to the cloud end in a one-time uploading mode, and therefore the uploading process of the monitoring equipment is simplified.
In one embodiment, the present application also provides a storage medium having stored therein computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the video file upload stream reclamation method as in any of the above embodiments.
In one embodiment, the present application also provides a computer device comprising: one or more processors, and memory.
The memory has stored therein computer readable instructions which, when executed by the one or more processors, perform the steps of the video file upload stream reclamation method as in any of the above embodiments.
Schematically, as shown in fig. 4, fig. 4 is a schematic internal structure of a computer device according to an embodiment of the present application, where the computer device 300 may be provided as a server. Referring to FIG. 4, computer device 300 includes a processing component 302 that further includes one or more processors, and memory resources represented by memory 301, for storing instructions, such as applications, executable by processing component 302. The application program stored in the memory 301 may include one or more modules each corresponding to a set of instructions. Further, the processing component 302 is configured to execute instructions to perform the video file upload stream reclamation method of any of the embodiments described above.
The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input output (I/O) interface 305. The computer device 300 may operate based on an operating system stored in memory 301, such as Windows Server TM, mac OS XTM, unix TM, linux TM, free BSDTM, or the like.
Those skilled in the art will appreciate that the structures shown in FIG. 4 are block diagrams only and do not constitute a limitation of the computer device on which the present aspects apply, and that a particular computer device may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application 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.

Claims (10)

1. A video file upload stream reclamation method, the method comprising:
when the monitoring equipment is detected to upload video files to an uploading address issued in advance, the uploaded video files are stored in a memory, and when the uploading link interruption is detected before the uploading process is finished, part of the video files stored in the memory are uploaded to a storage pool corresponding to the uploading address;
And generating file index information between the monitoring equipment and the partial video files according to the corresponding relation between the monitoring equipment and the uploading address and the corresponding relation between the partial video files and the storage pool, and writing the file index information into a file index library.
2. The video file uploading stream recycling method as set forth in claim 1, wherein before detecting that the monitoring device uploads the video file to the uploading address issued in advance, the method further comprises:
responding to an uploading address acquisition request sent by monitoring equipment, and transmitting a designated number of uploading addresses to the monitoring equipment so that the monitoring equipment can select an unexpired uploading address uploading video file from the transmitted uploading addresses;
wherein each upload address corresponds to a storage pool.
3. The video file uploading flow recycling method as set forth in claim 2, wherein said issuing a specified number of uploading addresses to a monitoring device in response to an uploading address acquisition request sent by the monitoring device includes:
receiving an uploading address acquisition request sent by monitoring equipment, wherein the uploading address acquisition request comprises equipment IP, equipment ID and uploading address quantity;
Resolving the province code corresponding to the equipment IP, and after distributing a designated number of storage pools according to the province code and the uploading address number, generating uploading addresses corresponding to each storage pool, wherein the uploading addresses at least comprise uploading expiration time;
and transmitting each uploading address to the monitoring equipment, and recording the corresponding relation between the equipment ID and each uploading address.
4. The video file uploading and stream recycling method according to claim 1, wherein the generating file index information between the monitoring device and the partial video file according to the correspondence between the monitoring device and the uploading address and the correspondence between the partial video file and the storage pool comprises:
determining the corresponding relation between the monitoring equipment and the partial video file according to the corresponding relation between the monitoring equipment and the uploading address and the corresponding relation between the partial video file and the storage pool;
acquiring equipment and file information according to the corresponding relation between the monitoring equipment and the partial video file;
and generating file index information between the monitoring equipment and the partial video file according to the equipment and the file information.
5. The method for recovering an upload stream of a video file according to claim 4, wherein said obtaining equipment and file information according to a correspondence between said monitoring equipment and said part of the video file comprises:
determining file information of the partial video file, wherein the file information at least comprises a storage pool ID, a file size, a start time, an end time and a status code of a storage pool in which the partial video file is positioned;
and acquiring equipment and file information corresponding to the monitoring equipment and the file information according to the corresponding relation between the monitoring equipment and the partial video file.
6. The video file upload stream reclamation method as recited in claim 5, wherein the determining file information of the partial video file comprises:
determining a storage pool ID of a storage pool in which the partial video file is located;
determining the file size and status code of the partial video file;
determining the receiving time of the partial video file, and taking the receiving time as the starting time of the partial video file;
determining the ending time of the partial video file according to the starting time and the video duration of the partial video file;
And taking the storage pool ID, the file size, the status code, the starting time and the ending time as file information of the partial video file.
7. The video file upload stream reclamation method as recited in claim 1, further comprising:
receiving a file index creation request submitted by the monitoring equipment;
when the file index information corresponding to the file index creation request is not stored in the file index library, the file index information corresponding to the file index creation request is created and then written into the file index library;
and when detecting that the file index information corresponding to the file index creation request is stored in the file index library, returning a file index created instruction to the monitoring equipment.
8. A video file upload stream reclamation apparatus comprising:
the video file storage module is used for storing the uploaded video file into a memory when detecting that the monitoring equipment uploads the video file to an uploading address issued in advance, and uploading part of the video file stored in the memory into a storage pool corresponding to the uploading address when detecting that the uploading link is interrupted before the uploading process is finished;
And the file index creation module is used for generating file index information between the monitoring equipment and the partial video files according to the corresponding relation between the monitoring equipment and the uploading address and the corresponding relation between the partial video files and the storage pool, and writing the file index information into a file index library.
9. A storage medium, characterized by: the storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the video file upload stream reclamation method as claimed in any of claims 1 to 7.
10. A computer device, comprising: one or more processors, and memory;
stored in the memory are computer readable instructions which, when executed by the one or more processors, perform the steps of the video file upload stream reclamation method of any of claims 1 to 7.
CN202311413045.7A 2023-10-27 2023-10-27 Video file uploading stream recycling method and device, storage medium and related equipment Pending CN117459590A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311413045.7A CN117459590A (en) 2023-10-27 2023-10-27 Video file uploading stream recycling method and device, storage medium and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311413045.7A CN117459590A (en) 2023-10-27 2023-10-27 Video file uploading stream recycling method and device, storage medium and related equipment

Publications (1)

Publication Number Publication Date
CN117459590A true CN117459590A (en) 2024-01-26

Family

ID=89584923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311413045.7A Pending CN117459590A (en) 2023-10-27 2023-10-27 Video file uploading stream recycling method and device, storage medium and related equipment

Country Status (1)

Country Link
CN (1) CN117459590A (en)

Similar Documents

Publication Publication Date Title
CN109040252B (en) File transmission method, system, computer device and storage medium
CN106407356B (en) Data backup method and device
US9262899B2 (en) Method, device and system for implementing video recording retrieval
US11687488B2 (en) Directory deletion method and apparatus, and storage server
JP4394493B2 (en) File management method, file management apparatus, and file management program
CN108933798B (en) Data storage method, storage server and system
US8775377B1 (en) Efficient data backup with change tracking
JP3830389B2 (en) Internet-based remote data and file recovery system and method
US8762347B1 (en) Method and apparatus for processing transactional file system operations to enable point in time consistent file data recreation
CN103348346A (en) Techniques for detecting new browser windows
US7680826B2 (en) Computer-readable recording medium storing security management program, security management system, and method of security management
US9817834B1 (en) Techniques for performing an incremental backup
US20090204648A1 (en) Tracking metadata for files to automate selective backup of applications and their associated data
CN109597722A (en) Database backup file restoration methods, device and electronic equipment
US8793346B2 (en) System and method for constructing session identification information
CN117459590A (en) Video file uploading stream recycling method and device, storage medium and related equipment
TW201227268A (en) Data backup system and data backup and retrival method
CN112000623A (en) Metadata access method and device and computer readable storage medium
JP4718605B2 (en) Message management method and system
KR20210049296A (en) Method for Data Recovery Using the System ComprisingServer and Client
US20110137860A1 (en) Method for providing managing function of storage service
JP2005157727A (en) Log processing method, and processing program and execution system of the same
US20210271554A1 (en) Method and system for a cloud backup service leveraging peer-to-peer data recovery
US20050132082A1 (en) System and method for resuming downloading from interruption points
WO2022062166A1 (en) Data processing method and apparatus, and device and 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240321

Address after: Unit 1, Building 1, China Telecom Zhejiang Innovation Park, No. 8 Xiqin Street, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province, 311100

Applicant after: Tianyi Shilian Technology Co.,Ltd.

Country or region after: Zhong Guo

Address before: Room 1423, No. 1256 and 1258, Wanrong Road, Jing'an District, Shanghai 200072

Applicant before: Tianyi Digital Life Technology Co.,Ltd.

Country or region before: Zhong Guo