CN114579060A - Configuration method and device of disk quota, storage medium and electronic device - Google Patents

Configuration method and device of disk quota, storage medium and electronic device Download PDF

Info

Publication number
CN114579060A
CN114579060A CN202210283498.1A CN202210283498A CN114579060A CN 114579060 A CN114579060 A CN 114579060A CN 202210283498 A CN202210283498 A CN 202210283498A CN 114579060 A CN114579060 A CN 114579060A
Authority
CN
China
Prior art keywords
determining
target
average
type
total amount
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
CN202210283498.1A
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202210283498.1A priority Critical patent/CN114579060A/en
Publication of CN114579060A publication Critical patent/CN114579060A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention provides a configuration method and device of a disk quota, a storage medium and an electronic device, wherein the method comprises the following steps: determining a first total amount of each type of multimedia file collected by target equipment in a target time period; determining a disk quota for each type of multimedia file based on the first total amount of each type of multimedia file; according to the method and the device, the storage space of the target disk is configured according to the disk quota of each type of multimedia file, wherein the target disk is used for storing the multimedia file acquired by the target equipment.

Description

Configuration method and device of disk quota, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the field of storage, in particular to a configuration method and device of a disk quota, a storage medium and an electronic device.
Background
The disk quota is used for limiting storage of a disk, and is used for limiting that one target use space is too large to influence use of other target spaces. The disk quota is realized by a partition of a disk, an operating system support (e.g., quota of linux), and the like. With the development of high-definition video, audio and video data such as video and pictures generated by video monitoring equipment become larger and larger. In order to improve the storage efficiency of the audio and video data and optimize the use efficiency of the storage space, the storage quota values of the video files and the picture files can be respectively specified by means of the partition quota function of the disk, and the disk is partitioned according to the specified quota values. A schematic diagram of a storage disk partition is shown in fig. 1.
In the related art, a user is usually required to configure a quota of each kind of data, but due to complexity of services and diversity of scene changes, a quota size confirmed by a client often cannot reach an expected target, and needs to be adjusted repeatedly. Especially, in a device involving multiple channels, since each scene is different, it is impossible to accurately determine the quota size.
Therefore, the problem that the size of the disk quota cannot be accurately configured exists in the related art.
In view of the above problems in the related art, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a configuration method and device of a disk quota, a storage medium and an electronic device, which are used for at least solving the problem that the size of the disk quota cannot be accurately configured in the related technology.
According to an embodiment of the present invention, a method for configuring a disk quota is provided, including: determining a first total amount of each type of multimedia file collected by target equipment in a target time period; determining a disk quota for each type of the multimedia files based on the first total amount of each type of the multimedia files; and configuring a storage space of a target disk according to the disk quota of each type of the multimedia file, wherein the target disk is used for storing the multimedia file acquired by the target equipment.
According to another embodiment of the present invention, an apparatus for configuring a disk quota is provided, including: the first determining module is used for determining a first total amount of each type of multimedia files collected by the target equipment in a target time period; a second determining module, configured to determine a disk quota of each type of the multimedia file based on the first total amount of each type of the multimedia file; and the configuration module is used for configuring the storage space of a target disk according to the disk quota of each type of the multimedia file, wherein the target disk is used for storing the multimedia file acquired by the target device.
According to yet another embodiment of the invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the method and the device, the first total amount of each type of multimedia file collected by the target device in the target time period is determined, the disk quota of each type of multimedia file is determined according to the first total amount of each type of multimedia file, and the storage space of the target disk is configured according to the disk quota of each type of multimedia file. The first total amount of each type of multimedia file can be determined in advance, the disk quota of each type of multimedia file can be determined according to the first total amount, and the storage space of the disk can be completely distributed according to the acquired total amount, so that the problem that the size of the disk quota cannot be accurately configured in the related technology can be solved, and the effect of improving the accuracy of the configured disk quota size is achieved.
Drawings
FIG. 1 is a schematic diagram of a storage disk partition in the related art;
fig. 2 is a block diagram of a hardware structure of a mobile terminal of a method for configuring a disk quota according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for configuring a disk quota according to an embodiment of the present invention;
FIG. 4 is a flowchart for determining an average total amount of each type of multimedia file according to an exemplary embodiment of the present invention;
FIG. 5 is a flowchart for determining a target number of times a target event occurred per target channel of a statistical target device per historical time period, according to an illustrative embodiment of the present invention;
FIG. 6 is a flowchart of a determination of an average total amount of a second type of multimedia files per target channel according to an exemplary embodiment of the present invention;
FIG. 7 is a flowchart of a determination of an average total amount of a first type of multimedia files per target channel according to an exemplary embodiment of the present invention;
fig. 8 is a block diagram of a configuration apparatus of a disk quota according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the operation on the mobile terminal as an example, fig. 2 is a hardware structure block diagram of the mobile terminal of a configuration method of a disk quota according to an embodiment of the present invention. As shown in fig. 2, the mobile terminal may include one or more (only one shown in fig. 2) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 2 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 2, or have a different configuration than shown in FIG. 2.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the configuration method of the disk quota in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In this embodiment, a method for configuring a disk quota is provided, and fig. 3 is a flowchart of the method for configuring a disk quota according to the embodiment of the present invention, and as shown in fig. 3, the flowchart includes the following steps:
step S302, determining a first total amount of each type of multimedia files collected by target equipment in a target time period;
step S304, determining a disk quota of each type of multimedia file based on the first total amount of each type of multimedia file;
step S306, configuring a storage space of a target disk according to the disk quota of each type of the multimedia file, where the target disk is used to store the multimedia file collected by the target device.
In the above embodiments, the target device may be an image capturing device, such as a video capturing device, a monitoring device. The target device can also be other devices capable of acquiring various multimedia files, such as a device integrating a sound acquisition device, an image acquisition device and a video acquisition device.
In the above embodiments, the multimedia file may be an image, video, audio, or the like. The target device can collect multiple multimedia files in each time period, and can predict the first total amount of each type of multimedia files collected by the target device in the target time period according to the historical total amount of each type of multimedia files collected in the historical time period. The target time period may be one day, one week, ten hours, and the like, which is not limited in the present invention. The following description will be given taking the target time period as one day as an example. For example, the historical total amount of each type of multimedia file may be collected in the first 7 periods of the target time period, and the first total amount may be determined according to the historical total amount.
In the above embodiment, the disk quota of each type of multimedia file may be determined according to the first total amount, and after the quota size is set, the disk may be subjected to partition formatting according to the specified quota, so that the entire disk is only used for each type of multimedia file. The following description will be made with two types of multimedia files as neighbors: for example, if the multimedia file includes a picture and a video, the following relationship exists between the size of the disk and the picture quota and the video quota: q1+ q2, where q1 represents the quota size of the picture; q2 represents the quota size of the video; c represents the total size of the disk. If the picture quota ratio is s1 and the video quota ratio is s2, the following relationship exists between the picture quota ratio and the video quota ratio: c-q 1+ q 2-s 1-c + s 2-c, and 1-s 1+ s2, i.e., s 2-1-s 1. The picture quota partition is used for storing pictures generated by different services, and the total size of the picture quota partition is equal to the total size of the stored pictures; the video quota partition is used for storing videos generated without services, the total size of the videos should be equal to the total size of the stored videos, and the two corresponding relations are as follows: q 1-Tp, q 2-Tv, where Tp represents the total size of the picture; tv represents the total size of the video. The calculation of the disk quota size may be converted to: and (4) evaluating and calculating the total amount of the picture files and the total amount of the video files. That is, the disk quota for each type of multimedia file may be determined by determining the first total amount for each type of multimedia file.
Optionally, the main body of the above steps may be a background processor, or other devices with similar processing capabilities, and may also be a machine integrated with at least an image acquisition device and a data processing device, where the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a terminal such as a computer and a mobile phone, but is not limited thereto.
According to the method and the device, the first total amount of each type of multimedia file collected by the target device in the target time period is determined, the disk quota of each type of multimedia file is determined according to the first total amount of each type of multimedia file, and the storage space of the target disk is configured according to the disk quota of each type of multimedia file. The first total amount of each type of multimedia file can be determined in advance, the disk quota of each type of multimedia file can be determined according to the first total amount, and the storage space of the disk can be completely distributed according to the acquired total amount, so that the problem that the size of the disk quota cannot be accurately configured in the related technology can be solved, and the effect of improving the accuracy of the configured disk quota size is achieved.
In one exemplary embodiment, determining the first total amount of each type of multimedia file collected by the target device within the target time period comprises: determining an average total amount of each type of the multimedia files collected by the target device in a plurality of historical time periods; determining the average total amount as the first total amount. In this embodiment, the target device may be a video monitoring device, and after the video monitoring device is installed, the image content has high repeatability every day, so that the event occurrence frequency and the event duration of the device, the code stream size, and the image size all have similarities. The data as a whole can be estimated using the average data over a number of consecutive days.
In an exemplary embodiment, determining that the target device has collected an average total amount of each type of the multimedia files over a plurality of historical time periods comprises: counting the target times of each target channel of the target equipment when a target event occurs in each historical time period to obtain a plurality of target times; counting the duration of each target channel of the target equipment in each historical time period when the target event occurs each time to obtain a plurality of durations; determining the code stream size of each target channel of the target equipment in each historical time period to obtain a plurality of code stream sizes; determining the file size of the first type of multimedia file acquired by each target channel of the target equipment in each historical time period to obtain a plurality of file sizes; determining the average total amount based on the target times, the duration, the code stream sizes and the file sizes. In this embodiment, since the corresponding scenes of each channel of the monitoring device are different, the event generation frequency, the event average duration, the code stream size, and the picture size of each channel need to be obtained. When the average total amount of each type of multimedia file is determined, the target event occurrence frequency of each channel of the target device, that is, the target times of the target time, the duration of each occurrence of the target time, the code stream size of the target channel, and the file size of the multimedia file may be counted to determine the average total amount.
In the above embodiment, a flow chart for determining the average total amount of each type of multimedia file can be seen in fig. 4. As shown in fig. 4, the event occurrence frequency of the statistical designated channel is the target number of times that each target channel of the statistical target device is determined to have a target event in each historical time period. The video monitoring equipment supports a plurality of event types, the frequency of each event is different, and separate statistical analysis is needed. The statistical method is to obtain the occurrence frequency of each event for m consecutive days, and then calculate the average value of the occurrence frequency of each event. The detailed calculations are shown in table 1.
TABLE 1
Item Day1 Day2 Day3 Daym
Event 1 F1d1 F1d1 F1d1 F1dm
Event 2 F2d2 F2d2 F2d3 F2dm
Event 3 F3d1 F3d2 F3d3 F3dm
Event n Fnd1 Fnd2 Fnd3 Fndm
Description of the invention: fndm represents the number of occurrences counted on day m for the nth event. Referring to fig. 5, a flow chart of determining the number of times of target events occurring in each historical time period in each target channel of the statistical target device may be shown. FnAvg ═ (Fnd1+ Fnd2+ Fnd3+ … + Fndm-FnMax-FnMin)/(m-2) can be expressed as the average number of occurrences of the nth event over the course of a day; FnMax is the maximum value in the nth event occurrence frequency set; fnmin is the minimum value in the nth event occurrence number set.
In the above embodiment, the duration of each target event occurring in each historical time period of each target channel of the statistical target device is the time average duration of the statistically specified channel in fig. 4. The statistical approach for the average duration of a single event is similar to the statistics of the frequency of occurrence of events, and LnAvg ═ (Lnd1/Fnd1+ Lnd2/Fnd2+ Lnd3/Fnd3+ … + Lndm/Fndm-LnMax-LnMin)/(m-2) can represent the average duration of the event occurring during the day of the nth event. Lndm is the cumulative duration of the nth event on the mth day; LnMax is the maximum value in the nth event average duration set; LnMin is the minimum value in the nth set of event average durations.
In the above embodiment, the factors affecting the size of the video stream include: the configured code stream size, the surrounding environment and the like are fixed values, the difference of the surrounding environment at different times of a day is large, and a timing sampling mechanism can be adopted for statistics when the code stream size is determined. And (6) counting.
When the target time period is 1 day, the statistical method is that the current code stream size is sampled at fixed intervals from the zero point every day, and the average code stream size of the current day is calculated by using the statistical data; in order to avoid deviation caused by the accidental events, continuously counting m days, and calculating the average value of the code stream of the m days. The detailed calculations are shown in table 2.
TABLE 2
Figure BDA0003559050560000081
Vsxdm represents the codestream size at the x-sample time on day m. To improve the prediction accuracy of the data, one maximum value data and one minimum value data are removed, and then the average value of the remaining data sets is calculated. The calculation formula of the average code stream size at the m-th day is as follows: VsmAvg ═ (Vs1dm + Vs2dm + Vs3dm + … + Vsxdm-Vsmmax-Vsmmin)/(x-2), wherein VsmAvg is the average code stream size counted on the m day; VsmmAX is the maximum value in the code stream size set counted in the mth day; vsmnin is the maximum value in the set of code stream sizes counted on the m day. The code stream size can be obtained by averaging the counted data of m days, and the calculation formula is as follows: VsAvg ═ Vs1Avg + Vs2Avg + Vs3Avg + … + VsmAvg)/m, and VsAvg is the average video code stream size of the current channel.
In the above embodiment, the multimedia file of the first type may be a picture, and the file size of the multimedia file of the first type may be a picture size. The statistical method of the picture size is similar to the statistical method of the code stream, and the calculation formula is as follows: PicAvg ═ (Pic1Avg + Pic2Avg + Pic3Avg + … + PicmAvg)/m, where PicAvg is the average picture size of the current channel; PicmAvg is the average picture size counted on day m.
In an exemplary embodiment, determining the average total amount based on the plurality of target times, the plurality of durations, the plurality of codestream sizes, and the plurality of file sizes comprises: determining the average times of a plurality of target times, the average duration of a plurality of duration, the average code stream size of a plurality of code stream sizes and the average file size of a plurality of file sizes; for each of the target channels, performing the following operations to determine a second total amount of the first type of multimedia files collected by each of the target channels: determining a first product of the average number of times of occurrence of each target event and the average duration of the target event to obtain a plurality of first products, determining a second duration of a first operation executed by the target device on the target channel, wherein the first operation is a preconfigured operation for acquiring a second type of multimedia file, determining a first sum of the plurality of first products and the second duration, and determining a second product of the first sum and the average code stream size of the target channel as the second total amount; determining a second sum of the second aggregate amount for each of the target channels as the average aggregate amount of the second type of multimedia file. In this embodiment, after obtaining the multiple target times, the multiple duration times, the multiple code stream sizes, and the multiple file sizes, the average times of the target times, the average duration times of the multiple duration times, the average code stream sizes of the multiple code stream sizes, and the average file sizes of the multiple file sizes may be determined.
In the above embodiment, the second type of multimedia file may be a video file. The video total amount related factors of the monitoring equipment are as follows: the method comprises the steps of timing a video recording time period, starting event triggering frequency of the linkage video recording, starting event duration of the linkage video recording, size of code stream, monitoring different channels of equipment and running time of the equipment. When the target time period is 1 day, the flow chart for determining the average total amount of the second type of multimedia files of each target channel can be seen in fig. 6, and the estimated total video size in 1 day time of a single channel can be represented by the formula chnvdeototal ═ (t2+ F1Avg L1Avg + F2Avg L2Avg + … + FnAvg lnvg) × VsAvg; wherein t2 is the total duration of the timer recording time period, i.e. the second duration, and if the timer recording is not started, t2 is 0. The average total amount of the second type of multimedia file may be represented by the formula Tvd ═ Chn1VideoTotal + Chn2VideoTotal + Chn3VideoTotal + … + ChnxVideoTotal. Wherein, Tvd represents the total amount of video generated by the monitoring equipment in 1 day; the ChnxVideoTotal represents the cumulative total amount of video for the xth channel.
In an exemplary embodiment, determining the average total amount based on the plurality of target times, the plurality of durations, the plurality of codestream sizes, and the plurality of file sizes comprises: determining the average times of a plurality of target times, the average duration of a plurality of duration, the average code stream size of a plurality of code stream sizes and the average file size of a plurality of file sizes; for each of the target channels, performing the following operations to determine a third total amount of the first type of multimedia files collected by each of the target channels: determining a first product of the average number of times each of the target events occurs and the average duration of the target events to obtain a plurality of first products; determining a third sum of the plurality of first products, determining a first time interval for the target device to perform a second operation on the target channel, determining a first ratio of the third sum to the first time interval, determining a third duration for the target device to perform a third operation on the target channel, and a second time interval for performing the third operation, determining a second ratio of the third duration to the second time interval, determining a fourth sum of the first ratio and the second ratio, determining the third total as the product of the fourth sum and the average file size, wherein the second operation is to acquire the first type of multimedia file, the time interval is a preconfigured interval, the second operation is a pre-configured operation for acquiring the first type of multimedia file; determining a fifth sum of the third total amount for each of the target channels as the average total amount of the first type of multimedia files. In this embodiment, after obtaining the multiple target times, the multiple duration times, the multiple code stream sizes, and the multiple file sizes, the average times of the target times, the average duration times of the multiple duration times, the average code stream sizes of the multiple code stream sizes, and the average file sizes of the multiple file sizes may be determined.
In the above embodiments, the first type of multimedia file may be a picture. The picture total amount related factors of the monitoring equipment are as follows: the method comprises the steps of timing chart grabbing time interval, event chart grabbing interval, timing chart grabbing time period, event triggering frequency for starting linkage chart grabbing, event duration for starting linkage chart grabbing, size of grabbed pictures, different channels of monitoring equipment and running time of the equipment. When the target time period is 1 day, the flow chart for determining the average total amount of the first type of multimedia files of each target channel can be seen in fig. 7, and the total picture size estimated in 1 day time of a single channel can be represented by the following formula: ChnPicTotal ((t1/p1) + (F1Avg L1Avg + F2Avg L2Avg + … + FnAvg LnAvg)/p2) × PicAvg, wherein t1 is the total duration of the timed grab period, i.e., the third duration, and if the timed grab is not turned on, t1 is 0; p1 is the grab interval of the timing grab, i.e. the first time interval; p2 is the grab interval of the event linked grab, i.e. the second time interval. The second operation is timing image capture, and the third operation is event linkage image capture. The total picture size can be obtained by summing the pictures of all channels, and the correspondence is as follows: tpd ═ Chn1PicTotal + Chn2PicTotal + Chn3PicTotal + … + ChnxPicTotal. Wherein, Tpd represents the total number of pictures generated by the monitoring equipment in 1 day; ChnxPicTotal represents the total number of pictures accumulated for the xth channel.
In one exemplary embodiment, determining an average number of times of the plurality of target numbers comprises: determining a sixth sum of the plurality of target times, determining a first number of the plurality of target times, determining a ratio of the sixth sum to the first number as the average time, or determining a seventh sum of other times, except for the maximum time and the minimum time, included in the plurality of target times, determining a second number of the other times, and determining a ratio of the seventh sum to the second number as the average time; determining an average duration of a plurality of the durations comprises: determining an eighth sum of a plurality of the duration lengths, determining a third number of the plurality of the duration lengths, determining a ratio of the eighth sum to the third number as the average length, or determining a ninth sum of other duration lengths included in the plurality of the duration lengths except for a maximum duration length and a minimum duration length, determining a fourth number of the other duration lengths, and determining a ratio of the ninth sum to the fourth number as the average length; determining an average code stream size of a plurality of the code stream sizes comprises: determining tenth sum values of the sizes of the multiple code streams, determining fifth quantity of the sizes of the multiple code streams, determining the ratio of the tenth sum values to the fifth quantity as the size of the average code stream, or determining eleventh sum values of the sizes of other code streams except the size of the maximum code stream and the size of the minimum code stream in the sizes of the multiple code streams, determining sixth quantity of the sizes of the other code streams, and determining the ratio of the eleventh sum values to the sixth quantity as the size of the average code stream. In this embodiment, when determining the average value, the average value of the plurality of data may be directly determined, or the average value of the remaining data may be determined by removing the maximum number and the minimum number of the plurality of data.
In the above embodiment, when determining the average value, the weight corresponding to each target channel may also be determined, and when determining the average value, the weighted average value of each channel may also be determined.
In one exemplary embodiment, determining the disk quota for each type of the multimedia file based on the first total amount for each type of the multimedia file comprises: determining a sixth sum of the first total amount of each type of the multimedia files; determining a third ratio of the first total amount to the sixth sum value for each type of the multimedia files; determining the disk quota for each type of the multimedia file as the product of the third ratio and the capacity of the target disk. In this embodiment, when the types of the multimedia file include two types, such as a picture and a video, considering that a disk is only used for storing the picture and the video, it is expected that when the device runs to time m, the generated picture and video just use up the corresponding picture quota and video quota, so the following formula exists: q1/q2 ═ s1 ×/s2 ×, Tp/Tv ═ s1 × (1-s1) × c, Tpd ×/Tvd ═ s1 × (1-s1) × c, Tpd/Tvd ═ s1/(1-s1), and s1 ═ Tpd/Tvd/(1+ Tpd/Tvd). By analyzing the above formula, the quota ratio s1 of the picture partition can be calculated from the total number of pictures per day and the total number of videos per day. And further calculating the quota size of the picture partition and the size of the video partition, wherein the corresponding formulas are as follows: q1 ═ s1 ═ c, q2 ═ 1-s1 ═ c.
In the foregoing embodiment, the quota sizes of the picture partition and the video partition are automatically derived and calculated by combining the estimation of the event generation frequency, the estimation of the event duration, the size sampling data of the code stream, and the size sampling data of the picture, and since all service usage scenarios are repeatedly considered and the sampling data is derived from the real device, the accuracy is much higher than the configuration value that the user tries many times. And the characteristics of event diversity of the monitoring equipment are fully considered, and all events are subjected to statistical calculation. The method effectively deals with the emergencies of the events, obtains a relatively accurate value by counting the accumulated times of m days and carrying out average calculation, simultaneously considers the accuracy of the result influenced by the emergencies of the events, and removes the maximum value and the minimum value in the result. Not only the equipment of single channel has been considered, still fully considered multichannel equipment demand, accomplished the full coverage of product. When the total amount of the video and the pictures is calculated, the characteristic that the video pictures have repeatability every day is fully utilized, and a large number of analysis and calculation processes are reduced.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a configuration device of a disk quota is further provided, where the device is used to implement the foregoing embodiment and the preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 8 is a block diagram of a configuration apparatus of a disk quota according to an embodiment of the present invention, and as shown in fig. 8, the apparatus includes:
a first determining module 82, configured to determine a first total amount of each type of multimedia file collected by the target device in the target time period;
a second determining module 84, configured to determine a disk quota for each type of the multimedia file based on the first total amount of each type of the multimedia file;
a configuration module 86, configured to configure a storage space of a target disk according to the disk quota of each type of the multimedia file, where the target disk is used to store the multimedia file acquired by the target device.
In an exemplary embodiment, the first determining module 82 may determine the first total amount of each type of multimedia file collected by the target device in the target time period by: determining an average total amount of each type of the multimedia files collected by the target device in a plurality of historical time periods; determining the average total amount as the first total amount.
In an exemplary embodiment, the first determining module 82 may determine the average total amount of each type of the multimedia files collected by the target device in a plurality of historical time periods by: counting the target times of each target channel of the target equipment when a target event occurs in each historical time period to obtain a plurality of target times; counting the duration of each target event of each target channel of the target equipment in each historical time period to obtain a plurality of durations; determining the code stream size of each target channel of the target equipment in each historical time period to obtain a plurality of code stream sizes; determining the file size of the first type of multimedia file acquired by each target channel of the target equipment in each historical time period to obtain a plurality of file sizes; determining the average total amount based on the target times, the duration, the code stream sizes and the file sizes.
In an exemplary embodiment, the first determining module 82 may determine the average total amount based on a plurality of the target times, a plurality of the durations, a plurality of the codestream sizes, and a plurality of the file sizes by: determining the average times of a plurality of target times, the average duration of a plurality of duration, the average code stream size of a plurality of code stream sizes and the average file size of a plurality of file sizes; for each of the target channels, performing the following operations to determine a second total amount of the first type of multimedia files collected by each of the target channels: determining a first product of the average number of times of occurrence of each target event and the average duration of the target event to obtain a plurality of first products, determining a second duration of a first operation executed by the target device on the target channel, wherein the first operation is a preconfigured operation for acquiring a second type of multimedia file, determining a first sum of the plurality of first products and the second duration, and determining a second product of the first sum and the average code stream size of the target channel as the second total amount; determining a second sum of the second aggregate amount for each of the target channels as the average aggregate amount of the second type of multimedia file.
In an exemplary embodiment, the first determining module 82 may determine the average total amount based on a plurality of the target times, a plurality of the durations, a plurality of the codestream sizes, and a plurality of the file sizes by: determining the average times of a plurality of target times, the average duration of a plurality of duration, the average code stream size of a plurality of code stream sizes and the average file size of a plurality of file sizes; for each of the target channels, performing the following operations to determine a third total amount of the first type of multimedia files collected by each of the target channels: determining a first product of the average number of times each of the target events occurs and the average duration of the target events to obtain a plurality of first products; determining a third sum of the plurality of first products, determining a first time interval for the target device to perform a second operation on the target channel, determining a first ratio of the third sum to the first time interval, determining a third duration for the target device to perform a third operation on the target channel, and a second time interval for performing the third operation, determining a second ratio of the third duration to the second time interval, determining a fourth sum of the first ratio and the second ratio, determining the third total as the product of the fourth sum and the average file size, wherein the second operation is to acquire the first type of multimedia file, the time interval is a preconfigured interval, the second operation is a pre-configured operation for acquiring the multimedia file of the first type; determining a fifth sum of the third total amount for each of the target channels as the average total amount of the first type of multimedia files.
In an exemplary embodiment, the first determination module 82 may determine the average number of the plurality of target numbers by: determining a sixth sum of the plurality of target times, determining a first number of the plurality of target times, determining a ratio of the sixth sum to the first number as the average time, or determining a seventh sum of other times, except for the maximum time and the minimum time, included in the plurality of target times, determining a second number of the other times, and determining a ratio of the seventh sum to the second number as the average time; the first determination module 82 may determine the average duration of the plurality of durations by: determining an eighth sum of a plurality of the duration lengths, determining a third number of the plurality of the duration lengths, determining a ratio of the eighth sum to the third number as the average length, or determining a ninth sum of other duration lengths included in the plurality of the duration lengths except for a maximum duration length and a minimum duration length, determining a fourth number of the other duration lengths, and determining a ratio of the ninth sum to the fourth number as the average length; the first determining module 82 may determine an average bitstream size of a plurality of the bitstream sizes by: determining tenth sum values of the sizes of the multiple code streams, determining fifth quantity of the sizes of the multiple code streams, determining the ratio of the tenth sum values to the fifth quantity as the size of the average code stream, or determining eleventh sum values of the sizes of other code streams except the size of the maximum code stream and the size of the minimum code stream in the sizes of the multiple code streams, determining sixth quantity of the sizes of the other code streams, and determining the ratio of the eleventh sum values to the sixth quantity as the size of the average code stream.
In an exemplary embodiment, the configuration module 86 may determine the disk quota for each type of the multimedia file based on the first total amount of each type of the multimedia file by: determining a sixth sum of the first total amount of each type of the multimedia files; determining a third ratio of the first total amount to the sixth sum value for each type of the multimedia files; determining the disk quota for each type of the multimedia file as the product of the third ratio and the capacity of the target disk.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A configuration method of a disk quota is characterized by comprising the following steps:
determining a first total amount of each type of multimedia file collected by target equipment in a target time period;
determining a disk quota for each type of the multimedia files based on the first total amount of each type of the multimedia files;
and configuring a storage space of a target disk according to the disk quota of each type of the multimedia file, wherein the target disk is used for storing the multimedia file acquired by the target equipment.
2. The method of claim 1, wherein determining the first total amount of each type of multimedia file captured by the target device within the target time period comprises:
determining an average total amount of each type of the multimedia files collected by the target device in a plurality of historical time periods;
determining the average total amount as the first total amount.
3. The method of claim 2, wherein determining the average total amount of each type of the multimedia file collected by the target device over a plurality of historical time periods comprises:
counting the target times of each target channel of the target equipment when a target event occurs in each historical time period to obtain a plurality of target times;
counting the duration of each target event of each target channel of the target equipment in each historical time period to obtain a plurality of durations;
determining the code stream size of each target channel of the target equipment in each historical time period to obtain a plurality of code stream sizes;
determining the file size of the first type of multimedia file acquired by each target channel of the target equipment in each historical time period to obtain a plurality of file sizes;
determining the average total amount based on the target times, the duration, the code stream sizes and the file sizes.
4. The method of claim 3, wherein determining the average total amount based on the plurality of target times, the plurality of duration times, the plurality of codestream sizes, and the plurality of file sizes comprises:
determining the average times of a plurality of target times, the average duration of a plurality of duration, the average code stream size of a plurality of code stream sizes and the average file size of a plurality of file sizes;
for each of the target channels, performing the following operations to determine a second total amount of the first type of multimedia files collected by each of the target channels: determining a first product of the average number of times of occurrence of each target event and the average duration of the target event to obtain a plurality of first products, determining a second duration of a first operation executed by the target device on the target channel, wherein the first operation is a preconfigured operation for acquiring a second type of multimedia file, determining a first sum of the plurality of first products and the second duration, and determining a second product of the first sum and the average code stream size of the target channel as the second total amount;
determining a second sum of the second aggregate amount for each of the target channels as the average aggregate amount of the second type of multimedia file.
5. The method of claim 3, wherein determining the average total amount based on the plurality of target times, the plurality of durations, the plurality of codestream sizes, and the plurality of file sizes comprises:
determining the average times of a plurality of target times, the average duration of a plurality of duration, the average code stream size of a plurality of code stream sizes and the average file size of a plurality of file sizes;
for each of the target channels, performing the following operations to determine a third total amount of the first type of multimedia files collected by each of the target channels: determining a first product of the average number of times each of the target events occurs and the average duration of the target events to obtain a plurality of first products; determining a third sum of the plurality of first products, determining a first time interval for the target device to perform a second operation on the target channel, determining a first ratio of the third sum to the first time interval, determining a third duration for the target device to perform a third operation on the target channel, and a second time interval for performing the third operation, determining a second ratio of the third duration to the second time interval, determining a fourth sum of the first ratio and the second ratio, determining the third total as the product of the fourth sum and the average file size, wherein the second operation is to acquire the first type of multimedia file, the time interval is a preconfigured interval, the second operation is a pre-configured operation for acquiring the first type of multimedia file;
determining a fifth sum of the third total amount for each of the target channels as the average total amount of the first type of multimedia files.
6. The method of claim 4 or 5,
determining an average number of times of the plurality of target numbers comprises: determining a sixth sum of the plurality of target times, determining a first number of the plurality of target times, determining a ratio of the sixth sum to the first number as the average time, or determining a seventh sum of other times, except for the maximum time and the minimum time, included in the plurality of target times, determining a second number of the other times, and determining a ratio of the seventh sum to the second number as the average time;
determining an average duration of a plurality of the durations comprises: determining an eighth sum of a plurality of the duration lengths, determining a third number of the plurality of the duration lengths, determining a ratio of the eighth sum to the third number as the average length, or determining a ninth sum of other duration lengths included in the plurality of the duration lengths except for a maximum duration length and a minimum duration length, determining a fourth number of the other duration lengths, and determining a ratio of the ninth sum to the fourth number as the average length;
determining an average code stream size of a plurality of the code stream sizes comprises: determining tenth sum values of the sizes of the multiple code streams, determining fifth quantity of the sizes of the multiple code streams, determining the ratio of the tenth sum values to the fifth quantity as the size of the average code stream, or determining eleventh sum values of the sizes of other code streams except the size of the maximum code stream and the size of the minimum code stream in the sizes of the multiple code streams, determining sixth quantity of the sizes of the other code streams, and determining the ratio of the eleventh sum values to the sixth quantity as the size of the average code stream.
7. The method of claim 1, wherein determining the disk quota for each type of the multimedia file based on the first total amount for each type of the multimedia file comprises:
determining a sixth sum of the first total amount of each type of the multimedia files;
determining a third ratio of the first total amount to the sixth sum value for each type of the multimedia files;
determining the disk quota for each type of the multimedia file as the product of the third ratio and the capacity of the target disk.
8. An apparatus for configuring disk quotas, comprising:
the first determining module is used for determining a first total amount of each type of multimedia files collected by the target equipment in a target time period;
a second determining module, configured to determine a disk quota for each type of the multimedia file based on a first total amount of each type of the multimedia file;
and the configuration module is used for configuring the storage space of a target disk according to the disk quota of each type of the multimedia file, wherein the target disk is used for storing the multimedia file acquired by the target device.
9. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN202210283498.1A 2022-03-22 2022-03-22 Configuration method and device of disk quota, storage medium and electronic device Pending CN114579060A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210283498.1A CN114579060A (en) 2022-03-22 2022-03-22 Configuration method and device of disk quota, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210283498.1A CN114579060A (en) 2022-03-22 2022-03-22 Configuration method and device of disk quota, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN114579060A true CN114579060A (en) 2022-06-03

