Frame Loss Judgment Method, Device, Storage Server, and Readable Storage Medium

By calculating the actual size and expected size of the video data, we can determine whether frame drops in the distributed storage system, which solves the problem of inefficiency in the prior art and achieves efficient and accurate frame drop judgments.

CN114528171BActive Publication Date: 2025-07-25CHONGQING UNISINSIGHT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210179046.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2025-07-25
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

The prior art is inefficient and low accuracy when judging whether frames are dropped during the video data storage process in a distributed storage system, and requires a lot of time and human resources.

Method used

By obtaining the actual size of the video data stored by the target front-end monitoring device to the storage server, and calculating the expected size of the video data based on the historical traffic received between the start time and the end time, and comparing the actual size and the expected size to determine whether the frame is dropped.

Benefits of technology

It improves the efficiency of frame drop judgment, avoids manual playback of video, thus saving time and human resources, and improving the accuracy of judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114528171B_ABST
    Figure CN114528171B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a method, a device, a storage server and a readable storage medium for judging frame loss, which relate to the field of storage system testing. The method provided by the embodiments of the present invention first obtains the actual size of video data stored by a target front-end monitoring device in the storage server; then determines the expected size of the video data according to the first historical traffic received between the start time and the end time of storing the video data, wherein the first historical traffic comes from a plurality of front-end monitoring devices; finally, judges whether frame loss occurs when the video data is stored in the storage server according to the actual size and the expected size, without the need for manual playback of each video, thereby improving the judgment efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage system testing. Specifically, it relates to a method and device for judging frame loss, a storage server, and a readable storage medium. Background Art

[0002] Distributed storage systems have great advantages in terms of performance, scalability, storage capacity, and reliability, and have been used as storage solutions for video surveillance in recent years.

[0003] A set of distributed storage systems can undertake the storage tasks of tens of thousands of front-end monitoring devices. For developers and testers of distributed storage systems, the most important task is to ensure the integrity of the stored video data and quickly and accurately discover which front-end monitoring device's video data has frame loss during the process of being stored in which storage server of the distributed storage system.

[0004] Currently, there are mainly two methods for judging whether frame loss occurs during the storage of video data. One is to play back the video on a device with a playback function and judge whether frame loss occurs based on whether the video has skipped seconds or screen distortion. This method requires a large amount of time and human resources and has low efficiency. The other is to retrieve frame loss keywords through logs, issue a frame loss alarm for the entire distributed storage system, obtain the time point when frame loss occurs, and then manually check whether each video has skipped seconds or screen distortion at this time point to locate the front-end monitoring device and storage server where frame loss occurs. Although this method does not require a complete playback of each video, due to tens of thousands of front-end monitoring devices being connected to the distributed storage system, testers still face a huge workload. Summary of the Invention

[0005] In order to overcome the deficiencies of the prior art, embodiments of the present invention provide a method and device for judging frame loss, a storage server, and a readable storage medium, which can improve the efficiency of frame loss judgment. The specific technical solutions are as follows:

[0006] In a first aspect, an embodiment of the present invention provides a method for judging frame loss, which is applied to a storage server in a distributed storage system. The storage server is communicatively connected to a plurality of front-end monitoring devices. The method includes:

[0007] Obtain the actual size of the video data stored by a target front-end monitoring device among the plurality of front-end monitoring devices to the storage server;

[0008] Determine the expected size of the video data according to the first historical traffic received between the start time and the end time when storing the video data, where the first historical traffic comes from the plurality of front-end monitoring devices;

[0009] Based on the actual size and the expected size, determine whether frames are lost when the video data is stored in the storage server.

[0010] Specifically, before the step of determining the expected size of the video data according to the first historical traffic received between the start time and the end time of storing the video data, the method further includes:

[0011] Obtain the second historical traffic received between the start time and the end time, where the second historical traffic is the total traffic received by the server;

[0012] Calculate the first historical traffic according to the second historical traffic, the first number of storage servers in the distributed storage system, and the erasure ratio of the distributed storage system.

