Storage medium capacity prediction method and system, equipment and storage medium
By predicting the future write data volume and failure capacity of the storage medium, users can know whether the storage medium is available in the future time, solving the problem that the storage medium cannot accurately predict the service life of the storage medium in the prior art, and providing a longer preparation time for replacement media, reduces risks.
Patent Information
- Application Number
- CN202410975516.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-29
AI Technical Summary
Users cannot accurately predict whether the storage media can be used normally within the preset time in the future. The existing technology can only provide warning information about insufficient storage media space through the number of cycle rewritten times and SMART parameters, but it is impossible to specifically predict future usage.
By obtaining the current write data amount and storage status information of the target storage medium, predicting the new write data amount and failure capacity in the future, and calculating the predicted effective capacity of the preset time in the future. Users can know whether the storage medium is in the future based on this. Still available during the time.
Accurate prediction of the future use of storage media is achieved, providing longer preparation time to replace storage media, avoiding the risks of insufficient life.
Smart Images

Figure CN119045988A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data storage, and in particular to a storage medium capacity prediction method and system, device, and storage medium. Background Art
[0002] Various storage media play an important role in people's lives, but storage media, like other electronic products, will be damaged as time goes by.
[0003] At present, in order to enable users to understand the usage of storage media in a timely manner, early warning information of insufficient storage medium space can be output to users based on the statistical value of the storage medium's cycle erase and write times and the service life ratio in the smart parameters (that is, the ratio of the normal available capacity of the storage medium to the total capacity).
[0004] Even so, the user still cannot know specifically whether the storage medium can still be used normally within a preset time in the future. Summary of the invention
[0005] The present application at least provides a storage medium capacity prediction method and system, device, and storage medium, so as to at least enable a user to know whether the storage medium can still be used normally within a preset time in the future.
[0006] The first aspect of the present application provides a storage medium capacity prediction method, comprising: obtaining the current amount of written data and storage status information of the target storage medium; wherein the storage status information includes at least the current effective capacity of the target storage medium; based on the current amount of written data, obtaining the predicted amount of written data that will be added at a preset time in the future; based on the current amount of written data, the predicted amount of written data and the storage status information, predicting the newly added failure capacity of the target storage medium; based on the current effective capacity and the newly added failure capacity, obtaining the predicted effective capacity of the target storage medium at the preset time in the future.
[0007] Therefore, the future write data volume can be predicted based on the current write data volume, thereby predicting the new failure capacity of the future target storage medium, and obtaining the predicted effective capacity of the storage medium when the future preset time is reached. The user can know whether the target storage medium can still be used normally when the future preset time is reached based on the predicted effective capacity.
[0008] A second aspect of the present application provides an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the storage medium capacity prediction method of the first aspect.
[0009] The third aspect of the present application provides a storage medium capacity prediction system, comprising a camera, a video recorder and a storage medium, wherein the camera and the storage medium are respectively connected to the video recorder, and the video recorder is at least used to receive and encode the real-time code stream of the camera to write the encoded data to the storage medium, and the video recorder is the electronic device of the second aspect mentioned above.
[0010] A fourth aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the storage medium capacity prediction method of the first aspect described above is implemented.
[0011] The above scheme can predict the future write data volume based on the current write data volume, thereby predicting the new failure capacity of the future target storage medium, and obtaining the predicted effective capacity of the storage medium when the future preset time is reached. The user can know whether the target storage medium can still be used normally when the future preset time is reached based on the predicted effective capacity.
[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0014] Figure 1 It is a flowchart of an embodiment of a storage medium capacity prediction method of the present application;
[0015] Figure 2 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;
[0016] Figure 3 It is a schematic diagram of the framework of an embodiment of a storage medium capacity prediction device of the present application;
[0017] Figure 4 It is a schematic diagram of the framework of another embodiment of the storage medium capacity prediction device of the present application;
[0018] Figure 5 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0019] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0020] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0021] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0022] In this document, different embodiments may be combined with each other unless they conflict with each other.
[0023] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of a storage medium capacity prediction method of the present application; specifically, the storage medium capacity prediction method includes:
[0024] Step S20: Acquire the current written data volume and storage status information of the target storage medium; wherein the storage status information at least includes the current effective capacity of the target storage medium.
[0025] Step S40: based on the current written data volume, obtain the predicted written data volume that will be added at a preset time in the future.
[0026] Step S60: predicting the newly added failure capacity of the target storage medium based on the current written data volume, the predicted written data volume and the storage status information.
[0027] Step S80: Based on the current effective capacity and the newly added failed capacity, obtain the predicted effective capacity of the target storage medium at a preset time in the future.
[0028] Through the storage medium capacity prediction method proposed in the present application, the future write data volume can be predicted based on the current write data volume, thereby predicting the newly added failure capacity of the future target storage medium, and obtaining the predicted effective capacity of the storage medium when the future preset time is reached. The user can know whether the target storage medium can still be used normally when the future preset time is reached based on the predicted effective capacity corresponding to the future preset time.
[0029] It should be noted that the storage medium capacity prediction method proposed in the present application can be used to predict the capacity of various storage media, for example, the capacity of hard disks, floppy disks, optical disks, memory cards, etc.
[0030] The storage status information may be SMART information, which may include the current effective capacity of the target storage medium. The storage status information may also be information in other formats, and in addition to including the current effective capacity of the target storage medium, may also carry other information, which is not limited in this application.
[0031] According to different storage strategies adopted by the target storage medium, the current effective capacity of the target storage medium can be the capacity of the current target storage medium that has not been damaged, or the capacity of the current target storage medium that has not been damaged and does not store information. For example, when the target storage medium adopts a circular storage strategy, that is, it can automatically clean up the storage space and rewrite data when the storage space is insufficient or other conditions are met, the current effective capacity can refer to the capacity of the target storage medium that has not been damaged. When the target storage medium has no automatic cleaning mechanism, the current effective capacity of the target storage medium can refer to the capacity of the current target storage medium that has not been damaged and does not store information.
[0032] In some embodiments, multiple predictions can be made based on the current effective capacity and the newly added failure capacity to obtain the predicted effective capacity at multiple future times, and the predicted effective capacity at multiple future times can be compared with a preset threshold. When the predicted effective capacity at a certain time in the future is predicted to be lower than the preset threshold, the prediction can be stopped, and the time and the corresponding predicted effective capacity can be reported. For example, the predicted effective capacity for the next 3 hours, 4 hours, 6 hours, etc. can be predicted multiple times. If the predicted effective capacity for the next 6 hours is lower than the preset threshold, it is reported that the predicted effective capacity will be lower than the preset threshold after the next 6 hours.
[0033] In some embodiments, the future amount of newly written data can also be predicted based on the current effective capacity and the current amount of written data. The time when the effective capacity is predicted to be lower than a preset threshold can be calculated based on the future amount of newly written data. For example, after obtaining the current effective capacity and the current amount of written data, the predicted amount of written data can be used to calculate that the effective capacity will be lower than the preset threshold after 5 hours in the future, which means that the target storage medium will run out of space after 5 hours.
[0034] Through the above-mentioned embodiments, it is possible to output warnings from the spatial and temporal levels, thereby providing users with a longer preparation time to replace storage media and avoiding the risks caused by insufficient storage medium life.
[0035] In some embodiments, obtaining the current amount of written data of the target storage medium in step S20 may include:
[0036] Step S21: Based on the real-time code stream statistics, the current written data volume is calculated.
[0037] In some embodiments, the bit rate control method of the code stream can be a constrained variable bit rate (CVBR) method, a constant bit rate (CBR) method, a dynamic bit rate (VBR) method, etc., and this application does not impose any restrictions on this.
[0038] In some embodiments, the amount of written data may be calculated based on the real-time code stream statistics and the duration of the real-time code stream statistics. For example, the real-time code stream statistics may be multiplied by the duration to obtain the data amount.
[0039] In some embodiments, obtaining the predicted amount of written data to be added at a preset time in the future based on the current amount of written data in step S40 includes:
[0040] Step S41: based on the real-time code stream statistics, predict the predicted code stream statistics within a preset time in the future.
[0041] In some embodiments, a code stream model can be established. The predicted code stream statistics within a preset time in the future are predicted using the real-time code stream statistics and the code stream model. The predicted code stream statistics within a preset time in the future are predicted based on the real-time code stream statistics. The predicted code stream statistics within a preset time in the future can be predicted based on the real-time code stream statistics within a certain period of time. For example, the real-time code stream statistics within the current and past one hour can be used to predict multiple continuous predicted code stream statistics within the next three hours using the code stream prediction model. It can also be based on the real-time code stream statistics at a certain moment to predict the predicted code stream statistics within a preset time in the future. For example, the current real-time code stream statistics can be used to predict multiple continuous predicted code stream statistics within the next three hours.
[0042] Step S42: Calculate the predicted amount of written data to be added at a preset time in the future based on the predicted bitstream statistics.
[0043] In some embodiments, the predicted amount of data to be written at a preset time in the future can be calculated based on the predicted bitstream statistics and the duration of the predicted bitstream statistics. For example, the predicted bitstream statistics can be multiplied by the duration to obtain the data amount. Then, the data amounts calculated based on multiple consecutive predicted bitstream statistics and the corresponding durations within the preset time in the future are added together to obtain the predicted amount of data to be written when the preset time in the future is reached.
[0044] Therefore, by using the current write amount, the predicted amount of new write data to be added at a preset time in the future can be obtained. Based on the current data writing situation, the subsequent storage medium usage can be predicted, making the prediction more accurate and thereby improving the reliability of the predicted effective capacity.
[0045] In some embodiments, the above step S60 may include:
[0046] Step S61: based on the current written data amount, the predicted written data amount and the storage status information, the predicted erasure times of the target storage medium are obtained.
[0047] In some embodiments, the predicted erasure times can ensure the newly added erasure times of the target storage medium when the preset time in the future is reached. The target storage medium can be divided into multiple parts. When writing data to the target storage medium, the data can be written to each part of the target storage medium in sequence, for example, after part A is full, write to part B, after part B is full, write to part C, and so on. When erasing each part, the erasure times of each part can be recorded. Therefore, the predicted erasure times of the target storage medium can characterize the newly added erasure times of each part of the target storage medium when the preset time in the future is reached. For the target storage medium adopting the above-mentioned circular storage strategy, when each part of the target storage medium is full, that is, when there is insufficient remaining space in the target storage medium, the storage space can be cleaned up, for example, the information of part A can be erased, and the data to be written can be written to part A. Therefore, the predicted erasure times can be calculated based on the current amount of written data, the predicted amount of written data, and the storage status information. For example, the current effective capacity in the storage status information may be divided by the sum of the current written data volume and the predicted written data volume to obtain the predicted number of erasures and writes.
[0048] For example, a storage medium may contain multiple blocks. Each time an erase operation is performed on a block in a storage unit, the number of write / erase cycles for the block is counted by one. The number of write / erase cycles for the block is the number of erase operations on the block. The number of write / erase cycles for the ith block may be recorded as Ei. When an erase operation is detected, the number of write / erase cycles for the block is incremented by one based on the original number. The information on the number of write / erase cycles for each block in the storage unit may be stored as metadata and double-backed up to prevent data from being unusable after loss.
[0049] In some embodiments, in order to extend the service life of the storage medium as much as possible, a wear leveling strategy can be adopted. For example, the number of erase and write times of each block of the storage medium can be made as even as possible, so as to obtain the number of erase and write times based on the existing balance; the number of erase and write times of each block can also be counted, and the average value of the count can be calculated. When the number of erase and write times reaches a certain value, an early warning can be issued.
[0050] Therefore, by calculating the predicted erasure times, it is possible to obtain the portion of the target storage medium whose erasure times reach a prescribed damage standard when a preset time in the future is reached.
[0051] Step S62: Based on the predicted erasure times, predict the newly added failure capacity of the target storage medium; the predicted newly added failure capacity represents the capacity of the storage medium whose newly added erasure times reach the damage standard.
[0052] In some embodiments, the newly added failed parts in the target storage medium can be predicted based on the predicted number of erase and write times. For example, it can be predicted that part A and part B may fail at a preset time in the future.
[0053] In addition to determining whether the storage medium has reached the damage standard based on the number of times the storage medium has been erased and written, it is also possible to determine whether the storage medium has reached the damage standard by monitoring the monitoring status of the storage medium, and this application does not impose any restrictions on this.
[0054] In some embodiments, the above step S80 may include:
[0055] Step S81: Calculate the difference between the current effective capacity and the newly added failed capacity to obtain the predicted effective capacity of the target storage medium at a preset time in the future.
[0056] With reference to the foregoing embodiment, the predicted effective capacity of the target storage medium at a preset time in the future may refer to the undamaged capacity of the target storage medium at the preset time in the future, or may refer to the undamaged capacity of the target storage medium without storing information at the preset time in the future, which is specifically adjusted according to the storage policy of the target storage medium.
[0057] By predicting the effective capacity of the target storage medium until a preset time in the future, we can know the remaining effective capacity if the target storage medium continues to be used until the preset time in the future according to the current usage conditions, and thus know whether the target storage medium can still be used normally at the preset time in the future.
[0058] In some embodiments, the method may further include:
[0059] Step S90: In response to the predicted effective capacity of the target storage medium at a preset time in the future being lower than a preset threshold, output a first warning message; the first warning message is used to indicate that the effective capacity of the target storage medium will be lower than the preset threshold at a preset time in the future.
[0060] When the predicted effective capacity of the target storage medium at a preset time in the future is lower than a preset threshold, it means that if the target storage medium continues to be used according to the current usage conditions, then when the preset time in the future is reached, the effective capacity will be lower than the preset threshold, which may affect normal use, thereby outputting a first warning message. The first warning message can more intuitively remind that the normal use of the target storage medium will be affected at the preset time in the future.
[0061] In some embodiments, the method may further include:
[0062] Step S100: in response to reaching a preset future time, obtaining the latest storage status information.
[0063] Step S110: Based on the latest storage status information, the predicted effective capacity of the target storage medium up to a preset time in the future is corrected.
[0064] Assume that in step S80, the predicted effective capacity of the target storage medium in the next 3 hours is obtained. Then, after 3 hours, the latest storage status information of the target storage medium can be obtained, and the storage status information can include the latest effective capacity of the target storage medium. And the predicted effective capacity is corrected according to the latest storage status information. For example, if the predicted effective capacity indicates that parts A, B, and C in the target storage medium are effective capacity, and the latest storage status information indicates that part A of the target storage medium is invalid, correction is performed; or, if the predicted effective capacity indicates that parts A, B, and C in the target storage medium are invalid capacity, and the latest storage status information indicates that part A of the target storage medium is valid, correction is also required.
[0065] In some embodiments, a second warning message may also be output in response to the current effective capacity being less than a preset threshold.
[0066] In some embodiments, the preset threshold can be set according to user needs, or can be pre-set according to the original capacity of the target storage medium, and this application does not limit it.
[0067] In some embodiments, in response to the current effective capacity being less than a preset threshold, the encoding parameters used to encode the code stream may be adjusted to reduce the amount of data written to the target storage medium.
[0068] By reducing the amount of data written when the current effective capacity is less than the preset threshold, the remaining available time of the target storage medium can be extended, which in turn helps provide users with more preparation time to replace the storage medium and reduce the risk of insufficient life of the target storage medium.
[0069] In some embodiments, in response to the predicted effective capacity of the target storage medium at a preset time in the future being less than a preset threshold, the encoding parameters used to encode the code stream may be adjusted to reduce the amount of data written to the target storage medium.
[0070] By reducing the amount of data written when the predicted effective capacity is less than the preset threshold, the remaining available time of the target storage medium can be extended, which in turn helps provide users with more preparation time to replace the hard disk and reduce the risk of insufficient life of the target storage medium.
[0071] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0072] See also Figure 2 , Figure 2 1 is a schematic diagram of a framework of an embodiment of an electronic device of the present application; the electronic device 20 includes a memory 21 and a processor 22 coupled to each other, and the processor 22 is used to execute program instructions stored in the memory 21 to implement the storage medium capacity prediction method of the first aspect. In a specific implementation scenario, the electronic device 20 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 20 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.
[0073] Specifically, the processor 22 is used to control itself and the memory 21 to implement the steps of any of the above-mentioned storage medium capacity prediction method embodiments. The processor 22 can also be called a CPU (Central Processing Unit). The processor 22 may be an integrated circuit chip with signal processing capabilities. The processor 22 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 22 can be implemented by an integrated circuit chip.
[0074] The above scheme can predict the future write data volume based on the current write data volume, thereby predicting the new failure capacity of the future target storage medium, and obtaining the predicted effective capacity of the storage medium when the future preset time is reached. The user can know whether the target storage medium can still be used normally when the future preset time is reached based on the predicted effective capacity.
[0075] See also Figure 3 , Figure 3 It is a framework diagram of an embodiment of a storage medium capacity prediction device of the present application; the storage medium capacity prediction system 30 includes a camera 31, a video recorder 32 and a storage medium 33, the camera 31 and the storage medium 33 are respectively connected to the video recorder 32, the video recorder 32 is at least used to receive and encode the real-time code stream of the camera 31 to write the encoded data to the storage medium 33, and the video recorder 32 is the electronic device 20 of the second aspect mentioned above.
[0076] In some embodiments, please refer to Figure 4 , Figure 4 It is a schematic diagram of the framework of another embodiment of the storage medium capacity prediction device of the present application; specifically, the video recorder 32 may include an encoding module 321, an early warning module 322 and a strategy adjustment module 323. The encoding module 321 can be used to receive and encode the real-time code stream of the camera 31, for example, it can be encoded according to encoding methods such as CBR / VBR / CVBR; the early warning module 322 can be connected to the encoding module 321 to receive the real-time code stream from the encoding module 321; the early warning module 322 can also be connected to the storage medium to receive the storage status information of the storage medium, such as SMART information, so as to obtain the predicted effective capacity at a preset time in the future according to the real-time code stream value and the storage status information. The strategy adjustment module 323 can be connected to the encoding module 321 and the early warning module 322, and can adjust the encoding strategy of the encoding module according to the output result of the early warning module.
[0077] The above scheme can predict the future write data volume based on the current write data volume, thereby predicting the new failure capacity of the future target storage medium, and obtaining the predicted effective capacity of the storage medium when the future preset time is reached. The user can know whether the target storage medium can still be used normally when the future preset time is reached based on the predicted effective capacity.
[0078] See also Figure 5 , Figure 5 The computer-readable storage medium 50 stores program instructions 501 that can be executed by a processor, and the program instructions 501 are used to implement the steps of any of the above storage medium capacity prediction method embodiments.
[0079] The above scheme can predict the future write data volume based on the current write data volume, thereby predicting the new failure capacity of the future target storage medium, and obtaining the predicted effective capacity of the storage medium when the future preset time is reached. The user can know whether the target storage medium can still be used normally when the future preset time is reached based on the predicted effective capacity.
[0080] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0081] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0082] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0083] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0084] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0085] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
Claims
1. A storage medium capacity prediction method, characterized in that: include: Acquire the current written data volume and storage status information of the target storage medium; wherein the storage status information at least includes the current effective capacity of the target storage medium; Based on the current written data volume, a predicted written data volume that will be added at a preset time in the future is obtained; Predicting the newly added failure capacity of the target storage medium based on the current written data volume, the predicted written data volume, and the storage status information; Based on the current effective capacity and the newly added failed capacity, the predicted effective capacity of the target storage medium at the preset future time is obtained.
2. The method according to claim 1, characterized in that The predicting, based on the current amount of written data, the predicted amount of written data, and the storage status information, the newly added failure capacity of the target storage medium includes: Obtaining a predicted number of erasures and writes of the target storage medium based on the current amount of written data, the predicted amount of written data, and the storage state information; Based on the predicted number of erasures and writes, a newly added failure capacity of the target storage medium is predicted; the newly added failure capacity represents the capacity of the storage medium whose newly added number of erasures and writes reaches a damage standard.
3. The method according to claim 1, characterized in that The obtaining of the current amount of written data of the target storage medium comprises: Based on the real-time code stream statistics, the current written data amount is calculated; The obtaining, based on the current written data volume, of the predicted newly added written data volume at a preset time in the future includes: Based on the real-time bitstream statistics, predict the predicted bitstream statistics within a preset time in the future; The predicted amount of written data added at a preset time in the future is calculated based on the predicted code stream statistics.
4. The method according to claim 1, characterized in that: The obtaining, based on the current effective capacity and the newly added failure capacity, of the predicted effective capacity of the target storage medium at the preset future time comprises: The difference between the current effective capacity and the newly added failure capacity is calculated to obtain the predicted effective capacity of the target storage medium at the preset future time.
5. The method according to claim 1, characterized in that In response to the predicted effective capacity of the target storage medium at the future preset time being lower than a preset threshold, outputting first warning information; The first warning information is used to indicate that at a preset time in the future, the effective capacity of the target storage medium will be lower than a preset threshold.
6. The method according to claim 1 or 5, characterized in that: The method further comprises: In response to reaching the future preset time, acquiring the latest storage status information; Based on the latest storage status information, the predicted effective capacity of the target storage medium up to the future preset time is corrected.
7. The method according to claim 1, characterized in that The method further comprises: In response to the current effective capacity being less than a preset threshold, a second warning message is output.
8. The method according to claim 1 or 7, characterized in that: The method further comprises: In response to the current effective capacity being less than a preset threshold, an encoding parameter for encoding a code stream is adjusted to reduce an amount of data written to the target storage medium.
9. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the storage medium capacity prediction method according to any one of claims 1 to 8.
10. A storage medium capacity prediction system, characterized in that: It includes a camera, a video recorder and a storage medium, wherein the camera and the storage medium are respectively connected to the video recorder, and the video recorder is at least used to receive and encode the real-time code stream of the camera to write the encoded data to the storage medium, and the video recorder is the electronic device described in claim 9.
11. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the storage medium capacity prediction method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Bank informatization intelligent management method and system based on big data
CN119248510A
Data writing method and device based on load balancing and storage medium
CN120406824A
