CN111314439A - Data sending method and device and electronic equipment - Google Patents

Data sending method and device and electronic equipment Download PDF

Info

Publication number
CN111314439A
CN111314439A CN202010068194.4A CN202010068194A CN111314439A CN 111314439 A CN111314439 A CN 111314439A CN 202010068194 A CN202010068194 A CN 202010068194A CN 111314439 A CN111314439 A CN 111314439A
Authority
CN
China
Prior art keywords
data
network state
splitting
split
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010068194.4A
Other languages
Chinese (zh)
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.)
Beijing Infinite Light Field Technology Co Ltd
Original Assignee
Beijing Infinite Light Field Technology 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 Beijing Infinite Light Field Technology Co Ltd filed Critical Beijing Infinite Light Field Technology Co Ltd
Priority to CN202010068194.4A priority Critical patent/CN111314439A/en
Publication of CN111314439A publication Critical patent/CN111314439A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the disclosure discloses a data sending method, a data sending device and electronic equipment. The data transmission method comprises the following steps: an application program acquires a network state parameter at the current moment; the application program sends the network state parameters and the data to be sent at the current moment to the preset data splitting component, and the preset data splitting component executes the following data splitting operation: determining whether the network state parameter meets a preset network state parameter condition; in response to determining that the network state parameter does not meet the preset network state parameter condition, determining that the current network state is a weak network state; splitting data to be sent into at least two split data according to a splitting rule corresponding to the network state parameter; and the system data transmission layer receives at least two split data sent by the preset data splitting component and executes the operation of sending the at least two split data. The method and the device effectively improve the sending success rate of the data to be sent in the weak network state.

Description

