CN112684878B - Data transmission method and electronic equipment - Google Patents

Data transmission method and electronic equipment Download PDF

Info

Publication number
CN112684878B
CN112684878B CN202011546248.XA CN202011546248A CN112684878B CN 112684878 B CN112684878 B CN 112684878B CN 202011546248 A CN202011546248 A CN 202011546248A CN 112684878 B CN112684878 B CN 112684878B
Authority
CN
China
Prior art keywords
data
storage area
target
preset value
size
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
CN202011546248.XA
Other languages
Chinese (zh)
Other versions
CN112684878A (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.)
Vivo Mobile Communication Hangzhou Co Ltd
Original Assignee
Vivo Mobile Communication Hangzhou Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Hangzhou Co Ltd filed Critical Vivo Mobile Communication Hangzhou Co Ltd
Priority to CN202011546248.XA priority Critical patent/CN112684878B/en
Publication of CN112684878A publication Critical patent/CN112684878A/en
Application granted granted Critical
Publication of CN112684878B publication Critical patent/CN112684878B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a data transmission method, a data transmission device, electronic equipment and a readable storage medium, and belongs to the technical field of communication. The data transmission method comprises the following steps: under the condition of acquiring first target data, identifying the real-time level of the first target data; storing the first target data in a first storage area if the level of the first target data is lower than or equal to the target level; and transmitting a first data group in the first storage area under the condition that the size of the data stored in the first storage area exceeds a first preset value, wherein the first data group comprises first target data acquired at least twice. The scheme provided by the embodiment of the application can solve the problem that the power consumption is large in the data transmission process of the existing electronic equipment.

Description

