Video transmission method and device, electronic equipment and computer readable medium
By testing the network packet loss rate before real-time video streaming and performing encoded segmented transmission, and introducing video watermark information into the video stream, the problems of unstable real-time video streaming transmission and difficult to trace video leakage are solved, and the video streaming is realized Stable transmission and source traceability.
Patent Information
- Application Number
- CN202411040046.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Real-time video streams are prone to network packet loss during transmission, resulting in unstable transmission of video streams. In private scenarios such as home monitoring, the video transmission process is easily leaked, making it difficult to trace the source of illegal requests.
By sending network status test packets, testing the network packet loss rate, and encode and segment the video stream according to the ratio is less than the preset threshold, and transmitting it in real time; at the same time, video watermark information is introduced, video stream is copied and segmented, and the video stream is generated A video stream with unique combination characteristics to trace the source of the leak.
It effectively reduces the network packet loss rate, improves the transmission stability of video streams, and can trace the illegal requested terminal devices during video leakage to determine the source of video leakage.
Smart Images

Figure CN119071430A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a video transmission method, device, electronic device, and computer-readable medium. Background Art
[0002] Real-time video transmission is a technology that transmits real-time video streams to target terminals through certain technologies, usually in scenarios such as home monitoring. At present, when transmitting real-time video streams, the commonly used method is to directly transmit the captured real-time video streams to the target terminal.
[0003] However, when the above method is used to transmit real-time video streams, the following technical problems often occur:
[0004] First, due to the influence of factors such as the network and equipment, network packet loss may easily occur during the transmission of real-time video streams, making it impossible for real-time video streams to be transmitted stably.
[0005] Second, the video transmission process is easy to leak. In private scenarios such as home monitoring, once illegal requests and controls are received, it will not only violate relevant privacy but also be difficult to trace. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose a video transmission method, an apparatus, an electronic device, and a computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a video transmission method, the method comprising: in response to receiving a real-time monitoring video request sent by a target terminal, sending a preset network status test data packet to the target terminal; receiving reply information returned by the target terminal, wherein the reply information includes the data volume of the received data packet, and the data volume of the received data packet is the data volume of the network status test data packet received by the target terminal; in response to determining that the ratio of the data volume of the received data packet to the data volume of the network status test data packet is less than a first preset threshold, controlling a monitoring camera to capture a real-time video stream and using an encoder to encode the captured real-time video stream to obtain a real-time generated monitoring video stream, and segmenting and storing the generated monitoring video stream; transmitting the monitoring video stream to the target terminal in real time; receiving data packet reception feedback information returned by the target terminal, wherein the data packet reception feedback information includes the data volume of the real-time sub-video stream reception, and the real-time sub-video stream reception data volume is the data volume of the real-time sub-video stream received by the target terminal, and the target terminal generates a reception feedback information for each real-time sub-video stream received.
[0009] In a second aspect, some embodiments of the present disclosure provide a video transmission device, the device comprising: a sending unit, configured to send a preset network status test data packet to the target terminal in response to receiving a real-time monitoring video request sent by the target terminal; a first receiving unit, configured to receive reply information returned by the target terminal, wherein the reply information includes the data volume of the received data packet, and the data volume of the received data packet is the data volume of the network status test data packet received by the target terminal; a control unit, configured to control a monitoring camera to capture a real-time video stream and encode the captured real-time video stream using an encoder in response to determining that the ratio of the data volume of the received data packet to the data volume of the network status test data packet is less than a first preset threshold, to obtain a real-time generated monitoring video stream, and to segment and store the generated monitoring video stream; a transmission unit, configured to transmit the monitoring video stream to the target terminal in real time; a second receiving unit, configured to receive data packet reception feedback information returned by the target terminal, wherein the data packet reception feedback information includes the data volume of the real-time sub-video stream reception, and the real-time sub-video stream reception data volume is the data volume of the real-time sub-video stream received by the target terminal, and the target terminal generates a reception feedback information for each real-time sub-video stream received.
[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0012] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the video transmission method of some embodiments of the present disclosure, the real-time transmitted video stream can be preprocessed according to the network packet loss rate, so that the video stream can be stably transmitted to a certain extent. Specifically, the network packet loss phenomenon occurs during the transmission of the real-time video stream, and the reason why the real-time video stream cannot be stably transmitted is that when the real-time video stream is transmitted, it is easily affected by network factors. Based on this, the video transmission method of some embodiments of the present disclosure, first, in response to the real-time monitoring video request sent by the receiving target terminal, sends a pre-set network status test data packet to the above-mentioned target terminal. Then, receive the reply information returned by the above-mentioned target terminal, wherein the above-mentioned reply information includes the data volume of the received data packet, and the above-mentioned received data packet data volume is the data volume of the network status test data packet received by the above-mentioned target terminal. Therefore, before starting the real-time video stream recording, the network status is tested first, and then the current network packet loss rate is obtained according to the test. Then, in response to determining that the ratio of the data volume of the above-mentioned received data packet to the data volume of the above-mentioned network status test data packet is less than the first preset threshold value, the monitoring camera is controlled to capture the real-time video stream and the captured real-time video stream is encoded using an encoder to obtain a real-time generated monitoring video stream, and the generated monitoring video stream is segmented and stored. Thus, the transmission process of the real-time video stream can be adjusted according to the pre-tested network status. Then, the above-mentioned monitoring video stream is transmitted to the above-mentioned target terminal in real time. Finally, the data packet reception feedback information returned by the above-mentioned target terminal is received, wherein the above-mentioned data packet reception feedback information includes the real-time sub-video stream reception data volume, the real-time sub-video stream reception data volume is the data volume of the real-time sub-video stream received by the above-mentioned target terminal, and the above-mentioned target terminal generates a reception feedback information for each real-time sub-video stream received. Thus, the real-time transmitted video stream can be preprocessed according to the network packet loss rate, so that the video stream can be stably transmitted to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0014] Figure 1 is a flow chart of some embodiments of the video transmission method according to the present disclosure;
[0015] Figure 2 is a schematic diagram of the structure of some embodiments of the video transmission device disclosed in the present invention;
[0016] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0018] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0019] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0020] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0023] refer to Figure 1 , shows a process 100 of some embodiments of the video transmission method according to the present disclosure. The video transmission method comprises the following steps:
[0024] Step 101, in response to receiving a real-time monitoring video request sent by a target terminal, sending a preset network status test data packet to the target terminal.
[0025] In some embodiments, the execution subject of the video transmission method may send a preset network status test data packet to the target terminal in response to receiving a real-time monitoring video request sent by the target terminal. The target terminal may be a mobile terminal. The network status test data packet may be a preset video with a fixed data volume.
[0026] As an example, the target terminal may be a smart phone.
[0027] In some optional implementations of some embodiments, the execution subject may further perform the following steps before sending a preset network status test data packet to the target terminal in response to receiving a real-time monitoring video request sent by the target terminal:
[0028] The first step is to send video watermark acquisition information to the above target terminal.
[0029] The second step is to receive the video watermark information returned by the target terminal in response to the video watermark acquisition information. The video watermark information may be information generated by the user on the target terminal and used as a video watermark.
[0030] The third step is to perform a uniqueness check on the video watermark information, wherein the uniqueness check may be to determine whether each stored video watermark information includes the video watermark information.
[0031] In the fourth step, in response to determining that the video watermark information fails to pass the uniqueness check, a watermark information duplication prompt is sent to the target terminal, and the video watermark information is re-acquired.
[0032] In a fifth step, in response to determining that the video watermark information passes the uniqueness check, the video watermark information is stored.
[0033] Step 102: Receive reply information returned by the target terminal.
[0034] In some embodiments, the execution subject may receive reply information returned by the target terminal, wherein the reply information may include the data volume of received data packets, and the data volume of received data packets is the data volume of the network status test data packets received by the target terminal.
[0035] Therefore, the packet loss rate of the network status test data packet during transmission can be determined by using the ratio of the data volume of the received data packet in the reply information to the data volume of the network status test data packet.
[0036] Step 103, in response to determining that the ratio of the data volume of the received data packet to the data volume of the network status test data packet is less than a first preset threshold, controlling the monitoring camera to capture the real-time video stream and using the encoder to encode the captured real-time video stream to obtain a real-time generated monitoring video stream, and storing the generated monitoring video stream in segments.
[0037] In some embodiments, the above-mentioned execution entity can control the monitoring camera to capture the real-time video stream and use the encoder to encode the captured real-time video stream in response to determining that the ratio of the data volume of the above-mentioned received data packet to the data volume of the above-mentioned network status test data packet is less than a first preset threshold value, so as to obtain a real-time generated monitoring video stream, and store the generated monitoring video stream in segments.
[0038] In practice, the first preset threshold may be set according to actual application requirements and is not limited here.
[0039] In some optional implementation methods of some embodiments, the above-mentioned execution entity can also control the above-mentioned monitoring camera to capture the real-time video stream and use the encoder to encode the captured real-time video stream in response to determining that the ratio of the data volume of the above-mentioned received data packet to the data volume of the above-mentioned network status test data packet is greater than or equal to the above-mentioned first preset threshold, so as to obtain a real-time generated monitoring video stream.
[0040] Step 104: Transmit the monitoring video stream to the target terminal in real time.
[0041] In some embodiments, the execution subject transmits the monitoring video stream to the target terminal in real time, which may include the following steps:
[0042] The first step is to segment the real-time generated surveillance video stream to obtain a real-time sub-video stream sequence, wherein the data volume of each real-time sub-video stream in the real-time sub-video stream sequence is the same.
[0043] In the second step, the real-time sub-video streams are sequentially taken out from the head end of the real-time sub-video stream sequence to be sent to the target terminal.
[0044] The third step is to add the real-time sub-video stream generated in real time to the end of the above real-time sub-video stream sequence.
[0045] Optionally, the execution subject sequentially takes out the real-time sub video streams from the head end of the real-time sub video stream sequence to send to the target terminal, and may further include the following steps:
[0046] The first step is to copy the above real-time sub-video stream to obtain a copied sub-video stream.
[0047] The second step is to combine the preset watermark distinguishing information with the above video watermark information to obtain the copied video watermark information.
[0048] The watermark distinguishing information is used to be combined with the existing video watermark information to generate duplicate video watermark information that is distinguished from the existing video watermark information.
[0049] In practice, the above watermark distinguishing information can be set according to actual application requirements and is not limited here.
[0050] The third step is to add the video watermark information to the real-time sub-video stream to obtain the first real-time video stream.
[0051] The fourth step is to add the video watermark information to the copied sub-video stream to obtain a second real-time video stream.
[0052] Step 5: Segment the first real-time video stream and the second real-time video stream to obtain a segmented video stream sequence and a copied segmented video stream sequence. The number of segmented video streams in the segmented video stream sequence is the same as the number of copied segmented video streams in the copied segmented video stream sequence. The duration of each segmented video stream in the segmented video stream sequence is the same as the duration of each copied segmented video stream in the copied segmented video stream sequence.
[0053] In practice, the duration of segmenting the video stream can be set according to actual application needs and is not limited here.
[0054] As an example, the duration of the segmented video stream may be 30 seconds.
[0055] In the sixth step, the number of segmented video streams in the segmented video stream sequence is determined as the number of combinations.
[0056] Step 7: Generate an initial sequence, wherein the length of the initial sequence is the same as the number of combinations, and the values in the initial sequence are all zero.
[0057] Step 8. Randomly select one of the positive integers that is less than the above number of combinations as the cutting score.
[0058] The ninth step is to segment the initial sequence using the segmentation number to obtain a segmentation group sequence, wherein the number of segmentation groups in the segmentation group sequence is one more than the segmentation number, and any segmentation group in the segmentation group sequence includes at least one value.
[0059] Step 10: randomly assign target values to the cut groups in the cut group sequence to obtain a target cut group sequence, wherein the target cut group sequence includes at least one cut group whose values are the target value and at least one cut group whose values are zero.
[0060] In practice, the target value may be set according to actual application needs, which is not limited here. As an example, the target value may be 1.
[0061] In the eleventh step, the split video streams in the split video stream sequence corresponding to the positions in the target split group sequence where the above-mentioned numerical value is the target value are combined in sequence with the copied split video streams in the copied video stream sequence corresponding to the positions in the target split group sequence where the numerical value is zero, to obtain the target real-time sub-video stream.
[0062] Step 12: Send the above target real-time sub-video stream to the above target terminal.
[0063] The above-mentioned steps of sequentially extracting the real-time sub-video streams from the head end of the above-mentioned real-time sub-video stream sequence to send them to the above-mentioned target terminal and the extended steps thereof serve as an inventive point of an embodiment of the present disclosure, which solves the second technical problem mentioned in the background technology: "In private scenarios such as home monitoring, once illegal requests and controls are received, it will not only infringe on the relevant privacy, but also be difficult to trace." The factors that lead to the above-mentioned technical problems are often as follows: the video transmission process is easy to leak, and it is easy to receive illegal requests and controls. If the above-mentioned factors are solved, it is possible to trace the terminal device that sends the illegal request after the video is leaked, and determine the source of the video leakage. In order to achieve this effect, the present disclosure introduces video watermark information, and copies the real-time sub-video stream to obtain a copied sub-video stream, and watermarks the real-time sub-video stream and the copied sub-video stream respectively, and then segment and combine them to obtain a video stream with a unique combination feature. Then, when the video stream is leaked, the source of the video leakage can be determined based on the combination relationship therein.
[0064] In some optional implementations of some embodiments, the above execution subject may further perform the following steps:
[0065] The first step is to respond to receiving a real-time surveillance video termination request sent by the target terminal or monitoring a real-time surveillance video playback termination operation of the target terminal, executing the following sub-steps:
[0066] The first sub-step is to continue controlling the above-mentioned surveillance camera to shoot the video stream to obtain the pre-stored video stream.
[0067] The second sub-step is to store the pre-stored video stream in segments.
[0068] In the second step, in response to receiving the video playback request sent by the target terminal, the following steps are performed:
[0069] The first sub-step is to test the current network status to obtain the current network speed.
[0070] The second sub-step, in response to determining that the above-mentioned current network speed is less than the first preset network speed, compresses the image quality of the segmented pre-stored video stream to the first image quality, obtains the first compressed video stream, and sends the above-mentioned first compressed video stream to the above-mentioned target terminal.
[0071] The third sub-step, in response to determining that the above-mentioned current network speed is greater than or equal to the above-mentioned first preset network speed and less than the second preset network speed, compresses the image quality of the segmented pre-stored video stream to the second image quality, obtains the second compressed video stream, and sends the above-mentioned second compressed video stream to the above-mentioned target terminal, wherein the resolution of the above-mentioned second image quality is higher than the above-mentioned first image quality.
[0072] As an example, the first preset network speed may be 10M / S, and the first preset network speed may be 20M / S. The first picture quality may be 360P, and the first picture quality may be 1080P.
[0073] The fourth sub-step is, in response to determining that the current network speed is greater than or equal to the second preset network speed, sending the segmented pre-stored video stream to the target terminal.
[0074] Step 105: receiving feedback information of the data packet returned by the target terminal.
[0075] In some embodiments, the execution subject may receive data packet reception feedback information returned by the target terminal, wherein the data packet reception feedback information includes the amount of data received by the real-time sub-video stream, the amount of data received by the real-time sub-video stream is the amount of data received by the target terminal, and the target terminal generates one piece of reception feedback information each time it receives a real-time sub-video stream.
[0076] Therefore, the packet loss rate can be determined in real time according to the amount of data received by the real-time sub-video stream in the data packet reception feedback information, and then the video transmission process can be adjusted to reduce the packet loss rate during the transmission process to a certain extent, thereby improving user experience and video data transmission stability.
[0077] In some optional implementations of some embodiments, the above execution subject may further perform the following steps:
[0078] The first step is to determine the real-time packet loss rate during the transmission of the monitoring video stream according to the feedback information received from the data packet.
[0079] In the second step, in response to determining that the packet loss rate satisfies a first preset condition, the real-time sub-video stream taken from the head end of the real-time sub-video stream sequence is compressed to send the compressed real-time sub-video stream to the target terminal. The first preset condition is that the packet loss rate is less than or equal to a second preset threshold, and the second preset threshold is less than the first preset threshold.
[0080] In practice, the first preset threshold and the second preset threshold can be set according to actual application requirements, which are not limited here.
[0081] Optionally, the execution subject determines the real-time packet loss rate during the transmission of the monitoring video stream according to the feedback information received from the data packet, and may further include the following steps:
[0082] The first step is, in response to determining that the above-mentioned data packet reception feedback information is empty, determining that the real-time packet loss rate during the transmission of the above-mentioned monitoring video stream is 100%.
[0083] In the second step, in response to determining that the above data packet reception feedback information is not empty, the ratio of the amount of real-time sub-video stream received data in the above data packet reception feedback information to the amount of data of the real-time sub-video stream in the above real-time sub-video stream sequence is determined as the real-time packet loss rate.
[0084] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the video transmission method of some embodiments of the present disclosure, the real-time transmitted video stream can be preprocessed according to the network packet loss rate, so that the video stream can be stably transmitted to a certain extent. Specifically, the network packet loss phenomenon occurs during the transmission of the real-time video stream, and the reason why the real-time video stream cannot be stably transmitted is that when the real-time video stream is transmitted, it is easily affected by network factors. Based on this, the video transmission method of some embodiments of the present disclosure, first, in response to the real-time monitoring video request sent by the receiving target terminal, sends a pre-set network status test data packet to the above-mentioned target terminal. Then, receive the reply information returned by the above-mentioned target terminal, wherein the above-mentioned reply information includes the data volume of the received data packet, and the above-mentioned received data packet data volume is the data volume of the network status test data packet received by the above-mentioned target terminal. Therefore, before starting the real-time video stream recording, the network status is tested first, and then the current network packet loss rate is obtained according to the test. Then, in response to determining that the ratio of the data volume of the above-mentioned received data packet to the data volume of the above-mentioned network status test data packet is less than the first preset threshold value, the monitoring camera is controlled to capture the real-time video stream and the captured real-time video stream is encoded using an encoder to obtain a real-time generated monitoring video stream, and the generated monitoring video stream is segmented and stored. Thus, the transmission process of the real-time video stream can be adjusted according to the pre-tested network status. Then, the above-mentioned monitoring video stream is transmitted to the above-mentioned target terminal in real time. Finally, the data packet reception feedback information returned by the above-mentioned target terminal is received, wherein the above-mentioned data packet reception feedback information includes the real-time sub-video stream reception data volume, the real-time sub-video stream reception data volume is the data volume of the real-time sub-video stream received by the above-mentioned target terminal, and the above-mentioned target terminal generates a reception feedback information for each real-time sub-video stream received. Thus, the real-time transmitted video stream can be preprocessed according to the network packet loss rate, so that the video stream can be stably transmitted to a certain extent.
[0085] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a video transmission device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the video transmission device can be specifically applied to various electronic devices.
[0086] like Figure 2As shown, the video transmission device 200 of some embodiments includes: a sending unit 201, a first receiving unit 202, a control unit 203, a transmission unit 204 and a second receiving unit 205. The sending unit 201 is configured to send a preset network status test data packet to the target terminal in response to receiving a real-time monitoring video request sent by the target terminal; the first receiving unit 202 is configured to receive reply information returned by the target terminal, wherein the reply information includes a received data packet data volume, and the received data packet data volume is the data volume of the network status test data packet received by the target terminal; the control unit 203 is configured to control the monitoring camera to shoot real-time video in response to determining that the ratio of the received data packet data volume to the network status test data packet data volume is less than a first preset threshold value. The video stream is encoded by an encoder to obtain a real-time generated monitoring video stream, and the generated monitoring video stream is stored in segments; a transmission unit 204 is configured to transmit the monitoring video stream to the target terminal in real time; a second receiving unit 205 is configured to receive data packet reception feedback information returned by the target terminal, wherein the data packet reception feedback information includes the real-time sub-video stream reception data volume, the real-time sub-video stream reception data volume is the data volume of the real-time sub-video stream received by the target terminal, and the target terminal generates a reception feedback information for each real-time sub-video stream received.
[0087] It is understandable that the units described in the video transmission device 200 are similar to those described in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the video transmission device 200 and the units included therein, and will not be described in detail here.
[0088] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0089] like Figure 3As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0090] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0091] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0092] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0093] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0094] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to receiving a real-time monitoring video request sent by a target terminal, sends a preset network status test data packet to the target terminal; receives reply information returned by the target terminal, wherein the reply information includes the data volume of the received data packet, and the data volume of the received data packet is the data volume of the network status test data packet received by the target terminal; in response to determining that the ratio of the data volume of the received data packet to the data volume of the network status test data packet is less than a first preset threshold, controls the monitoring camera to capture the real-time video stream and uses an encoder to encode the captured real-time video stream to obtain a real-time generated monitoring video stream, and stores the generated monitoring video stream in segments; transmits the monitoring video stream to the target terminal in real time; receives data packet reception feedback information returned by the target terminal, wherein the data packet reception feedback information includes the data volume of the real-time sub-video stream reception, and the real-time sub-video stream reception data volume is the data volume of the real-time sub-video stream received by the target terminal, and the target terminal generates a reception feedback information for each real-time sub-video stream received.
[0095] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0096] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0097] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a sending unit, a first receiving unit, a control unit, a transmission unit, and a second receiving unit. The names of these units do not constitute a limitation on the units themselves in some cases. For example, the sending unit may also be described as a "unit that sends a preset network status test data packet to a target terminal."
[0098] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
Claims
1. A video transmission method, comprising: In response to receiving a real-time monitoring video request sent by a target terminal, sending a preset network status test data packet to the target terminal; Receiving reply information returned by the target terminal, wherein the reply information includes a data volume of received data packets, and the data volume of received data packets is a data volume of network status test data packets received by the target terminal; In response to determining that the ratio of the data volume of the received data packet to the data volume of the network status test data packet is less than a first preset threshold, controlling the monitoring camera to capture a real-time video stream and using an encoder to encode the captured real-time video stream to obtain a real-time generated monitoring video stream, and storing the generated monitoring video stream in segments; Transmitting the monitoring video stream to the target terminal in real time; Receive data packet reception feedback information returned by the target terminal, wherein the data packet reception feedback information includes the amount of real-time sub-video stream received data, and the real-time sub-video stream received data amount is the amount of data of the real-time sub-video stream received by the target terminal. The target terminal generates a reception feedback information for each real-time sub-video stream received.
2. The method according to claim 1, wherein: The real-time transmission of the monitoring video stream to the target terminal includes: Segmenting the surveillance video stream generated in real time to obtain a real-time sub-video stream sequence, wherein the data volume of each real-time sub-video stream in the real-time sub-video stream sequence is the same; Sequentially taking out the real-time sub-video streams from the head end of the real-time sub-video stream sequence to send to the target terminal; The real-time sub-video stream generated in real time is added to the tail end of the real-time sub-video stream sequence.
3. The method according to claim 2, wherein: The method further comprises: Determine the real-time packet loss rate during the transmission of the monitoring video stream according to the feedback information received from the data packet; In response to determining that the packet loss rate satisfies a first preset condition, the real-time sub-video stream taken from the head end of the real-time sub-video stream sequence is compressed to send the compressed real-time sub-video stream to the target terminal, wherein the first preset condition is that the packet loss rate is less than or equal to a second preset threshold, and the second preset threshold is less than the first preset threshold.
4. The method according to claim 3, wherein: The step of receiving feedback information from the data packet and determining a real-time packet loss rate during the transmission of the monitoring video stream comprises: In response to determining that the data packet reception feedback information is empty, determining that the real-time packet loss rate during the monitoring video stream transmission process is 100 percent; In response to determining that the data packet reception feedback information is not empty, a ratio of an amount of received data of the real-time sub-video stream in the data packet reception feedback information to an amount of data of the real-time sub-video stream in the real-time sub-video stream sequence is determined as a real-time packet loss rate.
5. The method according to claim 4, wherein: The method further comprises: In response to determining that the ratio of the data volume of the received data packet to the data volume of the network status test data packet is greater than or equal to the first preset threshold, the monitoring camera is controlled to capture a real-time video stream and an encoder is used to encode the captured real-time video stream to obtain a real-time generated monitoring video stream.
6. The method according to claim 5, wherein: The method further comprises: In response to receiving a real-time surveillance video termination request sent by the target terminal or monitoring a real-time surveillance video playback termination operation of the target terminal, executing the following sub-steps: Continue to control the surveillance camera to shoot the video stream to obtain the pre-stored video stream; The pre-stored video stream is stored in segments; In response to receiving a video playback request sent by the target terminal, performing the following steps: Test the current network status to get the current network speed; In response to determining that the current network speed is less than a first preset network speed, compressing the image quality of the pre-stored video stream stored in segments to a first image quality to obtain a first compressed video stream, and sending the first compressed video stream to the target terminal; In response to determining that the current network speed is greater than or equal to the first preset network speed and less than a second preset network speed, compressing the image quality of the pre-stored video stream stored in segments to a second image quality to obtain a second compressed video stream, and sending the second compressed video stream to the target terminal, wherein the resolution of the second image quality is higher than the first image quality; In response to determining that the current network speed is greater than or equal to the second preset network speed, the segmented pre-stored video stream is sent to the target terminal.
7. A video transmission device, comprising: A sending unit, configured to send a preset network status test data packet to the target terminal in response to receiving a real-time monitoring video request sent by the target terminal; A first receiving unit is configured to receive reply information returned by the target terminal, wherein the reply information includes a data volume of received data packets, and the data volume of received data packets is a data volume of network status test data packets received by the target terminal; A control unit, configured to, in response to determining that the ratio of the data volume of the received data packet to the data volume of the network status test data packet is less than a first preset threshold, control the monitoring camera to capture a real-time video stream and use an encoder to encode the captured real-time video stream to obtain a real-time generated monitoring video stream, and store the generated monitoring video stream in segments; A transmission unit, configured to transmit the monitoring video stream to the target terminal in real time; The second receiving unit is configured to receive data packet reception feedback information returned by the target terminal, wherein the data packet reception feedback information includes the amount of real-time sub-video stream reception data, and the real-time sub-video stream reception data amount is the amount of data of the real-time sub-video stream received by the target terminal. The target terminal generates a reception feedback information for each real-time sub-video stream received.
8. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Wireless video streaming service self-adaption rate control method based on QoE
CN103888846A
Mobile equipment video stream transmission control method and system
CN105263066A
Video monitoring client system suitable for various network conditions
CN110113662A
Monitoring system and monitoring method based on big data network
CN113794861A
Cryogenic Chillers for Evaluation of Quantum Devices
KR102722768B1