Data sending method and device and electronic equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a data transmission method, an apparatus, and an electronic device.
Background
With the rapid development of the internet and the continuous improvement of the performance of the network communication equipment, a user can send information to other electronic equipment through the user terminal of the user so as to realize the rapid propagation of the information. Generally, according to an information transmission instruction executed by a user in an application, an application can transmit information corresponding to the information transmission instruction to a system data transmission layer of an operating system, and the system data transmission layer splits and sends the information.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides a data sending method, a data sending device and electronic equipment, which can effectively improve the sending success rate of data to be sent in a weak network state.
In a first aspect, an embodiment of the present disclosure provides a data sending method, where the method includes: an application program acquires a network state parameter at the current moment; the application program sends the network state parameters and the data to be sent at the current moment to a preset data splitting component, and the preset data splitting component executes the following data splitting operation: determining whether the network state parameter meets a preset network state parameter condition; in response to determining that the network state parameter does not satisfy the preset network state parameter condition, determining that the current network state is a weak network state; splitting the data to be sent into at least two split data according to a splitting rule corresponding to the network state parameter; and the system data transmission layer receives the at least two split data sent by the preset data splitting component and executes the operation of sending the at least two split data.
In a second aspect, an embodiment of the present disclosure provides a data transmission apparatus, including: the acquisition module is used for acquiring the network state parameters at the current moment through an application program; the splitting module is used for sending the network state parameters and the data to be sent at the current moment to a preset data splitting component through an application program, and the preset data splitting component executes the following data splitting operation: determining whether the network state parameter meets a preset network state parameter condition; in response to determining that the network state parameter does not satisfy the preset network state parameter condition, determining that the current network state is a weak network state; splitting the data to be sent into at least two split data according to a splitting rule corresponding to the network state parameter; and the receiving module is used for receiving the at least two split data sent by the preset data splitting component through a system data transmission layer and executing the operation of sending the at least two split data.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the data transmission method of the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements the steps of the data transmission method according to the first aspect described above.
According to the data transmission method, the data transmission device and the electronic equipment, firstly, a network state parameter at the current moment is obtained through an application program; then, the network state parameter and the data to be sent at the current moment are sent to a preset data splitting component through an application program, and the preset data splitting component executes the following data splitting operation: determining whether the network state parameter meets a preset network state parameter condition; in response to determining that the network state parameter does not satisfy the preset network state parameter condition, determining that the current network state is a weak network state; splitting the data to be sent into at least two split data according to a splitting rule corresponding to the network state parameter; and finally, receiving the at least two split data sent by the preset data splitting component through a system data transmission layer, and executing the operation of sending the at least two split data. The success rate of sending data to be sent in the weak network state can be effectively improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a flow chart of one embodiment of a method of data transmission according to the present disclosure;
FIG. 2 is a schematic flow chart of obtaining a current network transmission rate to which the present disclosure relates;
fig. 3 is a schematic flow chart of splitting data to be transmitted according to the present disclosure;
FIG. 4 is a schematic block diagram of one embodiment of a data transmission device according to the present disclosure;
fig. 5 is an exemplary system architecture to which the data transmission method of one embodiment of the present disclosure may be applied;
fig. 6 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, a flow chart of one embodiment of a data transmission method according to the present disclosure is shown. As shown in fig. 1, the data transmission method includes the following steps S101 to S103.
Step S101, the application program obtains the network state parameter of the current time.
The network status parameters of the used network can be obtained in real time. The network used herein may be a wired network and a wireless network. The wireless network may include, but is not limited to, a 2G network, a 3G network, a 4G network, and a 5G network.
The application program may be, for example, a chat application program or an application program that can substantially receive a user information transmission instruction.
The network state parameters are used for characterizing the network state of the used network. Here, the network status parameters may include, for example: network transmission rate, data transmission delay, etc.
Wherein, the network transmission rate may be obtained based on the procedure shown in fig. 2. Referring to fig. 2, the obtaining of the network transmission rate includes the following steps:
in step S201, the application program obtains the transmission data amount in a preset time period before and adjacent to the current time.
The preset time period may include, but is not limited to, 30 seconds, 1 minute, 2 minutes, 5 minutes.
Here, when the transmission data amount in the preset time period is acquired, timing may be started from the time when the transmission data amount starts to be acquired according to the duration of the preset time period, and the acquisition operation may be ended at the corresponding termination time after the duration, that is, the transmission data amount in the preset time period may be counted.
Step S202, based on the transmission data volume and the duration of the preset time period, the network transmission rate of the previous preset time period is obtained, and the network transmission rate of the previous preset time period is the current network transmission rate.
Specifically, the quotient of the transmission data amount in the preset time period and the duration of the preset time period may be used to obtain the network transmission rate. The duration of the preset time period may be set to be relatively short, for example, 30 seconds or 20 seconds, so that the network transmission rate obtained according to the data amount transmitted in the previous preset time period may be regarded as the real-time network transmission rate at the current time.
Step S102, the network state parameters and the data to be sent at the current moment are sent to a preset data splitting component, and the preset data splitting component executes data splitting operation.
The data to be transmitted may be data corresponding to pictures, texts, or videos. For the same data to be sent, if the network state parameters at different times are different in the sending process, the lengths of the data packets corresponding to the data to be sent at the different times may also be different.
The preset data splitting component can be an execution control for data splitting between the application program and the system network layer.
The data splitting operation can be divided into the following three steps:
the method comprises a first operation of determining whether the network state parameter meets a preset network state parameter condition.
The preset network state parameter condition may include, for example, whether the network transmission rate is greater than a preset network transmission rate threshold, and/or whether the data transmission delay is smaller than a preset data transmission delay threshold.
And a second operation of determining that the current network state is the weak network state in response to determining that the network state parameter does not satisfy the preset network state parameter condition.
In some application scenarios, the preset network transmission rate threshold may be 1 Mbps. If the network transmission rate is greater than the preset network transmission rate threshold, the network state can be determined to be a normal network state. If the network transmission rate is less than the preset network transmission rate threshold, the network state can be determined to be a weak network state.
In these application scenarios, if the current network transmission rate is less than 1Mbps, it may be determined that the current network state is a weak network state.
It should be noted that the preset network transmission rate threshold may be set according to different application scenarios. And are not limited herein.
In other application scenarios, the data transmission delay threshold may be 5s, for example. And if the data transmission delay is smaller than the preset data transmission delay threshold, determining that the network state is a normal network state. If the data transmission delay is greater than the preset data transmission delay threshold, the network state can be determined to be a weak network state.
In these application scenarios, if the current data transmission delay is greater than 5s, it may be determined that the current network state is a weak network state.
And thirdly, splitting the data to be sent into at least two split data according to a splitting rule corresponding to the network state parameter.
The data to be transmitted may be data corresponding to pictures, texts, or videos. For the same data to be sent, if the network state parameters at different times are different in the sending process, the lengths of the data packets corresponding to the data to be sent at the different times may also be different.
The splitting rule here may be to split the data to be transmitted according to a bisection method. For example, if a certain piece of information with ten words is sent as data to be sent, the data corresponding to the piece of information may be divided into two pieces of split data equally and sent, that is, each piece of split data may include five words.
In some alternative implementations, as shown in fig. 3, the third operation may include the following steps:
step S301, matching the network state parameters with a preset network state-data packet mapping relation table, wherein the preset network state-data packet mapping relation table stores multiple groups of network state parameters and data packet lengths corresponding to each group of network state parameters in an associated manner.
In some application scenarios, the network status-packet mapping relationship table includes a plurality of packet lengths and a plurality of sets of network status parameters, and the packet lengths corresponding to different network status parameters are different.
The length of the data packet corresponding to each group of network state parameters can be determined by the following steps:
firstly, obtaining a plurality of sending messages of splitting data packets which are sent successfully in history, wherein the sending messages comprise data packet lengths and sending time delays.
Secondly, the sending efficiency corresponding to each of the plurality of split data which are sent successfully in the history is determined, and the length of the split data packet with the highest sending efficiency is determined as the data packet length corresponding to the group of network state parameters.
The transmission efficiency here may be determined according to the amount of data transmitted per unit time. For example, splitting data to be sent according to a data packet length of 1000 bytes, and if the time length of the split data from the beginning to the end of sending is 40 seconds, then the sending efficiency at this time is (1000/40) bytes/second; splitting data to be sent according to the length of a data packet being 900 bytes, wherein if the time length of the split data after being sent to the sending completion is 30 seconds, the sending efficiency at the moment is (900/30) bytes/second. Then 900 bytes can be split as the packet length of the data to be transmitted under the condition that the network transmission rate is the same. That is, the length of the data packet corresponding to the set of network state parameters may be 900 bytes.
In this embodiment, the network status-packet mapping table may be queried according to the network status parameter, so as to determine whether a packet length corresponding to the network status parameter exists in the network status-packet mapping table.
Step S302, if the matching is successful, splitting the data to be transmitted according to the data packet length corresponding to the network state parameter in the preset network state-data packet mapping relation table.
That is, if the packet length corresponding to the network status parameter is found in the network status-packet mapping table, it can be determined that the packet length corresponding to the network status parameter exists in the network status-packet mapping table. The length of the data packet can be used as the length of the data packet corresponding to the current time, and the data to be sent is split according to the length of the data packet.
In some optional implementations, the third operation may further include:
step S303, if the matching is unsuccessful, determining the data packet length successfully transmitted within the preset transmission delay as the data packet length corresponding to the splitting data according to the network state parameter at the current moment, and splitting the data to be transmitted according to the data packet length; and the network state parameter and the data packet length at the current moment are related and stored in a network state-data packet mapping relation table.
That is, if it is determined in step S301 that the network state parameter at the current time does not exist in the network state-packet mapping table and/or the packet length corresponding to the network state parameter at the current time does not exist, the packet length successfully transmitted within the preset transmission delay is determined as the packet length corresponding to the current time.
The preset transmission delay is a preset time length from the beginning to the end of transmission of the data to be transmitted, and may be, for example, 5 to 30 seconds, 1 to 3 minutes, and the like.
The network state parameter and the data packet length at the current moment are related and stored in a network state-data packet mapping relation table, so that the information capacity of the network state-data packet mapping relation can be increased, and the network state-data packet mapping relation table can be directly inquired next time.
In some optional implementations, the third operation may further include:
step S304, if the length of a data packet generated by splitting the data to be transmitted according to the current network state parameters is less than or equal to a preset splitting threshold, splitting the data to be transmitted by taking the splitting threshold as the length of the data packet corresponding to the split data; wherein the split threshold is the length of the minimum transmission data packet.
That is to say, if the length of the split data packet obtained by splitting the data to be transmitted is smaller than or equal to the preset split threshold under the network state parameter at the current time, the split data cannot be split again. And the preset splitting threshold value can only be used as the length of the split data packet to split the data to be sent. The preset splitting threshold here may be, for example, 64 bytes, 128 bytes, and the like.
In some optional implementations, the data splitting operation may further include the following adjustment steps:
and adjusting the network state-data packet mapping relation table according to the transmission delay corresponding to the transmitted split data.
The adjusting step may be performed based on the following steps:
firstly, if the transmission delay is smaller than a preset delay threshold, adjusting a network state-data packet mapping relation table to increase the length of a data packet for splitting data to be sent.
Secondly, if the transmission delay is larger than the preset delay threshold, the network state-data packet mapping relation table is adjusted to reduce the length of the data packet for splitting the data to be sent.
The preset time delay threshold is a preset time length for sending data to be sent from the beginning to the end of sending, and may be, for example, 5-30s, 1-3 minutes, and the like. The data packet length may be 1000 bytes, 1500 bytes, etc.
That is, when the duration of time for completing the transmission of the data to be transmitted from the beginning to the end of the transmission of the data is shorter than the duration set in advance, the packet length corresponding to the data to be transmitted in the network status-packet mapping relationship table can be appropriately increased.
When the time length used for sending the data to be sent from the beginning to the end of sending the data is longer than the preset time length, the data packet length corresponding to the data to be sent in the network state-data packet mapping relation table can be properly reduced.
In the transmission process, if the packet length is short but the transmission is still unsuccessful (the transmission delay is greater than the preset delay threshold), the packet length can be made to correspond to a larger network transmission rate for the same packet length in the network state-packet mapping table; if the length of the data packet is large and the data packet is successfully transmitted within a short time (the transmission delay is smaller than the preset delay threshold), the length of the data packet can be corresponding to a smaller network transmission rate for the same length of the data packet.
In these optional implementation manners, the correspondence between the network state parameter and the packet length corresponding to the split data may be optimized by continuously adjusting the network state-compression ratio mapping table, so as to obtain the length of the split data that is most matched with the current network state parameter.
Step S103, the system data transmission layer receives at least two split data sent by the preset data splitting component, and executes an operation of sending the at least two split data.
Generally, data transmission of an electronic device includes the following processes: first, the data to be transmitted needs to be split according to a fixed data size. Secondly, the split data is sent to an ip layer in batches. Third, it is then sent by the ip layer to the data link layer. Fourth, the data link layer transfers to the physical layer. Fifth, data is transmitted through a physical layer.
In some optional implementations, step S103 may include: and the system data transmission layer receives the at least two split data sent by the preset data splitting component and executes the operation of sending one split data of the at least two split data at the current moment.
That is, the system data transmission layer may send one split data at the current time, or may send multiple split data at the same time.
The system data transmission layer may perform an operation of transmitting one of the split data after receiving at least two split data transmitted by the preset data splitting component. For example, a piece of split data may be sent to the ip layer, and the ip layer is instructed to perform the operation of transferring the split data.
In this embodiment, the data splitting operation may mark a split identifier for each split data, where the split identifier of each split data is used to indicate the data to be sent corresponding to the split data and the sequence of the split data in each split data.
The split identifier can uniquely identify a certain split data. The split identifier may include letters, numbers, and/or other symbols.
When the data to be sent corresponding to the current moment is split according to the currently determined data packet length, the data to be sent is split into a plurality of split data, and each split data is marked with a split identifier, so that the split information of the split data as the split data and the sequence of the split data in the split data can be indicated.
In practice, in order to enable split data to be orderly assembled after being received by a data receiving client, each split data can be numbered in a data packet encapsulation stage and used as a field for describing a unique identifier of each split data. The number here is the above-mentioned splitting identifier.
For example, the data to be sent at the current time is "how good you are", when it is determined that the length of the data packet corresponding to the network state parameter at the current time is 1400 bytes, the data to be sent is split with the length of the data packet being 1400 bytes, and when the length of the data packet of the last split data is less than 1400 bytes, the data packet also independently becomes a split data.
When the length of the data packet corresponding to the current network state parameter does not exist in the network state-data packet mapping relation table, the data to be sent corresponding to the 'hello does' can be split into two split data with the same length, and then the split data is sent. And if the transmission fails within the preset data transmission time delay, further splitting each split data into two secondary split data with shorter data packet length. And by analogy, a bisection method is utilized until split data obtained by splitting data to be sent according to the method is successfully sent within a preset transmission time delay. And then, the length of the data packet corresponding to the successfully sent split data and the network state parameter at the current moment are stored in a network state-data packet mapping relation table in an associated mode.
After the preset data splitting component marks a splitting identifier on each split data, the system data transmission layer may receive the at least two split data sent by the preset data splitting component and the splitting identifier corresponding to each split data; then, the system data transmission layer may send the split data and the split identifier corresponding to the split data together.
The data packet is transmitted in the form of data frame in the course of sending, the above-mentioned data frame can be formed by "destination IP address", "source IP address", "net load data", etc., the structure of the data packet is very similar to the structure of the letter, the destination IP address is to explain to whom this data packet is sent, it is equivalent to addressee; the source IP address is used to indicate where the packet originated, and corresponds to the address of the sender; and the payload data corresponds to the content of the letter.
When each split data is sent to the target IP address from the source IP address, after the data receiving end of the target IP address receives all the split data, the payload data in all the split data is recombined according to the split identifier on each split data, and the received data consistent with the data to be sent is obtained.
In the prior art, generally, an unpacking scheme provided by a system data transmission layer of a terminal device (for example, a User Datagram Protocol (UDP)) is to split data to be transmitted according to a fixed length, and the unpacking length cannot be adjusted in real time according to a network state, so that split data obtained by splitting the data to be transmitted by the unpacking scheme provided by the system may not be all successfully transmitted to a destination, and then part of the data is lost, thereby causing information loss.
In order to solve the problem caused by unpacking data to be sent by an unpacking scheme provided by a system in the prior art, in this embodiment, a network state parameter at the current moment may be first obtained by an application program; then, the application program sends the network state parameters and the data to be sent at the current moment to the preset data splitting component, and the preset data splitting component executes the following data splitting operation: determining whether the network state parameter meets a preset network state parameter condition; in response to determining that the network state parameter does not meet the preset network state parameter condition, determining that the current network state is a weak network state; splitting data to be sent into at least two split data according to a splitting rule corresponding to the network state parameter; and finally, the system data transmission layer receives at least two split data sent by the preset data splitting component and executes the operation of sending the at least two split data. According to the technical scheme provided by the embodiment, the data to be transmitted can be split according to the current network state by using the data splitting component, the transmission success rate of the data to be transmitted in the weak network state is effectively improved, and the integrity of information is further improved.
Referring to fig. 4, which shows a schematic structural diagram of an embodiment of a data sending apparatus according to the present disclosure, as shown in fig. 4, the data sending apparatus includes an obtaining module 401, a splitting module 402, and a receiving module 403. The acquiring module 401 is configured to acquire a network state parameter at a current moment through an application program; the splitting module 402 is configured to send the network state parameter and the data to be sent at the current time to the preset data splitting component through the application program, where the preset data splitting component executes the following data splitting operation: determining whether the network state parameter meets a preset network state parameter condition; in response to determining that the network state parameter does not meet the preset network state parameter condition, determining that the current network state is a weak network state; splitting data to be sent into at least two split data according to a splitting rule corresponding to the network state parameter; a receiving module 403, configured to receive, through the system data transmission layer, at least two split data sent by a preset data splitting component, and execute an operation of sending the at least two split data.
It should be noted that specific processing of the obtaining module 401, the splitting module 402, and the receiving module 403 of the data sending apparatus and technical effects thereof can refer to related descriptions of step S101 to step S103 in the corresponding embodiment of fig. 1, and are not described herein again.
In some optional implementations of this embodiment, the splitting module 402 is further configured to: matching the network state parameters with a preset network state-data packet mapping relation table, wherein the preset network state-data packet mapping relation table stores a plurality of groups of network state parameters and data packet lengths corresponding to each group of network state parameters in an associated manner; and if the matching is successful, splitting the data to be sent according to the data packet length corresponding to the network state parameter in the preset network state-data packet mapping relation table.
In some optional implementations of this embodiment, the splitting module 402 is further configured to: if the matching is unsuccessful, determining the length of the data packet successfully transmitted within the preset transmission delay as the length of the data packet corresponding to the splitting data according to the network state parameter at the current moment, and splitting the data to be transmitted according to the length of the data packet; and the network state parameter and the data packet length at the current moment are related and stored in a network state-data packet mapping relation table.
In some optional implementations of this embodiment, the splitting module 402 is further configured to: if the length of a data packet generated by splitting the data to be transmitted according to the current network state parameter is less than or equal to a preset splitting threshold, splitting the data to be transmitted by taking the splitting threshold as the length of the data packet corresponding to the split data; wherein the split threshold is the length of the minimum transmission data packet.
In some optional implementations of this embodiment, the splitting module 402 is configured to: and adjusting the network state-data packet mapping relation table according to the transmission delay corresponding to the transmitted split data.
In some optional implementations of this embodiment, the splitting module 402 is further configured to: if the transmission delay is smaller than the preset delay threshold, adjusting a network state-data packet mapping relation table to increase the length of a data packet for splitting data to be sent; and if the transmission delay is larger than the preset delay threshold, adjusting the network state-data packet mapping relation table to reduce the length of the data packet for splitting the data to be sent.
In some optional implementations of this embodiment, the obtaining module 401 is further configured to: acquiring the transmission data volume before the current time and in a preset time period adjacent to the current time; and obtaining the network transmission rate of the previous preset time period based on the transmission data volume and the duration of the preset time period, wherein the network transmission rate of the previous preset time period is the current network transmission rate.
In some optional implementations of this embodiment, the receiving module 403 is further configured to: and the system data transmission layer receives the at least two split data sent by the preset data splitting component and executes the operation of sending one split data of the at least two split data at the current moment.
In some optional implementations of this embodiment, the splitting module 402 is further configured to: labeling a split identifier for each split data, wherein the split identifier of each split data is used for indicating the data to be sent corresponding to the split data and the sequence of the split data in each split data; and the receiving module 403 is further configured to: receiving at least two splitting data sent by a preset data splitting component and a splitting identifier corresponding to each splitting data; and executing the operation of sending the split data and the split identifier corresponding to the split data.
Referring to fig. 5, an exemplary system architecture to which the data transmission method of one embodiment of the present disclosure may be applied is shown.
As shown in fig. 5, the system architecture may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices and servers described above may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., Ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The terminal devices 501, 502, 503 may interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have various client applications installed thereon, such as a video distribution application, a search application, and a news application.
The terminal devices 501, 502, 503 may be hardware or software. When the terminal devices 501, 502, 503 are hardware, they may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like. When the terminal devices 501, 502, and 503 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 505 may be a server that can provide various services, for example, receive video transmission information transmitted by the terminal devices 501, 502, and 503, and forward the video information indicated by the video transmission information to an object indicated by the video transmission information (for example, the terminal devices 501, 502, and 503).
It should be noted that the data transmission method provided by the embodiment of the present disclosure may be executed by a server or a terminal device, and accordingly, the data transmission apparatus may be provided in the server or the terminal device. In practice, the data transmission method may be executed by an application program and an unpacking program provided in the terminal device or the server.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of an electronic device (e.g., the server of FIG. 5) suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: the network state parameter of the current moment can be obtained through the application program; and then sending the network state parameters and the data to be sent at the current moment to a preset data splitting component through an application program, and executing the following data splitting operation by the preset data splitting component: determining whether the network state parameter meets a preset network state parameter condition; in response to determining that the network state parameter does not meet the preset network state parameter condition, determining that the current network state is a weak network state; splitting data to be sent into at least two split data according to a splitting rule corresponding to the network state parameter; and then, receiving at least two split data sent by a preset data splitting component through a system data transmission layer, and executing the operation of sending the at least two split data.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The name of the module does not in some cases constitute a limitation to the unit itself, and for example, the acquiring module may also be described as a "module for acquiring the network state parameter at the current time by the application program".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (12)

