CN115002527A - Data transmission optimization method, device, equipment and storage medium - Google Patents

Data transmission optimization method, device, equipment and storage medium Download PDF

Info

Publication number
CN115002527A
CN115002527A CN202210601098.0A CN202210601098A CN115002527A CN 115002527 A CN115002527 A CN 115002527A CN 202210601098 A CN202210601098 A CN 202210601098A CN 115002527 A CN115002527 A CN 115002527A
Authority
CN
China
Prior art keywords
data
cache
data set
cache data
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210601098.0A
Other languages
Chinese (zh)
Other versions
CN115002527B (en
Inventor
李阳达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202210601098.0A priority Critical patent/CN115002527B/en
Publication of CN115002527A publication Critical patent/CN115002527A/en
Application granted granted Critical
Publication of CN115002527B publication Critical patent/CN115002527B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • H04N21/43076Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen of the same content streams on multiple devices, e.g. when family members are watching the same movie on different devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the application is suitable for the technical field of big data, and provides a data transmission optimization method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring first data information of a first cache data set in a local cache; the first cached data set includes at least one first cached data; the first data information at least comprises a first total data volume of the first cache data set and the cache time of each first cache data; if any first data information does not accord with the preset rule, combining a plurality of first cache data in the first cache data set according to the cache time to obtain a second cache data set; the second total data volume of the second cache data set conforms to a preset rule; and respectively sending the second cache data set to the multi-terminal picture display equipment for display. By adopting the method, the interaction times of the terminal equipment and the picture display equipment can be reduced.

Description

Data transmission optimization method, device, equipment and storage medium
Technical Field
The present application belongs to the field of big data technologies, and in particular, to a data transmission optimization method, apparatus, device, and storage medium.
Background
With the deep development of the internet of things, the timeliness and synchronism of video data transmission in the video playing industry are facing the unprecedented and prosperous development. Video playing technology is increasingly related to various fields of life, such as video conference, video live broadcast, monitoring and the like.
Generally, in order to make the pictures played by the multi-terminal picture display device consistent in real time, when the terminal device collects video data, the video data is immediately synchronized to the multi-terminal picture display device for playing. However, the data transmission channel originally used for transmitting data can only process one data transmission request at a time, and the size of the data amount transmitted at a time is fixed. Therefore, in the time period when the terminal device frequently generates video data and synchronizes with the data transmission channel, the terminal device will respectively obtain the video data from the data transmission channel in real time based on the data transmission request of each picture display device and transmit the video data. Based on this, the terminal device will be caused to perform a large and repetitive data synchronization process with each of the screen display devices, respectively.
Disclosure of Invention
The embodiment of the application provides a data transmission optimization method, a data transmission optimization device, a terminal device and a storage medium, and can reduce the interaction times of the terminal device and a picture display device.
In a first aspect, an embodiment of the present application provides a data transmission optimization method, where the method includes:
acquiring first data information of a first cache data set in a local cache; the first cached data set includes at least one first cached data; the first data information at least comprises a first total data volume of the first cache data set and the cache time of each first cache data;
if any first data information does not accord with the preset rule, merging a plurality of first cache data in the first cache data set according to the cache time to obtain a second cache data set; the second total data volume of the second cache data set meets a preset rule;
and respectively sending the second cache data set to the multi-terminal picture display equipment for display.
In a second aspect, an embodiment of the present application provides a data transmission optimization apparatus, where the apparatus includes:
the acquisition module is used for acquiring first data information of a first cache data set in a local cache; the first cached data set includes at least one first cached data; the first data information at least comprises a first total data volume of the first cache data set and the cache time of each first cache data;
the merging module is used for merging a plurality of first cache data in the first cache data set according to the cache time to obtain a second cache data set if any first data information does not accord with the preset rule; the second total data volume of the second cache data set conforms to a preset rule;
and the display module is used for respectively sending the second cache data sets to the multi-terminal image display equipment for displaying.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method according to the first aspect is implemented.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, which, when run on a terminal device, causes the terminal device to execute the method of the first aspect.
Compared with the prior art, the embodiment of the application has the beneficial effects that: and determining whether to merge each first cache data in the first cache data set or not according to the first total data volume of the cached first cache data set in the local cache and the cache time of each first cache data. And then, when the plurality of first cache data are determined to be merged, generating a second cache data set, wherein the generated second cache data set only needs to meet the condition that the second total data amount meets the preset rule, and does not need to consider whether other data information in the second cache data set meets the preset rule. Therefore, the terminal device can trigger the merging operation of the first cache data based on the cache time of the first cache data and the first total data volume, and timely send the second cache data to the multi-terminal image display device, so that the continuity of playing videos by the multi-terminal image display device is ensured. Moreover, as the generated second total data volume meets the preset rule, the second cache data set can maximally contain the first cache data, and multiple interactions between the terminal device and the multi-terminal picture display device are reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart illustrating an implementation of a data transmission optimization method according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating an implementation manner of S102 of a data transmission optimization method according to an embodiment of the present application;
fig. 3 is a flowchart illustrating an implementation of a data transmission optimization method according to another embodiment of the present application;
fig. 4 is a flowchart of an implementation of a data transmission optimization method according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of a data transmission optimization apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
The data transmission optimization method provided by the embodiment of the application can be applied to terminal devices such as a tablet computer, a notebook computer, a super-mobile personal computer (UMPC), and the like, and the embodiment of the application does not limit the specific types of the terminal devices.
Referring to fig. 1, fig. 1 shows a flowchart of an implementation of a data transmission optimization method provided in an embodiment of the present application, where the method includes the following steps:
s101, terminal equipment obtains first data information of a first cache data set in a local cache; the first cached data set includes at least one first cached data; the first data information includes at least a first total data amount of the first cache data set and a cache time of each first cache data.
In an embodiment, the device for executing the method may be a terminal device, and a plurality of first cache data may be stored in a designated storage location of the terminal device in advance, or the terminal device may obtain the first cache data in real time through network transmission. The acquired first cache data includes, but is not limited to, video data, audio data, and the like. In this embodiment, the video data is explained as an example.
In an embodiment, the local cache may be a memory of the terminal device itself, and is used for storing the first cache data set. Taking a terminal device as an example of a monitoring device, the monitoring device can generate monitoring video data in real time during operation, and the monitoring video data needs to be transmitted to a plurality of display devices in real time. However, the monitored video data received by each display device may not be the same due to various factors such as different receiving rates of each display device, network delay, and the like. Therefore, in this embodiment, the terminal device may perform merging processing on the monitored video data to be played in advance, so as to make the video pictures played by the multiple display devices consistent, and reduce the number of data interactions between the display devices and the terminal device.
It should be noted that, when the terminal device acquires the first cache data set in the local cache, the terminal device needs to store the first cache data acquired in real time in the local cache in advance, and then the terminal device may acquire the first cache data set in the local cache every preset time period.
In an embodiment, the first cached data set may include one or more first cached data, or may not include any first cached data, which is not limited thereto. It will be appreciated that when the first set of buffered data does not include the first buffered data, the first total amount of data is zero and there is also no corresponding buffering time.
In another embodiment, the first data information may further include a total amount of the first cached data in the first cached data set, and the total data amount and the caching time are only two examples, which is not limited thereto.
S102, if any first data information does not accord with a preset rule, the terminal equipment merges a plurality of first cache data in the first cache data set according to cache time to obtain a second cache data set; the second total data size of the second cache data set meets a preset rule.
In an embodiment, the step of determining that any of the first data messages does not comply with the predetermined rule may specifically be: the total data volume of the first cache data set is larger than a preset data volume; or the total number of the first cache data sets exceeds a preset number; or, the buffering time of the first cache data stored earliest in the local cache exceeds the preset interval duration, which is not limited herein.
Thus, it can be appreciated that the trigger conditions for the merging process on the first cached data set include, but are not limited to: the total data volume of the first cache data set is larger than a preset data volume; or the total number of the first cache data sets exceeds a preset number; or, the buffering time of the first cache data stored earliest in the local cache exceeds the preset interval duration, which is not limited herein.
It is understood that the total amount of data in the first cache data set exceeds the preset data amount; or, the total number of the first cache data sets exceeds a preset number; or, when the buffering time of the first cache data stored in the local cache at the earliest exceeds the preset interval time, the terminal device may further merge each first cache data in the first cache data. That is, after merging the first cached data, the first cached data set is generally divided into two parts. At this time, the terminal device may determine a portion corresponding to the first cached data including the earliest caching time as the second cached data set.
In addition, the second total data amount of the second cache data set should comply with the preset rule. I.e. the second total data amount should be less than or equal to the preset data amount. It is understood that the second cache data set includes the cache time of the first cache data stored in the local cache at the earliest time, and the cache time may exceed the preset interval duration. Therefore, in the generated second cache data set, it is not necessary to determine whether the cache time of the first cache data earliest stored in the local cache satisfies the preset rule.
The preset data amount, the preset number and the preset interval duration can be preset according to actual conditions, and are not limited.
It can be understood that, if the preset interval duration is too long, the screen display device will be in a dark screen state for a long time when the data in the second cache data set sent by the terminal device last time has been played. And if the preset data volume is too large, the picture display equipment is in a condition of receiving the second cache data set for a long time, and cannot play the data in the second cache data set in real time. If the preset interval duration is too short and the preset data amount is too small, the data interaction times of the terminal equipment and the picture display equipment cannot be reduced to the maximum extent.
And S103, the terminal equipment respectively sends the second cache data set to the multi-terminal picture display equipment for display.
In an embodiment, the screen display device includes, but is not limited to, a player, a video display, and the like. In order to ensure that the video pictures played by the multi-terminal picture display device are consistent in real time when playing video data, the video data is usually synchronized to the multi-terminal picture display device immediately when the terminal device generates the video data. However, in a short time, this process will cause the terminal device to perform a large and frequent data interaction with the multi-end screen display device.
Based on this, in this embodiment, a second cache data set is generated by merging the first cache data to be synchronized, and the second cache data set is sent to the multi-end screen display device for synchronous playing. It can be understood that the video data included in the second cache data set is generated after performing the judgment processing based on the preset rule. Therefore, on the premise of ensuring that the video data played by the multi-terminal picture display equipment is consistent in real time, the terminal equipment can also reduce the sending times of sending the video data with the multi-terminal picture display equipment.
It can be understood that, because there is only one local cache, and the terminal device sends the second cache data sets in the local cache to the multi-terminal image display device respectively, it can be considered that the second cache data sets are sent to the multi-terminal image display device simultaneously. I.e. the time at which the multi-end picture display device receives the second buffered data set is typically consistent. Based on this, each picture display device can be considered to be playing synchronously with respect to the received second buffered data set.
In this embodiment, whether to perform merging processing on each first cache data in the first cache data set is determined according to the first total data volume of the first cache data set cached in the local cache and the cache time of each first cache data. And then, when the plurality of first cache data are determined to be merged, generating a second cache data set, wherein the generated second cache data set only needs to meet the condition that the second total data amount meets the preset rule, and does not need to consider whether other data information in the second cache data set meets the preset rule. Therefore, the terminal device can trigger the merging operation of the first cache data based on the cache time of the first cache data and the first total data volume, and timely send the second cache data to the multi-terminal image display device, so that the continuity of playing videos by the multi-terminal image display device is ensured. In addition, the generated second total data volume meets the preset rule, so that the second cache data set can maximally contain the first cache data, and multiple interactions between the terminal equipment and the multi-terminal picture display equipment are reduced.
In an embodiment, referring to fig. 2, in S102, a plurality of first cache data in the first cache data set are merged according to the cache time to obtain the second cache data set, which may specifically be implemented by the following sub-steps S1021 to S1024:
s1021, the terminal device obtains the caching time of each first caching data and the data volume of each first caching data.
In an embodiment, when the first cached data set does not include any first cached data, it may be determined that no data that needs to be sent to the multi-terminal screen display device is stored in the local cache. I.e. without performing the process of merging the first set of cached data.
In an embodiment, if the first cache data set includes at least one first cache data, when the terminal device stores each first cache data, the terminal device may record a cache time of each first cache data in the local cache and a data volume of each first cache data, respectively. Taking the first cache data as the video data as an example, because the video data is continuously played based on time, the time that each first cache data is acquired and stored by the terminal device is generally continuous.
And S1022, if the caching time of the first cache data stored in the local cache at the earliest time exceeds the preset interval duration, sequentially adding and caching the data quantity of the N first cache data with the earlier caching time according to the caching time when the first total data quantity is greater than the preset data quantity by the terminal equipment.
And S1023, when the data volume of the N first cache data is smaller than or equal to the preset data volume and the data volume of the N +1 first cache data is larger than the preset data volume, the terminal equipment merges the N first cache data into a second cache data set.
And S1024, if the caching time of the first cache data which is stored in the local cache at the earliest time exceeds a preset interval duration and the total data volume of the first cache data set is less than or equal to a preset data volume, determining the first cache data set as a second cache data set by the terminal equipment.
In an embodiment, for a plurality of first cached data in the first cached data set, the first cached data that is normally in the local cache is the cached data that belongs to the oldest storage. That is, the interval between the buffering time of the first cache data stored earliest and the current time is longest. Based on this, the terminal device may calculate an interval duration between the cache time of the first cache data earliest stored in the local cache and the current time, and then calculate the total data amount of the first cache data set when the interval duration exceeds the preset interval duration.
In an embodiment, when the total data amount is greater than the preset data amount, the data amounts of the N first cache data whose cache time is earlier are sequentially added and buffered according to the cache time until the total data amount of the N first cache data is less than or equal to the preset data amount, and the total data amount of the N +1 first cache data is greater than the preset data amount. At this time, the N first cache data sets are merged to obtain a second cache data set. In addition, if the total data volume of the first cache data set is less than or equal to the preset data volume, the terminal device may directly use the first cache data set as the second cache data set.
It should be noted that, the above steps are only a case of performing merging processing on the first cache data set when the cache time of the first cache data cached in the local cache at the earliest time does not meet the preset rule first. It can be understood that the terminal device should determine whether any kind of data information complies with the preset rule in real time.
Therefore, if the caching time of the first cache data cached in the local cache at the earliest time always meets the preset rule, the terminal device may directly add and cache the data amount of the N first cache data with the earliest caching time in sequence according to the caching time when the first total data amount of the first cache data set exceeds the preset data amount until the total data amount of the N first cache data satisfies the condition that the total data amount is less than or equal to the preset data amount, and the total data amount of the N +1 first cache data is greater than the preset data amount.
For example, if the caching time of the first cache data cached in the local cache at the earliest time always meets a preset rule, when new first cache data is received at the current time, calculating whether the sum of the data volume of the new first cache data and the data volume (first total data volume) of the existing first cache data set exceeds a preset data volume; if the data volume does not exceed the preset data volume, storing the new first cache data in a local cache to obtain a new first cache data set; otherwise, the existing first cache data is directly merged into the second cache data set.
In an embodiment, based on the above description of S1024, when the buffering time of the first cache data stored earliest in the local cache exceeds the preset interval time, the total data amount of the first cache data set may be less than or equal to the preset data amount. Therefore, the total data amount of the merged second cached data set at this time has not exceeded the preset data amount. Based on this, referring to fig. 3, after the first cached data set is determined as the second cached data set, the following steps S1-S4 are further included:
and S1, if the new first cache data are received in the local cache at the current moment, the terminal device calculates the sum of the data amount between the new first cache data and the second cache data set.
In an embodiment, the new first cache data is data acquired by the terminal device at the current time, and in a normal case, when the terminal device acquires the new first cache data, the data should be stored in the local cache. At this time, when the second total data volume of the already generated second cache data set does not exceed the preset data volume, the terminal device may further merge the new first cache data with the second cache data set.
And S2, if the sum of the data volumes is less than or equal to the preset data volume, the terminal equipment merges the first cache data into the second cache data set to obtain a new second cache data set.
And S3, the terminal equipment repeatedly executes the steps S1-S2 to update the second cache data set.
And S4, if the sum of the data volume is larger than the preset data volume, the terminal equipment sends the second cache data set to the multi-terminal picture display equipment.
In an embodiment, based on the above description of the second cached data set, it can be known that the total data amount of the second cached data set should be less than or equal to the preset data amount in this case. Based on this, at the current time, if new first cache data is received, the terminal device may perform the following determination process. Specifically, the second total data size is added to the data size of the new first cache data. And if the summed total data amount exceeds the preset data amount, sending the original second cache data set to the multi-terminal picture display equipment. And if the total data volume after the summation does not exceed the preset data volume, merging the first cache data and the original second cache data set to obtain a new second cache data set. And then, judging whether new first cache data are cached in the local cache at the current moment again, and repeatedly executing the steps. Therefore, the data volume of the second cache data set sent by the terminal device each time is maximized.
It should be noted that if the above steps S1-S2 are repeated all the time, the time for the terminal device to send the second buffer data to the multi-screen display device may be delayed. Therefore, referring to fig. 3, after repeatedly performing the steps S1-S2 at S3 to update the second cached data set, the terminal device may further include the following steps S5-S7 to process the second cached data set:
s5, the terminal device counts the execution time length for repeatedly executing the steps S1-S2.
And S6, if the execution duration exceeds the preset execution duration, the terminal device acquires a second cache data set updated after the preset execution duration is executed.
And S7, the terminal equipment respectively sends the updated second cache data set to the multi-terminal picture display equipment.
In an embodiment, the preset execution time may be set by a user according to an actual situation, which is not limited. Generally, in order to ensure the continuity of the video played by the multi-terminal image display device, the preset execution time period may be set to a shorter time period, for example, a time period of 5 seconds or 10 seconds.
It is to be added that the purpose of setting the preset execution duration is to: the interaction times of the terminal equipment and the multi-terminal picture display equipment are reduced as much as possible under the condition that the multi-terminal picture display equipment can continuously play videos.
It is understood that if the new first buffered data received at the current time is not merged into the second buffered data set, the new first buffered data will need to be transmitted next time. And under the condition that the subsequent first cache data to be processed does not exist, increasing the data interaction times of the terminal equipment and the multi-terminal image display equipment.
Based on this, the terminal device may also set a judgment condition for terminating the repetition step when performing the repeated process. Specifically, the execution duration of repeatedly executing the steps S1-S5 is recorded, and when the execution duration exceeds the preset execution duration, a new second cache data set updated after the preset execution duration is executed is obtained. Namely, after the preset time length is reached, the updating of the second cache data set is stopped, and the updated new second cache data set is sent to the multi-terminal image display device.
In an embodiment, referring to fig. 4, after the second cached data sets are respectively sent to the multi-terminal screen display device for display in S103, the terminal device may further process the second cached data sets through the following steps S131 to S135:
s131, if response data returned by each terminal of the image display equipment are received within the target time length and the response data all represent that the second cache data set is completely received, the terminal equipment deletes the second cache data set from the local cache.
S132, if not, the terminal equipment reserves the second cache data set in the local cache.
In an embodiment, the target duration may be set by a worker according to actual conditions, and the target duration should be a shorter duration in case of a smooth network. For example, a duration of 1s-5 s. Wherein, the response data is the data returned by the picture display equipment. Which includes the response result of the received complete second cached data set and the response result of the received incomplete second cached data set (i.e., there was a loss during the data transmission)
The image display device determines whether the received second cached data set is complete as in the prior art, which is not described in detail. It should be added that if the screen display device does not receive the second cached data set, the screen display device will not return any response data.
It can be understood that, if the response data returned by each terminal of the screen display device is not received within the target duration, or the received response data does not represent that the second cache data set is completely received, it indicates that the screen display device needs to obtain the complete second cache data set from the terminal device again. Therefore, the second cached data set in the local cache needs to be maintained.
However, if the second cached data set is always reserved in the local cache, it will affect the process of receiving and merging the new first cached data by the terminal device, so after S132, the terminal device may further perform the following steps S133-S135 to process the second cached data set in the local cache:
s133, aiming at the target picture display equipment which does not return response data in the target time length or the response data represents that the second cache data set is lost, the terminal equipment continuously issues the second cache data set to the target picture display equipment for preset times.
And S134, if the response data returned by the target picture display device is not received in the target time length within the continuous preset times or the response data represent that the second cache data set is lost, the terminal device disconnects a data transmission channel with the target picture display device.
And S135, the terminal equipment deletes the second cache data set in the local cache.
In an embodiment, the preset number of times may be three times, and may be specifically set according to an actual situation. And if the target picture display equipment returns the response data representing that the second cache data set receives the complete data at any time, stopping sending the second cache data set to the picture display equipment. And if the response data returned by the target picture display equipment is not received in the target time length within the continuous preset times or the response data represents that the second cache data set is lost, indicating that the target picture display equipment has a problem. The terminal device can disconnect the data transmission channel with the target screen display device at this time.
It can be understood that, after the data transmission channel with the target screen display device is disconnected, all the screen display devices still connected to the terminal device have received the second cached data set. Thus, the terminal device may delete the second cached data set in the local cache.
Referring to fig. 5, fig. 5 is a block diagram of a data transmission optimization apparatus according to an embodiment of the present disclosure. The data transmission optimizing apparatus in this embodiment includes modules for executing the steps in the embodiments corresponding to fig. 1 to 3. Please refer to fig. 1 to 3 and fig. 1 to 3 for the corresponding embodiments. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 5, the data transmission optimizing apparatus 500 may include: an obtaining module 510, a merging module 520, and a display module 530, wherein:
an obtaining module 510, configured to obtain first data information of a first cache data set in a local cache; the first cached data set includes at least one first cached data; the first data information includes at least a first total data amount of the first cache data set and a cache time of each first cache data.
A merging module 520, configured to merge multiple first cache data in the first cache data set according to the cache time if any first data information does not meet a preset rule, to obtain a second cache data set; the second total data size of the second cache data set meets a preset rule.
And a display module 530, configured to send the second cached data sets to the multi-end screen display devices respectively for displaying.
In an embodiment, the merging module 520 is further configured to:
if the first cache data set is in the first cache data set, the caching time of the first cache data which is stored in the local cache at the earliest exceeds the preset interval duration; or, if the first total data volume is larger than the preset data volume, judging that the first data information does not accord with the preset rule; and merging the first cache data according to the cache time to obtain a second cache data set.
In an embodiment, the merging module 520 is further configured to:
acquiring the caching time of each first cache data and the data volume of each first cache data; if the caching time of the first cache data stored in the local cache at the earliest time exceeds the preset interval duration, sequentially adding and caching the data quantity of N first cache data with earlier caching time according to the caching time when the first total data quantity is greater than the preset data quantity; when the data volume of the N first cache data is smaller than or equal to the preset data volume and the data volume of the N +1 first cache data is larger than the preset data volume, combining the N first cache data into a second cache data set; and if the caching time of the first cache data stored in the local cache at the earliest time exceeds the preset interval duration and the total data volume of the first cache data set is less than or equal to the preset data volume, determining the first cache data set as a second cache data set.
In an embodiment, the data transmission optimizing apparatus 500 further includes:
and a calculating module, configured to S1, if new first cache data is received in the local cache at the current time, calculate a sum of data amounts between the new first cache data and the second cache data set.
And a second cache data set generating module, configured to, at S2, merge the first cache data into the second cache data set if the sum of the data amounts is less than or equal to the preset data amount, to obtain a new second cache data set.
And the updating module is used for S3, repeatedly executing the steps S1-S2 and updating the second cache data set.
And the first sending module is used for S4, and if the sum of the data amount is larger than the preset data amount, sending the second cache data set to the multi-terminal picture display device.
In an embodiment, the data transmission optimizing apparatus 500 further includes:
and the counting module is used for counting the execution time length of repeatedly executing the steps S1-S2.
And the second cache data set acquisition module is used for acquiring a second cache data set updated after the preset execution time length is executed if the execution time length exceeds the preset execution time length.
And the second sending module is used for respectively sending the updated second cache data set to the multi-terminal picture display equipment.
In an embodiment, the data transmission optimizing apparatus 500 further includes:
and the first deleting module is used for deleting the second cache data set from the local cache if response data returned by each terminal of the image display equipment are received within the target time length and the response data all represent that the second cache data set is completely received.
And the storage module is used for reserving the second cache data set in the local cache if the second cache data set is not reserved.
In an embodiment, the data transmission optimizing apparatus 500 further includes:
and the third sending module is used for continuously issuing the second cache data set for preset times to the target picture display equipment aiming at the target picture display equipment which does not return response data in the target duration or the response data represents that the second cache data set is lost.
And the disconnection module is used for disconnecting the data transmission channel with the target picture display equipment if the response data returned by the target picture display equipment is not received in the target time length within the continuous preset times or the response data represents that the second cache data set is lost.
And the second deleting module is used for deleting the second cache data set in the local cache.
It should be understood that, in the structural block diagram of the data transmission optimizing device shown in fig. 5, each module is used to execute each step in the embodiment corresponding to fig. 1 to 3, and each step in the embodiment corresponding to fig. 1 to 3 has been explained in detail in the above embodiment, and specific reference is made to the relevant description in the embodiment corresponding to fig. 1 to 3 and fig. 1 to 3, which is not repeated herein.
Fig. 6 is a block diagram of a terminal device according to an embodiment of the present application. As shown in fig. 6, the terminal device 600 of this embodiment includes: a processor 610, a memory 620, and a computer program 630, such as a program for a data transfer optimization method, stored in the memory 620 and executable on the processor 610. The processor 610 executes the computer program 630 to implement the steps of the data transmission optimization methods, such as S101 to S104 shown in fig. 1. Alternatively, when the processor 610 executes the computer program 630, the functions of the modules in the embodiment corresponding to fig. 5, for example, the functions of the modules 510 to 540 shown in fig. 5, are implemented, and refer to the related description in the embodiment corresponding to fig. 5.
Illustratively, the computer program 630 may be divided into one or more modules, and the one or more modules are stored in the memory 620 and executed by the processor 610 to implement the data transmission optimization method provided by the embodiments of the present application. One or more of the modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 630 in the terminal device 600. For example, the computer program 630 may implement the data transmission optimization method provided by the embodiment of the present application.
The terminal device 600 may include, but is not limited to, a processor 610, a memory 620. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 600 and does not constitute a limitation of terminal device 600 and may include more or less components than those shown, or combine certain components, or different components, e.g., the terminal device may also include input output devices, network access devices, buses, etc.
The processor 610 may be a central processing unit, but may also be other general purpose processors, digital signal processors, application specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 620 may be an internal storage unit of the terminal device 600, such as a hard disk or a memory of the terminal device 600. The memory 620 may also be an external storage device of the terminal device 600, such as a plug-in hard disk, a smart memory card, a flash memory card, etc. provided on the terminal device 600. Further, the memory 620 may also include both an internal storage unit of the terminal apparatus 600 and an external storage device.
The embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the data transmission optimization method in the above embodiments is implemented.
The embodiments of the present application provide a computer-readable storage medium, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the data transmission optimization method in the foregoing embodiments is implemented.
The embodiments of the present application provide a computer program product, which, when running on a terminal device, enables the terminal device to execute the data transmission optimization method in the foregoing embodiments.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for optimizing data transmission, the method comprising:
acquiring first data information of a first cache data set in a local cache; the first cached data set comprises at least one first cached data; the first data information at least comprises a first total data volume of the first cache data set and cache time of each first cache data;
if any first data information does not accord with a preset rule, merging a plurality of first cache data in the first cache data set according to the cache time to obtain a second cache data set; a second total data volume of the second cache data set conforms to the preset rule;
and respectively sending the second cache data sets to multi-terminal image display equipment for display.
2. The method of claim 1, wherein if any of the first data information does not meet a preset rule, merging the first cache data according to the cache time to obtain a second cache data set, comprising:
if the first cache data set is the first cache data set, the cache time of the first cache data which is stored in the local cache at the earliest exceeds the preset interval duration; or, if the first total data volume is greater than a preset data volume, determining that the first data information does not accord with the preset rule;
and merging the first cache data according to the cache time to obtain a second cache data set.
3. The method according to any one of claims 1 or 2, wherein the merging the plurality of first cache data in the first cache data set according to the cache time to obtain a second cache data set comprises:
obtaining the caching time of each first caching data and the data volume of each first caching data;
if the caching time of the first caching data stored in the local cache at the earliest time exceeds a preset interval duration, sequentially adding the data volumes of N first caching data with the earlier caching time according to the caching time when the first total data volume is greater than a preset data volume;
when the data volume of the N first cache data is less than or equal to the preset data volume, and the data volume of the N +1 first cache data is greater than the preset data volume, merging the N first cache data into the second cache data set;
and if the caching time of the first caching data which is stored in the local cache at the earliest time exceeds the preset interval duration and the total data volume of the first caching data set is less than or equal to the preset data volume, determining the first caching data set as the second caching data set.
4. The method of claim 3, further comprising, after the determining the first cached data set as the second cached data set:
s1, if new first cache data is received in the local cache at the current time, calculating a sum of data amounts between the new first cache data and the second cache data set;
s2, if the sum of the data volumes is smaller than or equal to the preset data volume, merging the first cache data into the second cache data set to obtain a new second cache data set;
s3, repeatedly executing the steps S1-S2, and updating the second cache data set;
and S4, if the sum of the data volumes is larger than the preset data volume, sending the second cache data set to the multi-terminal picture display equipment.
5. The method of claim 4, wherein after said repeatedly performing steps S1-S2, updating said second cached data set, further comprising:
counting the execution time of repeatedly executing the steps S1-S2;
if the execution duration exceeds a preset execution duration, acquiring the second cache data set updated after the preset execution duration is executed;
and respectively sending the updated second cache data set to a multi-terminal picture display device.
6. The method according to any one of claims 1, 2, 4 or 5, wherein after sending the second buffered data set to a multi-end display device for display, further comprising:
if response data returned by the image display equipment at each end are received within a target time length and the response data represent that the second cache data set is completely received, deleting the second cache data set from the local cache;
otherwise, the second cached data set is retained in the local cache.
7. The method of claim 6, after retaining the second cached data set in the local cache, further comprising:
continuously issuing the second cache data set for preset times to target picture display equipment aiming at the target picture display equipment which does not return the response data within the target duration or the response data represents that the second cache data set is lost;
if the response data returned by the target picture display equipment is not received in the target time length within the continuous preset times or the response data represents that the second cache data set is lost, disconnecting a data transmission channel with the target picture display equipment;
deleting the second cached data set in the local cache.
8. An apparatus for optimizing data transmission, the apparatus comprising:
the acquisition module is used for acquiring first data information of a first cache data set in a local cache; the first cached data set comprises at least one first cached data; the first data information at least comprises a first total data volume of the first cache data set and a cache time of each first cache data;
the merging module is used for merging a plurality of first cache data in the first cache data set according to the cache time to obtain a second cache data set if any first data information does not accord with a preset rule; a second total data volume of the second cache data set conforms to the preset rule;
and the display module is used for respectively sending the second cache data sets to multi-terminal image display equipment for displaying.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202210601098.0A 2022-05-30 2022-05-30 Data transmission optimization method, device, equipment and storage medium Active CN115002527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210601098.0A CN115002527B (en) 2022-05-30 2022-05-30 Data transmission optimization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210601098.0A CN115002527B (en) 2022-05-30 2022-05-30 Data transmission optimization method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115002527A true CN115002527A (en) 2022-09-02
CN115002527B CN115002527B (en) 2024-05-07

Family

ID=83031548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210601098.0A Active CN115002527B (en) 2022-05-30 2022-05-30 Data transmission optimization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115002527B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301066A (en) * 2013-07-19 2015-01-21 华为技术有限公司 Data packet transmission method and device
CN104717467A (en) * 2015-03-05 2015-06-17 广州市吉星信息科技有限公司 Wireless field teaching system
CN110297810A (en) * 2019-07-05 2019-10-01 联想(北京)有限公司 A kind of stream data processing method, device and electronic equipment
US20200404381A1 (en) * 2018-12-29 2020-12-24 Beijing Bytedance Network Technology Co., Ltd. Interaction data distribution control method, apparatus, electronic device, and storage medium
CN112580755A (en) * 2019-09-30 2021-03-30 菜鸟智能物流控股有限公司 Data transmission method and device, electronic equipment and storage medium
CN113010131A (en) * 2021-03-15 2021-06-22 京东数字科技控股股份有限公司 Display content updating method, device, terminal, server and storage medium
CN113468128A (en) * 2021-07-21 2021-10-01 上海浦东发展银行股份有限公司 Data processing method and device, electronic equipment and storage medium
CN114374687A (en) * 2022-01-11 2022-04-19 同方有云(北京)科技有限公司 File transmission method and device between thermomagnetic storage and blue light storage

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301066A (en) * 2013-07-19 2015-01-21 华为技术有限公司 Data packet transmission method and device
CN104717467A (en) * 2015-03-05 2015-06-17 广州市吉星信息科技有限公司 Wireless field teaching system
US20200404381A1 (en) * 2018-12-29 2020-12-24 Beijing Bytedance Network Technology Co., Ltd. Interaction data distribution control method, apparatus, electronic device, and storage medium
CN110297810A (en) * 2019-07-05 2019-10-01 联想(北京)有限公司 A kind of stream data processing method, device and electronic equipment
CN112580755A (en) * 2019-09-30 2021-03-30 菜鸟智能物流控股有限公司 Data transmission method and device, electronic equipment and storage medium
CN113010131A (en) * 2021-03-15 2021-06-22 京东数字科技控股股份有限公司 Display content updating method, device, terminal, server and storage medium
CN113468128A (en) * 2021-07-21 2021-10-01 上海浦东发展银行股份有限公司 Data processing method and device, electronic equipment and storage medium
CN114374687A (en) * 2022-01-11 2022-04-19 同方有云(北京)科技有限公司 File transmission method and device between thermomagnetic storage and blue light storage

Also Published As

Publication number Publication date
CN115002527B (en) 2024-05-07

Similar Documents

Publication Publication Date Title
US10498786B2 (en) Method and apparatus for adaptively providing multiple bit rate streaming media in server
CN109842781B (en) Monitoring video playing method, device, system, media server and storage medium
CN107315825B (en) Index updating system, method and device
CN106998485B (en) Video live broadcasting method and device
CN107153620B (en) Data processing method and device
CN111107438B (en) Video loading method and device and electronic equipment
CN109889922B (en) Method, device, equipment and storage medium for forwarding streaming media data
CN114006946B (en) Method, device, equipment and storage medium for processing homogeneous resource request
CN112929728A (en) Video rendering method, device and system, electronic equipment and storage medium
CN112838980A (en) Message processing method, system, device, electronic equipment and storage medium
CN115002527A (en) Data transmission optimization method, device, equipment and storage medium
CN112653736A (en) Parallel source returning method and device and electronic equipment
CN115941907A (en) RTP data packet sending method, system, electronic equipment and storage medium
CN113824689B (en) Edge computing network, data transmission method, device, equipment and storage medium
CN112911390B (en) Video data playing method and terminal equipment
CN111400327B (en) Data synchronization method and device, electronic equipment and storage medium
CN113031895A (en) Screen projection control method and device and electronic equipment
CN113489745B (en) Video data transmission method, device, equipment and storage medium
CN112073747A (en) Streaming media data preview method, user end equipment and relay server
CN113742376A (en) Data synchronization method, first server and data synchronization system
CN113139123B (en) Resource recommendation method, device, server side and storage medium
CN112653691B (en) Data processing method, device, equipment and storage medium
CN110753268B (en) Page card data generation method and device and electronic equipment
CN117640974A (en) Live broadcast data transmission method, device, equipment and storage medium
WO2021082602A1 (en) Method for processing media service and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant