Data transmission method, device, terminal equipment and storage medium

By receiving and judging terminal requests on the server side, monitoring data is recorded only at the first request and file information is generated, the delay problem caused by serial download of multiple terminals is solved, and data transmission efficiency is improved.

CN115695719BActive Publication Date: 2025-03-04海南乾唐视联信息技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When multiple terminals request the same surveillance video, the server needs to process each request in serial, resulting in an increase in download delay of subsequent terminals and inefficient.

Method used

By receiving requests from multiple viewing terminals, it is determined whether it is the first request. If so, obtain monitoring data and record, generate recording file information, and then send the information to all terminals to avoid repeated recording.

Benefits of technology

This reduces the time when the terminal waits for download, reduces the time extension, improves data transmission efficiency, and avoids the process of downloading multiple terminals in sequence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695719B_ABST
    Figure CN115695719B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a data transmission method, apparatus, terminal device and storage medium, the method comprising: receiving viewing requests sent by multiple viewing terminals; judging the viewing requests, if the viewing request is the first request, obtaining monitoring data corresponding to a monitoring resource identifier, and recording the monitoring data to generate recording file information; sending the monitoring information to multiple viewing terminals, so that the server receives multiple viewing requests at the same time, judges the viewing requests, and only obtains the monitoring data corresponding to the monitoring resource identifier from the monitoring device when the viewing request is received for the first time, and sends the recorded recording file information to all viewing terminals, so that multiple viewing terminals do not need to download the monitoring data in sequence, and the same recording file information is sent to multiple viewing terminals at the same time, which reduces the time for the viewing terminals to wait for downloading, reduces the time extension, and improves the data transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a data transmission method, device, terminal equipment and storage medium. Background Art

[0002] When a large number of terminals request a certain surveillance video from the same surveillance device, the server will serially obtain the surveillance video from the surveillance device. That is to say, multiple virtual terminals are installed on the server. When multiple terminals request the same surveillance video, the server processes each request in turn through multiple virtual terminals. That is, one terminal can only download the surveillance video after it is finished downloading from the server. In this way, if all terminals complete the download, it will take a long time, which will cause a certain degree of delay for the terminals that download later. Summary of the invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide a data transmission method, apparatus, terminal device and storage medium that overcome the above problems or at least partially solve the above problems.

[0004] In a first aspect, an embodiment of the present invention provides a data transmission method, the method comprising:

[0005] receiving viewing requests sent by multiple viewing terminals, wherein the viewing requests are used to request monitoring data of the same monitoring resource identifier;

[0006] The viewing request is judged, and if the viewing request is a first request, monitoring data corresponding to the monitoring resource identifier is acquired, and the monitoring data is recorded to generate recording file information;

[0007] The recording file information is sent to the multiple viewing terminals.

[0008] Optionally, the acquiring the monitoring data corresponding to the monitoring resource identifier, and recording the monitoring data to generate recording file information includes:

[0009] Receiving monitoring data corresponding to the monitoring resource identifier through a live broadcast channel;

[0010] Recording the monitoring data into a monitoring file in MP4 format;

[0011] According to the monitoring file, address information corresponding to the monitoring file is generated.

[0012] Optionally, sending the recorded file information to the multiple viewing terminals includes:

[0013] The address information is sent to a plurality of viewing terminals, so that the plurality of viewing terminals download the monitoring data corresponding to the monitoring resource identifier according to the address information.

[0014] Optionally, the method further comprises:

[0015] When the monitoring file is recorded, the live broadcast channel is closed.

[0016] Optionally, the monitoring resource identifier includes at least a monitoring device identifier, a monitoring start time, and a monitoring end time.

[0017] In a second aspect, an embodiment of the present invention provides a data transmission device, the device comprising:

[0018] A receiving module, used for receiving viewing requests sent by multiple viewing terminals, wherein the viewing requests are used for requesting monitoring data of the same monitoring resource identifier;

[0019] A recording module, configured to judge the viewing request, and if the viewing request is a first request, obtain monitoring data corresponding to the monitoring resource identifier, and record the monitoring data to generate recording file information;

[0020] The sending module is used to send the recording file information to the multiple viewing terminals.