1. A data transmission method, comprising:
an application program acquires a network state parameter at the current moment;
the application program sends the network state parameters and the data to be sent at the current moment to a preset data splitting component, and the preset data splitting component executes the following data splitting operation: determining whether the network state parameter meets a preset network state parameter condition; in response to determining that the network state parameter does not satisfy the preset network state parameter condition, determining that the current network state is a weak network state; splitting the data to be sent into at least two split data according to a splitting rule corresponding to the network state parameter;
and the system data transmission layer receives the at least two split data sent by the preset data splitting component and executes the operation of sending the at least two split data.
2. The method according to claim 1, wherein the splitting the data to be sent into at least two split data according to a splitting rule corresponding to the network status parameter includes:
matching the network state parameters with a preset network state-data packet mapping relation table, wherein the preset network state-data packet mapping relation table stores multiple groups of network state parameters and data packet lengths corresponding to each group of network state parameters in an associated manner;
and if the matching is successful, splitting the data to be sent according to the data packet length corresponding to the network state parameter in a preset network state-data packet mapping relation table.
3. The method according to claim 2, wherein the splitting the data to be sent into at least two split data according to a splitting rule corresponding to the network status parameter further comprises:
if the matching is unsuccessful, determining the length of a data packet successfully transmitted within a preset transmission delay as the length of the data packet corresponding to the split data according to the network state parameter at the current moment, and splitting the data to be transmitted according to the length of the data packet; and the network state parameter and the data packet length at the current moment are related and stored in the network state-data packet mapping relation table.
4. The method according to claim 2 or 3, wherein the splitting the data to be sent into at least two split data according to a splitting rule corresponding to the network status parameter further comprises:
if the length of a data packet generated by splitting the data to be sent according to the current network state parameters is smaller than or equal to a preset splitting threshold, splitting the data to be sent by taking the splitting threshold as the length of the data packet corresponding to the split data; wherein the split threshold is the length of the minimum transmission data packet.
5. The method of claim 2, wherein the data splitting operation further comprises:
and adjusting the network state-data packet mapping relation table according to the transmission delay corresponding to the split data.
6. The method of claim 5, wherein the adjusting the network status-packet mapping table according to the transmission delay corresponding to the sending of the split data comprises:
if the transmission delay is smaller than a preset delay threshold, adjusting the network state-data packet mapping relation table to increase the length of a data packet for splitting data to be sent;
and if the transmission delay is greater than a preset delay threshold, adjusting the network state-data packet mapping relation table to reduce the length of a data packet for splitting the data to be transmitted.
7. The method of claim 1, wherein the application program obtaining the network status parameter at the current time comprises:
acquiring the transmission data volume before the current time and in a preset time period adjacent to the current time;
and obtaining the network transmission rate of the last preset time period based on the transmission data volume and the duration of the preset time period, and taking the network transmission rate of the last preset time period as the current network transmission rate.
8. The method of claim 1, wherein the system data transport layer receives the at least two split data sent by the preset data splitting component and performs an operation of sending the at least two split data, comprising:
and the system data transmission layer receives the at least two split data sent by the preset data splitting component and executes the operation of sending one split data of the at least two split data at the current moment.
9. The method of claim 1, wherein the data splitting operation further comprises:
labeling a split identifier for each split data, wherein the split identifier of each split data is used for indicating data to be sent corresponding to the split data and the sequence of the split data in each split data; and
the system data transmission layer receives the at least two split data sent by the preset data splitting component and executes the operation of sending the at least two split data, and the operation comprises the following steps:
the system data transmission layer receives the at least two split data sent by the preset data splitting component and a splitting identifier corresponding to each split data;
and the system data transmission layer executes the operation of sending the split data and the split identifier corresponding to the split data.
10. A data transmission apparatus, comprising:
the acquisition module is used for acquiring the network state parameters at the current moment through an application program;
the splitting module is used for sending the network state parameters and the data to be sent at the current moment to a preset data splitting component through an application program, and the preset data splitting component executes the following data splitting operation: determining whether the network state parameter meets a preset network state parameter condition; in response to determining that the network state parameter does not satisfy the preset network state parameter condition, determining that the current network state is a weak network state; splitting the data to be sent into at least two split data according to a splitting rule corresponding to the network state parameter;
and the sending module is used for receiving the at least two split data sent by the preset data splitting component through a system data transmission layer and executing the operation of sending the at least two split data.
11. An electronic device, comprising:
one or more processors;
storage means having one or more programs stored thereon which, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-9.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202010068194.4A 2020-01-20 2020-01-20 Data sending method and device and electronic equipment Pending CN111314439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010068194.4A CN111314439A (en) 2020-01-20 2020-01-20 Data sending method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010068194.4A CN111314439A (en) 2020-01-20 2020-01-20 Data sending method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111314439A true CN111314439A (en) 2020-06-19

