CN112702146B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN112702146B
CN112702146B CN201911007444.7A CN201911007444A CN112702146B CN 112702146 B CN112702146 B CN 112702146B CN 201911007444 A CN201911007444 A CN 201911007444A CN 112702146 B CN112702146 B CN 112702146B
Authority
CN
China
Prior art keywords
data
queue
sent
time
terminal
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.)
Active
Application number
CN201911007444.7A
Other languages
Chinese (zh)
Other versions
CN112702146A (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 device, wherein the method comprises the following steps: after the server sends data to the terminal, the sent data is buffered in a sent data queue, the data in the sent data queue is repeatedly sent according to a preset data sending interval, namely the server repeatedly sends the data sent to the terminal, so that the problem that when the existing server sends the data to the terminal in a dormant state, the dormant terminal is not awakened, the terminal does not receive the data for the first few seconds, the server also judges whether the data buffering time in the sent data queue reaches the preset time upper limit, if the data buffering time reaches the preset time upper limit, the data in the sent data queue is emptied, and the data is normally sent to the terminal (the data is not stored in the sent data queue) afterwards, so that 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, trunking communication is increasingly widely used in life. The trunking communication is to form a trunking communication common network by using a trunking communication system with the technical characteristics of channel sharing, dynamic allocation and the like, and provide communication services such as special command scheduling for group users of a plurality of departments, units and the like.
Taking trunked voice communication as an example, in a security scene or a large mall of a large activity, one person can talk to another person in the talk group and can hear the talk of the talk person at the same time. In the implementation model, there is usually a data forwarding server, which transmits the data transmission of the presenter to the other listening terminals, respectively.
However, there may be some risk in this process, for example, when a talk-around starts, some listening terminals also handle the sleep state (in order to save power, the terminals may go into the sleep state). If the server transmits the talkback data to the terminal in the dormant state, the dormant terminal is not awakened, the audio player does not get up, and the server forwards the past audio data for the first seconds at the moment, the dormant terminal does not receive the past audio data, and the dormant terminal cannot hear the data for the first seconds. If the first few seconds of audio data are important, they may have serious consequences.
Disclosure of Invention
The embodiment of the application provides a data processing method and device, which are used for solving 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 first few seconds.
In a first aspect, an embodiment of the present application provides a data processing method, including:
transmitting data to the terminal, and buffering the transmitted data in a transmitted data queue;
repeatedly transmitting data in the transmitted data queue according to a preset data transmission interval, wherein the data is used for indicating the terminal to buffer 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;
judging whether the data buffering time in the transmitted data queue reaches a preset time upper limit or not, wherein the time upper limit is larger than the data transmission interval;
and if the data caching time reaches the time upper limit, clearing the data in the sent data queue.
In one possible design, the repeatedly sending the data in the sent data queue according to the preset data sending interval includes:
judging whether the time for transmitting data to the terminal is equal to the data transmission interval or not;
and if the time is equal to the data transmission interval, repeatedly transmitting the data in the transmitted data queue once.
In one possible design, before the sending of the 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 wake state;
and setting the data transmission interval according to the time upper limit.
In a second aspect, embodiments of the present application provide another data processing method, including:
receiving data sent by a server, wherein the data comprises data in a sent data queue which is repeatedly sent 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;
caching 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 said ordering of the data in the received data queue, further comprising:
judging whether the sequence identifier of the first data in the received data queue after sequencing 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 sequencing result.
In one possible design, the sorting the data in the received data queue according to the sequence identifier of the received data includes:
determining the front-to-back sequence of the received data according to the sequence identification of the received data;
and sorting the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sorting 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 buffering the sent data in a sent data queue;
The second sending module is used for 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 buffer 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;
the first judging module is used for judging whether the data buffering time in the transmitted data queue reaches a preset time upper limit or not, wherein the time upper limit is larger than the data transmission 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 transmitting module is specifically configured to:
judging whether the time for transmitting data to the terminal is equal to the data transmission interval or not;
and if the time is equal to the data transmission interval, repeatedly transmitting the data in the transmitted data queue once.
In one possible design, the apparatus further comprises:
the first setting module is used for setting the time upper limit according to the time required by the terminal from the dormant state to the awake state before the first sending module sends data to the terminal;
And the second setting module is used for setting the data transmission interval according to the time upper limit.
In a fourth aspect, embodiments of the present application provide 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 repeatedly sent 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 a 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 apparatus further comprises:
the second judging module is used for judging whether the sequence identifier of the first data in the received data queue after the sequencing is a preset identifier 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;
And 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 sequencing result.
In one possible design, the sorting module is specifically configured to:
determining the front-to-back sequence of the received data according to the sequence identification of the received data;
and sorting the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sorting process.
In a fifth aspect, embodiments of the present application provide 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 in the memory such that the at least one processor performs the data processing method as described above in the first aspect and the 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 computer-executable instructions stored in the memory such that the at least one processor performs the data processing method as described above in the second aspect and the various possible designs of the second aspect.
In a seventh aspect, embodiments of the present application provide a computer readable storage medium, where computer executable instructions are stored, when executed by a processor, to implement the data processing method according to the first aspect and the various possible designs of the first aspect.
In an eighth aspect, embodiments of the present application provide another computer readable storage medium, where computer executable instructions are stored, when executed by a processor, to implement the data processing method according to the second aspect and the various possible designs of the second aspect.
According to the data processing method and the data processing device, 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 repeatedly sent according to the preset data sending interval, namely the server repeatedly sends the data sent to the terminal, the problem that the terminal does not receive the data for the first few seconds because the dormant terminal is not awakened when the existing server sends the data to the terminal in the dormant state is solved, the server also judges whether the data caching time in the sent data queue reaches the preset time upper limit or not, if so, the data in the sent data queue is emptied, and the data is normally sent to the terminal (the data is not stored in the sent data queue any more) subsequently, so that resource waste is avoided, and the method and the device are 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, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic diagram of a data processing system architecture according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a data processing method according to an embodiment of the present disclosure;
FIG. 3 is a second flowchart of a data processing method according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
FIG. 5 is a second schematic structural diagram of a data processing apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic hardware structure of a data processing device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of 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 apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Cluster communication is increasingly used in life. Taking trunked voice communication as an example, in a security scene or a large mall of a large activity, one person can talk to another person in the talk group and can hear the talk of the talk person at the same time. In the implementation model, there is usually a data forwarding server, which transmits the data transmission of the presenter to the other listening terminals, respectively. However, there may be some risk in this process, for example, when a main talk starts, some listening terminals also deal with the sleep state. If the server transmits the talkback data to the terminal in the dormant state, the dormant terminal is not awakened, the audio player does not get up, and the server forwards the past audio data for the first seconds at the moment, the dormant terminal does not receive the past audio data, and the dormant terminal cannot hear the data for the first seconds. If the first few seconds of audio data are important, they may have serious consequences.
Therefore, in view of the above problems, the present application provides a data processing method, after a server sends data to a terminal, the sent data is buffered in a sent data queue, and according to a preset data sending interval, the data in the sent data queue is repeatedly sent, that is, the server repeatedly sends the data sent to the terminal, so that 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 previous seconds of data is solved, and the server also judges whether the data buffering time in the sent data queue reaches a preset time upper limit, if so, the data in the sent data queue is emptied, and then the data is normally sent to the terminal (the data is not stored in the sent data queue any more), so that 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 a terminal 10 and a server 20.
In particular implementations, server 20 may send data to terminal 10 and buffer the sent data in a sent 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 also determine whether the data buffering time in the transmitted data queue reaches a preset time upper limit, where the time upper limit is greater than the data transmission interval. If so, the server 20 empties the data in the transmitted 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 architecture is only an exemplary system architecture block diagram, and in implementation, the architecture may be set according to application requirements, for example, the server side may further include a receiving device, configured to receive information related to the data transmission interval, the time upper limit, and so on, so as to meet different application requirements.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic flow chart of a data processing method according to an embodiment of the present application, and an execution body according to an embodiment of the present application may be a server in the embodiment of fig. 1. As shown in fig. 2, the method may include:
s201: and sending data to the terminal, and buffering the sent data in a sent data queue.
The data sent to the terminal may include audio, video, pictures, and the like.
Optionally, before the data is sent 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 wake state;
and setting the data transmission interval according to the time upper limit.
Here, the server may set the above-mentioned upper time limit according to the required experience time of the terminal from the sleep state to the awake state, and in addition, may consider a terminal abnormality such as the terminal not always transitioning to the awake state when the above-mentioned upper time limit is set.
In an exemplary embodiment, a time upper limit is set, and a data transmission interval is set according to the time upper limit, and in the process that the terminal is in a sleep state to an awake state, data is repeatedly transmitted according to the data transmission interval, so that the situation that the terminal in sleep is not awakened and does not receive data when the server transmits data to the terminal in sleep state is avoided.
Specifically, the setting the data transmission interval according to the time upper limit may include:
and receiving a data transmission interval setting instruction, wherein the instruction can carry a processing mode of the time upper limit, for example, the time upper limit is divided into n shares, and the data transmission interval is set according to the instruction and the time upper 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 adjustment instruction can be received, and the time upper limit is 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 time upper limit, a transmission interval adjustment instruction may be received, and the data transmission interval may be adjusted according to the instruction, so that the method is suitable for application.
S202: and repeatedly transmitting the data in the transmitted data queue according to a preset data transmission interval, wherein the data is used for indicating the terminal to buffer 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 transmitting data to the terminal is equal to the data transmission interval or not;
and if the time is equal to the data transmission interval, repeatedly transmitting the data in the transmitted data queue once.
Specifically, the server may determine whether the time for which the server transmits data to the terminal is equal to the above-described data transmission interval through the retransmission timer. The server starts the retransmission timer when starting to transmit certain data to the terminal, judges whether the retransmission timer is up, if yes, the server retransmits the data in the transmitted data queue once, if not, the server continues normal transmission, and stores the transmitted data in the transmitted data queue.
In addition, the server may determine whether the time for the server to transmit data to the terminal is equal to the data transmission interval according to the start time and the current time of transmitting data to the terminal. Specifically, the server records the starting time of transmitting certain data to the terminal, then calculates the time of transmitting the data to the terminal according to the current time and the starting time in the data transmission process, and retransmits the data in the transmitted data queue once when the time is equal to the data transmission interval.
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 time upper limit, and if so, empties the data in the transmitted data queue, stops the retransmission timer, and normally transmits the data to the terminal (not stored in the transmitted data queue). If not, continuing to transmit and storing the transmitted data in a transmitted data queue.
As can be seen from the above, the time upper limit is set according to the time required by the terminal from the sleep state to the awake state, if the server detects that the data buffering time in the transmitted data queue reaches the time upper limit, it indicates that the terminal has transitioned from the sleep state to the awake state, and the terminal can normally receive data, and the server does not need to repeatedly transmit data at this time, so that the server empties the data in the transmitted data queue, stops the retransmission timer, normally transmits data to the terminal, thereby saving resources and being suitable for practical application.
S204: and if the data caching time reaches the time upper limit, clearing 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 foregoing description, in the embodiment of the present application, after the server sends data to the terminal, the sent data is buffered in the sent data queue, and according to the preset data sending interval, the data in the sent data queue is repeatedly sent, that is, the server repeatedly sends the data sent to the terminal, so that the problem that when the existing server sends the data to the terminal in the dormant state, the dormant terminal is not awakened yet, so that the terminal does not receive the previous few seconds of data is solved, and the server also determines whether the data buffering time in the sent data queue reaches the preset time upper limit, if so, the data in the sent data queue is emptied, and then the data is normally sent to the terminal (the data is not stored in the sent data queue any more), 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 above in conjunction with fig. 2, and another data processing method provided according to the embodiment of the present application will be described in detail from the terminal side below in conjunction with fig. 3. It should be understood that certain concepts, characteristics, etc. described at the terminal side correspond to those described at the server side, and duplicate descriptions are omitted as appropriate for brevity.
Fig. 3 is a second flowchart of a data processing method provided in the embodiment of the present application, where the execution body in the embodiment of the present application may be a terminal in the embodiment shown in fig. 1. As shown in fig. 3, the method may include:
s301: and receiving data sent by a server, wherein the data comprises data in a sent data queue which is repeatedly sent 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: the received data is buffered in a received data queue.
S303: and ordering the data in the received data queue according to the sequence identification of the received data.
The sequence identifiers of the data are in sequence, for example, the server sequentially sends three data to the terminal, and the sequence identifiers of the three data can be respectively set as 1, 2 and 3.
Optionally, the sorting the data in the received data queue according to the sequence identifier of the received data includes:
determining the front-to-back sequence of the received data according to the sequence identification of the received data;
and sorting the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sorting process.
As can be seen from the above, the server repeatedly sends data to the terminal according to the preset data sending interval, so that the terminal may repeatedly receive data, and in order to ensure that the subsequent data play correctly, the terminal sorts the data in the received data queue according to the front-to-back sequence of the received data, and discards the data with repeated sequence identifiers in the sorting process, so that the method is suitable for application.
Optionally, after said ordering of the data in the received data queue, further comprising:
judging whether the sequence identifier of the first data in the received data queue after sequencing 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.
For example, if the sequence identifier of the first data sent by the server to the terminal is 1, after sorting the data in the received data queue, the terminal determines whether the sequence identifier of the first data in the sorted received data queue is 1, 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 transmits the data to the terminal in the dormant state, the terminal can successfully receive the data transmitted by the server, and the subsequent data playing error is 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 sequencing result.
Here, the terminal may set the above-described upper time limit according to a required time for the terminal from the sleep state to the awake state.
The terminal receives the data sent by the server, buffers 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 buffer time in the received data queue reaches the preset time upper limit, and plays the data in the received data queue according to the sorting result if the data buffer time reaches the preset time upper limit, so that the terminal can immediately play the received data when switching from the dormant state to the awake 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 adjustment instruction, and adjust the time upper limit according to the instruction, so as to meet the application requirements of different application scenes.
According to the data processing method provided by the embodiment of the application, the terminal receives the data sent by the server, the data comprises the data in the sent data queue which is repeatedly sent by the server according to the preset data sending interval, wherein the data in the sent data queue is the cached data sent by the server, namely the data repeatedly sent by the terminal receiving server, the problem that the terminal is not awakened due to the fact that the terminal does not receive the data for the first few seconds when the existing server sends the data to the terminal in the dormant state is solved, the terminal caches the received data in the received data queue, sorts the data in the received data queue according to the sequence identification of the received data, plays the received data in the received data queue according to the sorting result, and meets the application requirement.
Fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, corresponding to the data processing method of the above embodiment. For convenience of explanation, only portions relevant to the embodiments of the present application are shown. Fig. 4 is a 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.
The second sending module 402 is 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 buffer the data in the 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 transmitted data queue reaches a preset time upper limit, where the time upper limit is greater than the data transmission 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 one possible design, the second transmitting module 402 is specifically configured to:
judging whether the time for transmitting data to the terminal is equal to the data transmission interval or not;
and if the time is equal to the data transmission interval, repeatedly transmitting the data in the transmitted data queue once.
In one possible design, the first setting module 405 is configured to set the upper time limit according to a required time of the terminal 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 time upper limit.
The device provided in the embodiment of the present application may be used to implement the technical solution of the embodiment of the method described in fig. 2, and its implementation principle and technical effects are similar, and the embodiment of the present application will not be described herein again.
Fig. 5 is a schematic diagram of a second structure 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 buffering 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, where the data in the sent data queue is cached data sent by the server.
A buffering module 502, configured to buffer the received data in a 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.
And the second processing module 504 is configured to play the data in the received data queue according to the sorting result.
In one 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 the sequence identifier of the first data in the received data queue after sorting is a preset identifier.
The receiving module 501 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 504 is further configured to play 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 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 sequencing result.
In one possible design, the sorting module 503 is specifically configured to:
determining the front-to-back sequence of the received data according to the sequence identification of the received data;
and sorting the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sorting process.
The device provided in the embodiment of the present application may be used to implement the technical solution of the embodiment of the method described in fig. 3, and its implementation principle and technical effects are similar, and the embodiment of the present application will not be described herein again.
Fig. 6 is a schematic hardware structure of a data processing device according to an embodiment of the present invention. As shown in fig. 6, the data processing apparatus 60 of the present embodiment includes: a processor 601 and a memory 602; wherein the method comprises the steps of
A memory 602 for storing computer-executable instructions;
a processor 601 for executing computer-executable instructions stored in a memory to perform the steps of:
transmitting data to the terminal, and buffering the transmitted data in a transmitted data queue;
repeatedly transmitting data in the transmitted data queue according to a preset data transmission interval, wherein the data is used for indicating the terminal to buffer 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;
Judging whether the data buffering time in the transmitted data queue reaches a preset time upper limit or not, wherein the time upper limit is larger than the data transmission interval;
and if the data caching time reaches the time upper limit, clearing the data in the sent data queue.
In one possible design, the repeatedly sending the data in the sent data queue according to the preset data sending interval includes:
judging whether the time for transmitting data to the terminal is equal to the data transmission interval or not;
and if the time is equal to the data transmission interval, repeatedly transmitting the data in the transmitted data queue once.
In one possible design, before the sending of the 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 wake state;
and setting the data transmission interval according to the time upper limit.
Alternatively, the memory 602 may be separate or integrated with the processor 601.
When the memory 602 is provided separately, the data processing device further comprises a bus 603 for connecting said memory 602 and the processor 601.
An embodiment of the present invention provides another data processing apparatus including: a processor and a memory; wherein the method comprises the steps of
A memory for storing computer-executable 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 which is repeatedly sent 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;
caching 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 said ordering of the data in the received data queue, further comprising:
judging whether the sequence identifier of the first data in the received data queue after sequencing 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 sequencing result.
In one possible design, the sorting the data in the received data queue according to the sequence identifier of the received data includes:
determining the front-to-back sequence of the received data according to the sequence identification of the received data;
and sorting the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sorting process.
In the alternative, the memory may be separate or integrated with the processor.
When the memory is provided separately, the data processing device further comprises a bus for connecting the memory and the processor.
Embodiments of the present invention provide a computer readable storage medium having stored therein computer executable instructions that when executed by a processor implement a data processing method as described above in fig. 2.
An embodiment of the present invention provides another computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement a data processing method as described above in fig. 3.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one unit. The units formed by the modules can be realized in a form of hardware or a form of hardware and software functional units.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional module is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods described in the embodiments of the present application.
It should be understood that the above processor may be a central processing unit (Central Processing Unit, abbreviated as CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, abbreviated as DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as 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 for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings 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 nonvolatile 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 disk. 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. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). It is also possible that the processor and the storage medium reside as discrete components in an electronic device or a master device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (8)

1. A data processing method, wherein the method is applied to a server, the method comprising:
transmitting data to the terminal, and buffering the transmitted data in a transmitted data queue;
repeatedly transmitting data in the transmitted data queue according to a preset data transmission interval, wherein the data is used for indicating the terminal to buffer 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;
judging whether the data buffering time in the transmitted data queue reaches a preset time upper limit or not, wherein the time upper limit is larger than the data transmission interval;
if the data caching time reaches the time upper limit, the data in the sent data queue is emptied;
before the data is sent to the terminal, the method further comprises the following steps:
setting the upper time limit according to the time required by the terminal from the sleep state to the wake state;
setting the data transmission interval according to the time upper limit;
and repeatedly transmitting the data in the transmitted data queue according to a preset data transmission interval, wherein the data transmission interval comprises the following steps:
Judging whether the time for transmitting data to the terminal is equal to the data transmission interval or not;
and if the time is equal to the data transmission interval, repeatedly transmitting the data in the transmitted data queue once.
2. A method of data processing, comprising:
receiving data sent by a server, wherein the data comprises data in a sent data queue which is repeatedly sent by the server according to a preset data sending interval, the data in the sent data queue is cached data sent by the server, the preset data sending interval is set to an upper time limit according to the time required by a terminal from a dormant state to a wake-up state, and the upper time limit is set according to the upper time limit;
caching 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;
playing the data in the received data queue according to the sorting result;
after said ordering of the data in the received data queue, further comprising:
judging whether the sequence identifier of the first data in the received data queue after sequencing 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;
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;
the playing the data in the received data queue according to the sorting result comprises the following steps:
judging whether the data caching time in the received data queue reaches a preset time upper limit or not;
if the data caching time reaches the time upper limit, playing the data in the received data queue according to the sequencing result;
the sorting the data in the received data queue according to the sequence identification of the received data includes:
determining the front-to-back sequence of the received data according to the sequence identification of the received data;
and sorting the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sorting process.
3. A data processing apparatus, the data processing apparatus being applied to a server, the data processing apparatus comprising:
The first sending module is used for sending data to the terminal and buffering the sent data in a sent data queue;
the second sending module is used for 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 buffer 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;
the first judging module is used for judging whether the data buffering time in the transmitted data queue reaches a preset time upper limit or not, wherein the time upper limit is larger than the data transmission interval;
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;
the data processing apparatus further includes:
the first setting module is used for setting the time upper limit according to the time required by the terminal from the dormant state to the awake state before the first sending module sends data to the terminal;
a second setting module, configured to set the data transmission interval according to the time upper limit;
The second sending module is specifically configured to:
judging whether the time for transmitting data to the terminal is equal to the data transmission interval or not;
and if the time is equal to the data transmission interval, repeatedly transmitting the data in the transmitted data queue once.
4. A data processing apparatus, 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 repeatedly sent by the server according to a preset data sending interval, the data in the sent data queue is cached data sent by the server, the preset data sending interval is set to a time upper limit according to the time required by a terminal from a dormant state to a wake-up state, and the time upper limit is set according to the time upper limit;
the buffer module is used for buffering the received data in a 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;
the second processing module is used for playing the data in the received data queue according to the sorting result;
further comprises:
the second judging module is used for judging whether the sequence identifier of the first data in the received data queue after the sequencing is a preset identifier 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;
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;
if the data caching time reaches the time upper limit, playing the data in the received data queue according to the sequencing result;
the sorting module is specifically configured to:
determining the front-to-back sequence of the received data according to the sequence identification of the received data;
and sorting the data in the received data queue according to the front-back sequence, and discarding the data with repeated sequence identification in the sorting process.
5. A server, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the data processing method of claim 1.
6. A terminal, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the data processing method of claim 2.
7. A computer-readable storage medium, in which computer-executable instructions are stored which, when executed by a processor, implement the data processing method of claim 1.
8. A computer-readable storage medium, in which computer-executable instructions are stored which, when executed by a processor, implement the data processing method of claim 2.
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 CN112702146A (en) 2021-04-23
CN112702146B true 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)