Family

ID=81776276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210283498.1A Pending CN114579060A (en) 2022-03-22 2022-03-22 Configuration method and device of disk quota, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114579060A (en)

Similar Documents

Publication Publication Date Title
US7519705B1 (en) Method for computing aggregate traffic between adjacent points of presence in an internet protocol backbone network
EP3639475B1 (en) Qoe-based catv network capacity planning and upgrade system
CN103561354B (en) Method and device for calculating and processing video smoothness
CN112434039A (en) Data storage method, device, storage medium and electronic device
CN110784929B (en) Access resource allocation method, device, equipment and system
CN108391089B (en) Monitoring flow pushing method and device of multi-path camera and monitoring system
CN111372130B (en) User online time counting method and device, electronic equipment and storage medium
EP1985067B1 (en) Monitoring network usage
US9559911B1 (en) Forecasting link utilization between points of presence in an IP network
CN113630616A (en) Live broadcast edge node resource control method and system
CN110620699A (en) Message arrival rate determination method, device, equipment and computer readable storage medium
CN114189705A (en) Live broadcast card pause processing method and system
CN115150473A (en) Resource scheduling method, device and storage medium
CN111061588A (en) Method and device for locating database abnormal source
CN114579060A (en) Configuration method and device of disk quota, storage medium and electronic device
CN110751045A (en) Fault recording method, system and terminal equipment
JP2007172133A (en) Calculation system, calculation method and calculation computer program for increase and decrease in charge for resource use
CN112771816B (en) Method and device for predicting network rate
CN116168045A (en) Method and system for dividing sweeping lens, storage medium and electronic equipment
CN115037968A (en) Video playing method and device, storage medium and electronic device
CN112612673B (en) Analysis method and device for dial testing log, storage medium and electronic device
CN113079062B (en) Resource adjusting method and device, computer equipment and storage medium
CN115705380A (en) Live broadcast room heat processing method and device and server
CN111464629B (en) Hot spot data determination method and device
CN113438555A (en) Bandwidth detection method and device, computer equipment and storage medium

Legal Events

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