[0013] Specifically, the step of determining the expected size of the video data according to the first historical traffic received between the start time and the end time of storing the video data includes:

[0014] Determine the storage duration of the video data according to the start time and the end time;

[0015] Calculate the bit rate of the target front-end monitoring device according to the second number of front-end monitoring devices accessing the distributed storage system and the first historical traffic;

[0016] Calculate the expected size of the video data according to the bit rate and the storage duration.

[0017] Specifically, all front-end monitoring devices accessing the distributed storage system have the same data transmission configuration. The step of calculating the bit rate of the target front-end monitoring device according to the second number of front-end monitoring devices accessing the distributed storage system and the first historical traffic includes:

[0018] Use the ratio of the first historical traffic to the second number as the bit rate of the target front-end monitoring device.

[0019] Specifically, among all front-end monitoring devices accessing the distributed storage system, at least two of the front-end monitoring devices have different data transmission configurations. The step of calculating the bit rate of the target front-end monitoring device according to the second number of front-end monitoring devices accessing the distributed storage system and the first historical traffic includes:

[0020] Calculate the bit rate reference value of the target front-end monitoring device according to the actual size and the storage duration of the video data stored by the target front-end monitoring device in the storage server;

[0021] Determine the bitrate of the target front-end monitoring device according to the bitrate reference value and the preset conversion coefficient, where the preset conversion coefficient is obtained according to the bitrate reference values of the second number of front-end monitoring devices and the first historical traffic volume.

[0022] Specifically, before the step of determining the bitrate of the target front-end monitoring device according to the reference value and the preset conversion coefficient, the method further includes:

[0023] Determine the minimum bitrate reference value among the bitrate reference values of all the front-end monitoring devices;

[0024] Obtain the preset conversion coefficient according to the ratio of the bitrate reference values of all the front-end monitoring devices to the minimum bitrate reference value and the first historical traffic volume.

[0025] Specifically, the step of determining whether frames are lost when the video data is stored in the storage server according to the actual size and the expected size includes:

[0026] Calculate the error value between the actual size and the expected write size;

[0027] If the error value is greater than the preset value, frames are lost when the video data is stored in the storage server.

[0028] In a second aspect, an embodiment of the present invention provides a frame loss judgment device, which is applied to a storage server in a distributed storage system. The storage server is communicatively connected to a plurality of front-end monitoring devices. The device includes:

[0029] An acquisition module, configured to acquire the actual size of the video data stored in the storage server by a target front-end monitoring device among the plurality of front-end monitoring devices;

[0030] A determination module, configured to determine the expected size of the video data according to the first historical traffic volume received between the start time and the end time of storing the video data, where the first historical traffic volume comes from the plurality of front-end monitoring devices;

[0031] A judgment module, configured to judge whether frames are lost when the video data is stored in the storage server according to the actual size and the expected size.

[0032] In a third aspect, an embodiment of the present invention provides a storage server, including: a memory and a processor. The memory is used to store a computer program; the processor is configured to execute the method described in the first aspect when calling the computer program.

[0033] Fourthly, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0034] Compared with the prior art, for a frame loss judgment method, device, storage server, and readable storage medium provided by an embodiment of the present invention, first, the actual size of video data stored by a target front-end monitoring device in the storage server is obtained; then, according to the first historical traffic received between the start time and the end time of storing the video data, the expected size of the video data is determined, where the first historical traffic comes from multiple front-end monitoring devices; finally, according to the actual size and the expected size, it is judged whether frame loss occurs when the video data is stored in the storage server. Since the embodiment of the present invention judges whether frame loss occurs when the storage server stores the video data sent by the target front-end monitoring device by comparing the actual size and the expected size of the video data stored by the target front-end monitoring device in the storage server, and there is no need to manually play back each video, the judgment efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0036] Figure 1 It is a schematic diagram of an application scenario of a distributed storage system provided by an embodiment of the present invention;

[0037] Figure 2 It is a schematic block diagram of the structure of a storage server provided by an embodiment of the present invention;

[0038] Figure 3 It is a schematic flowchart of a frame loss judgment method provided by an embodiment of the present invention;