Data transmission method and electronic equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data transmission method, an apparatus, and an electronic device.
Background
In the prior art, electronic equipment generally needs to perform data transmission and data processing. The electronic device will directly transmit to the data processing module (e.g. CPU) each time after receiving the data, to ensure real-time performance of data transmission. However, when the frequency of the data transmitted by the data transmission module is high, the power consumption of the electronic device for transmitting the data is large, and thus, the problem of large power consumption exists in the existing electronic device in the data transmission process.
Disclosure of Invention
The data transmission method, the data transmission device and the electronic equipment provided by the embodiment of the application aim to solve the problem that the power consumption of the existing electronic equipment is large in the data transmission process.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a data transmission method, where the method includes:
under the condition of acquiring first target data, identifying the real-time level of the first target data;
storing the first target data in a first storage area if the level of the first target data is lower than or equal to the target level;
and transmitting a first data group in the first storage area under the condition that the size of the data stored in the first storage area exceeds a first preset value, wherein the first data group comprises first target data acquired at least twice.
In a second aspect, an embodiment of the present application provides an electronic device, including:
the first determining module is used for identifying the real-time level of the first target data under the condition of acquiring the first target data;
the storage module is used for storing the first target data in a first storage area under the condition that the real-time level of the first target data is lower than or equal to the target level;
and the transmission module is used for transmitting a first data group in the first storage area under the condition that the size of the data stored in the first storage area exceeds a first preset value, wherein the first data group comprises first target data acquired at least twice.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or an instruction stored in the memory and executable on the processor, where the program or the instruction implements the steps of the data transmission method when executed by the processor.
In a fourth aspect, the present application provides a readable storage medium, where a program or instructions are stored on the readable storage medium, and when the program or instructions are executed by a processor, the program or instructions implement the steps of the data transmission method.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions, and the program or instructions, when executed by the processor, implement the steps of the data transmission method.
In the embodiment of the application, under the condition that the first target data is acquired, the real-time level of the first target data is determined, the acquired first target data with the lower real-time level is temporarily stored in the first storage area, and under the condition that the total amount of the first target data stored in the first storage area exceeds a first preset value, the first target data acquired at least twice and stored in the first storage area is transmitted.
Drawings
Fig. 1 is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 2 is a second schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 3 is a third schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
fig. 6 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application.
Detailed Description
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, but not all, embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The data transmission method, the data transmission device, and the electronic device provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Referring to fig. 1, fig. 1 is a data transmission method provided in an embodiment of the present application, where the method includes:
step S101, under the condition that first target data are obtained, identifying the real-time level of the first target data.
The data transmission method can be used for various devices for transmitting data or transmission modules in the devices. For convenience of understanding, the method provided in the present application is further explained below by taking the above-mentioned data transmission method as an example of applying the method to a data transmission node, where the data transmission node may be a chip used by an electronic device to communicate with an external base station or other electronic devices, for example, an antenna of the electronic device, and a connection between the electronic device and the external base station or other electronic devices is established through the data transmission node; and may transceive data through the data transfer node.
The first target data may be any piece of data received by the data transmission node, specifically, a determination rule for determining a real-time level of the acquired data may be set in the electronic device in advance, for example, the real-time level of the corresponding data may be determined based on a data type of the received data, in this case, the audio data may be determined as data of a first level, the text data may be determined as data of a second level, and the picture data may be determined as data of a third level, where the first level is higher than the second level, the second level is higher than the third level, and the target level may be the second level.
In this way, when the data transmission node acquires the first target data, the data type of the first target data can be identified by reading the field for recording the data type of the first target data, and the real-time level of the first target data is determined.
It should be noted that the higher the real-time level of the first target data, the higher the requirement on the timeliness of transmission is, for example, when the real-time level of the first target data is the first level, the first target data may be a voice call request or a video call request, and since the voice call request or the video call request is required for timely answering processing, if the request is not timely transmitted to the data processing node, the request may fail, and therefore, the data of this type should be preferentially transmitted. For the text data or the picture data, the user is not required to perform receiving operation in the transmission process, so that the problem of transmission failure and the like cannot be caused if the data is transmitted to the data processing node in time, and the timeliness grade of the data can be set to be a lower grade.
The first target data may be data received by the electronic device through various wireless transmission technologies, for example, through any one of the following wireless transmission manners: ble wireless transmission, BT transmission, WiFi transmission, 4G network transmission, 5G network transmission, etc. And the data transmission node and the data processing node can transmit data in an SPI communication mode.
Step S102, under the condition that the real-time performance level of the first target data is lower than or equal to the target level, the first target data is stored in a first storage area.
As is apparent from the above description, since the requirement on the timeliness of transmission is low for data with a low timeliness level, when first target data with a low timeliness level is received, such data can be temporarily stored in a first storage area, where the first storage area may be a cache area of a data transmission node, and thus, the stored plurality of first target data are collectively directed to a data processing node, so as to reduce the number of data transmission.
Step S103, transmitting a first data group in the first storage area under the condition that the size of the data stored in the first storage area exceeds a first preset value, where the first data group includes first target data acquired by the data transmission node at least twice.
Specifically, the first target data stored in the first storage area may be spliced in the order of storage to form a data block, so that when the size of the data block exceeds a first preset value, that is, it is described that the amount of data stored in the first storage area is large, part or all of the data of the database may be transmitted.
In this embodiment, when the first target data is acquired, the real-time level of the first target data is determined, the acquired first target data with the lower real-time level is temporarily stored in the first storage area, and when the total amount of the first target data stored in the first storage area exceeds the first preset value, the first target data acquired at least twice and stored in the first storage area is transmitted.
Optionally, after determining the level of real-time performance of the first target data, the method further includes:
transmitting the first target data if the level of the first target data is higher than a target level.
In this embodiment, when it is determined that the real-time level of the first target data is higher than the target level, it indicates that the first target data has a high requirement on timeliness, and therefore, when the real-time level of the first target data is higher than the target level, the first target data is directly transmitted, so as to ensure that the data having a high requirement on timeliness is transmitted in time.
Optionally, the transmitting the first data group in the first storage area when the size of the data stored in the first storage area exceeds a first preset value includes:
under the condition that the size of the data stored in the first storage area exceeds a first preset value, dividing the data stored in the first storage area into a first data group and a second data group, wherein the data size of the first data group is matched with the first preset value;
and transmitting the first data group and storing the second data group in the first storage area.
Specifically, the data size of the first data group may be the same as a first preset value, and the first preset value may be a maximum value of data that the data transmission node can send to the data processing node at a single time. The first preset value can be determined according to the performance of the electronic device.
After the division of the data stored in the first storage area is completed, the second data group is further stored in the first storage area, so that when the first target data is subsequently received again in the first storage area, the subsequently received second target data and the second data group can be spliced and stored as data which is subsequently sent to the data processing node.
It should be noted that, when the size of the data stored in the first storage area is equal to the first preset value, all the data stored in the first storage area may be used as the first data group, and at this time, that is, in this case, the data in the first storage area does not need to be divided, and the second data group is empty.
In this embodiment, when the data stored in the first storage area exceeds the first preset value, the first data group with the size matching the first preset value is divided from the first storage area, and the first data group is sent to the data processing node, so that the number of times of data transmission to the data processing node can be further reduced, and further the power consumption of the electronic device in the data transmission process can be further reduced.
Optionally, before identifying the level of real-time performance of the first target data when the first target data is obtained, the method further includes:
determining the data to be transmitted as the first target data under the condition that the data to be transmitted are acquired and meet first storage conditions;
determining the data to be transmitted as second target data when the data to be transmitted is acquired and the data to be transmitted does not accord with the first storage condition;
storing the second target data in a second storage area;
wherein the first storage condition comprises: the sum of the size of the data stored in the first storage area and the size of the data to be transmitted is smaller than or equal to a second preset value, and the transmission speed of the data to be transmitted is smaller than or equal to a third preset value;
the second preset value is the maximum value of the data amount which can be cached by the data transmission node, the third preset value is the maximum speed of the data transmission node for transmitting data, the data transmission node is a node for transmitting the data to be transmitted, and the first storage area is the cache area of the data transmission node.
The first transmission condition may be a condition that whether the data to be transmitted is suitable for being directly transmitted by the data transmission node under the current condition of the data transmission node, for example, the first transmission condition may be whether the size of the data to be transmitted exceeds a preset value, and when the size of the data to be transmitted exceeds the preset value, the remaining storage space of the data transmission node cannot accommodate the data to be transmitted, at this time, it may be set that the data to be transmitted does not conform to the first transmission condition, and correspondingly, when the size of the data to be transmitted is smaller than the preset value, it may be set that the data to be transmitted conforms to the first transmission condition.
The second storage area may be a storage area with a larger storage space, and may be, for example, various storage elements, such as a memory card, a nor flash, a nand flash, a usb disk, and the like of an electronic device.
Because the data transmission node cannot directly transmit the data to be transmitted at present, the data to be transmitted can be temporarily stored in a second storage area as second target data.
Optionally, before determining the level of real-time performance of the first target data when the first target data is obtained, the method further includes:
calculating the sum of the size of the data to be transmitted and the size of the data stored in the first storage area to obtain the total amount of the data;
determining that the data to be transmitted meets the first transmission condition under the condition that the total data amount is less than or equal to a second preset value;
determining that the data to be transmitted does not accord with the first transmission condition under the condition that the total data amount is larger than the second preset value;
the second preset value is the maximum value of the data amount which can be cached by the data transmission node.
In this embodiment, the first transmission condition may be a condition whether the data to be transmitted can be directly transmitted through the data transmission node at present. The data transmission method comprises the steps of determining whether the total data amount exceeds the maximum value of the data amount which can be cached by the data transmission node to determine whether the data to be transmitted can be directly transmitted through the data transmission node at present, and when the total data amount exceeds the maximum value of the data amount which can be cached by the data transmission node, explaining that if the data to be transmitted is stored in a cache region of the data transmission node, the data which needs to be stored in the cache region of the data transmission node exceeds the upper limit of the data which can be stored in the cache region of the data transmission node, at the moment, the data to be transmitted may fail in caching, and further the problem of transmission failure is caused.
Correspondingly, when the total amount of the data is less than or equal to the second preset value, it indicates that the cache area of the data transmission node can accommodate the data to be transmitted, so that the data to be transmitted can be directly transmitted through the data transmission node at this time, or the data to be transmitted is temporarily stored in the first storage area.
Optionally, before determining the level of real-time performance of the first target data when the first target data is obtained, the method further includes:
calculating the transmission speed of the data to be transmitted;
determining that the data to be transmitted conforms to the first transmission condition under the condition that the transmission speed of the data to be transmitted is less than or equal to a third preset value;
determining that the data to be transmitted does not accord with the first transmission condition under the condition that the transmission speed of the data to be transmitted is greater than the third preset value;
and the third preset value is the maximum speed at which the data transmission node can transmit data to the data processing node.
The process of calculating the transmission speed of the data to be transmitted may be dividing the size of the data to be transmitted by the time consumed for receiving the data to be transmitted, so as to obtain the transmission speed of the data to be transmitted.
The data to be transmitted may be the maximum transmission speed of the data to be transmitted, and specifically, it is assumed that the data to be transmitted includes N data segments, the N data segments are sequentially transmitted to a data transmission node, in calculating the transmission speed of the data to be transmitted, the data transmission rate may be calculated, after each completion of the reception of one data segment, the total amount of the currently received data segments S1, and the current time point TI1 are recorded, and then, the time point TI2 when the reception is completed is recorded after the reception of the next data segment is completed, and the total amount of received data segments S2 at TI2 is recorded, so that, the transmission speed of the data segment can be calculated through (S2-S1)/(TI2-TI1), the transmission speed of N data segments can be calculated through the method, and the maximum value of the calculated N transmission speeds can be used as the transmission speed of the data to be transmitted.
The first transmission condition may be a condition whether the data to be transmitted can be directly transmitted through the data transmission node at present. In this embodiment, a comparison is made between a speed at which a data transmission node receives data to be transmitted and a maximum speed at which the data transmission node can send data to a data processing node, so as to determine whether the data to be transmitted can be directly transmitted by the data transmission node at present, and if the transmission speed of the data to be transmitted is greater than a third preset value, it indicates that the speed at which the data transmission node receives the data to be transmitted is greater than the maximum speed at which the data transmission node can send data to the data processing node, and at this time, if the data to be transmitted is directly transmitted by the data transmission node, the speed of the data input to the data transmission node is greater than the speed of the data output from the data transmission node, which results in a large amount of data accumulated at the data transmission node, and the cache space of the data transmission node is usually small, which further results in a problem that the data transmission node may not accommodate the data to be transmitted, so that the data transmission fails, in this case, the data to be transmitted may be stored as second target data in a second storage area capable of accommodating the second target data.
Correspondingly, when the transmission speed of the data to be transmitted is less than or equal to the third preset value, it indicates that the data to be transmitted does not cause data accumulation at the data transmission node, so that the data to be transmitted can be directly transmitted through the data transmission node at this time, or the data to be transmitted is temporarily stored in the first storage area.
In this embodiment, when it is determined that the data to be transmitted does not conform to the first transmission condition, the data to be transmitted is stored in the second storage area as the second target data, so that the problem of transmission failure caused by the data transmission node transmitting the data that does not conform to the transmission condition can be avoided.
Optionally, after storing the second target data in the second storage area, the method further includes:
and transmitting a third data group in the second storage area under the condition that the size of the data stored in the second storage area exceeds the first preset value, wherein the third data group comprises second target data acquired by the data transmission node at least twice, and the size of the third data group is matched with the first preset value.
Specifically, in the case that the size of the data stored in the second storage area exceeds the first preset value, the data stored in the second storage area may be divided into a third data group and a fifth data group, where the data size of the third data group is the same as the first preset value. Then, the third data group is transmitted to the data processing node, and the fifth data group is stored in the first storage area.
In this embodiment, the second target data acquired at least twice and stored in the second storage area are transmitted at one time, so that the number of times that the data transmission node transmits data can be reduced compared with the case that the second target data is acquired each time, that is, transmitted once, and thus the power consumption of the electronic device in the data transmission process is saved. In addition, when the data stored in the second storage area exceeds the first preset value, a third data group with the size matched with the second preset value is divided from the second storage area and transmitted, so that the data transmission times can be further reduced, and the power consumption of the electronic equipment in the data transmission process can be further reduced.
Optionally, the third data group further includes a first identifier, where the first identifier is used to indicate a size of data remaining in the second storage area; after the transmitting the third data set in the second storage area, the method further comprises:
acquiring a fourth data group from the second storage area by the data processing node under the condition that the first identification indicates that the size of the data left in the second storage area exceeds the first preset value;
the data processing node is a node used for receiving the third data group, the fourth data group comprises second target data and a second identifier, the second identifier is used for indicating the size of the data remaining in the second storage area after the data processing node acquires the fourth data group from the second storage area, and the size of the fourth data group is matched with the first preset value.
The data processing node may be a data processing chip in an electronic device, and may be, for example, a CPU of the electronic device. After receiving the data transmitted by the data transmission node, the data processing node may perform parsing on the received data.
Specifically, the first identifier is used to indicate the size of the data remaining in the second storage area, that is, to indicate the size of the fifth data group. When the first identifier indicates that the size of the fifth data group exceeds the first preset value, it indicates that the data stored in the second storage area is still more after the third data group is transmitted to the data processing node, and in order to avoid a large amount of data accumulation at the second node, the data processing node may be notified to actively pull the data from the second storage area while sending the third data to the data processing node. Accordingly, in the case where the first flag indicates that the size of the fifth data group is smaller than the first preset value, the data processing node may perform no processing.
The sum of the sizes of all the second target data stored in the fourth data group may be matched with the first preset value, so as to further reduce the number of times that data is transmitted between the second storage area and the data processing node.
In this embodiment, the first identifier is further sent to the data processing node while the third data group is sent to the data processing node, so that the data processing node actively acquires data from the second storage area based on the first identifier, thereby avoiding a large amount of data accumulation in the second storage area.
Optionally, the storing the second target data in a second storage area includes:
storing the second target data in a first queue in the second storage area if the level of the second target data is higher than the target level;
storing the second target data in a second queue in the second storage area if the level of the second target data is less than or equal to the target level.
In this embodiment, the second target data with different real-time levels are stored in different queues based on the real-time level of the second target data, so that the data with high real-time level can be transmitted preferentially when the second target data in the second storage area is transmitted to the data processing node subsequently.
Optionally, the transmitting, to the data processing node, a third data group in the second storage area when the size of the data stored in the second storage area exceeds the first preset value includes:
judging whether the size of the data stored in the first queue exceeds the first preset value or not;
under the condition that the size of data stored in the first queue exceeds a first preset value, transmitting a first target data group in the first queue to the data processing node, wherein the first target data group comprises second target data acquired by the data transmission node at least twice;
when the size of the data stored in the first queue is smaller than or equal to the first preset value, or after the third data group in the first queue is transmitted to the data processing node, judging whether the size of the data stored in the second queue exceeds the first preset value;
under the condition that the size of the data stored in the second queue exceeds a first preset value, transmitting a second target data group in the second queue to the data processing node, wherein the second target data group comprises second target data acquired by the data transmission node at least twice;
wherein the third data set may be the first target data set or the second target data set.
Optionally, in a case that the third data group is the first target data group, in a case that the first identifier indicates that the size of the data remaining in the second storage area exceeds the first preset value, acquiring, by the data processing node, a fourth data group from the second storage area includes:
and under the condition that the first identification indicates that the size of the data left in the first queue exceeds the first preset value, acquiring a fourth data group from the first queue by the data processing node.
Optionally, in a case that the third data group is the second target data group, in a case that the first identifier indicates that the size of the data remaining in the second storage area exceeds the first preset value, acquiring, by the data processing node, a fourth data group from the second storage area, includes:
and under the condition that the first identifier indicates that the size of the data left in the second queue exceeds the first preset value, acquiring a fourth data group from the second queue by the data processing node.
In this embodiment, the second target data stored in the second storage area is further stored in the real-time ranking queue, so that when the data in the second storage area is transmitted, the second target data with high real-time ranking can be preferentially transmitted.
Referring to fig. 2, a specific process of a data transmission node transmitting first target data when receiving the first target data in an embodiment of the present application specifically includes: the method comprises the steps of obtaining first target data, judging whether the real-time level of the first target data is higher than a target level or not, transmitting the first target data to a data processing node under the condition that the real-time level of the first target data is higher than the target level, and analyzing and processing the received first target data due to the data processing node. When the real-time level of the first target data is lower than or equal to the target level, the first target data is stored in a first storage area, whether the sum of the sizes of all data stored in the first storage area exceeds a first preset value or not is judged, under the condition that the sum of the sizes of all data stored in the first storage area is determined to exceed the first preset value, the data stored in the first storage area are segmented to obtain a first data group, the first data group is transmitted to a data processing node, and the data processing node analyzes the received first data group.
In addition, in this embodiment, other specific processing procedures for the received first target data are similar to those in the above-described embodiment, and the same beneficial effects can be achieved, and are not described herein again to avoid repetition.
Referring to fig. 3, a specific process of transmitting the second target data by the data transmission node when receiving the second target data in an embodiment of the present application specifically includes: the method comprises the steps of obtaining second target data, judging whether the real-time level of the second target data is higher than a target level or not, storing the second target data in a first queue under the condition that the real-time level of the second target data is higher than the target level, judging whether the sum of the sizes of all data stored in the first queue exceeds a first preset value or not, segmenting the data stored in the first queue under the condition that the sum of the sizes of all data stored in the first queue exceeds the first preset value to obtain a first target data group, transmitting the first target data group to a data processing node, and analyzing and processing the received first target data group due to the data processing node. And judging whether the size of the data stored in the second queue exceeds a first preset value or not after the sum of the sizes of all the data stored in the first queue is smaller than or equal to the first preset value or the first target data group is sent to a data processing node, segmenting the data stored in the second queue to obtain a second target data group under the condition that the size of the data stored in the second queue exceeds the first preset value, and transmitting the second target data group to the data processing node, wherein the data processing node analyzes the received second target data group.
In addition, in this embodiment, other specific processing procedures for the received second target data are similar to those in the above-described embodiment, and the same beneficial effects can be achieved, and are not described herein again to avoid repetition.
Referring to fig. 4, an embodiment of the present application further provides an electronic device 400, where the electronic device 400 includes a data processing node and a data transmission node, and the electronic device 400 includes:
the first determining module 401 is configured to identify a real-time level of first target data when the first target data is obtained;
a storage module 402, configured to store the first target data in a first storage area if the real-time level of the first target data is lower than or equal to the target level;
a transmission module 403, configured to transmit a first data group in the first storage area when the size of the data stored in the first storage area exceeds a first preset value, where the first data group includes first target data acquired at least twice.
Optionally, the transmission module 403 includes:
the dividing sub-module is used for dividing the data stored in the first storage area into a first data group and a second data group when the size of the data stored in the first storage area exceeds a first preset value, wherein the data size of the first data group is matched with the first preset value;
and the transmission sub-module is used for transmitting the first data group and storing the second data group in the first storage area.
Optionally, the electronic device 400 further includes:
the second determining module is used for determining the data to be transmitted as the first target data under the condition that the data to be transmitted is obtained and meets a first storage condition;
the second determining module is further configured to determine the data to be transmitted as second target data when the data to be transmitted is acquired and the data to be transmitted does not meet the first storage condition;
the storage module stores the second target data in a second storage area;
wherein the first storage condition comprises: the sum of the size of the data stored in the first storage area and the size of the data to be transmitted is smaller than or equal to a second preset value, and the transmission speed of the data to be transmitted is smaller than or equal to a third preset value;
the second preset value is the maximum value of the data amount which can be cached by the data transmission node, the third preset value is the maximum speed of the data transmission node for transmitting data, the data transmission node is a node for transmitting the data to be transmitted, and the first storage area is the cache area of the data transmission node.
Optionally, the transmitting module 403 is further configured to transmit a third data group in the second storage area when the size of the data stored in the second storage area exceeds the first preset value, where the third data group includes second target data acquired by the data transmission node at least twice, and the size of the third data group matches the first preset value.
Optionally, the third data group further includes a first identifier, where the first identifier is used to indicate a size of data remaining in the second storage area; the electronic device 400 further comprises:
an obtaining module, configured to, when the first identifier indicates that the size of data remaining in the second storage area exceeds the first preset value, obtain, by a data processing node, a fourth data group from the second storage area;
the data processing node is a node used for receiving the third data group, the fourth data group comprises second target data and a second identifier, the second identifier is used for indicating the size of data remaining in the second storage area after the data processing node acquires the fourth data group from the second storage area, and the size of the fourth data group is matched with the first preset value.
Optionally, the storing module 402 is configured to store the second target data in a first queue in the second storage area if the real-time level of the second target data is higher than the target level;
the storage module 402 is further configured to store the second target data in a second queue in the second storage area when the real-time level of the second target data is lower than or equal to the target level.
Optionally, the transmission module 403 is further configured to transmit the first target data if the level of the first target data is higher than a target level.
In this embodiment, when the first target data is acquired, the real-time level of the first target data is determined, the acquired first target data with the lower real-time level is temporarily stored in the first storage area, and when the total amount of the first target data stored in the first storage area exceeds the first preset value, the first target data acquired at least twice and stored in the first storage area is transmitted.
The electronic device 400 in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The icon management apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The electronic device 400 provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to fig. 3, and is not described herein again to avoid repetition.
Optionally, as shown in fig. 5, an electronic device 500 is further provided in this embodiment of the present application, and includes a processor 501, a memory 502, and a program or an instruction stored in the memory 502 and executable on the processor 501, where the program or the instruction is executed by the processor 501 to implement each process of the data transmission method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and the like.
Those skilled in the art will appreciate that the electronic device 600 may further comprise a power supply (e.g., a battery) for supplying power to various components, and the power supply may be logically connected to the processor 610 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
It is to be understood that, in the embodiment of the present application, the input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics Processing Unit 6041 processes image data of a still picture or a video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 607 includes a touch panel 6071 and other input devices 6072. A touch panel 6071, also referred to as a touch screen. The touch panel 6071 may include two parts of a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 609 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 610 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the data transmission method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the data transmission method embodiment, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (14)