Family

ID=71146951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010068194.4A Pending CN111314439A (en) 2020-01-20 2020-01-20 Data sending method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111314439A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112579134A (en) * 2020-12-31 2021-03-30 株洲菲斯罗克光电技术有限公司 Circuit board upgrading method and system
CN112822237A (en) * 2020-12-28 2021-05-18 北京奇艺世纪科技有限公司 Network request transmission method and device
CN115190653A (en) * 2022-07-29 2022-10-14 润芯微科技(江苏)有限公司 4G transmission system and data transmission method for vehicle
CN115208836A (en) * 2022-06-17 2022-10-18 珠海格力电器股份有限公司 Data packet processing method, device, equipment and computer readable storage medium
CN115687233A (en) * 2021-07-29 2023-02-03 腾讯科技(深圳)有限公司 Communication method, device, equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101291429A (en) * 2008-06-02 2008-10-22 沈海涛 Network video monitoring method and system
US20090185572A1 (en) * 2008-01-17 2009-07-23 Canon Kabushiki Kaisha Relay apparatus and method for notifying information
CN104811499A (en) * 2015-05-14 2015-07-29 广东中烟工业有限责任公司 Network file transmission optimization method
CN107342848A (en) * 2017-08-24 2017-11-10 杭州联吉技术有限公司 A kind of adaptive code stream transmission method, device and equipment
CN109150935A (en) * 2017-06-19 2019-01-04 深圳联友科技有限公司 A kind of document transmission method, device and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090185572A1 (en) * 2008-01-17 2009-07-23 Canon Kabushiki Kaisha Relay apparatus and method for notifying information
CN101291429A (en) * 2008-06-02 2008-10-22 沈海涛 Network video monitoring method and system
CN104811499A (en) * 2015-05-14 2015-07-29 广东中烟工业有限责任公司 Network file transmission optimization method
CN109150935A (en) * 2017-06-19 2019-01-04 深圳联友科技有限公司 A kind of document transmission method, device and mobile terminal
CN107342848A (en) * 2017-08-24 2017-11-10 杭州联吉技术有限公司 A kind of adaptive code stream transmission method, device and equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822237A (en) * 2020-12-28 2021-05-18 北京奇艺世纪科技有限公司 Network request transmission method and device
CN112579134A (en) * 2020-12-31 2021-03-30 株洲菲斯罗克光电技术有限公司 Circuit board upgrading method and system
CN115687233A (en) * 2021-07-29 2023-02-03 腾讯科技(深圳)有限公司 Communication method, device, equipment and computer readable storage medium
CN115208836A (en) * 2022-06-17 2022-10-18 珠海格力电器股份有限公司 Data packet processing method, device, equipment and computer readable storage medium
CN115190653A (en) * 2022-07-29 2022-10-14 润芯微科技(江苏)有限公司 4G transmission system and data transmission method for vehicle