[0039] Figure 4 It is a schematic flowchart of a method for obtaining the first historical traffic provided by an embodiment of the present invention;

[0040] Figure 5 It is a schematic flowchart of a method for determining the expected size of video data provided by an embodiment of the present invention;

[0041] Figure 6 It is a schematic flowchart of a method for judging whether frame loss occurs when video data is stored in a storage server provided by an embodiment of the present invention;

[0042] Figure 7A block diagram of a frame loss judgment device provided by an embodiment of the present invention.

[0043] Icons: 100 - storage server; 110 - memory; 120 - processor; 200 - front - end monitoring device; 300 - frame loss judgment device; 301 - acquisition module; 302 - determination module; 303 - judgment module. Detailed implementation manners

[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.

[0045] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0046] It should be noted that: Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0047] In the description of the present invention, it should be noted that if terms such as "upper", "lower", "inner", "outer", etc. are used to indicate the orientation or positional relationship, it is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation of the present invention.

[0048] In addition, if terms such as "first", "second", etc. are used only for distinguishing descriptions, they cannot be understood as indicating or implying relative importance.

[0049] It should be noted that, without conflict, the features in the embodiments of the present invention can be combined with each other.

[0050] Please refer to Figure 1 , Figure 1Schematic diagram of an application scenario of a distributed storage system provided by an embodiment of the present invention. Multiple front-end monitoring devices 200 are connected to the distributed storage system. The distributed storage system includes multiple storage servers 100. Each storage server 100 is communicatively connected to multiple front-end monitoring devices 200. Each storage server 100 can be an independent computer device, or a cluster composed of multiple computer devices, or a storage array, etc. The front-end monitoring device 200 can be a network camera. The front-end monitoring device 200 encodes and compresses video images to obtain video data and sends it to the storage server 100 of the distributed storage system for storage. Compared with the traditional method of using a centralized storage server 100 to store all data, the distributed storage system uses multiple storage servers 100 to jointly undertake the video data storage tasks of multiple front-end monitoring devices 200, and has higher reliability, availability, and storage efficiency, and is also easy to expand.

[0051] For developers and testers of the distributed storage system, the most important task is to ensure the integrity of the stored video data, quickly and accurately detect video data with lost frames, and accurately locate the front-end monitoring device and storage server corresponding to the video data with lost frames. Currently, the methods for judging whether video data is lost during storage are all implemented based on whether there is a jump in seconds or a frozen screen phenomenon when playing back the video, which requires a large amount of time and human resources, has low efficiency, and because playing back the video requires relying on a device with a playback function, it may also be due to a malfunction of the device for playing back the video itself that causes a jump in seconds or a frozen screen, so the prior art also has the problem of low judgment accuracy.

[0052] Based on Figure 1 , an embodiment of the present invention provides a method for judging lost frames. The execution subject of this method is any one of the storage servers in the distributed storage system. Further, please refer to Figure 2 , Figure 2 Schematic block diagram of a structure of a storage server 100 provided by an embodiment of the present invention. The storage server may include a memory 110 and a processor 120.

[0053] Among them, the processor 120 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the method for judging lost frames provided by the following method embodiments.

[0054] The memory 110 can be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or can also be an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium, or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 110 can exist independently and be connected to the processor 120 through a communication bus. The memory 110 can also be integrated with the processor 120. Among them, the memory 110 is used to store machine-executable instructions for implementing the solution of this application. The processor 120 is used to execute the machine-executable instructions stored in the memory 110 to implement the following method embodiments.

[0055] Since the storage server provided by the embodiments of the present invention is another implementation form of the frame loss judgment method provided by the following method embodiments, the technical effects that can be obtained thereby can refer to the following method embodiments and will not be elaborated herein.

[0056] The embodiments of the present invention also provide a readable storage medium containing computer-executable instructions, and the computer-executable instructions can be used to perform relevant operations in the frame loss judgment method provided by the following method embodiments when executed.

[0057] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of a frame loss judgment method provided by an embodiment of the present invention. The method includes steps S101, S102, and S103.

[0058] S101, Obtain the actual size of the video data stored by the target front-end monitoring device in the storage server.