1. A method of data transmission, the method comprising:
under the condition of acquiring first target data, identifying the real-time level of the first target data;
storing the first target data in a first storage area if the level of the first target data is lower than or equal to a target level;
under the condition that the size of data stored in the first storage area exceeds a first preset value, transmitting a first data group in the first storage area, wherein the first data group comprises first target data acquired at least twice;
before identifying the real-time level of the first target data in the case of acquiring the first target data, the method further includes:
determining the data to be transmitted as the first target data when the data to be transmitted is acquired and meets a first storage condition;
determining the data to be transmitted as second target data when the data to be transmitted is acquired and the data to be transmitted does not accord with the first storage condition;
storing the second target data in a second storage area;
wherein the first storage condition comprises: the sum of the size of the data stored in the first storage area and the size of the data to be transmitted is smaller than or equal to a second preset value, and the transmission speed of the data to be transmitted is smaller than or equal to a third preset value;
the second preset value is the maximum value of the data amount which can be cached by the data transmission node, the third preset value is the maximum speed of the data transmission node for transmitting data, the data transmission node is a node for transmitting the data to be transmitted, and the first storage area is the cache area of the data transmission node.
2. The method of claim 1, wherein the transmitting the first data group in the first storage area if the size of the data stored in the first storage area exceeds a first preset value comprises:
under the condition that the size of the data stored in the first storage area exceeds a first preset value, the data stored in the first storage area is divided into a first data group and a second data group, wherein the data size of the first data group is matched with the first preset value;
and transmitting the first data group and storing the second data group in the first storage area.
3. The method of claim 1, wherein after storing the second target data in the second storage area, the method further comprises:
and transmitting a third data group in the second storage area under the condition that the size of the data stored in the second storage area exceeds the first preset value, wherein the third data group comprises second target data acquired by the data transmission node at least twice, and the size of the third data group is matched with the first preset value.
4. The method of claim 3, wherein the third data group further comprises a first identifier, wherein the first identifier is used to indicate a size of data remaining in the second storage area; after the transmitting the third data group in the second storage area, the method further comprises:
acquiring a fourth data group from the second storage area by the data processing node under the condition that the first identifier indicates that the size of the data left in the second storage area exceeds the first preset value;
the data processing node is a node used for receiving the third data group, the fourth data group comprises second target data and a second identifier, the second identifier is used for indicating the size of the data remaining in the second storage area after the data processing node acquires the fourth data group from the second storage area, and the size of the fourth data group is matched with the first preset value.
5. The method of claim 1, wherein storing the second target data in a second storage area comprises:
storing the second target data in a first queue in the second storage area if the level of the second target data is higher than the target level;
storing the second target data in a second queue in the second storage area if the level of the second target data is less than or equal to the target level.
6. The method of claim 1, wherein after identifying the level of real-time of the first target data, the method further comprises:
transmitting the first target data if the level of the first target data is higher than a target level.
7. An electronic device, characterized in that the electronic device comprises:
the first determining module is used for identifying the real-time level of the first target data under the condition of acquiring the first target data;
the storage module is used for storing the first target data in a first storage area under the condition that the real-time level of the first target data is lower than or equal to a target level;
the transmission module is used for transmitting a first data group in the first storage area under the condition that the size of the data stored in the first storage area exceeds a first preset value, wherein the first data group comprises first target data acquired at least twice;
the electronic device further includes:
the second determining module is used for determining the data to be transmitted as the first target data under the condition that the data to be transmitted is obtained and meets a first storage condition;
the second determining module is further configured to determine the data to be transmitted as second target data when the data to be transmitted is acquired and the data to be transmitted does not meet the first storage condition;
the storage module stores the second target data in a second storage area;
wherein the first storage condition comprises: the sum of the size of the data stored in the first storage area and the size of the data to be transmitted is smaller than or equal to a second preset value, and the transmission speed of the data to be transmitted is smaller than or equal to a third preset value;
the second preset value is the maximum value of the data amount which can be cached by the data transmission node, the third preset value is the maximum speed of the data transmission node for transmitting data, the data transmission node is a node for transmitting the data to be transmitted, and the first storage area is the cache area of the data transmission node.
8. The electronic device of claim 7, wherein the transmission module comprises:
the dividing submodule is used for dividing the data stored in the first storage area into a first data group and a second data group under the condition that the size of the data stored in the first storage area exceeds a first preset value, wherein the data size of the first data group is matched with the first preset value;
and the transmission sub-module is used for transmitting the first data group and storing the second data group in the first storage area.
9. The electronic device of claim 7, wherein the transmission module is further configured to transmit a third data group in the second storage area if the size of the data stored in the second storage area exceeds the first preset value, wherein the third data group includes second target data acquired by the data transmission node at least twice, and the size of the third data group matches the first preset value.
10. The electronic device of claim 9, wherein the third data set further comprises a first identifier, wherein the first identifier is used to indicate a size of data remaining in the second storage area; the electronic device further includes:
an obtaining module, configured to, when the first identifier indicates that the size of data remaining in the second storage area exceeds the first preset value, obtain, by a data processing node, a fourth data group from the second storage area;
the data processing node is a node used for receiving the third data group, the fourth data group comprises second target data and a second identifier, the second identifier is used for indicating the size of the data remaining in the second storage area after the data processing node acquires the fourth data group from the second storage area, and the size of the fourth data group is matched with the first preset value.
11. The electronic device of claim 10, wherein the storage module is configured to store the second target data in a first queue in the second storage area if the real-time level of the second target data is higher than the target level;
the storage module is further configured to store the second target data in a second queue in the second storage area when the real-time level of the second target data is lower than or equal to the target level.
12. The electronic device of claim 7, wherein the transmission module is further configured to transmit the first target data if the level of the first target data is higher than a target level.
13. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the data transmission method according to any one of claims 1 to 6.
14. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the data transmission method according to any one of claims 1 to 6.
CN202011546248.XA 2020-12-24 2020-12-24 Data transmission method and electronic equipment Active CN112684878B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011546248.XA CN112684878B (en) 2020-12-24 2020-12-24 Data transmission method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011546248.XA CN112684878B (en) 2020-12-24 2020-12-24 Data transmission method and electronic equipment

