CN-122027844-A - Data transmission method, apparatus, device, storage medium and program product
Abstract
The embodiment of the application provides a data transmission method, a device, equipment, a storage medium and a program product, wherein the method comprises the following steps: the video data are obtained, the transmission interval time length of the video data is determined, the video data are encoded to obtain multi-layer code stream data, the multi-layer code stream data comprise basic layer data and at least one enhancement layer data, the multi-layer code stream data are transmitted to the cloud server layer by layer from the basic layer data until the transmission time length is longer than the transmission interval time length, the enhancement layer data are stopped being transmitted, and the reliability of video data transmission is improved.
Inventors
- FAN YING
- LIU ZHENHAO
Assignees
- 杭州萤石软件有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20241112
Claims (12)
- 1. A data transmission method, applied to a video camera, comprising: acquiring video data and determining transmission interval duration of the video data; Coding the video data to obtain multi-layer code stream data, wherein the multi-layer code stream data comprises basic layer data and at least one enhancement layer data; and starting from the basic layer data, transmitting the multi-layer code stream data to a cloud server layer by layer until the transmission time period is longer than the transmission interval time period, and stopping transmitting the enhancement layer data.
- 2. The method of claim 1, wherein transmitting the multi-layer bitstream data layer by layer from the base layer data to a cloud server until a transmission time period is longer than the transmission interval duration, comprises: transmitting the basic layer data to the cloud server, and determining a basic time length corresponding to the transmission of the basic layer data; If the basic time length is smaller than the transmission interval time length, transmitting the at least one enhancement layer data layer by layer to the cloud server until the transmission time length is longer than the transmission interval time length, and stopping transmitting the enhancement layer data, wherein the transmission time length comprises the basic time length; And if the basic time length is greater than or equal to the transmission interval time length, stopping transmitting the enhancement layer data.
- 3. The method of claim 2, wherein transmitting the at least one enhancement layer data layer by layer to the cloud server until the transmission time period is longer than the transmission interval duration, comprises: transmitting the ith enhancement layer data to the cloud server, and determining the ith total transmission time length, wherein the ith total transmission time length comprises the basic time length and the time length for transmitting the previous i enhancement layer data; and (3) taking 1, 2 and the first and second transmission time periods in sequence until the i total transmission time period is longer than or equal to the transmission interval time period, or stopping transmitting the enhancement layer data when the i is equal to N, wherein the N is the number of the at least one enhancement layer data.
- 4. A method according to any one of claims 1-3, wherein the video camera comprises a memory card, and wherein transmitting the multi-layer code stream data layer by layer from the base layer data to a cloud server until after the transmission time period is longer than the transmission interval time period, and further comprising: if the multi-layer code stream data is not transmitted, determining at least one layer of target code stream data which is not transmitted in the multi-layer code stream data; and generating transmission information according to the at least one layer of target code stream data, wherein the transmission information comprises the identification of the at least one layer of target code stream data.
- 5. The method according to claim 4, wherein the method further comprises: Judging whether the bandwidth currently transmitted to the cloud server is larger than a preset bandwidth or not; If yes, determining at least one layer of target code stream data according to the transmission information, wherein the target code stream data comprises untransmitted base layer data and untransmitted enhancement layer data; determining transmission priorities corresponding to the at least one layer of target code stream data respectively; And sequentially transmitting the at least one layer of target code stream data according to the order of the transmission priority from high to low.
- 6. The method according to any one of claims 1-5, wherein encoding the video data to obtain multi-layer code stream data comprises: acquiring a plurality of preset parameters; And carrying out layered coding on the video data in a time domain through an encoder according to the plurality of preset parameters to obtain the base layer data and the at least one enhancement layer data.
- 7. The method of any of claims 1-6, wherein obtaining video data and determining a transmission interval duration of the video data comprises: acquiring a transmission mode of the camera, wherein the transmission mode is an adaptive transmission mode or a normal transmission mode; and when the transmission mode is determined to be the self-adaptive transmission mode, acquiring video data and determining the transmission interval duration of the video data.
- 8. The method according to any one of claims 1 to 7, wherein the base layer data is bitstream data capable of being decoded independently by a decoder to obtain a base video, the enhancement layer data is bitstream data for enhancing a quality corresponding to the base video, and the base video is a video corresponding to the video recording data.
- 9. A data transmission device for use with a video camera, the device comprising: the determining module is used for acquiring video data and determining the transmission interval duration of the video data; The coding module is used for coding the video data to obtain multi-layer code stream data, wherein the multi-layer code stream data comprises basic layer data and at least one enhancement layer data; And the transmission module is used for starting from the basic layer data, transmitting the multi-layer code stream data to a cloud server layer by layer until the transmission time length is longer than the transmission interval time length, and stopping transmitting the enhancement layer data.
- 10. An electronic device comprising a processor and a memory communicatively coupled to the processor; The memory stores computer-executable instructions; The processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1 to 8.
- 11. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1to 8.
- 12. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 8.
Description
Data transmission method, apparatus, device, storage medium and program product Technical Field Embodiments of the present application relate to the field of data processing technologies, and in particular, to a data transmission method, apparatus, device, storage medium, and program product. Background At present, a camera can support a cloud video function, and the cloud video function can be used for uploading video generated by equipment to a cloud server in real time so as to realize mass data storage and real-time remote access. The dependence of the cloud video on the network environment is larger in the uploading process, and the requirements on the network are more severe along with the improvement of the requirements of people on high image quality and the like. When the network fluctuates, the situation that the video is lost after the cloud video is uploaded fails exists, so that the reliability of video data transmission is lower. Disclosure of Invention The embodiment of the application provides a data transmission method, a device, equipment, a storage medium and a program product, which are used for solving the defect of lower reliability of video data transmission caused by the condition that video is lost after cloud video uploading fails when a network fluctuates in the prior art. In a first aspect, the present application provides a data transmission method, applied to a video camera, including: acquiring video data and determining transmission interval duration of the video data; Coding the video data to obtain multi-layer code stream data, wherein the multi-layer code stream data comprises basic layer data and at least one enhancement layer data; and starting from the basic layer data, transmitting the multi-layer code stream data to a cloud server layer by layer until the transmission time period is longer than the transmission interval time period, and stopping transmitting the enhancement layer data. In one possible implementation manner, starting from the base layer data, transmitting the multi-layer code stream data to a cloud server layer by layer until the transmission time period is longer than the transmission interval time period, stopping transmitting the enhancement layer data, including: transmitting the basic layer data to the cloud server, and determining a basic time length corresponding to the transmission of the basic layer data; If the basic time length is smaller than the transmission interval time length, transmitting the at least one enhancement layer data layer by layer to the cloud server until the transmission time length is longer than the transmission interval time length, and stopping transmitting the enhancement layer data, wherein the transmission time length comprises the basic time length; And if the basic time length is greater than or equal to the transmission interval time length, stopping transmitting the enhancement layer data. In one possible implementation manner, transmitting the at least one enhancement layer data layer by layer to the cloud server until the transmission time period is longer than the transmission interval time period, and stopping transmitting the enhancement layer data includes: transmitting the ith enhancement layer data to the cloud server, and determining the ith total transmission time length, wherein the ith total transmission time length comprises the basic time length and the time length for transmitting the previous i enhancement layer data; and (3) taking 1, 2 and the first and second transmission time periods in sequence until the i total transmission time period is longer than or equal to the transmission interval time period, or stopping transmitting the enhancement layer data when the i is equal to N, wherein the N is the number of the at least one enhancement layer data. In one possible implementation manner, the video camera includes a memory card, and starts from the base layer data, and transmits the multi-layer code stream data to a cloud server layer by layer, until the transmission time period is longer than the transmission interval time period, and after stopping transmitting the enhancement layer data, the video camera further includes: if the multi-layer code stream data is not transmitted, determining at least one layer of target code stream data which is not transmitted in the multi-layer code stream data; and generating transmission information according to the at least one layer of target code stream data, wherein the transmission information comprises the identification of the at least one layer of target code stream data. In one possible embodiment, the method further comprises: Judging whether the bandwidth currently transmitted to the cloud server is larger than a preset bandwidth or not; If yes, determining at least one layer of target code stream data according to the transmission information, wherein the target code stream data comprises untransmitted base layer data and untransmitted enhance