Data communication method and device, electronic equipment and storage medium
By selecting the final transmission path according to the traffic type of the data request and optimizing the data transmission path, the problem of high hardware costs and poor delay optimization in the prior art is solved, and a low-cost, efficient communication delay reduction is achieved.
Patent Information
- Application Number
- CN202510466375.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-08-08
AI Technical Summary
The prior art optimizes communication delay mainly by increasing the number of servers and communication channels, resulting in increased hardware costs and poor results, and cannot effectively solve the problem of longer data response time.
By obtaining the traffic type of the data request and multiple candidate transmission paths between the destination, the final queue path is selected according to the traffic type, the data transmission path is optimized to reduce communication delay and avoid a large increase in hardware facilities.
Significantly reduce the communication delay between the data uploading end and the data receiving end, save hardware costs, and improve network resource utilization efficiency and avoid resource waste.
Smart Images

Figure CN120455385A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data communication method, device, electronic device, and storage medium. Background Art
[0002] With the rapid development of technology, cloud computing communication enables instant interconnection of multimedia data between traditional PC web browsers and new smart terminals through cloud communication applications.
[0003] With the popularization of the Internet, a large amount of data is generated every day. Due to the different data types and the increasing number of users year by year, data congestion will occur. When users request data, the data response time will become longer and the latency will increase. Excessive latency will seriously affect the user experience.
[0004] Currently, the main method for optimizing communication latency is to increase the number of servers and reduce communication latency by adding communication channels. However, statistics show that this method not only has a poor effect in reducing communication latency, but also increases hardware costs. Summary of the Invention
[0005] The present application provides a data communication method, device, electronic device, and storage medium.
[0006] In a first aspect, the present application provides a data communication method, applied to an electronic device, comprising:
[0007] When a data request to be sent is obtained, a traffic type of the data request to be sent and a destination of the data request to be sent are obtained;
[0008] obtaining a plurality of candidate transmission paths between the electronic device and a destination of a data request to be sent;
[0009] Selecting a final queuing path from multiple candidate transmission paths according to the traffic type of the data request to be sent;
[0010] The data request to be sent is transmitted to a destination of the data request to be sent based on the final queuing path.
[0011] In an optional implementation, obtaining the traffic type of the data request to be sent includes:
[0012] Get the service type of the data request to be sent; service types include: long video, short video, live video, game, web page, and text message;
[0013] The traffic type of the data request to be sent is determined at least based on the business type of the data request to be sent, and the traffic type of the data request to be sent includes a first traffic type and a second traffic type; the traffic required for the data request to be sent of the first traffic type is higher than the traffic required for the data request to be sent of the second traffic type.
[0014] In an optional implementation, determining the traffic type of the data request to be sent at least according to the service type of the data request to be sent includes:
[0015] When the service type of the data request to be sent is a long video type, a short video type, a live video type, or a game type, determining that the traffic type of the data request to be sent is a first traffic type;
[0016] or,
[0017] In a case where the service type of the data request to be sent is a web page type or an information text type, it is determined that the traffic type of the data request to be sent is a second traffic type.
[0018] In an optional implementation, obtaining multiple candidate transmission paths between the electronic device and a destination of the data request to be sent includes:
[0019] Obtaining all transmission paths between the electronic device and a destination of the data request to be sent;
[0020] Obtaining the time delay of each transmission path in all transmission paths, obtaining the bandwidth of each transmission path in all transmission paths, and obtaining the packet loss rate of each transmission path in all transmission paths;
[0021] Among all transmission paths, screening multiple transmission paths having a delay less than a preset delay, a bandwidth greater than a preset bandwidth, and a packet loss rate less than a preset packet loss rate;
[0022] A plurality of candidate transmission paths is determined based on the screened plurality of transmission paths.
[0023] In an optional implementation, selecting a final queuing path from a plurality of candidate transmission paths according to the traffic type of the data request to be sent includes:
[0024] For any one candidate transmission path among the multiple candidate transmission paths, obtaining a time delay of the candidate transmission path, obtaining a bandwidth of the candidate transmission path, and obtaining a packet loss rate of the candidate transmission path;
[0025] Obtaining the quality of the candidate transmission link according to the delay of the candidate transmission path, the bandwidth of the candidate transmission path, and the packet loss rate of the candidate transmission path;
[0026] A final queuing path is determined from multiple candidate transmission paths according to the traffic type of the data request to be sent and the quality of each candidate transmission link.
[0027] In an optional implementation, determining a final queuing path from a plurality of candidate transmission paths according to the traffic type of the data request to be sent and the quality of each candidate transmission link includes:
[0028] respectively obtaining the traffic type of the data queued on each candidate transmission path and at the end of the queue sequence;
[0029] Selecting, from among a plurality of candidate transmission paths, a candidate transmission path on which a traffic type of data queued at the end of the queueing order is different from a traffic type of the data request to be sent;
[0030] determining a candidate transmission path with the highest quality among the selected candidate transmission paths;
[0031] The final queuing path is determined based on the candidate transmission path with the highest quality.
[0032] In an optional implementation, obtaining the quality of the candidate transmission link according to the delay of the candidate transmission path, the bandwidth of the candidate transmission path, and the packet loss rate of the candidate transmission path includes:
[0033] Calculating a first reciprocal of a bandwidth of the candidate transmission path;
[0034] Calculating a first product between the time delay of the candidate transmission path and a first weight coefficient;
[0035] Calculating a second product between the packet loss rate of the candidate transmission path and a second weight coefficient;
[0036] The quality of the candidate transmission link is acquired according to the first inverse, the first product, and the second product.
[0037] In a second aspect, the present application provides a data communication device, which is applied to an electronic device, and includes:
[0038] The first acquisition module is used to obtain the traffic type of the data request to be sent when the data request to be sent is obtained, and the second acquisition module is used to obtain the destination of the data request to be sent;
[0039] a third acquisition module, configured to acquire a plurality of candidate transmission paths between the electronic device and a destination of the data request to be sent;
[0040] A selection module, configured to select a final queuing path from a plurality of candidate transmission paths according to a traffic type of a data request to be sent;
[0041] The transmission module is configured to transmit the data request to be sent to a destination of the data request to be sent based on the final queuing path.
[0042] In an optional implementation, the first acquisition module includes:
[0043] The first acquisition unit is used to acquire the service type of the data request to be sent; the service types include: long video, short video, live video, game, web page and text information;
[0044] The first determination unit is used to determine the traffic type of the data request to be sent based at least on the business type of the data request to be sent, the traffic type of the data request to be sent including a first traffic type and a second traffic type; the traffic required for the data request to be sent of the first traffic type is higher than the traffic required for the data request to be sent of the second traffic type.
[0045] In an optional implementation, the first determining unit includes:
[0046] A first determining subunit is configured to determine that the traffic type of the data request to be sent is a first traffic type when the service type of the data request to be sent is a long video type, a short video type, a live video type, or a game type;
[0047] or,
[0048] The second determining subunit is configured to determine that the traffic type of the data request to be sent is a second traffic type when the service type of the data request to be sent is a web page type or an information text type.
[0049] In an optional implementation, the third acquisition module includes:
[0050] a second acquiring unit, configured to acquire all transmission paths between the electronic device and a destination of the data request to be sent;
[0051] a third acquiring unit, configured to acquire a time delay of each transmission path among all transmission paths, acquire a bandwidth of each transmission path among all transmission paths, and acquire a packet loss rate of each transmission path among all transmission paths;
[0052] a screening unit, configured to screen, from all transmission paths, a plurality of transmission paths having a delay less than a preset delay, a bandwidth greater than a preset bandwidth, and a packet loss rate less than a preset packet loss rate;
[0053] The second determining unit is configured to determine a plurality of candidate transmission paths according to the screened plurality of transmission paths.
[0054] In an optional implementation, the selection module includes:
[0055] a fourth acquiring unit, configured to acquire, for any one of the plurality of candidate transmission paths, a time delay of the candidate transmission path, a bandwidth of the candidate transmission path, and a packet loss rate of the candidate transmission path;
[0056] a fifth acquiring unit, configured to acquire the quality of the candidate transmission link according to the delay of the candidate transmission path, the bandwidth of the candidate transmission path, and the packet loss rate of the candidate transmission path;
[0057] The third determining unit is configured to determine a final queuing path among multiple candidate transmission paths according to a traffic type of the data request to be sent and the quality of each candidate transmission link.
[0058] In an optional implementation, the third determining unit includes:
[0059] The first acquisition subunit is used to respectively acquire the traffic type of the data queued on each candidate transmission path and at the end of the queue sequence;
[0060] A selection subunit is configured to select, from a plurality of candidate transmission paths, a candidate transmission path on which a traffic type of data queued at the end of the queueing order is different from a traffic type of the data request to be sent;
[0061] a third determining subunit, configured to determine a candidate transmission path with the highest quality among the selected candidate transmission paths;
[0062] The fourth determining subunit is configured to determine a final queuing path according to the candidate transmission path with the highest quality.
[0063] In an optional implementation, the fifth acquiring unit includes:
[0064] a first calculating subunit, configured to calculate a first inverse of a bandwidth of the candidate transmission path;
[0065] a second calculation subunit, configured to calculate a first product between the delay of the candidate transmission path and a first weight coefficient;
[0066] a third calculation subunit, configured to calculate a second product between the packet loss rate of the candidate transmission path and a second weight coefficient;
[0067] The second acquisition subunit is configured to acquire the quality of the candidate transmission link according to the first inverse, the first product, and the second product.
[0068] In a third aspect, the present application shows an electronic device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.
[0069] In a fourth aspect, the present application shows a non-temporary computer-readable storage medium, which, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method described in any of the above aspects.
[0070] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method as described in any one of the above aspects.
[0071] The technical solution provided by this application may have the following beneficial effects:
[0072] In the present application, when a data request to be sent is obtained, the traffic type of the data request to be sent and the destination of the data request to be sent are obtained; multiple candidate transmission paths between the electronic device and the destination of the data request to be sent are obtained; according to the traffic type of the data request to be sent, a final queuing path is selected from the multiple candidate transmission paths; and the data request to be sent is transmitted to the destination of the data request to be sent based on the final queuing path.
[0073] In this application, in terms of queuing, the data requests to be sent are classified, and the final queuing path is selected from multiple candidate transmission paths according to the traffic type of the data requests to be sent. The queuing time is reduced from the data upload end and the data receiving end, which can significantly reduce the communication delay between the data upload end and the data receiving end, and on the basis of reducing the communication delay, a large amount of hardware facilities does not need to be added, thus saving hardware costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 This is a flowchart of the steps of a data communication method of the present application.
[0075] Figure 2 This is a structural block diagram of a data communication device of the present application.
[0076] Figure 3 This is a block diagram of an electronic device of the present application.
[0077] Figure 4 This is a block diagram of an electronic device of the present application. DETAILED DESCRIPTION
[0078] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0079] Before introducing the technical solution of this application, the technologies that may be involved in the technical solution of this application are first explained.
[0080] Cloud computing technology: Cloud computing is a new way of computing based on the Internet, providing computing services through the Internet, including servers, storage, databases, networks, software, analysis and intelligence resources.
[0081] Communication latency: Server communication latency refers to the time delay between a client sending a request and the server receiving the request and returning a response. It can also be understood as the time it takes from sending a request to receiving a response.
[0082] Specifically, refer to Figure 1 , shows a flowchart of the steps of a data communication method of the present application, which is applied to an electronic device, wherein the method includes:
[0083] In step S101, when a data request to be sent is obtained, the traffic type of the data request to be sent and the destination of the data request to be sent are obtained.
[0084] The traffic type of the data request to be sent includes a first traffic type and a second traffic type. The traffic required by the data request to be sent of the first traffic type is higher than the traffic required by the data request to be sent of the second traffic type.
[0085] For example, the first traffic type is a high-traffic service that requires more traffic, and the second traffic type is a low-traffic service that requires less traffic.
[0086] The destination of the data request to be sent may be a receiving end of the data request to be sent.
[0087] In one embodiment of the present application, obtaining the traffic type of the data request to be sent can be achieved through the following process, including:
[0088] 1011. Obtain the service type of the data request to be sent.
[0089] Business types include: long videos, short videos, live videos, games, web pages, and text messages.
[0090] The service type of a data request to be sent is one of the at least six types described above. An identifier indicating the service type of the data request to be sent is stored in a specific field in the data request to be sent. Thus, the service type of the data request to be sent can be determined based on the identifier in the specific field in the data request to be sent.
[0091] Different business types have different identifiers.
[0092] 1012. Determine a traffic type of the data request to be sent based at least on a service type of the data request to be sent.
[0093] In this step, if the service type of the data request to be sent is long video, short video, live video, or game, the traffic type of the data request to be sent is determined to be the first traffic type. Alternatively, if the service type of the data request to be sent is web page or information text, the traffic type of the data request to be sent is determined to be the second traffic type.
[0094] In one embodiment, when the service type of the data request to be sent is a web page or text message type, the time of receipt of the data request to be sent can be obtained. If the time of receipt is during the daytime, the traffic type of the data request to be sent is determined to be the second traffic type. Alternatively, if the time of receipt is during the nighttime, the traffic type of the data request to be sent is determined to be the first traffic type.
[0095] The first traffic type may be considered as high-traffic traffic, and the second traffic type may be considered as low-traffic traffic.
[0096] In this embodiment, the traffic type classification strategy is dynamically adapted according to the reception time when the data request to be sent is received. For example, at night, the overall traffic is large, so low-traffic services can be adjusted to high-traffic services.
[0097] Low-traffic services may not be able to fully utilize network resources during peak traffic hours at night. For example, low-traffic services occupy network resources, such as 10M bandwidth. However, low-traffic services are subject to some restrictions, resulting in low-traffic services only being able to utilize part of the 10M bandwidth and unable to fully utilize all of the 10M bandwidth. The remaining bandwidth in the 10M bandwidth is wasted. High-traffic services are not subject to restrictions. Therefore, in order to enable low-traffic traffic to fully utilize the bandwidth resources it occupies, low-traffic services can be adjusted to high-traffic services. In this way, the adjusted high-traffic traffic can fully utilize the bandwidth resources it occupies, and the network bandwidth is more fully utilized, avoiding idle waste of network resources due to low-traffic services occupying resources but not fully using them.
[0098] Specifically, during peak nighttime traffic, high-traffic services (such as videos and online games) are prioritized over low-traffic services (such as file downloads and email). This prioritizes bandwidth requirements for high-traffic services, allocating resources to them and improving resource utilization efficiency.
[0099] Reasons why low-traffic services cannot fully utilize network resources during peak nighttime traffic hours include:
[0100] Business nature limitations (production systems typically experience high traffic during the day and low traffic at night when the business hall is closed): Some low-traffic businesses, such as backend data synchronization, scheduled tasks, and email, typically require less bandwidth. These businesses typically don't require large amounts of data transmission, and even when sufficient network bandwidth is available, they won't actively consume excessive bandwidth resources.
[0101] System Defaults: Many devices and applications have default settings for allocating network resources to low-traffic services to ensure stable operation in various network environments. During peak nighttime traffic hours, these default settings may restrict low-traffic services from accessing network resources. Even when there is idle bandwidth, low-traffic services may struggle to utilize these resources. For example, some background applications have their maximum upload and download speeds limited in their network connection settings to avoid impacting the network experience of primary front-end services.
[0102] In one example, the daytime period may be from 7 am to 7 pm every day, and the nighttime period may be from 7 pm one day to 7 am the next day.
[0103] It is understandable that the division of daytime time periods and nighttime time periods can be determined according to actual conditions, and this application does not impose any limitation on this.
[0104] In step S102, a plurality of candidate transmission paths between the electronic device and a destination of a data request to be sent is obtained.
[0105] In one embodiment, this step can be implemented through the following process, including:
[0106] 1021. Obtain all transmission paths between the electronic device and the destination of the data request to be sent.
[0107] 1022. Obtain the time delay of each transmission path among all transmission paths, obtain the bandwidth of each transmission path among all transmission paths, and obtain the packet loss rate of each transmission path among all transmission paths.
[0108] The time delay, bandwidth and packet loss rate of each transmission path are all counted and updated in real time. In this way, the latest updated time delay, bandwidth and packet loss rate of each transmission path can be directly obtained.
[0109] 1023. Among all transmission paths, select multiple transmission paths having a delay less than a preset delay, a bandwidth greater than a preset bandwidth, and a packet loss rate less than a preset packet loss rate.
[0110] The preset delay is set in advance by the technician. The specific value of the preset delay can be determined by the technician based on actual conditions. This application does not limit the specific value of the preset delay.
[0111] The preset bandwidth is set in advance by a technician, and the specific value of the preset bandwidth can be determined by the technician based on actual conditions. This application does not limit the specific value of the preset bandwidth.
[0112] The preset packet loss rate is set in advance by the technician. The specific value of the preset packet loss rate can be determined by the technician based on actual conditions. This application does not limit the specific value of the preset packet loss rate.
[0113] 1024. Determine multiple candidate transmission paths based on the multiple screened transmission paths.
[0114] For example, the selected multiple transmission paths are all used as multiple candidate transmission paths.
[0115] In step S103 , a final queuing path is selected from a plurality of candidate transmission paths according to the traffic type of the data request to be sent.
[0116] In one embodiment of the present application, this step can be implemented through the following process, including:
[0117] 1031. For any one candidate transmission path among the multiple candidate transmission paths, obtain a delay of the candidate transmission path, obtain a bandwidth of the candidate transmission path, and obtain a packet loss rate of the candidate transmission path.
[0118] The delay of the candidate transmission path, the bandwidth of the candidate transmission path, and the packet loss rate of the candidate transmission path are all counted and updated in real time. In this way, the latest updated delay of the candidate transmission path, the bandwidth of the candidate transmission path, and the packet loss rate of the candidate transmission path can be directly obtained.
[0119] 1032. Obtain the quality of the candidate transmission link according to the delay of the candidate transmission path, the bandwidth of the candidate transmission path, and the packet loss rate of the candidate transmission path.
[0120] In one embodiment, the first reciprocal of the bandwidth of the candidate transmission path can be calculated, the first product between the delay of the candidate transmission path and the first weight coefficient can be calculated, and the second product between the packet loss rate of the candidate transmission path and the second weight coefficient can be calculated. Then, the quality of the candidate transmission link can be obtained based on the first reciprocal, the first product and the second product.
[0121] For example, in one example, the sum of the inverse, the first product, and the second product is calculated, the second inverse of the sum is calculated, and the quality of the candidate transmission link is obtained based on the second inverse of the sum. For example, the second inverse of the sum is determined as the quality of the candidate transmission link.
[0122] Among them, the first weight coefficient and the second weight coefficient are set in advance by technical personnel. The specific value of the first weight coefficient and the specific value of the second weight coefficient can be set by technical personnel according to actual conditions. This application does not limit the specific value of the first weight coefficient and the specific value of the second weight coefficient.
[0123] In an example, the first weight coefficient may range from 0.01 to 1, the second weight coefficient may range from 1 to 100, and so on.
[0124] 1033. Determine a final queuing path from multiple candidate transmission paths based on the traffic type of the data request to be sent and the quality of each candidate transmission link.
[0125] In one example, the traffic type of the data queued on each candidate transmission path and at the end of the queue order may be obtained respectively.
[0126] This scenario means that for any candidate transmission path, other data (e.g., other data requests to be sent) may be queued for transmission on that candidate transmission path. If there are multiple other data items queued on that candidate transmission path, then the multiple other data items have a queueing order. Among the multiple candidate transmission paths, the candidate transmission path is selected where the traffic type of the data queued at the end of the queueing order is different from the traffic type of the data request to be sent.
[0127] If there is one other data queued on the candidate transmission path, the one other data is the data at the end of the queueing order on the candidate transmission path.
[0128] The main consideration is to avoid multiple low-traffic services being adjacent to each other when queuing, which may lead to inadequate utilization of network resources, and to avoid multiple high-traffic services being adjacent to each other when queuing, which may lead to congestion.
[0129] Then, the candidate transmission path with the highest quality may be determined among the selected candidate transmission paths, and then the final queuing path may be determined based on the candidate transmission path with the highest quality. For example, the candidate transmission path with the highest quality may be directly used as the final queuing path.
[0130] Alternatively, in another embodiment, the quality of the candidate transmission link may be obtained by other means, for example, obtaining the cost of the candidate transmission path. For example, the actual bandwidth of the candidate transmission path may be obtained, and a bandwidth ratio between a preset fixed reference bandwidth and the actual bandwidth of the candidate transmission path may be calculated and used as the cost of the candidate transmission path.
[0131] The preset fixed reference bandwidth may include 100 Mbps or 200 Mbps, etc., which may be determined according to actual conditions and is not limited in this application.
[0132] In step S104 , the data request to be sent is transmitted to a destination of the data request to be sent based on the final queuing path.
[0133] For example, the data request to be sent is queued on the final queuing path. After other data on the final queuing path whose queuing order is before the data request to be sent has been sent through the final queuing path, the data request to be sent can be transmitted to the destination of the data request to be sent based on the final queuing path.
[0134] In the present application, when a data request to be sent is obtained, the traffic type of the data request to be sent and the destination of the data request to be sent are obtained; multiple candidate transmission paths between the electronic device and the destination of the data request to be sent are obtained; according to the traffic type of the data request to be sent, a final queuing path is selected from the multiple candidate transmission paths; and the data request to be sent is transmitted to the destination of the data request to be sent based on the final queuing path.
[0135] In this application, in terms of queuing, the data requests to be sent are classified, and the final queuing path is selected from multiple candidate transmission paths according to the traffic type of the data requests to be sent. The queuing time is reduced from the data upload end and the data receiving end, which can significantly reduce the communication delay between the data upload end and the data receiving end, and on the basis of reducing the communication delay, a large amount of hardware facilities does not need to be added, thus saving hardware costs.
[0136] In another embodiment of the present application, a low-latency transmission model may be constructed, for example, by dividing the data transmission channel into an identification layer and a transmission layer.
[0137] The identification layer is used to convert the data size, sending rate, queue length, upload port, and protocol type of the data request into the expected state of network delay, and pass the expected state to the transport layer.
[0138] The sending rate refers to the amount of data successfully sent per unit time.
[0139] The upload port is the port of the hardware device or program that uploads data.
[0140] The protocol type is the protocol type of the communication protocol used to transmit data.
[0141] The desired states include high bandwidth, low latency, stability, integrity, availability, and security.
[0142] The transport layer uses a back pressure algorithm to allocate data transmission window types based on the expected state.
[0143] Take fiber optic communications as an example. In long-distance fiber optic communication networks, such as intercity backbone networks, a large number of data streams from various sources converge on the same fiber link. When the data flow exceeds the link's carrying capacity, the data packets are queued in the sending end's buffer or at intermediate switching equipment.
[0144] The sender's data transmission window is a concept used in communication protocols for flow control. It defines the maximum amount of data a sender can send before receiving an acknowledgment from the receiver. By adjusting the size of this window, the sender can control the data transmission rate, thereby avoiding network congestion and increasing the processing pressure on the receiver.
[0145] The receiver's data transmission window is a concept used in communication protocols for flow control. It defines the maximum amount of data a receiver can accept. By adjusting the size of this window, the receiver can control the speed at which data is received, thereby avoiding increasing the receiver's processing pressure.
[0146] The transport layer uses control mechanisms to manage data transmission flow and confirm receipt. The sender and receiver each maintain a window. The send window manages the data being sent, while the receive window confirms the data being received.
[0147] Specifically, the value of the data transmission window of the sender (electronic device) is determined, which is the maximum amount of data that can be sent by the electronic device before receiving the confirmation of the receiver, calculated according to the network quality.
[0148] A value of a data transmission window of a destination of the data request to be sent is determined, where the value is a maximum amount of data that can be received by the destination of the data request to be sent, calculated according to network quality.
[0149] A smaller value is selected between the value of the data transmission window of the sender (electronic device) and the value of the data transmission window of the destination of the data request to be sent.
[0150] If the smaller value exceeds the expected value, the value of the data congestion window corresponding to the smaller value is increased, so that more data packets can be transmitted and more data can be transmitted at one time.
[0151] Alternatively, if the smaller value is smaller than the expected value, the value of the data congestion window corresponding to the smaller value is reduced.
[0152] Through this embodiment, a back pressure algorithm is used to calculate the fastest data transmission window, and the algorithm is used to avoid information-congested data transmission channels, thereby reducing the communication delay in the transmission stage. In this way, the delay data can be significantly reduced, and the operation and maintenance costs are lower.
[0153] It should be noted that for the method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions involved are not necessarily required by this application.
[0154] Reference Figure 2 , shows a data communication device of the present application, applied to electronic equipment, the device comprising:
[0155] The first acquisition module 11 is used to obtain the traffic type of the data request to be sent when a data request to be sent is obtained. The second acquisition module 12 is used to obtain the destination of the data request to be sent;
[0156] A third acquisition module 13 is configured to acquire a plurality of candidate transmission paths between the electronic device and a destination of the data request to be sent;
[0157] A selection module 14 is configured to select a final queuing path from a plurality of candidate transmission paths according to the traffic type of the data request to be sent;
[0158] The transmission module 15 is configured to transmit the data request to be sent to a destination of the data request to be sent based on the final queuing path.
[0159] In an optional implementation, the first acquisition module includes:
[0160] The first acquisition unit is used to acquire the service type of the data request to be sent; the service types include: long video, short video, live video, game, web page and text information;
[0161] The first determination unit is used to determine the traffic type of the data request to be sent based at least on the business type of the data request to be sent, the traffic type of the data request to be sent including a first traffic type and a second traffic type; the traffic required for the data request to be sent of the first traffic type is higher than the traffic required for the data request to be sent of the second traffic type.
[0162] In an optional implementation, the first determining unit includes:
[0163] A first determining subunit is configured to determine that the traffic type of the data request to be sent is a first traffic type when the service type of the data request to be sent is a long video type, a short video type, a live video type, or a game type;
[0164] or,
[0165] The second determining subunit is configured to determine that the traffic type of the data request to be sent is a second traffic type when the service type of the data request to be sent is a web page type or an information text type.
[0166] In an optional implementation, the third acquisition module includes:
[0167] a second acquiring unit, configured to acquire all transmission paths between the electronic device and a destination of the data request to be sent;
[0168] a third acquiring unit, configured to acquire a time delay of each transmission path among all transmission paths, acquire a bandwidth of each transmission path among all transmission paths, and acquire a packet loss rate of each transmission path among all transmission paths;
[0169] a screening unit, configured to screen, from all transmission paths, a plurality of transmission paths having a delay less than a preset delay, a bandwidth greater than a preset bandwidth, and a packet loss rate less than a preset packet loss rate;
[0170] The second determining unit is configured to determine a plurality of candidate transmission paths according to the screened plurality of transmission paths.
[0171] In an optional implementation, the selection module includes:
[0172] a fourth acquiring unit, configured to acquire, for any one of the plurality of candidate transmission paths, a time delay of the candidate transmission path, a bandwidth of the candidate transmission path, and a packet loss rate of the candidate transmission path;
[0173] a fifth acquiring unit, configured to acquire the quality of the candidate transmission link according to the delay of the candidate transmission path, the bandwidth of the candidate transmission path, and the packet loss rate of the candidate transmission path;
[0174] The third determining unit is configured to determine a final queuing path among multiple candidate transmission paths according to a traffic type of the data request to be sent and the quality of each candidate transmission link.
[0175] In an optional implementation, the third determining unit includes:
[0176] The first acquisition subunit is used to respectively acquire the traffic type of the data queued on each candidate transmission path and at the end of the queue sequence;
[0177] A selection subunit is configured to select, from a plurality of candidate transmission paths, a candidate transmission path on which a traffic type of data queued at the end of the queueing order is different from a traffic type of the data request to be sent;
[0178] a third determining subunit, configured to determine a candidate transmission path with the highest quality among the selected candidate transmission paths;
[0179] The fourth determining subunit is configured to determine a final queuing path according to the candidate transmission path with the highest quality.
[0180] In an optional implementation, the fifth acquiring unit includes:
[0181] a first calculating subunit, configured to calculate a first inverse of a bandwidth of the candidate transmission path;
[0182] a second calculation subunit, configured to calculate a first product between the delay of the candidate transmission path and a first weight coefficient;
[0183] a third calculation subunit, configured to calculate a second product between the packet loss rate of the candidate transmission path and a second weight coefficient;
[0184] The second acquisition subunit is configured to acquire the quality of the candidate transmission link according to the first inverse, the first product, and the second product.
[0185] In the present application, when a data request to be sent is obtained, the traffic type of the data request to be sent and the destination of the data request to be sent are obtained; multiple candidate transmission paths between the electronic device and the destination of the data request to be sent are obtained; according to the traffic type of the data request to be sent, a final queuing path is selected from the multiple candidate transmission paths; and the data request to be sent is transmitted to the destination of the data request to be sent based on the final queuing path.
[0186] In this application, in terms of queuing, the data requests to be sent are classified, and the final queuing path is selected from multiple candidate transmission paths according to the traffic type of the data requests to be sent. The queuing time is reduced from the data upload end and the data receiving end, which can significantly reduce the communication delay between the data upload end and the data receiving end, and on the basis of reducing the communication delay, a large amount of hardware facilities does not need to be added, thus saving hardware costs.
[0187] Optionally, an embodiment of the present application also provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and runnable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0188] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the various processes of the above-described method embodiments are implemented and the same technical effects are achieved. To avoid repetition, the details are not described here. The computer-readable storage medium may be, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0189] Figure 3 8 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0190] Reference Figure 3 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0191] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0192] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0193] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0194] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also monitor the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0195] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0196] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0197] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can monitor the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also monitor the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to monitor the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0198] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0199] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0200] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0201] Figure 41 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 can be provided as a server.
[0202] Reference Figure 4 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described method.
[0203] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0204] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0205] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can 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 a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0206] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
[0207] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0208] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0209] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0210] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0211] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0212] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
[0213] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A data communication method, characterized in that: Applied to electronic equipment, the method includes: When a data request to be sent is obtained, a traffic type of the data request to be sent and a destination of the data request to be sent are obtained; obtaining a plurality of candidate transmission paths between the electronic device and a destination of a data request to be sent; Selecting a final queuing path from multiple candidate transmission paths according to the traffic type of the data request to be sent; The data request to be sent is transmitted to a destination of the data request to be sent based on the final queuing path.
2. The method according to claim 1, characterized in that The traffic type of the data request to be sent is obtained, including: Get the service type of the data request to be sent; service types include: long video, short video, live video, game, web page, and text message; The traffic type of the data request to be sent is determined at least based on the business type of the data request to be sent, and the traffic type of the data request to be sent includes a first traffic type and a second traffic type; the traffic required for the data request to be sent of the first traffic type is higher than the traffic required for the data request to be sent of the second traffic type.
3. The method according to claim 2, characterized in that The determining the traffic type of the data request to be sent at least according to the service type of the data request to be sent includes: When the service type of the data request to be sent is a long video type, a short video type, a live video type, or a game type, determining that the traffic type of the data request to be sent is a first traffic type; or, In a case where the service type of the data request to be sent is a web page type or an information text type, it is determined that the traffic type of the data request to be sent is a second traffic type.
4. The method according to claim 1, wherein The acquiring of multiple candidate transmission paths between the electronic device and a destination of the data request to be sent includes: Acquire all transmission paths between the electronic device and a destination of the data request to be sent; Obtaining the time delay of each transmission path in all transmission paths, obtaining the bandwidth of each transmission path in all transmission paths, and obtaining the packet loss rate of each transmission path in all transmission paths; Among all transmission paths, screening multiple transmission paths having a delay less than a preset delay, a bandwidth greater than a preset bandwidth, and a packet loss rate less than a preset packet loss rate; A plurality of candidate transmission paths is determined based on the screened plurality of transmission paths.
5. The method according to claim 1, wherein The selecting a final queuing path from a plurality of candidate transmission paths according to the traffic type of the data request to be sent includes: For any one candidate transmission path among the multiple candidate transmission paths, obtaining a time delay of the candidate transmission path, obtaining a bandwidth of the candidate transmission path, and obtaining a packet loss rate of the candidate transmission path; Obtaining the quality of the candidate transmission link according to the delay of the candidate transmission path, the bandwidth of the candidate transmission path, and the packet loss rate of the candidate transmission path; A final queuing path is determined from multiple candidate transmission paths according to the traffic type of the data request to be sent and the quality of each candidate transmission link.
6. The method according to claim 5, characterized in that The step of determining a final queuing path from among multiple candidate transmission paths according to the traffic type of the data request to be sent and the quality of each candidate transmission link includes: respectively obtaining the traffic type of the data queued on each candidate transmission path and at the end of the queue sequence; Selecting, from among a plurality of candidate transmission paths, a candidate transmission path on which a traffic type of data queued at the end of the queueing order is different from a traffic type of the data request to be sent; determining a candidate transmission path with the highest quality among the selected candidate transmission paths; The final queuing path is determined based on the candidate transmission path with the highest quality.
7. The method according to claim 5, characterized in that The acquiring the quality of the candidate transmission link according to the delay of the candidate transmission path, the bandwidth of the candidate transmission path, and the packet loss rate of the candidate transmission path includes: Calculating a first reciprocal of a bandwidth of the candidate transmission path; Calculating a first product between the time delay of the candidate transmission path and a first weight coefficient; Calculating a second product between the packet loss rate of the candidate transmission path and a second weight coefficient; The quality of the candidate transmission link is acquired according to the first inverse, the first product, and the second product.
8. A data communication device, characterized in that: Applied to electronic equipment, the device comprises: The first acquisition module is used to obtain the traffic type of the data request to be sent when the data request to be sent is obtained, and the second acquisition module is used to obtain the destination of the data request to be sent; a third acquisition module, configured to acquire a plurality of candidate transmission paths between the electronic device and a destination of the data request to be sent; A selection module, configured to select a final queuing path from a plurality of candidate transmission paths according to a traffic type of a data request to be sent; The transmission module is configured to transmit the data request to be sent to a destination of the data request to be sent based on the final queuing path.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which implements the method according to any one of claims 1 to 7 when executed by a processor.