[0059] In the embodiments of the present invention, the storage server can store video data of multiple front-end monitoring devices. The video data of each front-end monitoring device is written into the data area of the storage server. The target front-end monitoring device can be any one of the above multiple front-end monitoring devices.

[0060] In an embodiment of the present invention, the actual size of video data may be the size of the storage space occupied by the video data in the storage server. As a specific implementation, if the video data is stored in the data area of the storage server in the form of a file, the storage server may call the file scanning interface to obtain the size of the video file corresponding to the target front-end monitoring device. Generally, the video file also includes an index area with a fixed size. The difference between the size of the video file and the size of the index area is used as the actual size of the video data.

[0061] It can be understood that there may also be various abnormal factors that cause the video data not to be written into the corresponding data area in the storage server. The embodiment of the present invention performs frame loss judgment on the video data that has been written into the data area. Of course, if there is no video data in the data area, frame loss judgment is not required.

[0062] S102. Determine the expected size of the video data according to the first historical traffic received between the start time and the end time of storing the video data, where the first historical traffic comes from multiple front-end monitoring devices.

[0063] In an embodiment of the present invention, the expected size of the video data refers to the size that the video data should be written into the data area of the storage server without frame loss. Since the storage server can write the video data of multiple front-end monitoring devices at the same time and synchronously record the traffic received at each moment in the database table, the time interval can be determined by the start time and the end time of storing the video data of the target front-end monitoring device, and the first historical traffic received within this time interval is obtained from the database table to calculate the expected size of the video data. The first historical traffic refers to the sum of the traffic from each front-end monitoring device received by the storage server within this time interval.

[0064] As a specific implementation, when the video data is stored in the data area of the storage server in the form of a file, the storage server can determine the start time and the end time of storing the video data according to the creation time and the closing time of the video file corresponding to the target front-end monitoring device. Generally, the creation time of the file can be directly used as the start time of storing the video data, that is, at the moment when the video file is created, the video data has already started to be written into the data area. When using the closing time of the video file to determine the end time of storing the video data, it is necessary to judge whether the video file is normally closed or timed out.

[0065] If the video file is closed normally, that is, while the video data writing is completed, the video file is also closed, the closing time of the video file can be used as the end time for storing the video data. If the video file is closed due to timeout, that is, after the writing of the video data is completed, the video file is not closed until the time exceeds the preset threshold and is forcibly closed, the closing time of the video file can be subtracted by the preset threshold to obtain the end time for storing the video data.

[0066] S103. Determine whether frames are lost when the video data is stored in the storage server according to the actual size and the expected size.

[0067] In the embodiments of the present invention, if there is no frame loss when the video data is written into the data area of the storage server, the difference between the actual size and the expected size of the video data is very small and generally can be approximately equal to the expected size. Therefore, it is possible to determine whether there is a frame loss when the video data is stored in the storage server and the severity of the frame loss according to the difference between the actual size and the expected size of the video data.

[0068] The beneficial effect of the method provided by the above embodiments of the invention is that by comparing the actual size and the expected size of the video data stored in the storage server by the target front-end monitoring device, it is determined whether frames are lost when the storage server stores the video data sent by the target front-end monitoring device, without the need for manual playback of each video, thereby improving the judgment efficiency.

[0069] Based on Figure 3 , the embodiments of the present invention provide a specific implementation manner for obtaining the first historical traffic. Please refer to Figure 4 , Figure 4 is a schematic flowchart of a method for obtaining the first historical traffic provided by the embodiments of the present invention. The method includes step S201 and step S202.

[0070] S201. Obtain the second historical traffic received between the start time and the end time, where the second historical traffic is the total traffic received by the server.

[0071] In the embodiments of the present invention, since the video data of the front-end monitoring device is scattered and stored in each storage server of the distributed storage system, combined with the erasure algorithm, the traffic at each moment recorded in the database table of a single storage server, that is, the second historical traffic, includes the traffic from each front-end monitoring device at that moment and the traffic distributed by other storage servers in the distributed storage system.

