Video monitoring data transmission method and device, equipment and storage medium
By adjusting the packaging duration granularity according to the client's level of attention to the video, the video surveillance data is losslessly compressed and packaged, which solves the problem of high bandwidth consumption in video surveillance data transmission and achieves both efficient transmission of video stream data and real-time performance.
Patent Information
- Application Number
- CN202311726084.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-14
- Publication Date
- 2024-10-22
AI Technical Summary
Existing video surveillance data transmission technology cannot effectively reduce server bandwidth usage while ensuring video picture quality. The problem of high bandwidth consumption is usually solved by reducing the resolution or frame rate, resulting in a decrease in video picture quality.
By calculating the packaging duration granularity based on the client's level of attention to the video in each period, and generating a packaging duration strategy, the video surveillance terminal performs lossless compression and packaging of the video stream data when the client is not watching the real-time live broadcast, and compresses and packages the files. Upload to the platform server, and the platform server obtains the original video stream data after decompression.
Without changing the video encoding method or reducing the quality of the video picture, the server bandwidth usage is effectively reduced, and the compression rate of the video stream data and the real-time transmission of the video stream data are achieved.
Smart Images

Figure CN118828071A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video data transmission, and in particular to a method, device, equipment and storage medium for transmitting video surveillance data. Background Art
[0002] IP Camera (IPC) is widely used in smart home, smart security and other fields. IPC transmits the collected video images to the monitoring platform. Users can use the client software to request the platform to pull the video stream to watch the real-time images of the camera. The monitoring platform usually provides customers with value-added services such as video caching, caching video data within a period of time to the platform server. After activation, customers can not only watch the real-time live stream, but also replay the images at any time within the time period. This service requires the IPC device to transmit the video stream to the platform server uninterruptedly throughout the day, regardless of whether the user is watching the live broadcast. For servers with a large number of access terminals, the consumption of bandwidth resources is relatively large. Existing solutions reduce the bandwidth occupied by video streams by reducing the video resolution or frame rate, or reducing the encoding quality of the images in some areas, but this usually results in a significant decrease in video image quality. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a method, device, equipment and storage medium for transmitting video surveillance data, which adjusts the package duration granularity of each time period in combination with the client's attention to the video in each time period, effectively reduces the server bandwidth usage without changing the video encoding method or reducing the video picture quality, and achieves both the compression rate and real-time transmission of video stream data.
[0004] In order to achieve the above object, an embodiment of the present invention provides a method for transmitting video surveillance data, comprising:
[0005] Calculate the package duration granularity of each time period based on the historical duration of live broadcast and playback watched by the client, generate a package duration strategy and send it to the video surveillance terminal;
[0006] The video compression file compressed and packaged according to the packaging duration strategy and transmitted by the video monitoring terminal is received, and the video compression file is decompressed to obtain video stream data.
[0007] As an improvement of the above solution, the method of calculating the package duration granularity of each time period according to the historical duration of the live broadcast and playback of each time period watched by the client includes:
[0008] Calculate the playback heat factor of each time period and the average value of the playback heat factor according to the live broadcast time and playback time of each time period watched by the client in the historical operation cycle;
[0009] The packaging duration granularity of each time period in the next operation cycle is calculated according to the average value of the playback heat factor.
[0010] As an improvement of the above solution, the calculation formula of the play heat factor is:
[0011]
[0012] In the formula, H j Indicates the playback heat factor; D j Indicates the time period, T represents the operation cycle, m represents the number of time periods; S j Indicates that the client is watching D j The duration of the live broadcast; R j Indicates that the client is watching D j The duration of the playback of the time period; w and v are both weights, and 0<w<1, 0<v<1.
[0013] As an improvement of the above solution, the calculation formula of the packaging duration granularity is:
[0014]
[0015] Where, L j Indicates the granularity of packaging duration; Indicates the average value of the playback heat factor; l and a are both adjustable parameters, and 0≤l≤D j , 0≤a≤1.
[0016] As an improvement to the above solution, when transmitting the video compression file, the video surveillance terminal transmits it at a data transmission speed that does not exceed a preset threshold.
[0017] As an improvement of the above solution, the preset threshold is Wherein, F represents the size of the video compression file, P represents the time consumed for compressing and packaging the video compression file, b is an adjustable parameter, and 0<b≤1.
[0018] As an improvement of the above solution, when the video monitoring terminal compresses and packages the video stream data or transmits the video compression file, the method further includes:
[0019] If a live broadcast request or a playback request is received from the client, the video surveillance terminal is notified to stop writing the video stream data into the local video file, and the received real-time video stream data or playback video stream data of the video surveillance terminal is sent to the client.
[0020] The embodiment of the present invention further provides a device for transmitting video surveillance data, including:
[0021] The package duration strategy generation module is used to calculate the package duration granularity of each time period according to the historical duration of the live broadcast and playback watched by the client in each time period, generate a package duration strategy and send it to the video surveillance terminal;
[0022] The video compression file decompression module is used to receive the video compression file compressed and packaged according to the packaging time strategy and transmitted by the video monitoring terminal, and decompress the video compression file to obtain video stream data.
[0023] An embodiment of the present invention also provides a video surveillance data transmission device, including a processor and a memory, wherein a computer program is stored in the memory, and the computer program is configured to be executed by the processor, and when the processor executes the computer program, the video surveillance data transmission method described in any one of the above items is implemented.
[0024] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned methods for transmitting video surveillance data.
[0025] Compared with the prior art, the beneficial effects of a video surveillance data transmission method, device, equipment and storage medium provided by an embodiment of the present invention are: by introducing the degree of attention of the client to the video in each time period, the package duration granularity of each time period is adjusted, and a package duration strategy is generated and sent to the video surveillance terminal. During the time period when the client is not watching the real-time live broadcast screen, the video surveillance terminal uses a compression tool to losslessly compress and package the original video stream data according to the package duration strategy with the package duration granularity corresponding to each time period, and uploads the compressed and packaged video compressed file to the platform server. After receiving the video compression file, the platform server decompresses it to obtain the original video stream data. The embodiment of the present invention effectively reduces the server bandwidth usage without changing the video encoding method or reducing the video picture quality, thereby achieving both the compression rate and transmission real-time performance of the video stream data. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of a preferred embodiment of a method for transmitting video surveillance data provided by the present invention;
[0027] Figure 2 It is a schematic diagram of the architecture of the data transmission system of the video monitoring platform provided by the present invention;
[0028] Figure 3 This is a schematic diagram of information interaction of a preferred embodiment of a video surveillance data transmission method provided by the present invention;
[0029] Figure 4 It is a structural schematic diagram of a preferred embodiment of a video surveillance data transmission device provided by the present invention;
[0030] Figure 5 It is a structural schematic diagram of a preferred embodiment of a video surveillance data transmission device provided by the present invention. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] See also Figure 1 , Figure 1 The figure is a flow chart of a preferred embodiment of a method for transmitting video surveillance data provided by the present invention. The method for transmitting video surveillance data comprises:
[0033] S1, calculates the package duration granularity of each time period according to the historical duration of live broadcast and playback watched by the client in each time period, generates a package duration strategy and sends it to the video surveillance terminal;
[0034] S2, receiving the video compression file compressed and packaged according to the packaging duration strategy and transmitted by the video surveillance terminal, and decompressing the video compression file to obtain video stream data.
[0035] It is worth noting that the video surveillance data transmission method provided in the embodiment of the present invention is implemented by the platform server. Figure 2 , Figure 2The present invention provides a schematic diagram of the architecture of the data transmission system of the video monitoring platform. The data transmission system of the video monitoring platform includes a video monitoring terminal, i.e., an IPC terminal, a platform server, and a client. The IPC terminal is connected to the platform server via the Internet, and the IPC terminal includes two logical units, namely, a local storage unit and a first transmission unit. The local storage unit is used to store the collected video stream data, and according to the packaging duration strategy issued by the platform server, the video stream data is segmented and compressed and packaged with the corresponding packaging duration granularity. The compression tool can select cross-platform compression and decompression tools such as gzip, bzip2, xz, and pbzip2 to ensure the compatibility of the method. The first transmission unit is used to transmit real-time video streams when the client is live broadcasting; when the client is not live broadcasting, the video compression file packaged by the local storage unit is transmitted to the platform server for caching, and the packaging duration strategy, live broadcast request, and playback request issued by the platform server are received. The platform server is connected to the IPC terminal and the client via the Internet respectively, and the platform server includes three logical units, a cloud storage unit, a strategy unit, and a second transmission unit. Among them, the second transmission unit is used to receive the real-time video stream data and video compression files uploaded by the IPC terminal, issue a packaging duration strategy to the IPC terminal, and respond to the live broadcast request or playback request of the client to transmit the video stream data to the client. The cloud storage unit is used to save the real-time video stream data uploaded by the IPC terminal, and decompress the video compression file uploaded by the IPC terminal to restore the original video stream data and save it. The strategy unit is used to count the historical duration of the client watching the live broadcast and playback of each time period, and calculate the packaging duration granularity of each time period to generate a packaging duration strategy. The client is connected to the platform server via the Internet, and the client is used to initiate a live broadcast request or playback request to the platform server, and receive the video stream data sent by the platform server for the user to view the live broadcast screen or playback screen.
[0036] The embodiment of the present invention adjusts the packaging duration granularity of each time period by introducing the client's attention level to the video in each time period, and generates a packaging duration strategy and sends it to the video monitoring terminal. During the time period when the client is not watching the real-time live broadcast, the video monitoring terminal uses a compression tool to losslessly compress and package the original video stream data with the corresponding packaging duration granularity of each time period according to the packaging duration strategy, and uploads the compressed and packaged video compressed file to the platform server. After receiving the video compression file, the platform server decompresses it to obtain the original video stream data. The embodiment of the present invention effectively reduces the server bandwidth usage without changing the video encoding method or reducing the video picture quality, thereby achieving a balance between the compression rate and real-time transmission of the video stream data.
[0037] In another preferred embodiment, the calculation of the packaging duration granularity of each time period according to the historical duration of the live broadcast and playback of each time period watched by the client includes:
[0038] Calculate the playback heat factor of each time period and the average value of the playback heat factor according to the live broadcast time and playback time of each time period watched by the client in the historical operation cycle;
[0039] The packaging duration granularity of each time period in the next operation cycle is calculated according to the average value of the playback heat factor.
[0040] Specifically, the embodiment of the present invention stipulates that one operation cycle of the system is T, and each operation cycle T is evenly divided into m time periods, namely D1, D2, ..., D j (1≤j≤m), To evaluate the client's response to each period D j The platform server receives and saves the video stream data reported by the IPC, responds to the live broadcast request or playback request from the client, records the live broadcast time and playback time of each time period watched by the client, and calculates the playback heat factor of each time period based on the live broadcast time and playback time of each time period watched by the client in the historical operation cycle. k After the end, the next operation cycle T k+1 Before starting, calculate the IPC in the past n operation cycles, that is, T k-n+1 ,…,T k-1 , T k In each period D j The average value of the playback heat factor is used to predict the next operation cycle. The client calculates the average value of the playback heat factor for each period D j The platform server then calculates the attention level of the video content according to each time period D j The average value of the playback heat factor is calculated for each IPC in the next operation cycle T k+1 The granularity of the packaging duration for each time period.
[0041] It should be noted that in order to avoid the platform server from calculating, generating and issuing packaging duration strategies for all IPCs at the same time, which may cause congestion and delay due to excessive concurrency, the embodiment of the present invention can perform discrete processing on the start time point of the operation cycle of each IPC.
[0042] In another preferred embodiment, the calculation formula of the play heat factor is:
[0043]
[0044] In the formula, H j Indicates the playback heat factor; Dj Indicates the time period, T represents the operation cycle, m represents the number of time periods; S j Indicates that the client is watching D j The duration of the live broadcast; R j Indicates that the client is watching D j The duration of the playback of the time period; w and v are both weights, and 0<w<1, 0<v<1.
[0045] In another preferred embodiment, the calculation formula of the average value of the playback heat factor is:
[0046]
[0047] In the formula, Represents the average value of the playback heat factor; n represents the number of historical running cycles.
[0048] Specifically, in the embodiment of the present invention, the platform server performs a running cycle T k After the end, the next operation cycle T k+1 Before starting, calculate the IPC in the past n operation cycles, that is, T k-n+1 ,…,T k-1 , T k In each period D j The average value of the playback heat factor: To predict a future operation cycle, the client performs D j The level of attention paid to the video content.
[0049] In another preferred embodiment, the calculation formula of the packaging duration granularity is:
[0050]
[0051] Where, L j Indicates the granularity of packaging duration; Indicates the average value of the playback heat factor; l and a are both adjustable parameters, and 0≤l≤D j , 0≤a≤1.
[0052] Specifically, the embodiment of the present invention is based on the average value of the play heat factor Calculate the packaging duration granularity for each period of the next operation cycle For periods with low popularity and low attention, use a larger package duration granularity to improve the compression rate of video data and minimize bandwidth usage. For periods with high popularity and high attention, use a smaller package duration granularity to ensure a certain degree of real-time performance and improve user experience. When the video surveillance terminal IPC writes real-time video stream data to the local video file, if the duration of the written video stream reaches the package duration granularity L j or D j When the time period ends, the writing stops, and the current video file is compressed and packaged using a compression tool and transmitted to the platform server. After the transmission is completed, the video file is deleted.
[0053] It should be noted that if the IPC has not run for n cycles T, the variable parameter l can be set to 0, that is, the package duration granularity is 0, and only real-time reporting is performed on the video stream. After the running time reaches n cycles T, it will return to normal to ensure that the playback heat factor can accurately evaluate and predict the client's attention to the video content in each time period.
[0054] In another preferred embodiment, when transmitting the video compression file, the video surveillance terminal transmits it at a data transmission speed that does not exceed a preset threshold.
[0055] As a preferred solution, the preset threshold is Wherein, F represents the size of the video compression file, P represents the time consumed for compressing and packaging the video compression file, b is an adjustable parameter, and 0<b≤1.
[0056] Specifically, in order to avoid occupying too much bandwidth, the embodiment of the present invention limits the data transmission speed. When the video monitoring terminal IPC transmits the video compression file, it transmits it at a data transmission speed C1 that does not exceed the preset threshold. The preset threshold in the embodiment of the present invention is preferably Right now Wherein, F represents the size of the video compression file, P represents the time consumed for compressing and packaging the video compression file, b is an adjustable parameter, and 0<b≤1. It should be noted that the adjustable parameter b can be adjusted according to the current live broadcast or playback business situation to avoid affecting the upload of the live broadcast or playback video stream.
[0057] In another preferred embodiment, when the video surveillance terminal compresses and packages the video stream data or transmits the video compression file, the method further includes:
[0058] If a live broadcast request or a playback request is received from the client, the video surveillance terminal is notified to stop writing the video stream data into the local video file, and the received real-time video stream data or playback video stream data of the video surveillance terminal is sent to the client.
[0059] For details, please refer to Figure 3 , Figure 3 1 is an information interaction diagram of a preferred embodiment of a video surveillance data transmission method provided by the present invention. In the embodiment of the present invention, the platform server calculates the package duration granularity of each time period according to the historical duration of the live broadcast and playback of each time period watched by the client, and generates a package duration strategy and sends it to the video surveillance terminal IPC. The IPC receives and updates the package duration strategy and enters the next operation cycle. The IPC determines which time period D is currently in. j , load the corresponding packaging duration granularity L j IPC collects video stream data and determines whether the client has initiated a live broadcast request. If so, it continuously reports the real-time video stream and continuously detects whether the client has stopped live broadcast. If so, it stops uploading the real-time video stream; if not, it creates a new local video file and writes the real-time video stream data to the local video file. If the duration of writing the video stream reaches L j or D j When the time period ends, stop writing, use the compression tool to compress and package the current video file, and transfer it to the platform server. After the transfer is completed, delete the video file. If the client initiates a live broadcast request during the writing process, stop writing and continue to report the real-time video stream. If the client initiates a playback request for the video stream that has been written to the video file during the writing process, stop writing. Or if the client initiates a playback request for the video stream that is being packaged and uploaded during the compression, packaging or transmission process, stop compression, packaging or transmission. Read the current video file, locate the playback start time point, upload the playback video stream, and continuously detect whether the client stops playback. If so, stop uploading the playback video stream, and detect whether there are any video files that have not been transferred. If so, transfer the untransmitted video files to the platform server. After the current video file is transferred, first update the playback start time point to the time of the last frame of the file, and continue to play the next video file; then determine whether all video stream data in the current video file has been reported. If so, delete the video file; if there is still data that has not been uploaded, delete the uploaded video stream and retain the unreported video stream.
[0060] Correspondingly, the present invention also provides a video surveillance data transmission device, which can implement all the processes of the video surveillance data transmission method in the above embodiment.
[0061] See also Figure 4 , Figure 4 1 is a schematic diagram of a preferred embodiment of a video surveillance data transmission device provided by the present invention. The video surveillance data transmission device comprises:
[0062] The package duration strategy generation module 401 is used to calculate the package duration granularity of each time period according to the historical duration of the live broadcast and playback of each time period watched by the client, generate a package duration strategy and send it to the video monitoring terminal;
[0063] The video compression file decompression module 402 is used to receive the video compression file compressed and packaged according to the packaging time strategy and transmitted by the video monitoring terminal, and decompress the video compression file to obtain video stream data.
[0064] Preferably, the step of calculating the package duration granularity of each time period according to the historical duration of the live broadcast and playback of each time period watched by the client includes:
[0065] Calculate the playback heat factor of each time period and the average value of the playback heat factor according to the live broadcast time and playback time of each time period watched by the client in the historical operation cycle;
[0066] The packaging duration granularity of each time period in the next operation cycle is calculated according to the average value of the playback heat factor.
[0067] Preferably, the calculation formula of the play heat factor is:
[0068]
[0069] In the formula, H j Indicates the playback heat factor; D j Indicates the time period, T represents the operation cycle, m represents the number of time periods; S j Indicates that the client is watching D j The duration of the live broadcast; R j Indicates that the client is watching D j The duration of the playback of the time period; w and v are both weights, and 0<w<1, 0<v<1.
[0070] Preferably, the calculation formula for the packaging duration granularity is:
[0071]
[0072] Where, L j Indicates the granularity of packaging duration; Indicates the average value of the playback heat factor; l and a are both adjustable parameters, and 0≤l≤D j , 0≤a≤1.
[0073] Preferably, when transmitting the video compression file, the video surveillance terminal transmits it at a data transmission speed that does not exceed a preset threshold.
[0074] Preferably, the preset threshold is Wherein, F represents the size of the video compression file, P represents the time consumed for compressing and packaging the video compression file, b is an adjustable parameter, and 0<b≤1.
[0075] Preferably, the device further comprises a client request response module, configured to:
[0076] When the video surveillance terminal compresses and packages the video stream data or transmits the video compression file, if a live broadcast request or a playback request sent by the client is received, the video surveillance terminal is notified to stop writing the video stream data into the local video file, and the received real-time video stream data or playback video stream data of the video surveillance terminal is sent to the client.
[0077] In the specific implementation, the working principle, control process and technical effect achieved by the video surveillance data transmission device provided in the embodiment of the present invention are the same as those of the video surveillance data transmission method in the above embodiment, and will not be repeated here.
[0078] See also Figure 5 , Figure 5 1 is a schematic diagram of a preferred embodiment of a video surveillance data transmission device provided by the present invention. The video surveillance data transmission device includes a processor 501, a memory 502, and a computer program stored in the memory 502 and configured to be executed by the processor 501. When the processor 501 executes the computer program, the video surveillance data transmission method described in any of the above embodiments is implemented.
[0079] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory 502 and executed by the processor 501 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the transmission device of the video surveillance data.
[0080] The processor 501 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor 501 can also be any conventional processor. The processor 501 is the control center of the video surveillance data transmission device, and uses various interfaces and lines to connect various parts of the video surveillance data transmission device.
[0081] The memory 502 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory 502 can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory 502 can also be other volatile solid-state storage devices.
[0082] It should be noted that the transmission device of the above-mentioned video surveillance data may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that Figure 5 The structural diagram is only an example of the above-mentioned video surveillance data transmission device and does not constitute a limitation on the above-mentioned video surveillance data transmission device. It may include more or less components than shown in the figure, or combine certain components, or different components.
[0083] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the video surveillance data transmission method described in any of the above embodiments.
[0084] The embodiments of the present invention provide a method, device, equipment and storage medium for transmitting video surveillance data. The granularity of the packaging duration of each time period is adjusted by introducing the degree of attention of the client to the video in each time period, and a packaging duration strategy is generated. During the time period when the client is not watching the real-time live broadcast picture, the video surveillance terminal performs lossless compression and packaging on the original video stream data according to the packaging duration strategy, and uploads the compressed and packaged video compressed file to the platform server. After receiving the video compression file, the platform server decompresses it to obtain the original video stream data. The embodiments of the present invention effectively reduce the server bandwidth usage without changing the video encoding method or reducing the video picture quality, thereby achieving both the compression rate and real-time transmission of the video stream data.
[0085] It should be noted that the system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the system embodiment provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0086] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for transmitting video surveillance data, characterized in that: include: Calculate the package duration granularity of each time period based on the historical duration of live broadcast and playback watched by the client, generate a package duration strategy and send it to the video surveillance terminal; The video compression file compressed and packaged according to the packaging duration strategy and transmitted by the video monitoring terminal is received, and the video compression file is decompressed to obtain video stream data.
2. The method for transmitting video surveillance data according to claim 1, characterized in that: The calculation of the package duration granularity of each time period according to the historical duration of the live broadcast and playback of each time period watched by the client includes: Calculate the playback heat factor of each time period and the average value of the playback heat factor according to the live broadcast time and playback time of each time period watched by the client in the historical operation cycle; The packaging duration granularity of each time period in the next operation cycle is calculated according to the average value of the playback heat factor.
3. The method for transmitting video surveillance data according to claim 2, characterized in that: The calculation formula of the playback heat factor is: In the formula, H j Indicates the playback heat factor; D j Indicates the time period, T represents the operation cycle, m represents the number of time periods; S j Indicates that the client is watching D j The duration of the live broadcast; R j Indicates that the client is watching D j The duration of the playback of the time period; w and v are both weights, and 0<w<1, 0<v<1.
4. The method for transmitting video surveillance data according to claim 3, characterized in that: The calculation formula of the packaging duration granularity is: Where, L j Indicates the granularity of the packaging duration; H j Indicates the average value of the playback heat factor; l and a are both adjustable parameters, and 0≤l≤D j , 0≤a≤1.
5. The method for transmitting video surveillance data according to claim 1, characterized in that: When transmitting the video compression file, the video monitoring terminal transmits it at a data transmission speed that does not exceed a preset threshold.
6. The method for transmitting video surveillance data according to claim 5, characterized in that: The preset threshold is Wherein, F represents the size of the video compression file, P represents the time consumed for compressing and packaging the video compression file, b is an adjustable parameter, and 0<b≤1.
7. The method for transmitting video surveillance data according to claim 1, characterized in that: When the video surveillance terminal compresses and packages the video stream data or transmits the video compression file, the method further includes: If a live broadcast request or a playback request is received from the client, the video surveillance terminal is notified to stop writing the video stream data into the local video file, and the received real-time video stream data or playback video stream data of the video surveillance terminal is sent to the client.
8. A video surveillance data transmission device, characterized in that: include: The package duration strategy generation module is used to calculate the package duration granularity of each time period according to the historical duration of the live broadcast and playback watched by the client in each time period, generate a package duration strategy and send it to the video surveillance terminal; The video compression file decompression module is used to receive the video compression file compressed and packaged according to the packaging time strategy and transmitted by the video monitoring terminal, and decompress the video compression file to obtain video stream data.
9. A video surveillance data transmission device, characterized in that: It comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is configured to be executed by the processor, and when the processor executes the computer program, the method for transmitting video surveillance data as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the video surveillance data transmission method according to any one of claims 1 to 7 is implemented.