[0021] Optionally, the recording module is used to:

[0022] Receiving monitoring data corresponding to the monitoring resource identifier through a live broadcast channel;

[0023] Recording the monitoring data into a monitoring file in MP4 format;

[0024] According to the monitoring file, address information corresponding to the monitoring file is generated.

[0025] Optionally, the sending module is used to:

[0026] The address information is sent to a plurality of viewing terminals, so that the plurality of viewing terminals download the monitoring data corresponding to the monitoring resource identifier according to the address information.

[0027] Optionally, the recording module is used to:

[0028] When the monitoring file is recorded, the live broadcast channel is closed.

[0029] Optionally, the monitoring resource identifier includes at least a monitoring device identifier, a monitoring start time, and a monitoring end time.

[0030] In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and a memory;

[0031] The memory stores a computer program; and the at least one processor executes the computer program stored in the memory to implement the data transmission method provided in the first aspect.

[0032] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the data transmission method provided in the first aspect is implemented.

[0033] The embodiments of the present invention include the following advantages:

[0034] The data transmission method, apparatus, terminal device and storage medium provided by the embodiment of the present invention receive viewing requests sent by multiple viewing terminals, where the viewing requests are used to request monitoring data of the same monitoring resource identifier; judge the viewing request, and if the viewing request is the first request, obtain the monitoring data corresponding to the monitoring resource identifier, and record the monitoring data to generate recording file information; send the monitoring information to multiple viewing terminals, so that the server receives multiple viewing requests at the same time and judges the viewing requests. Only when the viewing request is received for the first time, the server obtains the monitoring data corresponding to the monitoring resource identifier from the monitoring device, and records the monitoring data to obtain the recording file information. During the recording process, the viewing requests received no longer obtain the monitoring data again for recording, but send the recorded recording file information to all viewing terminals. In this way, there is no need for multiple viewing terminals to download the monitoring data in sequence, and the same recording file information is sent to multiple viewing terminals at the same time, which reduces the time for the viewing terminals to wait for downloading, reduces the time extension, and improves the data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 is a flowchart of a data transmission method embodiment of the present invention;

[0036] Figure 2 is a flowchart of another data transmission method embodiment of the present invention;

[0037] Figure 3 is a flowchart of steps of another data transmission method embodiment of the present invention;

[0038] Figure 4 is a structural block diagram of an embodiment of a data transmission device of the present invention;

[0039] Figure 5 It is a structural schematic diagram of a terminal device of the present invention. DETAILED DESCRIPTION

[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] An embodiment of the present invention provides a data transmission method for processing parallel requests. The execution subject of this embodiment is a data transmission device, which is arranged on a server.

[0042] Reference Figure 1 , shows a flow chart of a data transmission method embodiment of the present invention, the method may specifically include the following steps:

[0043] S101, receiving viewing requests sent by multiple viewing terminals, where the viewing requests are used to request monitoring data of the same monitoring resource identifier;

[0044] Specifically, multiple viewing terminals are connected to a streaming media server, and the streaming media server is connected to each monitoring device through a coordination server. The streaming media server receives viewing requests for viewing monitoring sent by multiple viewing terminals, wherein the viewing requests are used to request monitoring data of the same monitoring resource identifier, and the monitoring resource identifier at least includes a monitoring device identifier, a monitoring start time, and a monitoring end time.

[0045] Exemplarily, terminal 1 to terminal 5 request to watch the monitoring video of monitoring device 1 from 10:00 to 10:30.

[0046] S102, judging the viewing request, if the viewing request is the first request, obtaining monitoring data corresponding to the monitoring resource identifier, and recording the monitoring data to generate recording file information;

[0047] Specifically, the monitoring data in the embodiment of the present invention is video data, wherein the video data refers to monitoring images saved within a certain period of time.

[0048] When receiving a viewing request, the streaming media server determines whether the viewing request is the first request for the monitoring resource identifier based on the monitoring resource identifier. If it is the first request, the monitoring data corresponding to the monitoring resource identifier is obtained from the monitoring device through the coordination server.