[0072] S202. Calculate the first historical traffic according to the second historical traffic, the first quantity of the storage servers in the distributed storage system, and the erasure ratio of the distributed storage system.

[0073] In an embodiment of the present invention, the first historical traffic is calculated based on the total traffic received by the storage server between the start time and the end time of the stored video data, that is, the second historical traffic, in combination with the first number of storage servers in the distributed storage system and the erasure ratio of the distributed storage system.

[0074] Specifically, the start time of the stored video data is T1, the end time is T2, and between T1 and T2, the traffic r received by the storage server is obtained once every interval dt. i (i = 1, 2, 3…, n), and a total of n = (T2 - T1) / dt times are obtained. For each r i , the absolute value of the difference between it and each r j (j ∈ [1, n], j ≠ i) is used as the numerator, and r j is used as the denominator. If the obtained value is less than or equal to the preset threshold, then this r i is not abnormal traffic. In a specific implementation manner, the preset threshold can be 0.2. Remove all abnormal traffic in r1, r2, …, r n , and take the average value r avg of the remaining non-abnormal traffic as the second historical traffic R2.

[0075] Obtain the number of storage servers in the distributed storage system, that is, the first number num, from the configuration file, and obtain the erasure ratio N + M (N is the number of original data blocks, M is the number of parity data blocks) corresponding to the video service root directory of the distributed storage system from the database table. In combination with the second historical traffic R2, calculate the first historical traffic R1 according to the following formula.

[0076]

[0077] For example, when the second historical traffic R2 is 600 Mb / s, the first number num is 5, and the erasure ratio N + M is 3 + 1, then

[0078] It should be noted that if the storage server is not aggregated, the ri obtained each time is the total traffic received by the network card. If the storage server performs network port aggregation, the ri obtained each time is the total traffic received by the aggregated network port.

[0079] Based on Figure 3 , an embodiment of the present invention also provides a specific implementation manner for determining the expected size of video data. Please refer to Figure 5 , Figure 5 is a flowchart of a method for determining the expected size of video data provided by an embodiment of the present invention. Step S102 includes sub-steps S102-1, S102-2, and S102-3.

[0080] S102-1. Determine the storage duration of the video data according to the start time and the end time.

[0081] In the embodiment of the present invention, the storage duration of the video data refers to the time length consumed for writing the video data into the data area of the storage server. The difference T2 - T1 between the end time T2 and the start time T1 for storing the video data is used as the storage duration ΔT of the video data, that is, ΔT = T2 - T1.

[0082] S102-2. Calculate the bit rate of the target front-end monitoring device according to the second quantity of the front-end monitoring devices accessing the distributed storage system and the first historical traffic.

[0083] In the embodiment of the present invention, the bit rate of the target front-end monitoring device refers to the amount of data transmitted to the storage server per unit time after the video image of the target front-end monitoring device is encoded and compressed. Since the storage server can write the video data of multiple front-end monitoring devices, the relationship between the first historical traffic R1 and the bit rate dr i (i = 1, 2, 3,..., k) is as follows:

[0084]

[0085] where S is the quantity of the front-end monitoring devices accessing the distributed storage system, that is, the second quantity, and s i (i = 1, 2, 3,..., k) represents the quantity of the front-end monitoring devices with the bit rate dr i . Based on the above formula, calculate the bit rate dr aim of the target front-end monitoring device.

[0086] Specifically, if all the front-end monitoring devices accessing the distributed storage system have the same data transmission configuration, it means that the amount of data transmitted to the storage server per unit time after the video images of all the front-end monitoring devices are encoded and compressed is the same, that is, the bit rates of all the front-end monitoring devices are the same. At this time, the specific implementation process of step S102-2 is as follows:

[0087] Take the ratio of the first historical traffic to the second quantity as the bit rate of the target front-end monitoring device.

[0088] In the embodiment of the present invention, if the bit rate dr aim of the target front-end monitoring device is the same as the bit rate dr i (i ∈ [1, k], i ≠ aim) of other monitoring devices, then the formula R1 = dr1·s1 + dr2·s2 + dr3·s3 +... + dr k ·s k can be simplified to R1 = dr aim·S, the ratio of the first historical traffic R1 to the second quantity S can be used as the bitrate dr of the target front-end monitoring device aim , that is, dr aim = R1 / S.