Publications (2)

Publication Number Publication Date
CN112684878A CN112684878A (en) 2021-04-20
CN112684878B true CN112684878B (en) 2022-09-30

Family

ID=75451550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011546248.XA Active CN112684878B (en) 2020-12-24 2020-12-24 Data transmission method and electronic equipment

Country Status (1)

Country Link
CN (1) CN112684878B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003319012A (en) * 2002-04-19 2003-11-07 Matsushita Electric Ind Co Ltd Data receiver and data distribution system
CN102487286A (en) * 2010-12-01 2012-06-06 中兴通讯股份有限公司 Method and device for processing data
CN105657017A (en) * 2016-01-04 2016-06-08 北京百度网讯科技有限公司 Data transmission method, device and system
CN110719232A (en) * 2019-09-30 2020-01-21 北京欧珀通信有限公司 Data transmission method and device, mobile terminal and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9195296B2 (en) * 2009-09-24 2015-11-24 Qualcomm Incorporated Apparatus and methods for optimizing power consumption in a wireless device
CN104090858A (en) * 2014-06-10 2014-10-08 中兴通讯股份有限公司 Data transmission method and device
CN105517058B (en) * 2014-09-29 2019-03-05 展讯通信(上海)有限公司 Mobile terminal data transmission control method and device
US10887794B2 (en) * 2018-04-03 2021-01-05 Samsung Electronics Co., Ltd. Method and apparatus for controlling data receiving rate in mobile communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003319012A (en) * 2002-04-19 2003-11-07 Matsushita Electric Ind Co Ltd Data receiver and data distribution system
CN102487286A (en) * 2010-12-01 2012-06-06 中兴通讯股份有限公司 Method and device for processing data
CN105657017A (en) * 2016-01-04 2016-06-08 北京百度网讯科技有限公司 Data transmission method, device and system
CN110719232A (en) * 2019-09-30 2020-01-21 北京欧珀通信有限公司 Data transmission method and device, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN112684878A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN107800651B (en) Application program closing method and device, storage medium and electronic equipment
CN105743158B (en) Apparatus and method for charging an electronic device having a battery
US10631361B2 (en) Method and apparatus for providing user with information received by electronic device
EP3531290B1 (en) Data backup method, apparatus, electronic device, storage medium, and system
US20150067585A1 (en) Electronic device and method for displaying application information
WO2019183785A1 (en) Frame rate adjustment method and terminal
CN110391867B (en) DCI detection method, DCI sending method, terminal and base station
US20150347377A1 (en) Method for processing contents and electronic device thereof
US20150154149A1 (en) Typesetting method, device and system
KR20150025223A (en) Method for controlling a content display and an electronic device
US11671678B2 (en) Method and device, equipment, and storage medium for data processing
CN108601048B (en) Flow control method and mobile terminal
KR102203130B1 (en) Method for controlling an use of sim card and an electronic device thereof
US20230413247A1 (en) Method for communication processing, terminal device, and non-transitory computer-readable storage medium
CN115237618A (en) Request processing method and device, computer equipment and readable storage medium
CN111918288B (en) Communication method, communication device and electronic equipment
CN110837343B (en) Snapshot processing method and device and terminal
CN108011860B (en) Method, device and terminal for processing broadcast message
CN112684878B (en) Data transmission method and electronic equipment
CN104079368B (en) A kind of the test data transmission method and server of application software
CN114546171A (en) Data distribution method, data distribution device, storage medium and electronic equipment
CN113268179B (en) Session message processing method, device, equipment and storage medium
CN113225830B (en) Data network uplink scheduling method and device and electronic equipment
CN114138401A (en) Container configuration method, device, equipment and medium based on artificial intelligence
CN112468870A (en) Video playing method, device, equipment 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