[0049] In the specific implementation process, when the streaming media server determines that the viewing request is the first request, it sends the viewing request to the co-conversion server. The co-conversion server obtains the monitoring data corresponding to the monitoring resource identifier from the monitoring device according to the monitoring resource identifier, and publishes the live broadcast corresponding to the monitoring data in a live broadcast manner through the virtual terminal installed on the co-conversion server. An idle virtual terminal is searched on the streaming media server, and a live broadcast channel with the co-conversion server is established. The live broadcast data published by the co-conversion server is received through the live broadcast channel, and the received live broadcast data is recorded to obtain the recording file information.

[0050] The recording file information includes not only the recording file, but also address information corresponding to the recording file generated according to the recording file.

[0051] For example, the streaming media server receives viewing requests sent by terminals 1 to 5, all of which are requests to view the monitoring video of monitoring device 1 from 10:00 to 10:30. The streaming media server judges the five viewing requests, determines the viewing request received first according to the order of the received time, and sends the viewing request to the coordination server. The coordination server obtains the monitoring data of monitoring device 1 from 10:00 to 10:30, and uses a virtual terminal to broadcast the monitoring data in a live broadcast mode. The streaming media server establishes a live broadcast channel for receiving the live broadcast data. When the live broadcast video starts to be received, the monitoring data starts to be recorded and the recording file information is generated.

[0052] S103: Send the recorded file information to multiple viewing terminals.

[0053] Specifically, after the streaming media server completes recording of the monitoring data identified by the monitoring resource, if it receives a viewing request sent by other viewing terminals during the recording process, the viewing request will not be processed until the recording of the monitoring data is completed. The streaming media server sends the recording file information to all viewing terminals that send viewing requests. In this way, there is no need for multiple viewing terminals to download the monitoring data in sequence. The same recording file information can be sent to multiple viewing terminals at the same time, which reduces the time the viewing terminals wait for downloading, reduces time extension, and improves data transmission efficiency.

[0054] The data transmission method provided by the embodiment of the present invention receives viewing requests sent by multiple viewing terminals, where the viewing requests are used to request monitoring data of the same monitoring resource identifier; judges the viewing requests, and if the viewing request is the first request, obtains the monitoring data corresponding to the monitoring resource identifier, and records the monitoring data to generate recording file information; sends the monitoring information to multiple viewing terminals, so that the server receives multiple viewing requests at the same time and judges the viewing requests. Only when the viewing request is received for the first time, the server obtains the monitoring data corresponding to the monitoring resource identifier from the monitoring device, and records the monitoring data to obtain the recording file information. During the recording process, the viewing requests received no longer re-acquire the monitoring data for recording, but send the recorded recording file information to all viewing terminals. In this way, there is no need for multiple viewing terminals to download the monitoring data in sequence, and the same recording file information is sent to multiple viewing terminals at the same time, which reduces the time for the viewing terminals to wait for downloading, reduces the time extension, and improves the data transmission efficiency.

[0055] Another embodiment of the present invention further supplements the data transmission method provided by the above embodiment.

[0056] like Figure 2 FIG. 1 is a flowchart showing another data transmission method embodiment of the present invention, wherein the data transmission method comprises:

[0057] S201. Receive viewing requests sent by multiple viewing terminals, where the viewing requests are used to request monitoring data of the same monitoring resource identifier; the monitoring resource identifier at least includes a monitoring device identifier, a monitoring start time, and a monitoring end time.

[0058] Specifically, multiple viewing terminals are connected to a streaming media server, and the streaming media server is connected to each monitoring device through a coordination server. The streaming media server receives viewing requests for viewing monitoring sent by multiple viewing terminals, wherein the viewing requests are used to request monitoring data of the same monitoring resource identifier, and the monitoring resource identifier at least includes a monitoring device identifier, a monitoring start time, and a monitoring end time.

[0059] S202, judging the viewing request;

[0060] When receiving multiple viewing requests, the streaming media server determines whether it is the first request based on the receiving time. If it is the first request, step S203 is executed; if it is not the first request, no processing is performed.

[0061] S203: If the viewing request is a first request, receiving monitoring data corresponding to the monitoring resource identifier through a live broadcast channel;

[0062] Specifically, when receiving a viewing request, the streaming media server determines whether the viewing request is the first request for the monitoring resource identifier based on the monitoring resource identifier. If it is the first request, the monitoring data corresponding to the monitoring resource identifier is obtained from the monitoring device through the coordination server.