Similar Documents

Publication Publication Date Title
US20220394316A1 (en) Message sending method and device, readable medium and electronic device
CN111314439A (en) Data sending method and device and electronic equipment
CN113395353B (en) File downloading method and device, storage medium and electronic equipment
CN110781150A (en) Data transmission method and device and electronic equipment
CN110545472B (en) Video data processing method and device, electronic equipment and computer readable medium
US20150296014A1 (en) Picture download method and apparatus
CN111338780B (en) Transmission method and device for concurrent files
CN112015816A (en) Data synchronization method, device, medium and electronic equipment
CN111263220B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN112965673A (en) Content printing method, device, equipment and storage medium
CN110910469A (en) Method, device, medium and electronic equipment for drawing handwriting
CN110764983A (en) Test method, device, medium and electronic equipment
CN110572805A (en) Data transmission method and device, electronic equipment and computer readable medium
CN110719233A (en) Method and device for sending information
CN103856552A (en) Method and device for interactive live telecast
CN112346661B (en) Data processing method and device and electronic equipment
CN112416887B (en) Information interaction method and device and electronic equipment
CN112203103B (en) Message processing method, device, electronic equipment and computer readable storage medium
CN112860431A (en) Connection method, system, equipment and storage medium of micro service node
CN112040328A (en) Data interaction method and device and electronic equipment
CN115225586B (en) Data packet transmitting method, device, equipment and computer readable storage medium
CN110007894B (en) Method and device for transmitting audio information
CN113612676B (en) Social group message synchronization method, device, equipment and storage medium
CN113535428B (en) Method, device, equipment and medium for processing request message and response message
CN110636374A (en) Method and device for searching information

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200619

RJ01 Rejection of invention patent application after publication