CN112702146A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN112702146A
CN112702146A CN201911007444.7A CN201911007444A CN112702146A CN 112702146 A CN112702146 A CN 112702146A CN 201911007444 A CN201911007444 A CN 201911007444A CN 112702146 A CN112702146 A CN 112702146A
Authority
CN
China
Prior art keywords
data
sent
queue
terminal
time
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
CN201911007444.7A
Other languages
Chinese (zh)
Other versions
CN112702146B (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.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech 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 Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN201911007444.7A priority Critical patent/CN112702146B/en
Publication of CN112702146A publication Critical patent/CN112702146A/en
Application granted granted Critical
Publication of CN112702146B publication Critical patent/CN112702146B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/1874Buffer management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1835Buffer management
    • H04L1/1841Resequencing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/189Transmission or retransmission of more than one copy of a message
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a data processing method and equipment, wherein the method comprises the following steps: after the server sends data to the terminal, the sent data is cached in the sent data queue, the data in the sent data queue is sent repeatedly according to a preset data sending interval, namely the server sends the data sent to the terminal repeatedly, the problem that when the existing server sends the data to the terminal in a dormant state, the dormant terminal is not awakened yet, so that the terminal does not receive the data of the previous few seconds is solved, the server also judges whether the data caching time in the sent data queue reaches a preset time upper limit, if the data caching time reaches the preset time upper limit, the data in the sent data queue is emptied, the data are normally sent to the terminal in the follow-up process (the data are not stored in the sent data queue), resource waste is avoided, and the method is suitable for practical application.

Description

Data processing method and device
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a data processing method and device.
Background
With the continuous development of communication technology, the application of cluster communication in life is more and more extensive. The trunking communication refers to a trunking communication common network formed by trunking communication systems with technical characteristics of channel sharing, dynamic allocation and the like, and provides communication services such as special command and scheduling for group users of multiple departments, units and the like.
Taking cluster voice communication as an example, in a large-scale activity security site or a large-scale shopping mall, one person talks, and other people in the talk group can simultaneously hear the speaker speaking. In the implementation model, there is usually a data forwarding server that sends the data transmission of the speaker to other listening terminals.
However, there may be some risks in this process, for example, some listening terminals may also handle the sleep state when the main phone starts talking (the terminals enter the sleep state for power saving). If the server sends the data of the main speaking to the terminal in the dormant state, the dormant terminal is not awakened yet, the audio player is not started yet, the server forwards the past audio data for the previous seconds at this time, and the dormant terminal does not receive the audio data, so that the dormant terminal cannot hear the data for the previous seconds. If the first few seconds of audio data are important, it may have serious consequences.
Disclosure of Invention
The embodiment of the application provides a data processing method and equipment, which are used for overcoming the problem that when an existing server sends data to a terminal in a dormant state, the dormant terminal is not awakened yet, so that the terminal does not receive the data of the last few seconds.
In a first aspect, an embodiment of the present application provides a data processing method, including:
sending data to a terminal, and caching the sent data in a sent data queue;
repeatedly sending the data in the sent data queue according to a preset data sending interval, wherein the data is used for indicating the terminal to cache the data in a received data queue, sequencing the data in the received data queue according to the sequence identification of the received data, and playing the data in the received data queue according to the sequencing result;
judging whether the data caching time in the sent data queue reaches a preset time upper limit, wherein the time upper limit is larger than the data sending interval;
and if the data caching time reaches the upper time limit, emptying the data in the sent data queue.
In one possible design, the repeatedly sending the data in the sent data queue according to a preset data sending interval includes:
judging whether the time for sending data to the terminal is equal to the data sending interval or not;
and if the time is equal to the data sending interval, repeatedly sending the data in the sent data queue once.
In one possible design, before the sending data to the terminal, the method further includes:
setting the upper time limit according to the time required by the terminal from the sleep state to the awakening state;
and setting the data transmission interval according to the upper time limit.
In a second aspect, an embodiment of the present application provides another data processing method, including:
receiving data sent by a server, wherein the data comprises data in a sent data queue sent repeatedly by the server according to a preset data sending interval, and the data in the sent data queue is cached data sent by the server;
buffering the received data in a received data queue;
sorting the data in the received data queue according to the sequence identification of the received data;
and playing the data in the received data queue according to the sorting result.
In one possible design, after the sorting the data in the received data queue, the method further includes:
judging whether the sequence identifier of the first data in the sorted received data queue is a preset identifier or not;
if the sequence identifier is not the preset identifier, re-executing the step of receiving the data sent by the server;
and if the sequence identifier is the preset identifier, executing the step of playing the data in the received data queue according to the sequencing result.
In one possible design, the playing the data in the received data queue according to the sorting result includes:
judging whether the data caching time in the received data queue reaches a preset time upper limit or not;
and if the data caching time reaches the time upper limit, playing the data in the received data queue according to the sorting result.
In one possible design, the sorting the data in the received data queue according to the sequence identification of the received data includes:
determining the front-back sequence of the received data according to the sequence identification of the received data;
and sequencing the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sequencing process.
In a third aspect, an embodiment of the present application provides a data processing apparatus, including:
the first sending module is used for sending data to the terminal and caching the sent data in a sent data queue;
a second sending module, configured to repeatedly send data in the sent data queue according to a preset data sending interval, where the data is used to instruct the terminal to cache the data in a received data queue, sort the data in the received data queue according to a sequence identifier of the received data, and play the data in the received data queue according to a sorting result;
the first judgment module is used for judging whether the data caching time in the sent data queue reaches a preset time upper limit, wherein the time upper limit is larger than the data sending interval;
and the first processing module is used for emptying the data in the sent data queue if the data caching time reaches the time upper limit.
In one possible design, the second sending module is specifically configured to:
judging whether the time for sending data to the terminal is equal to the data sending interval or not;
and if the time is equal to the data sending interval, repeatedly sending the data in the sent data queue once.
In one possible design, the above apparatus further includes:
the first setting module is used for setting the upper time limit according to the time required by the terminal from the dormant state to the awakening state before the first sending module sends data to the terminal;
and the second setting module is used for setting the data sending interval according to the time upper limit.
In a fourth aspect, an embodiment of the present application provides another data processing apparatus, including:
the receiving module is used for receiving data sent by a server, wherein the data comprises data in a sent data queue which is sent repeatedly by the server according to a preset data sending interval, and the data in the sent data queue is cached data sent by the server;
the buffer module is used for buffering the received data in the received data queue;
the sequencing module is used for sequencing the data in the received data queue according to the sequence identification of the received data;
and the second processing module is used for playing the data in the received data queue according to the sorting result.
In one possible design, the above apparatus further includes:
the second judging module is used for judging whether the sequence identifier of the first data in the received data queue after sequencing is a preset identifier or not after the sequencing module sequences the data in the received data queue;
the receiving module is further configured to re-execute the step of receiving the data sent by the server if the sequence identifier is not the preset identifier;
the second processing module is further configured to execute the step of playing the data in the received data queue according to the sorting result if the sequence identifier is the preset identifier.
In one possible design, the second processing module is specifically configured to:
judging whether the data caching time in the received data queue reaches a preset time upper limit or not;
and if the data caching time reaches the time upper limit, playing the data in the received data queue according to the sorting result.
In one possible design, the sorting module is specifically configured to:
determining the front-back sequence of the received data according to the sequence identification of the received data;
and sequencing the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sequencing process.
In a fifth aspect, an embodiment of the present application provides a server, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the data processing method as described above in the first aspect and various possible designs of the first aspect.
In a sixth aspect, an embodiment of the present application provides a terminal, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the data processing method as set forth in the second aspect above and in various possible designs of the second aspect.
In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the data processing method according to the first aspect and various possible designs of the first aspect are implemented.
In an eighth aspect, embodiments of the present application provide another computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the data processing method according to the second aspect and various possible designs of the second aspect is implemented.
According to the data processing method and the data processing equipment, after the server sends data to the terminal, the sent data are cached in the sent data queue, the data in the sent data queue are sent repeatedly according to the preset data sending interval, namely the server sends the data sent to the terminal repeatedly, the problem that when the existing server sends the data to the terminal in a dormant state, the dormant terminal is not awakened yet, and the terminal does not receive the data in the previous seconds is solved, the server also judges whether the data caching time in the sent data queue reaches the preset time upper limit, if the data caching time reaches the preset time upper limit, the data in the sent data queue are emptied, the data are sent to the terminal normally in the follow-up process (the data are not stored in the sent data queue any more), resource waste is avoided, and the data processing method is suitable for practical application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a block diagram of a data processing system according to an embodiment of the present application;
fig. 2 is a first schematic flowchart of a data processing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating a data processing method according to an embodiment of the present application;
fig. 4 is a first schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic hardware structure diagram of a data processing device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The use of group communication in life is becoming more and more widespread. Taking cluster voice communication as an example, in a large-scale activity security site or a large-scale shopping mall, one person talks, and other people in the talk group can simultaneously hear the speaker speaking. In the implementation model, there is usually a data forwarding server that sends the data transmission of the speaker to other listening terminals. However, there may be some risks in this process, for example, some listening terminals may also handle the sleep state when the main phone starts to talk. If the server sends the data of the main speaking to the terminal in the dormant state, the dormant terminal is not awakened yet, the audio player is not started yet, the server forwards the past audio data for the previous seconds at this time, and the dormant terminal does not receive the audio data, so that the dormant terminal cannot hear the data for the previous seconds. If the first few seconds of audio data are important, it may have serious consequences.
In view of the above, the present application provides a data processing method that, after a server transmits data to a terminal, buffering the transmitted data in the transmitted data queue, repeatedly transmitting the data in the transmitted data queue according to a preset data transmission interval, namely, the server repeatedly sends the data sent to the terminal, solves the problem that when the existing server sends the data to the terminal in a dormant state, the dormant terminal has not been awakened yet, causing a problem that the terminal has not received the data of the previous seconds, and the server also judges whether the data buffering time in the sent data queue reaches a preset time upper limit, if the data is in the empty state, the data in the sent data queue is emptied, and the data is sent to the terminal normally in the follow-up state (the data is not stored in the sent data queue any more), so that the resource waste is avoided, and the method is suitable for practical application.
The data processing method provided by the application can be applied to the data processing system shown in fig. 1, and the system comprises the terminal 10 and the server 20.
In a specific implementation, the server 20 may transmit data to the terminal 10 and buffer the transmitted data in a transmitted data queue. The server 20 may repeatedly transmit data in the transmitted data queue according to a preset data transmission interval, where the data is used to instruct the terminal 10 to buffer the data in the received data queue, sort the data in the received data queue according to the sequence identifier of the received data, and play the data in the received data queue according to the sorting result. The server 20 may further determine whether the data buffering time in the sent data queue reaches a preset upper time limit, where the upper time limit is greater than the data sending interval. If so, server 20 empties the data in the sent data queue. The terminal may be a computer, a mobile phone, a tablet, etc., which is not particularly limited in this application.
It should be understood that the above-mentioned architecture is only an exemplary system architecture block diagram, and in specific implementation, the above-mentioned architecture may be set according to application requirements, for example, the server side may further include a receiving device for receiving information related to the above-mentioned data transmission interval, time upper limit, and the like, so as to meet different application requirements.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a first schematic flowchart of a data processing method according to an embodiment of the present application, where an execution subject according to the embodiment of the present application may be a server according to the embodiment of fig. 1. As shown in fig. 2, the method may include:
s201: and transmitting the data to the terminal, and buffering the transmitted data in a transmitted data queue.
The data sent to the terminal may include audio, video, pictures, and the like.
Optionally, before the sending data to the terminal, the method further includes:
setting the upper time limit according to the time required by the terminal from the sleep state to the awakening state;
and setting the data transmission interval according to the upper time limit.
Here, the server may set the upper time limit according to an experience time required for the terminal to go from the sleep state to the awake state, and may consider an abnormal situation of the terminal, for example, the terminal may not always transition to the awake state, when the upper time limit is set.
Illustratively, a time upper limit is set, a data transmission interval is set according to the time upper limit, and in the process that the terminal is in the dormant state to the awakening state, data is repeatedly transmitted according to the data transmission interval, so that the situation that the dormant terminal is not awakened and does not receive the data when the server transmits the data to the terminal in the dormant state is avoided.
Specifically, the setting of the data transmission interval according to the upper time limit may include:
receiving a data transmission interval setting instruction, which may carry a processing manner of the upper time limit, for example, dividing the upper time limit into n parts, and setting the data transmission interval according to the instruction and the upper time limit.
In addition, after the time upper limit is set according to the time required by the terminal from the sleep state to the wake state, a time upper limit adjusting instruction can be received, and the time upper limit can be adjusted according to the instruction, so that the application requirements of different application scenes are met.
Similarly, after the data transmission interval is set according to the upper time limit, a transmission interval adjustment instruction may be received, and the data transmission interval may be adjusted according to the instruction, which is suitable for application.
S202: and repeatedly sending the data in the sent data queue according to a preset data sending interval, wherein the data is used for indicating the terminal to cache the data in the received data queue, sequencing the data in the received data queue according to the sequence identification of the received data, and playing the data in the received data queue according to the sequencing result.
Optionally, the repeatedly sending the data in the sent data queue according to a preset data sending interval includes:
judging whether the time for sending data to the terminal is equal to the data sending interval or not;
and if the time is equal to the data sending interval, repeatedly sending the data in the sent data queue once.
Specifically, the server may determine whether the time for the server to transmit data to the terminal is equal to the data transmission interval through the retransmission timer. Illustratively, when the server starts to transmit certain data to the terminal, the retransmission timer is started, whether the retransmission timer is up or not is judged, if yes, the server retransmits the data in the transmitted data queue once, and if not, the server continues normal transmission and stores the transmitted data in the transmitted data queue.
In addition, the server can also judge whether the time for the server to transmit the data to the terminal is equal to the data transmission interval according to the starting time and the current time for transmitting the data to the terminal. Specifically, the server records a starting time of sending certain data to the terminal, then calculates the time of sending the data to the terminal by the server in real time according to the current time and the starting time in the data sending process, and when the time is equal to the data sending interval, the server sends the data in the sent data queue again.
S203: and judging whether the data buffering time in the transmitted data queue reaches a preset time upper limit, wherein the time upper limit is larger than the data transmission interval.
Here, the server detects whether the data buffering time in the transmitted data queue reaches the upper time limit, and if so, the server empties the data in the transmitted data queue, stops the retransmission timer, and normally transmits the data to the terminal (without storing the data in the transmitted data queue). If not, the transmission is continued, and the transmitted data is stored in the transmitted data queue.
Therefore, the time upper limit is set according to the time required by the terminal from the sleep state to the wake-up state, if the server detects that the data cache time in the sent data queue reaches the time upper limit, the terminal is converted into the wake-up state from the sleep state, the terminal can normally receive the data, and the server does not need to repeatedly send the data at the moment, so that the server empties the data in the sent data queue, stops the retransmission timer, normally sends the data to the terminal, can save resources, and is suitable for practical application.
S204: and if the data caching time reaches the upper time limit, emptying the data in the sent data queue.
And if the data caching time reaches the time upper limit, re-executing the step of sending the data to the terminal.
As can be seen from the above description, in the embodiment of the present application, after a server sends data to a terminal, the sent data is cached in a sent data queue, and the data in the sent data queue is repeatedly sent according to a preset data sending interval, that is, the server repeatedly sends the data sent to the terminal, so that a problem that when an existing server sends data to a terminal in a dormant state, the dormant terminal is not yet awakened, so that the terminal does not receive the previous data for several seconds is solved, and the server also determines whether the data caching time in the sent data queue reaches a preset time upper limit, and if so, empties the data in the sent data queue, and then normally sends the data to the terminal (the data is not stored in the sent data queue), so that resource waste is avoided, and the method is suitable for practical application.
The data processing method according to the embodiment of the present application is described in detail from the server side in conjunction with fig. 2 above, and another data processing method provided according to the embodiment of the present application will be described in detail from the terminal side in conjunction with fig. 3 below. It should be understood that certain concepts, characteristics, and the like of the terminal-side description correspond to those of the server-side description, and the duplicated description is appropriately omitted for the sake of brevity.
Fig. 3 is a second flowchart of the data processing method according to the embodiment of the present application, and an execution subject according to the embodiment of the present application may be the terminal in the embodiment shown in fig. 1. As shown in fig. 3, the method may include:
s301: receiving data sent by a server, wherein the data comprises data in a sent data queue sent repeatedly by the server according to a preset data sending interval, and the data in the sent data queue is cached data sent by the server.
S302: buffering the received data in a received data queue.
S303: and sequencing the data in the received data queue according to the sequence identification of the received data.
The sequence identifier of the data is a front-back sequence between the data, for example, the server sequentially sends three data to the terminal, and the sequence identifiers of the three data may be set to 1, 2, and 3, respectively.
Optionally, the sorting the data in the received data queue according to the sequence identifier of the received data includes:
determining the front-back sequence of the received data according to the sequence identification of the received data;
and sequencing the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sequencing process.
Therefore, the server repeatedly sends the data to the terminal according to the preset data sending interval, so that the terminal may repeatedly receive the data, in order to ensure that the subsequent data is played correctly, the terminal sorts the data in the received data queue according to the front-back sequence of the received data, discards the data with repeated sequence identification in the sorting process, and is suitable for application.
Optionally, after the sorting the data in the received data queue, the method further includes:
judging whether the sequence identifier of the first data in the sorted received data queue is a preset identifier or not;
if the sequence identifier is not the preset identifier, re-executing the step of receiving the data sent by the server;
and if the sequence identifier is the preset identifier, executing the step of playing the data in the received data queue according to the sequencing result.
Illustratively, if the sequence identifier of the first data sent to the terminal by the server is 1, the terminal judges whether the sequence identifier of the first data in the sorted received data queue is 1 after sorting the data in the received data queue, if so, the terminal plays the data in the received data queue according to the sorting result, and if not, the terminal re-executes the step of receiving the data sent by the server. Therefore, when the server sends the data to the terminal in the dormant state, the terminal can successfully receive the data sent by the server, and errors in subsequent data playing are avoided.
S304: and playing the data in the received data queue according to the sorting result.
Optionally, the playing the data in the received data queue according to the sorting result includes:
judging whether the data caching time in the received data queue reaches a preset time upper limit or not;
and if the data caching time reaches the time upper limit, playing the data in the received data queue according to the sorting result.
Here, the terminal may set the above-mentioned upper time limit according to a time required for the terminal to go from the sleep state to the awake state.
The terminal receives data sent by the server, caches the received data in a received data queue, sorts the data in the received data queue according to the sequence identification of the received data, judges whether the data caching time in the received data queue reaches a preset time upper limit, and plays the data in the received data queue according to a sorting result if the data caching time in the received data queue reaches the preset time upper limit, so that the terminal can immediately play the received data when being switched from a dormant state to an awakening state, and the playing sequence is ensured to be correct.
In addition, after the terminal sets the time upper limit according to the time required by the terminal from the sleep state to the wake state, the terminal can also receive a time upper limit adjusting instruction, and the time upper limit is adjusted according to the instruction, so that the application requirements of different application scenes are met.
In the data processing method provided by the embodiment of the application, the terminal receives data sent by the server, the data comprises data in a sent data queue which is sent repeatedly by the server according to a preset data sending interval, wherein, the data in the transmitted data queue is the cached data transmitted by the server, namely, the terminal receives the data repeatedly sent by the server, solves the problem that when the existing server sends the data to the terminal in the dormant state, the dormant terminal is not awakened yet, which causes the problem that the terminal does not receive the data of the previous seconds, the terminal buffers the received data in the received data queue, according to the sequence identification of the received data, and sequencing the data in the received data queue, playing the data in the received data queue according to the sequencing result, and correctly playing the received data to meet the application requirement.
Fig. 4 is a schematic structural diagram of a data processing device according to an embodiment of the present application, corresponding to the data processing method according to the foregoing embodiment. For convenience of explanation, only portions related to the embodiments of the present application are shown. Fig. 4 is a first schematic structural diagram of a data processing apparatus according to an embodiment of the present application. As shown in fig. 4, the data processing apparatus 40 includes: a first sending module 401, a second sending module 402, a first judging module 403, a first processing module 404, a first setting module 405, and a second setting module 406.
The first sending module 401 is configured to send data to a terminal, and buffer the sent data in a sent data queue.
A second sending module 402, configured to repeatedly send data in the sent data queue according to a preset data sending interval, where the data is used to instruct the terminal to cache the data in a received data queue, sort the data in the received data queue according to a sequence identifier of the received data, and play the data in the received data queue according to a sorting result.
A first determining module 403, configured to determine whether a data buffering time in the sent data queue reaches a preset time upper limit, where the time upper limit is greater than the data sending interval.
A first processing module 404, configured to empty the data in the sent data queue if the data buffering time reaches the time upper limit.
In a possible design, the second sending module 402 is specifically configured to:
judging whether the time for sending data to the terminal is equal to the data sending interval or not;
and if the time is equal to the data sending interval, repeatedly sending the data in the sent data queue once.
In a possible design, the first setting module 405 is configured to set the upper time limit according to a time required for the terminal to go from the sleep state to the awake state before the first sending module 401 sends data to the terminal.
A second setting module 406, configured to set the data transmission interval according to the upper time limit.
The device provided in the embodiment of the present application may be configured to execute the technical solution of the method embodiment described in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again in the embodiment of the present application.
Fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. As shown in fig. 5, the data processing apparatus 50 includes: a receiving module 501, a caching module 502, a sorting module 503, a second processing module 504 and a second judging module 505.
The receiving module 501 is configured to receive data sent by a server, where the data includes data in a sent data queue that is repeatedly sent by the server according to a preset data sending interval, and the data in the sent data queue is cached data that has been sent by the server.
A buffering module 502, configured to buffer the received data in the received data queue.
A sorting module 503, configured to sort the data in the received data queue according to the sequence identifier of the received data.
The second processing module 504 is configured to play the data in the received data queue according to the sorting result.
In a possible design, the second determining module 505 is configured to determine, after the sorting module 503 sorts the data in the received data queue, whether a sequence identifier of first data in the sorted received data queue is a preset identifier.
The receiving module 501 is further configured to, if the sequence identifier is not the preset identifier, re-execute the step of receiving the data sent by the server.
The second processing module 504 is further configured to play the data in the received data queue according to a sorting result if the sequence identifier is the preset identifier.
In one possible design, the second processing module 504 is specifically configured to:
judging whether the data caching time in the received data queue reaches a preset time upper limit or not;
and if the data caching time reaches the time upper limit, playing the data in the received data queue according to the sorting result.
In one possible design, the sorting module 503 is specifically configured to:
determining the front-back sequence of the received data according to the sequence identification of the received data;
and sequencing the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sequencing process.
The device provided in the embodiment of the present application may be configured to execute the technical solution of the method embodiment described in fig. 3, and the implementation principle and the technical effect are similar, which are not described herein again in the embodiment of the present application.
Fig. 6 is a schematic diagram of a hardware structure of a data processing device according to an embodiment of the present invention. As shown in fig. 6, the data processing device 60 of the present embodiment includes: a processor 601 and a memory 602; wherein
A memory 602 for storing computer-executable instructions;
a processor 601 for executing computer executable instructions stored in a memory to implement the steps of:
sending data to a terminal, and caching the sent data in a sent data queue;
repeatedly sending the data in the sent data queue according to a preset data sending interval, wherein the data is used for indicating the terminal to cache the data in a received data queue, sequencing the data in the received data queue according to the sequence identification of the received data, and playing the data in the received data queue according to the sequencing result;
judging whether the data caching time in the sent data queue reaches a preset time upper limit, wherein the time upper limit is larger than the data sending interval;
and if the data caching time reaches the upper time limit, emptying the data in the sent data queue.
In one possible design, the repeatedly sending the data in the sent data queue according to a preset data sending interval includes:
judging whether the time for sending data to the terminal is equal to the data sending interval or not;
and if the time is equal to the data sending interval, repeatedly sending the data in the sent data queue once.
In one possible design, before the sending data to the terminal, the method further includes:
setting the upper time limit according to the time required by the terminal from the sleep state to the awakening state;
and setting the data transmission interval according to the upper time limit.
Alternatively, the memory 602 may be separate or integrated with the processor 601.
When the memory 602 is provided separately, the data processing apparatus further comprises a bus 603 for connecting the memory 602 and the processor 601.
Another data processing apparatus provided in an embodiment of the present invention includes: a processor and a memory; wherein
A memory for storing computer execution instructions;
a processor for executing computer-executable instructions stored in the memory to perform the steps of:
receiving data sent by a server, wherein the data comprises data in a sent data queue sent repeatedly by the server according to a preset data sending interval, and the data in the sent data queue is cached data sent by the server;
buffering the received data in a received data queue;
sorting the data in the received data queue according to the sequence identification of the received data;
and playing the data in the received data queue according to the sorting result.
In one possible design, after the sorting the data in the received data queue, the method further includes:
judging whether the sequence identifier of the first data in the sorted received data queue is a preset identifier or not;
and if the sequence identifier is not the preset identifier, re-executing the step of receiving the data sent by the server.
In one possible design, the playing the data in the received data queue according to the sorting result includes:
judging whether the data caching time in the received data queue reaches a preset time upper limit or not;
and if the data caching time reaches the time upper limit, playing the data in the received data queue according to the sorting result.
In one possible design, the sorting the data in the received data queue according to the sequence identification of the received data includes:
determining the front-back sequence of the received data according to the sequence identification of the received data;
and sequencing the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sequencing process.
Alternatively, the memory may be separate or integrated with the processor.
When the memory is provided separately, the data processing apparatus further comprises a bus for connecting the memory and the processor.
An embodiment of the present invention provides a computer-readable storage medium, where a computer executing instruction is stored in the computer-readable storage medium, and when a processor executes the computer executing instruction, the data processing method described in fig. 2 is implemented.
An embodiment of the present invention provides another computer-readable storage medium, where a computer executing instruction is stored in the computer-readable storage medium, and when a processor executes the computer executing instruction, the data processing method described in fig. 3 is implemented.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in an electronic device or host device.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (18)

1. A data processing method, comprising:
sending data to a terminal, and caching the sent data in a sent data queue;
repeatedly sending the data in the sent data queue according to a preset data sending interval, wherein the data is used for indicating the terminal to cache the data in a received data queue, sequencing the data in the received data queue according to the sequence identification of the received data, and playing the data in the received data queue according to the sequencing result;
judging whether the data caching time in the sent data queue reaches a preset time upper limit, wherein the time upper limit is larger than the data sending interval;
and if the data caching time reaches the upper time limit, emptying the data in the sent data queue.
2. The method according to claim 1, wherein said repeatedly transmitting the data in the transmitted data queue according to a preset data transmission interval comprises:
judging whether the time for sending data to the terminal is equal to the data sending interval or not;
and if the time is equal to the data sending interval, repeatedly sending the data in the sent data queue once.
3. The method according to claim 1 or 2, wherein before said sending data to the terminal, further comprising:
setting the upper time limit according to the time required by the terminal from the sleep state to the awakening state;
and setting the data transmission interval according to the upper time limit.
4. A data processing method, comprising:
receiving data sent by a server, wherein the data comprises data in a sent data queue sent repeatedly by the server according to a preset data sending interval, and the data in the sent data queue is cached data sent by the server;
buffering the received data in a received data queue;
sorting the data in the received data queue according to the sequence identification of the received data;
and playing the data in the received data queue according to the sorting result.
5. The method of claim 4, further comprising, after said sorting data in the received data queue:
judging whether the sequence identifier of the first data in the sorted received data queue is a preset identifier or not;
if the sequence identifier is not the preset identifier, re-executing the step of receiving the data sent by the server;
and if the sequence identifier is the preset identifier, executing the step of playing the data in the received data queue according to the sequencing result.
6. The method of claim 4, wherein playing the data in the received data queue according to the sorting result comprises:
judging whether the data caching time in the received data queue reaches a preset time upper limit or not;
and if the data caching time reaches the time upper limit, playing the data in the received data queue according to the sorting result.
7. The method according to any one of claims 4 to 6, wherein the sorting the data in the received data queue according to the sequence identification of the received data comprises:
determining the front-back sequence of the received data according to the sequence identification of the received data;
and sequencing the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sequencing process.
8. A data processing apparatus, characterized by comprising:
the first sending module is used for sending data to the terminal and caching the sent data in a sent data queue;
a second sending module, configured to repeatedly send data in the sent data queue according to a preset data sending interval, where the data is used to instruct the terminal to cache the data in a received data queue, sort the data in the received data queue according to a sequence identifier of the received data, and play the data in the received data queue according to a sorting result;
the first judgment module is used for judging whether the data caching time in the sent data queue reaches a preset time upper limit, wherein the time upper limit is larger than the data sending interval;
and the first processing module is used for emptying the data in the sent data queue if the data caching time reaches the time upper limit.
9. The device according to claim 8, wherein the second sending module is specifically configured to:
judging whether the time for sending data to the terminal is equal to the data sending interval or not;
and if the time is equal to the data sending interval, repeatedly sending the data in the sent data queue once.
10. The apparatus of claim 8 or 9, further comprising:
the first setting module is used for setting the upper time limit according to the time required by the terminal from the dormant state to the awakening state before the first sending module sends data to the terminal;
and the second setting module is used for setting the data sending interval according to the time upper limit.
11. A data processing apparatus, characterized by comprising:
the receiving module is used for receiving data sent by a server, wherein the data comprises data in a sent data queue which is sent repeatedly by the server according to a preset data sending interval, and the data in the sent data queue is cached data sent by the server;
the buffer module is used for buffering the received data in the received data queue;
the sequencing module is used for sequencing the data in the received data queue according to the sequence identification of the received data;
and the second processing module is used for playing the data in the received data queue according to the sorting result.
12. The apparatus of claim 11, further comprising:
the second judging module is used for judging whether the sequence identifier of the first data in the received data queue after sequencing is a preset identifier or not after the sequencing module sequences the data in the received data queue;
the receiving module is further configured to re-execute the step of receiving the data sent by the server if the sequence identifier is not the preset identifier;
the second processing module is further configured to execute the step of playing the data in the received data queue according to the sorting result if the sequence identifier is the preset identifier.
13. The device according to claim 11, wherein the second processing module is specifically configured to:
judging whether the data caching time in the received data queue reaches a preset time upper limit or not;
and if the data caching time reaches the time upper limit, playing the data in the received data queue according to the sorting result.
14. The device according to any one of claims 11 to 13, wherein the sorting module is specifically configured to:
determining the front-back sequence of the received data according to the sequence identification of the received data;
and sequencing the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sequencing process.
15. A server, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the data processing method of any of claims 1 to 3.
16. A terminal, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
execution of computer-executable instructions stored by the memory by the at least one processor causes the at least one processor to perform the data processing method of any of claims 4 to 7.
17. A computer-readable storage medium, having stored thereon computer-executable instructions, which, when executed by a processor, implement a data processing method according to any one of claims 1 to 3.
18. A computer-readable storage medium, having stored thereon computer-executable instructions, which, when executed by a processor, implement a data processing method according to any one of claims 4 to 7.
CN201911007444.7A 2019-10-22 2019-10-22 Data processing method and device Active CN112702146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911007444.7A CN112702146B (en) 2019-10-22 2019-10-22 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911007444.7A CN112702146B (en) 2019-10-22 2019-10-22 Data processing method and device

Publications (2)

Publication Number Publication Date
CN112702146A true CN112702146A (en) 2021-04-23
CN112702146B CN112702146B (en) 2023-06-23

Family

ID=75504557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911007444.7A Active CN112702146B (en) 2019-10-22 2019-10-22 Data processing method and device

Country Status (1)

Country Link
CN (1) CN112702146B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114598754A (en) * 2022-01-14 2022-06-07 许继电气股份有限公司 Real-time data one-way transmission method and device
CN116996450A (en) * 2023-08-05 2023-11-03 哈尔滨商业大学 Management data processing method, device and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014057259A (en) * 2012-09-13 2014-03-27 Nec Commun Syst Ltd Mobile communication system and mobile communication method
CN107294653A (en) * 2016-04-13 2017-10-24 中兴通讯股份有限公司 The data processing method and system of a kind of wireless chain control layer
CN107612661A (en) * 2017-09-07 2018-01-19 四川九洲北斗导航与位置服务有限公司 Data communication method and device
CN108563774A (en) * 2018-04-20 2018-09-21 广州林邦信息科技有限公司 GPS data processing method and processing device
CN108616968A (en) * 2016-12-09 2018-10-02 华为技术有限公司 The method and apparatus of transmission frame
CN109617657A (en) * 2019-01-22 2019-04-12 新华三技术有限公司 A kind of message processing method and device
CN109743717A (en) * 2019-03-06 2019-05-10 深圳市飞比电子科技有限公司 Data processing method, device, terminal device and storage medium
EP3528554A1 (en) * 2016-11-04 2019-08-21 Huawei Technologies Co., Ltd. Method for transmitting information, terminal device and network device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014057259A (en) * 2012-09-13 2014-03-27 Nec Commun Syst Ltd Mobile communication system and mobile communication method
CN107294653A (en) * 2016-04-13 2017-10-24 中兴通讯股份有限公司 The data processing method and system of a kind of wireless chain control layer
EP3528554A1 (en) * 2016-11-04 2019-08-21 Huawei Technologies Co., Ltd. Method for transmitting information, terminal device and network device
CN108616968A (en) * 2016-12-09 2018-10-02 华为技术有限公司 The method and apparatus of transmission frame
CN107612661A (en) * 2017-09-07 2018-01-19 四川九洲北斗导航与位置服务有限公司 Data communication method and device
CN108563774A (en) * 2018-04-20 2018-09-21 广州林邦信息科技有限公司 GPS data processing method and processing device
CN109617657A (en) * 2019-01-22 2019-04-12 新华三技术有限公司 A kind of message processing method and device
CN109743717A (en) * 2019-03-06 2019-05-10 深圳市飞比电子科技有限公司 Data processing method, device, terminal device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何金辉;朱大庆;齐文新;: "嵌入精简型TCP/IP协议栈的GPRS终端实现", 计算机与数字工程, no. 03 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114598754A (en) * 2022-01-14 2022-06-07 许继电气股份有限公司 Real-time data one-way transmission method and device
CN116996450A (en) * 2023-08-05 2023-11-03 哈尔滨商业大学 Management data processing method, device and system
CN116996450B (en) * 2023-08-05 2024-03-22 哈尔滨商业大学 Management data processing method, device and system

Also Published As

Publication number Publication date
CN112702146B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
JP6742465B2 (en) Method, device and bluetooth speaker for continuous wakeup delay reduction in bluetooth speaker
CN108234790B (en) Multi-person voice communication method, device, terminal equipment and storage medium
US11202066B2 (en) Video data encoding and decoding method, device, and system, and storage medium
US11587560B2 (en) Voice interaction method, device, apparatus and server
CN110457078B (en) Intelligent service method, device and equipment
US10173135B2 (en) Data processing method, terminal and server
WO2021238404A1 (en) Data card switching method and apparatus, and terminal, and storage medium
WO2022017007A1 (en) Audio data processing method, server, and storage medium
CN110784858A (en) Bluetooth device control method and device, electronic device and storage medium
CN110703944B (en) Touch data processing method and device, terminal and storage medium
CN112702146B (en) Data processing method and device
JP6785332B2 (en) Bluetooth speaker Data processing method, device and bluetooth speaker
CN113573172A (en) Dual-device audio playing method and device, electronic device and storage medium
WO2024027745A1 (en) Network connection method, electronic device, readable storage medium, and chip
TWI632816B (en) Continuous data delivery with energy conservation
WO2015103951A1 (en) Instant application message processing method and modem
CN112565876A (en) Screen projection method, device, equipment, system and storage medium
CN110457077B (en) Intelligent service method, device and equipment
US9437205B2 (en) Method, application, and device for audio signal transmission
CN111091827B (en) Voice navigation method and device, terminal and computer readable storage medium
CN106775748B (en) Screen locking switching method and device and electronic equipment
CN115065651B (en) Management method and device of dialogue message, electronic equipment and storage medium
CN116419359B (en) Bluetooth control method and device
CN112187705B (en) Audio playing method and equipment
CN111552454B (en) Audio playing method, device, terminal and storage medium

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