[0063] In the specific implementation process, when the streaming media server determines that the viewing request is the first request, it sends the viewing request to the co-transmission server. The co-transmission server obtains the monitoring data corresponding to the monitoring resource identifier from the monitoring device according to the monitoring resource identifier, and publishes the live broadcast corresponding to the monitoring data in a live broadcast manner through the virtual terminal installed on the co-transmission server. The streaming media server searches for an idle virtual terminal, establishes a live broadcast channel with the co-transmission server, and receives the live broadcast data published by the co-transmission server through the live broadcast channel.

[0064] For example, the streaming media server receives viewing requests sent by terminals 1 to 5, all of which are requests to view the monitoring video of monitoring device 1 from 10:00 to 10:30. The streaming media server judges the five viewing requests, determines the viewing request received first according to the order of the received time, and sends the viewing request to the coordination server. The coordination server obtains the monitoring data of monitoring device 1 from 10:00 to 10:30, and uses a virtual terminal to broadcast the monitoring data in a live broadcast mode. The streaming media server establishes a live broadcast channel for receiving the live broadcast data. When the live broadcast video starts to be received, the monitoring data starts to be recorded and the recording file information is generated.

[0065] S204, recording the monitoring data into a monitoring file in MP4 format;

[0066] Specifically, the streaming media server starts recording the monitoring data at the same time as it starts receiving the monitoring data. During the recording process, based on the characteristics that the data volume remains unchanged but the download transmission is much faster than the normal playback, when recording the MP4 file, the timestamps of all video frames need to be reassigned to ensure that the data is played stably at normal multiples. For example, the timestamp of each video frame is increased by 40ms, and the monitoring data with the increased time is saved until the reception is completed and a recording file is generated.

[0067] The recording file information includes not only the recording file, but also address information corresponding to the recording file generated according to the recording file.

[0068] S205. Generate address information corresponding to the recording file according to the recording file.

[0069] In order to reduce the network bandwidth for transmission, the streaming media server generates address information corresponding to the recording file, namely, URL (uniform resource locator; uniform resource locator system) according to the recording file.

[0070] S206: When the recording file is finished, close the live broadcast channel.

[0071] Specifically, after the streaming media server completes recording the recording file, it closes the live broadcast channel. When a new viewing terminal wants to watch the monitoring resources of other monitoring resource identifiers, it needs to re-establish the live broadcast channel. By connecting the live broadcast channels, the operating pressure of the streaming media server can be reduced.

[0072] S207: Send the address information to multiple viewing terminals, so that the multiple viewing terminals download the monitoring data corresponding to the monitoring resource identifier according to the address information.

[0073] Specifically, after the streaming media server completes recording the file, it sends the URL of the generated recording file to multiple viewing terminals. Each viewing terminal downloads the monitoring data corresponding to the monitoring resource identifier according to the address information. In this way, there is no need for multiple viewing terminals to download the monitoring data in sequence. The same recording file information can be sent to multiple viewing terminals at the same time, which reduces the time the viewing terminals spend waiting for downloading, reduces time extension, and improves data transmission efficiency.

[0074] Figure 3 FIG. 1 is a flowchart of another embodiment of a data transmission method of the present invention. Figure 3 As shown, the data transmission method includes:

[0075] S301, select a monitoring channel and a video time period to request Q to download the video.

[0076] Specifically, the streaming media server receives viewing requests sent by multiple viewing terminals Q, where the viewing requests are used to request monitoring data of the same monitoring resource identifier, where the monitoring resource identifier includes a monitoring device identifier, a monitoring start time, and a monitoring end time.

[0077] S302: Determine whether there is a live broadcast channel.

[0078] The streaming media server determines whether there is a live broadcast channel at present. If there is a live broadcast channel, it means that monitoring data is being recorded. If there is no live broadcast channel, a live broadcast channel needs to be established to obtain monitoring data from the protocol server.

[0079] S303, if there is no live channel, the viewing request is sent to the cooperative server, and the cooperative server pulls the video data (monitoring data) of the same time period on the monitoring device, binds the data stream to an idle virtual terminal, and publishes the live broadcast. The streaming media server uses an idle virtual terminal to watch the live data of the cooperative server, i.e., the monitoring data, and creates a live channel, records information such as terminal Q, and introduces the received monitoring data, i.e., data stream information, into the channel of terminal Q. The streaming media server determines whether the live channel and terminal Q are the first requester. If so, it records the MP4 file and records the monitoring data into an MP4 file, i.e., a recording file.

[0080] If there is a live broadcast channel, it means that the streaming media server is already recording and will not process the request sent by the viewing terminal, waiting for notification.

[0081] S304, the live broadcast channel receives the monitoring data sent by the cooperative conversion server through the live broadcast channel.

[0082] S305, starting from 0, add 40ms to the timestamp of each frame.

[0083] During the recording process, the streaming media server resets the timestamp of each video frame received, for example, the timestamp of each frame is increased by 40ms, so that when the viewing terminal plays it, it can be played at a normal rate without accelerated playback.

[0084] S306: After recording is completed, a recording file in MP4 format is generated, and a URL corresponding to the recording file is generated;

[0085] S307: The streaming media server sends the URL to multiple viewing terminals, so that the multiple viewing terminals download the monitoring data corresponding to the monitoring resource identifier according to the address information URL.

[0086] The embodiment of the present invention adopts a live broadcast channel to download surveillance video, reducing the occupation of virtual terminals. In the embodiment of the present invention, what is broadcast live is video data, not real-time data. If there is a request, a live broadcast channel A is created for the same surveillance video and the same period of time. The receiving channel A, i.e., the live broadcast channel, is created only for the first requesting terminal. The video data is received through the live broadcast channel, and the received video data is saved and converted into an MP4 file. After that, the requesting terminal joins this channel A without stream data processing. After the first requesting terminal receives the surveillance data stream through the live broadcast channel and generates an MP4 file, the save address of the MP4 file is sent to all viewing terminals so that the viewing terminals can download it.

[0087] When recording an MP4 file, the embodiment of the present invention reassigns the timestamps of all frames in the recorded MP4 file based on the characteristic that the data volume remains unchanged but the download transmission is much faster than the normal playback, thereby ensuring that the data playback is stably played at a normal multiple.

[0088] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0089] The data transmission method provided by the embodiment of the present invention receives viewing requests sent by multiple viewing terminals, where the viewing requests are used to request monitoring data of the same monitoring resource identifier; judges the viewing requests, and if the viewing request is the first request, obtains the monitoring data corresponding to the monitoring resource identifier, and records the monitoring data to generate recording file information; sends the monitoring information to multiple viewing terminals, so that the server receives multiple viewing requests at the same time and judges the viewing requests. Only when the viewing request is received for the first time, the server obtains the monitoring data corresponding to the monitoring resource identifier from the monitoring device, and records the monitoring data to obtain the recording file information. During the recording process, the viewing requests received no longer re-acquire the monitoring data for recording, but send the recorded recording file information to all viewing terminals. In this way, there is no need for multiple viewing terminals to download the monitoring data in sequence, and the same recording file information is sent to multiple viewing terminals at the same time, which reduces the time for the viewing terminals to wait for downloading, reduces the time extension, and improves the data transmission efficiency.

[0090] Another embodiment of the present invention provides a data transmission device, which is used to execute the data transmission method provided in the above embodiment.

[0091] Reference Figure 4 , shows a structural block diagram of an embodiment of a data transmission device of the present invention, the device may specifically include the following modules: an acquisition module 401, a recording module 402 and a sending module 403, wherein:

[0092] The receiving module 401 is used to receive viewing requests sent by multiple viewing terminals, where the viewing requests are used to request monitoring data of the same monitoring resource identifier;

[0093] The recording module 402 is used to judge the viewing request, if the viewing request is the first request, obtain the monitoring data corresponding to the monitoring resource identifier, and record the monitoring data to generate recording file information;

[0094] The sending module 403 is used to send the recording file information to multiple viewing terminals.

[0095] The data transmission device provided by the embodiment of the present invention receives viewing requests sent by multiple viewing terminals, where the viewing requests are used to request monitoring data of the same monitoring resource identifier; judges the viewing requests, and if the viewing request is the first request, obtains the monitoring data corresponding to the monitoring resource identifier, and records the monitoring data to generate recording file information; sends the monitoring information to multiple viewing terminals, so that the server receives multiple viewing requests at the same time and judges the viewing requests. Only when the viewing request is received for the first time, the server obtains the monitoring data corresponding to the monitoring resource identifier from the monitoring device, and records the monitoring data to obtain the recording file information. During the recording process, the viewing requests received no longer obtain the monitoring data again for recording, but send the recorded recording file information to all viewing terminals. In this way, there is no need for multiple viewing terminals to download the monitoring data in sequence, and the same recording file information is sent to multiple viewing terminals at the same time, which reduces the time for the viewing terminals to wait for downloading, reduces the time extension, and improves the data transmission efficiency.

[0096] Another embodiment of the present invention further supplements the data transmission device provided in the above embodiment.

[0097] Optionally, the recording module is used to:

[0098] Receive monitoring data corresponding to the monitoring resource identifier through a live broadcast channel;

[0099] Record monitoring data into monitoring files in MP4 format;

[0100] According to the recording file, generate address information corresponding to the recording file.

[0101] Optionally, the sending module is used to:

[0102] The address information is sent to a plurality of viewing terminals, so that the plurality of viewing terminals download the monitoring data corresponding to the monitoring resource identifier according to the address information.

[0103] Optionally, the recording module is used to:

[0104] When the recording file is finished, close the live channel.

[0105] Optionally, the monitoring resource identifier includes at least a monitoring device identifier, a monitoring start time, and a monitoring end time.

[0106] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any combination without conflict, and this application is not limited thereto.

[0107] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0108] The data transmission device provided by the embodiment of the present invention receives viewing requests sent by multiple viewing terminals, where the viewing requests are used to request monitoring data of the same monitoring resource identifier; judges the viewing requests, and if the viewing request is the first request, obtains the monitoring data corresponding to the monitoring resource identifier, and records the monitoring data to generate recording file information; sends the monitoring information to multiple viewing terminals, so that the server receives multiple viewing requests at the same time and judges the viewing requests. Only when the viewing request is received for the first time, the server obtains the monitoring data corresponding to the monitoring resource identifier from the monitoring device, and records the monitoring data to obtain the recording file information. During the recording process, the viewing requests received no longer obtain the monitoring data again for recording, but send the recorded recording file information to all viewing terminals. In this way, there is no need for multiple viewing terminals to download the monitoring data in sequence, and the same recording file information is sent to multiple viewing terminals at the same time, which reduces the time for the viewing terminals to wait for downloading, reduces the time extension, and improves the data transmission efficiency.

[0109] Still another embodiment of the present invention provides a terminal device for executing the data transmission method provided in the above embodiment.

[0110] Figure 5 is a schematic diagram of the structure of a terminal device of the present invention, such as Figure 5 As shown, the terminal device includes: at least one processor 501 and a memory 502;

[0111] The memory stores a computer program; and at least one processor executes the computer program stored in the memory to implement the data transmission method provided in the above embodiment.

[0112] The terminal device provided in this embodiment receives viewing requests sent by multiple viewing terminals, where the viewing requests are used to request monitoring data of the same monitoring resource identifier; judges the viewing requests, and if the viewing request is the first request, obtains the monitoring data corresponding to the monitoring resource identifier, and records the monitoring data to generate recording file information; sends the monitoring information to multiple viewing terminals, so that the server receives multiple viewing requests at the same time and judges the viewing requests. Only when the viewing request is received for the first time, the monitoring data corresponding to the monitoring resource identifier is obtained from the monitoring device, and the monitoring data is recorded to obtain the recording file information. During the recording process, the viewing requests received no longer obtain the monitoring data again for recording, but send the recorded recording file information to all viewing terminals. In this way, there is no need for multiple viewing terminals to download the monitoring data in sequence, and the same recording file information is sent to multiple viewing terminals at the same time, which reduces the time for the viewing terminals to wait for downloading, reduces the time extension, and improves the data transmission efficiency.

[0113] Yet another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed, the data transmission method provided in any of the above embodiments is implemented.