[0089] Correspondingly, if among all the front-end monitoring devices connected to the distributed storage system, there are at least two front-end monitoring devices with different data transmission configurations, it means that the amount of data transmitted to the storage server per unit time after the video data of at least two front-end monitoring devices is encoded and compressed is different, that is, their bitrates are different. At this time, the specific implementation process of step S102-2 is as follows:

[0090] First, calculate the bitrate reference value of the target front-end monitoring device according to the actual size and storage duration of the video data stored by the target front-end monitoring device in the storage server;

[0091] Then, determine the bitrate of the target front-end monitoring device according to the bitrate reference value and the preset conversion coefficient, where the preset conversion coefficient is obtained according to the bitrate reference values of the second quantity of front-end monitoring devices and the first historical traffic.

[0092] In the embodiment of the present invention, the bitrate reference value DR of the target front-end monitoring device aim and the actual size D of the video data aim and the storage duration ΔT satisfy the formula It can be understood that if there is no frame loss during the storage of the video data, the bitrate reference value DR aim is equal to the bitrate dr of the target front-end monitoring device aim .

[0093] Obtain the sizes of the video data written by other front-end monitoring devices in the storage server except the target front-end monitoring device between T1 and T2, and calculate the bitrate reference values DR of other front-end monitoring devices in the same way i (i ∈ [1, k]), and obtain the preset conversion coefficient X in the following formula for calculating the bitrate dr according to the bitrate reference value DR of each front-end monitoring device i and the first historical traffic R1. i

[0094]

[0095] where DR min is the minimum bitrate reference value among the bitrate reference values of all front-end monitoring devices. Substitute the bitrate reference value DR of the target front-end monitoring device aim into the above formula, and the bitrate dr of the target front-end monitoring device can be calculated aim .

[0096] ​The embodiments of the present invention also provide a specific implementation method for obtaining a preset conversion coefficient X, and the process is as follows:

[0097] First, determine the minimum bitstream reference value among the bitstream reference values of all front-end monitoring devices;

[0098] Then, based on the ratio of the bitstream reference values of all front-end monitoring devices to the minimum bitstream reference value, and the first historical traffic, obtain the preset conversion coefficient.

[0099] In the embodiments of the present invention, using Rewrite the formula R1 = dr1·s1 + dr2·s2 + dr3·s3 + … + dr k ·s k as Then the following expression of the preset conversion coefficient X can be obtained:

[0100]

[0101] S102-3, calculate the expected size of the video data according to the bitstream and the storage duration.

[0102] In the embodiments of the present invention, the expected size B of the video data aim and the bitstream dr of the target front-end monitoring device aim and the storage duration ΔT satisfy the formula

[0103] Based on Figure 3 , the embodiments of the present invention also provide a specific implementation method for determining whether frames are lost when video data is stored in the storage server. Please refer to Figure 6 , Figure 6 is a schematic flowchart of a method for determining whether frames are lost when video data is stored in the storage server provided by the embodiments of the present invention. Step S103 includes sub-steps S103-1 and S102-3.

[0104] S103-1, calculate the error value between the actual size and the expected size.

[0105] In the embodiments of the present invention, the following formula is used to calculate the error value K between the actual size D aim and the expected size B aim of the video data.

[0106]

[0107] S103-2, if the error value is greater than the preset value, it means that frames are lost when the video data is stored in the storage server.

[0108] In the embodiments of the present invention, considering the availability of the distributed storage system, when the actual size D of the video data aimThe error value K from the expected size B aim When the error value K is not greater than the preset value, that is, the frame loss situation of the video data is within the acceptable range, it is regarded that no frame loss occurs during the process of writing the video data into the data area of the storage server. When the error value K is greater than the preset value, it means that the frame loss situation of the video data is relatively serious and not within the acceptable range. As a specific implementation, the preset value can be 0.05.