Families Citing this family (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
CN116996450B (en) * 2023-08-05 2024-03-22 哈尔滨商业大学 Management data processing method, device and system

Citations (3)

* 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
CN108563774A (en) * 2018-04-20 2018-09-21 广州林邦信息科技有限公司 GPS data processing method and processing device
CN109743717A (en) * 2019-03-06 2019-05-10 深圳市飞比电子科技有限公司 Data processing method, device, terminal device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107294653A (en) * 2016-04-13 2017-10-24 中兴通讯股份有限公司 The data processing method and system of a kind of wireless chain control layer
CN108024320A (en) * 2016-11-04 2018-05-11 华为技术有限公司 Transmit method, the network equipment and the terminal device of information
CN108616968B (en) * 2016-12-09 2021-02-12 华为技术有限公司 Method and apparatus for transmitting frame
CN107612661B (en) * 2017-09-07 2021-06-22 四川九洲北斗导航与位置服务有限公司 Data communication method and device
CN109617657B (en) * 2019-01-22 2021-07-30 新华三技术有限公司 Message processing method and device

Patent Citations (3)

* 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
CN108563774A (en) * 2018-04-20 2018-09-21 广州林邦信息科技有限公司 GPS data processing method and processing 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终端实现;何金辉;朱大庆;齐文新;;计算机与数字工程(第03期);全文 *

Also Published As

Publication number Publication date
CN112702146A (en) 2021-04-23

Similar Documents

Publication Publication Date Title
WO2021047390A1 (en) Method for reducing power consumption and mobile terminal
JP6742465B2 (en) Method, device and bluetooth speaker for continuous wakeup delay reduction in bluetooth speaker
WO2006071821A2 (en) Method and apparatus for adjusting a duty cycle to save power in a computing system
CN112702146B (en) Data processing method and device
CN110457078B (en) Intelligent service method, device and equipment
WO2021238404A1 (en) Data card switching method and apparatus, and terminal, and storage medium
EP3779690A1 (en) Processor core scheduling method and apparatus, terminal, and storage medium
CN111447603A (en) Data transmission method and device
WO2023103419A1 (en) Message queue-based method and apparatus for sending 5g messages in batches, and electronic device
WO2022017007A1 (en) Audio data processing method, server, and storage medium
WO2022156586A1 (en) Network access method and device
EP4024945A1 (en) Information processing method, apparatus, and device, and computer readable storage medium
KR102219015B1 (en) Use of network support protocols to improve network usage
JP6785332B2 (en) Bluetooth speaker Data processing method, device and bluetooth speaker
US20070167195A1 (en) Communication system, method for extending stand-by time, and computer readable medium therefor
US10740161B2 (en) Broadcast message sending method and apparatus, and mobile terminal
CN106411718B (en) Data synchronization method and device based on instant messaging application
CN107124353B (en) Message processing method and device, computer device and storage medium
CN110597643A (en) Inter-core communication method, processor and electronic equipment
WO2022156801A1 (en) Method for determining validity of reference signal transmission occasion, and user equipment
CN110457077B (en) Intelligent service method, device and equipment
CN113746647B (en) Data transmission method, node, electronic device and readable storage medium
US20110153940A1 (en) Method and apparatus for communicating data between processors in mobile terminal
CN113132300B (en) Audio data transmission method and device
CN112152975B (en) Audio data processing method and 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