[0114] According to the computer-readable storage medium of this embodiment, by receiving viewing requests sent by multiple viewing terminals, the viewing requests are used to request monitoring data of the same monitoring resource identifier; judging the viewing request, if the viewing request is the first request, obtaining the monitoring data corresponding to the monitoring resource identifier, and recording the monitoring data to generate recording file information; sending the monitoring information to multiple viewing terminals, so that the server receives multiple viewing requests at the same time, and judges the viewing requests. Only when the viewing request is received for the first time, the monitoring data corresponding to the monitoring resource identifier is obtained from the monitoring device, and the monitoring data is recorded to obtain the recording file information. During the recording process, the viewing requests received no longer re-obtain the monitoring data for recording, but the recording file information of the completed recording is sent to all viewing terminals. In this way, there is no need for multiple viewing terminals to download the monitoring data in sequence, and the same recording file information is sent to multiple viewing terminals at the same time, which reduces the time for the viewing terminals to wait for downloading, reduces the time extension, and improves the data transmission efficiency.

[0115] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0116] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, apparatuses, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0117] The embodiments of the present invention are described with reference to flowcharts and / or block diagrams of methods, electronic devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing electronic device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing electronic device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0118] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing electronic device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing electronic device so that a series of operating steps are executed on the computer or other programmable electronic device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable electronic device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0120] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0121] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or electronic device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or electronic device. In the absence of further restrictions, the elements defined by the sentence "comprises a..." do not exclude the presence of other identical elements in the process, method, article or electronic device that includes the elements.

[0122] The data transmission method and the data transmission device provided by the present invention are introduced in detail above. The principle and implementation mode of the present invention are explained by using specific examples in this article. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and the scope of application. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A data transmission method, characterized in that: The method comprises: receiving viewing requests sent by multiple viewing terminals, wherein the viewing requests are used to request monitoring data of the same monitoring resource identifier; The viewing request is judged, and if the viewing request is a first request, monitoring data corresponding to the monitoring resource identifier is acquired, and the monitoring data is recorded to generate recording file information; Sending the recorded file information to the multiple viewing terminals; The acquiring the monitoring data corresponding to the monitoring resource identifier, and recording the monitoring data to generate recording file information includes: Receiving monitoring data corresponding to the monitoring resource identifier through a live broadcast channel; Recording the monitoring data into a monitoring file in MP4 format; According to the monitoring file, address information corresponding to the monitoring file is generated.

2. The method according to claim 1, characterized in that The step of sending the recorded file information to the plurality of viewing terminals comprises: The address information is sent to a plurality of viewing terminals, so that the plurality of viewing terminals download the monitoring data corresponding to the monitoring resource identifier according to the address information.

3. The method according to claim 1, characterized in that The method further comprises: When the monitoring file is recorded, the live broadcast channel is closed.

4. The method according to any one of claims 1 to 3, characterized in that: The monitoring resource identifier at least includes a monitoring device identifier, a monitoring start time, and a monitoring end time.

5. A data transmission device, characterized in that: The device comprises: A receiving module, used for receiving viewing requests sent by multiple viewing terminals, wherein the viewing requests are used for requesting monitoring data of the same monitoring resource identifier; A recording module, configured to judge the viewing request, and if the viewing request is a first request, obtain monitoring data corresponding to the monitoring resource identifier, and record the monitoring data to generate recording file information; A sending module, used for sending the recording file information to the multiple viewing terminals; The recording module is used for: Receiving monitoring data corresponding to the monitoring resource identifier through a live broadcast channel; Recording the monitoring data into a monitoring file in MP4 format; According to the monitoring file, address information corresponding to the monitoring file is generated.

6. The device according to claim 5, characterized in that The sending module is used for: The address information is sent to a plurality of viewing terminals, so that the plurality of viewing terminals download the monitoring data corresponding to the monitoring resource identifier according to the address information.

7. A terminal device, characterized in that: include: at least one processor and memory; The memory stores a computer program; The at least one processor executes the computer program stored in the memory to implement the data transmission method according to any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the data transmission method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Video playing method and device, video playing client side and multimedia server

    CN104284239A

  • Monitoring video stream processing method and system based on articulated naturality web

    CN110113559A