[0109] To execute the corresponding steps in the above embodiments and each possible implementation, the following provides an implementation of a frame loss judgment device 300. Please refer to Figure 7 , Figure 7 FIG. shows a block diagram of the frame loss judgment device 300 provided by the embodiments of the present invention. It should be noted that for the frame loss judgment device 300 provided by the embodiments of the present invention, its basic principle and the technical effects produced are the same as those of the above embodiments. For the sake of brief description, the embodiments of the present invention do not mention it.

[0110] The frame loss judgment device 300 includes an acquisition module 301, a determination module 302, and a judgment module 303.

[0111] The acquisition module 301 is configured to acquire the actual size of the video data stored in the storage server by the target front-end monitoring device among the multiple front-end monitoring devices.

[0112] The determination module 302 is configured to determine the expected size of the video data according to the first historical traffic received between the start time and the end time of storing the video data, where the first historical traffic comes from multiple front-end monitoring devices.

[0113] The judgment module 303 is configured to judge whether frame loss occurs when the video data is stored in the storage server according to the actual size and the expected size.

[0114] As an implementation, the acquisition module 301 is further configured to acquire the second historical traffic received between the start time and the end time, where the second historical traffic is the total traffic received by the server; calculate the first historical traffic according to the second historical traffic, the first number of storage servers in the distributed storage system, and the erasure ratio of the distributed storage system.

[0115] As an implementation, the determination module 302 is specifically configured to determine the storage duration of the video data according to the start time and the end time; calculate the bit rate of the target front-end monitoring device according to the second number of front-end monitoring devices accessing the distributed storage system and the first historical traffic; calculate the expected size of the video data according to the bit rate and the storage duration.

[0116] As an implementation, all the front-end monitoring devices accessing the distributed storage system have the same data transmission configuration. When the determining module 302 is used to calculate the bit rate of the target front-end monitoring device according to the second quantity of the front-end monitoring devices accessing the distributed storage system and the first historical traffic, it is specifically used to take the ratio of the first historical traffic to the second quantity as the bit rate of the target front-end monitoring device.

[0117] As an implementation, among all the front-end monitoring devices accessing the distributed storage system, there are at least two front-end monitoring devices with different data transmission configurations. When the determining module 302 is used to calculate the bit rate of the target front-end monitoring device according to the second quantity of the front-end monitoring devices accessing the distributed storage system and the first historical traffic, it is specifically used to calculate a bit rate reference value of the target front-end monitoring device according to the actual size and storage duration of the video data stored by the target front-end monitoring device in the storage server; and determine the bit rate of the target front-end monitoring device according to the bit rate reference value and a preset conversion coefficient, where the preset conversion coefficient is obtained according to the bit rate reference values and the first historical traffic of the second quantity of front-end monitoring devices.

[0118] As an implementation method, before the determining module 302 is used to determine the bit rate of the target front-end monitoring device according to the bit rate reference value and the preset conversion coefficient, it is further used to determine the minimum bit rate reference value among the bit rate reference values of all the front-end monitoring devices; and obtain the preset conversion coefficient according to the ratio of the bit rate reference values of all the front-end monitoring devices to the minimum bit rate reference value, and the first historical traffic.

[0119] As an implementation, the judging module 303 is specifically used to calculate the error value between the actual size and the expected writing size; if the error value is greater than the preset value, frame loss occurs when the video data is stored in the storage server.

[0120] In summary, a frame loss judging method, device, storage server and readable storage medium provided by an embodiment of the present invention first obtains the actual size of the video data stored by a target front-end monitoring device in the storage server; then determines the expected size of the video data according to the first historical traffic received between the start time and the end time of storing the video data, where the first historical traffic comes from multiple front-end monitoring devices; and finally judges whether frame loss occurs when the video data is stored in the storage server according to the actual size and the expected size. Since the embodiment of the present invention judges whether frame loss occurs when the storage server stores the video data sent by the target front-end monitoring device by comparing the actual size and the expected size of the video data stored by the target front-end monitoring device in the storage server, it is not necessary to manually play back each video, thereby improving the judging efficiency.

[0121] The above are only the specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for judging frame loss, characterized in that, A storage server applied to a distributed storage system, the storage server being communicatively connected to a plurality of front-end monitoring devices, the method comprising: Obtaining second historical traffic received between a start time and an end time, wherein the second historical traffic is the total traffic received by the storage server; Calculating first historical traffic according to the second historical traffic, a first quantity of storage servers in the distributed storage system, and an erasure ratio of the distributed storage system, wherein the first historical traffic is from the plurality of front-end monitoring devices; Obtaining an actual size of video data stored by a target front-end monitoring device among the plurality of front-end monitoring devices to the storage server; Determining a storage duration of the video data according to the start time and the end time; Calculating a bit rate of the target front-end monitoring device according to a second quantity of front-end monitoring devices accessing the distributed storage system and the first historical traffic; Calculating an expected size of the video data according to the bit rate and the storage duration; Judging whether frames are lost when the video data is stored to the storage server according to the actual size and the expected size.

2. The method according to claim 1, characterized in that, All front-end monitoring devices accessing the distributed storage system have the same data transmission configuration. The step of calculating the bit rate of the target front-end monitoring device according to a second quantity of front-end monitoring devices accessing the distributed storage system and the first historical traffic comprises: Taking a ratio of the first historical traffic to the second quantity as the bit rate of the target front-end monitoring device.

3. The method according to claim 1, characterized in that, Among all front-end monitoring devices accessing the distributed storage system, at least two of the front-end monitoring devices have different data transmission configurations. The step of calculating the bit rate of the target front-end monitoring device according to a second quantity of front-end monitoring devices accessing the distributed storage system and the first historical traffic comprises: Calculating a bit rate reference value of the target front-end monitoring device according to the actual size of the video data stored by the target front-end monitoring device to the storage server and the storage duration; Determining the bit rate of the target front-end monitoring device according to the bit rate reference value and a preset conversion coefficient, wherein the preset conversion coefficient is obtained according to the bit rate reference values of the second quantity of front-end monitoring devices and the first historical traffic.

4. The method according to claim 3, wherein Before the step of determining the bit rate of the target front-end monitoring device according to the bit rate reference value and the preset conversion coefficient, the method further comprises: Determining a minimum bit rate reference value among the bit rate reference values of all the front-end monitoring devices; Obtaining the preset conversion coefficient according to a ratio of the bit rate reference values of all the front-end monitoring devices to the minimum bit rate reference value, and the first historical traffic.

5. The method according to claim 1, characterized in that, The step of judging whether frames are lost when the video data is stored to the storage server according to the actual size and the expected size comprises: Calculating an error value between the actual size and the expected size; If the error value is greater than a preset value, then frames are lost when the video data is stored to the storage server.

6. A dropped frame determination device, characterized in that, A storage server applied to a distributed storage system, the storage server being communicatively connected to a plurality of front-end monitoring devices, the device comprising: An acquisition module, configured to acquire second historical traffic received between a start time and an end time, wherein the second historical traffic is the total traffic received by the storage server; calculate first historical traffic according to the second historical traffic, a first quantity of storage servers in the distributed storage system, and an erasure ratio of the distributed storage system, wherein the first historical traffic is from the plurality of front-end monitoring devices; acquire an actual size of video data stored by a target front-end monitoring device among the plurality of front-end monitoring devices to the storage server; A determination module, configured to determine a storage duration of the video data according to the start time and the end time; calculate a bit rate of the target front-end monitoring device according to a second quantity of front-end monitoring devices accessing the distributed storage system and the first historical traffic; calculate an expected size of the video data according to the bit rate and the storage duration; A judgment module, configured to judge whether frames are lost when the video data is stored to the storage server according to the actual size and the expected size.

7. A storage server, characterized in that, Comprising: A memory and a processor, the memory being configured to store a computer program; The processor is configured to execute the method according to any one of claims 1 to 5 when calling the computer program.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by the processor, implements the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Video extraction frame loss control method and system, terminal and storage medium

    CN111277836A

  • Underground video data processing method and device, electronic equipment and storage medium

    CN111866586A