CN114422079A - Data transmission method and device, computer equipment and storage medium - Google Patents

Data transmission method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114422079A
CN114422079A CN202111561087.6A CN202111561087A CN114422079A CN 114422079 A CN114422079 A CN 114422079A CN 202111561087 A CN202111561087 A CN 202111561087A CN 114422079 A CN114422079 A CN 114422079A
Authority
CN
China
Prior art keywords
channel
sent
target
data
sending rate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111561087.6A
Other languages
Chinese (zh)
Other versions
CN114422079B (en
Inventor
范其锦
张锦秀
王连光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xuanwu Wireless Technology Co Ltd
Original Assignee
Guangzhou Xuanwu Wireless 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 Guangzhou Xuanwu Wireless Technology Co Ltd filed Critical Guangzhou Xuanwu Wireless Technology Co Ltd
Priority to CN202111561087.6A priority Critical patent/CN114422079B/en
Publication of CN114422079A publication Critical patent/CN114422079A/en
Application granted granted Critical
Publication of CN114422079B publication Critical patent/CN114422079B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Abstract

The embodiment of the disclosure provides a data sending method and a device thereof, computer equipment and a storage medium, belonging to the technical field of communication, wherein the method comprises the following steps: acquiring data to be transmitted; acquiring at least two channels to be sent according to the data to be sent; calculating a target sending rate corresponding to the channel to be sent; calculating a target weight of the channel to be sent according to the target sending rate of the channel to be sent; determining a target transmission channel of the data to be transmitted from a plurality of channels to be transmitted according to the target weight of the channel to be transmitted; and transmitting the data to be transmitted according to the target transmission channel. By calculating the corresponding target sending rate of the channel to be sent, the actual sending rate of the channel can be obtained, the waste of channel resources or data backlog is avoided, and the target sending channel is determined according to the actual sending rate, so that the data can be sent to the client in time.

Description

Data transmission method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data transmission method and apparatus, a computer device, and a storage medium.
Background
Currently, the transmission rate of the data transmission channel is a fixed value provided by the operator. The fixed value is greatly influenced by the test environment and the test data, and cannot reflect the actual data sending rate. If the fixed value is set to be small, the channel cannot be fully utilized to send data, and resource waste is caused; if the fixed value is set to be large, data backlog is caused, and data cannot be sent to the client in time.
Disclosure of Invention
The main purpose of the embodiments of the present disclosure is to provide a data sending method and apparatus, a computer device, and a storage medium, which can obtain an actual data sending rate of a channel and avoid channel resource waste or data backlog.
In order to achieve the above object, a first aspect of the embodiments of the present disclosure provides a data sending method, including:
acquiring data to be transmitted;
acquiring at least two channels to be sent according to the data to be sent;
calculating a target sending rate corresponding to the channel to be sent;
calculating a target weight of the channel to be sent according to the target sending rate of the channel to be sent;
determining a target transmission channel of the data to be transmitted from a plurality of channels to be transmitted according to the target weight of the channel to be transmitted;
and transmitting the data to be transmitted according to the target transmission channel.
In some embodiments, the calculating a target sending rate corresponding to the channel to be sent includes:
acquiring an initial sending rate of the report of the channel to be sent;
and calculating the target sending rate of the channel to be sent according to the initial sending rate.
In some embodiments, the calculating a target transmission rate of the channel to be transmitted according to the initial transmission rate includes:
and if the initial sending rate is different from the current sending rate of the channel to be sent, updating the current sending rate of the channel to be sent so as to calculate and obtain the target sending rate of the channel to be sent.
In some embodiments, the calculating a target transmission rate of the channel to be transmitted according to the initial transmission rate further includes:
if the initial sending rate is the same as the current sending rate of the channel to be sent, acquiring an initial state reported by the channel to be sent, and updating the current state of the channel to be sent according to the initial state to calculate a target state of the channel to be sent;
and calculating the target sending rate of the channel to be sent according to the target state of the channel to be sent.
In some embodiments, the calculating a target transmission rate of the channel to be transmitted according to the target state of the channel to be transmitted includes:
if the target state of the channel to be sent is the offline state, taking the target sending rate of the channel to be sent as zero;
if the target state of the channel to be sent is an online state and a new online state, taking the target sending rate of the channel to be sent as a preset rate threshold;
and if the target state of the channel to be sent is an online state and is not a new online state, taking the current sending rate of the channel to be sent as the target sending rate of the channel to be sent.
In some embodiments, the calculating a target weight of the channel to be sent according to the target sending rate of the channel to be sent includes:
acquiring an initial weight of a channel to be sent;
and calculating to obtain the target weight of the channel to be sent according to the sum of the initial weight of the channel to be sent and the target sending rate of the channel to be sent.
In some embodiments, the determining, according to the target weight of the channel to be sent, a target channel to be sent for the data to be sent from a plurality of channels to be sent includes:
and selecting the channel to be sent with the maximum target weight from the plurality of channels to be sent as a target sending channel of data to be sent.
A second aspect of the embodiments of the present disclosure provides a data transmission apparatus, including:
the first acquisition module is used for acquiring data to be sent;
the second acquisition module is used for acquiring at least two channels to be sent according to the data to be sent;
the first calculation module is used for calculating a target sending rate corresponding to the channel to be sent;
a second calculating module, configured to calculate a target weight of the channel to be sent according to the target sending rate of the channel to be sent;
a third obtaining module, configured to determine, according to the target weight of the channel to be sent, a target sending channel of the data to be sent from the multiple channels to be sent;
and the data sending module is used for sending the data to be sent according to the target sending channel.
A third aspect of the embodiments of the present disclosure provides a computer device, which includes a memory and a processor, where the memory stores a program, and the processor is configured to execute the method according to any one of the embodiments of the first aspect of the present disclosure when the program is executed by the processor.
A fourth aspect of the embodiments of the present disclosure provides a storage medium, which is a computer-readable storage medium, and the storage medium stores computer-executable instructions, where the computer-executable instructions are configured to cause a computer to perform the method according to any one of the embodiments of the first aspect of the present disclosure.
According to the data transmission method and device, the computer device, and the storage medium provided by the embodiment of the disclosure, by acquiring data to be transmitted, acquiring at least two channels to be transmitted according to the data to be transmitted, calculating a target transmission rate corresponding to the channels to be transmitted, calculating a target weight of the channels to be transmitted according to the target transmission rate of the channels to be transmitted, determining a target transmission channel of the data to be transmitted from a plurality of channels to be transmitted according to the target weight of the channels to be transmitted, and transmitting the data to be transmitted according to the target transmission channel. By calculating the corresponding target sending rate of the channel to be sent, the actual sending rate of the channel can be obtained, the waste of channel resources or data backlog is avoided, and the target sending channel is determined according to the actual sending rate, so that the data can be sent to the client in time.
Drawings
Fig. 1 is a first flowchart of a data transmission method provided by an embodiment of the present disclosure;
FIG. 2 is a flowchart of step S130 in FIG. 1;
FIG. 3 is a first flowchart of step S220 in FIG. 2;
FIG. 4 is a second flowchart of step S220 in FIG. 2;
FIG. 5 is a flowchart of step S140 in FIG. 1;
fig. 6 is a second flowchart of a data transmission method provided by an embodiment of the present disclosure;
fig. 7 is a block diagram of a data transmission device according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that although functional blocks are partitioned in a schematic diagram of an apparatus and a logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the partitioning of blocks in the apparatus or the order in the flowchart. The terms first, second and the like in the description and in the claims, and the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Currently, the sending rate of a data sending channel is a fixed value provided by an operator, and the fixed value is an estimated value capable of reflecting the data amount which should be sent by the channel every minute. However, the fixed value is easily affected by the test network environment and the size of the data volume to be sent in the test, and cannot reflect the actual data sending rate. When the test network environment is good and the data volume sent by the test is small, the fixed value is larger. When the test network environment is poor and the data volume sent by the test is large, the fixed value is smaller. If the fixed value is set to be small, the channel cannot be fully utilized to send data, and resource waste is caused; if the fixed value is set to be large, data backlog is caused, and data cannot be sent to the client in time.
Because the channel transmits data according to the transmission rate requirement provided by the operator, and the transmission rate requirement provided by the operator is mostly inaccurate, the channel cannot adjust the transmission rate per se according to the actual situation, thereby causing channel resource waste or data backlog. Based on this, a main object of the embodiments of the present disclosure is to provide a data sending method, which can obtain an actual sending rate of a channel by calculating a target sending rate of the channel, so that the channel can automatically adjust its sending rate according to an actual situation of data sending, avoid resource waste or data backlog caused by the channel sending data according to a processing speed provided by an operator, and determine the target sending channel according to the actual sending rate, so that the data can be sent to a client in time.
The data transmission method and apparatus, computer device, and storage medium provided in the embodiments of the present disclosure are specifically described with the following embodiments, and first, the data transmission method in the embodiments of the present disclosure is described.
Referring to fig. 1, the data transmission method according to the first aspect of the embodiments of the present disclosure includes, but is not limited to, step S110 to step S160.
S110, acquiring data to be transmitted;
s120, acquiring at least two channels to be transmitted according to data to be transmitted;
s130, calculating a target sending rate corresponding to a channel to be sent;
s140, calculating the target weight of the channel to be sent according to the target sending rate of the channel to be sent;
s150, determining a target transmission channel of data to be transmitted from a plurality of channels to be transmitted according to the target weight of the channels to be transmitted;
and S160, transmitting the data to be transmitted according to the target transmission channel.
In step S110, the data to be sent includes sender identity information, data content to be sent, receiver identity information, and the like, and is data that needs to be sent by the user.
In step S120, the channel to be sent refers to a program interfacing with an operator, the same channel to be sent may deploy multiple services to interface different services of the operator, and the operator sends the data to be sent to a corresponding data receiver through the channel to be sent.
In step S130, the target sending rate is an actual sending rate of the channel to be sent for data sending, and reflects an actual data quantity sent per minute monitored by the channel to be sent in the data sending process. By calculating the target sending rate of the channel to be sent, the actual sending rate of the channel to be sent can be obtained.
In step S140 and step S150, a target weight of each channel to be transmitted is calculated according to the target transmission rate of each channel to be transmitted, and a target transmission channel of data to be transmitted is determined from a plurality of channels to be transmitted according to the target weights of the plurality of channels to be transmitted. The target sending channel is an optimal channel for sending data this time, and the selection mode may be to select a channel to be sent with the largest target weight from a plurality of channels to be sent, as the target sending channel for sending data.
In step S160, the data to be transmitted is transmitted at the target transmission rate in the target transmission channel.
It should be noted that, if a channel to be sent cannot be queried from the cache according to data to be sent, a new channel is created, the channel is regarded as a new on-line channel, and the target sending rate of the channel is set to be the preset rate threshold.
In some embodiments, as shown in fig. 2, step S130 specifically includes the steps of:
s210, acquiring an initial sending rate of the report of a channel to be sent;
and S220, calculating the target sending rate of the channel to be sent according to the initial sending rate.
In step S210, since the number of channels is large and the same channel deploys multiple services, the third-party component is used to receive the data reported by the channels, and then the reported data is obtained from the third-party component. Because the data structure of the redis is rich, the operation data is fast, the processing of the data is single-threaded, the locking is not required to be considered when the data is concurrently updated, and the complexity of the program is simplified, the redis can be used as a component for bearing the reported data, and the timer is defined to acquire the reported data from the redis at fixed time.
It should be noted that the initial sending rate can be stored by using a map data structure in the redis. When the channel issues data, one second is a window in a sliding time window, and the data issuing amount per second, that is, the data sending amount of one time window, is counted. The total transmission of the first 60 windows, i.e., the data transmission of the previous minute, is counted every 0 second per minute. The transmission amount of the previous minute is the initial transmission rate, and the initial transmission rate is reported to the map of the redis. Map in redis stores data in the format of { key: { field: value } }, where speed: the current minute is key, the lane identification is field, and the send amount is value. Assuming that the channel identifier is channel 1, it indicates the transmission amount of channel 1 in the current minute, i.e. the initial transmission rate speed reported by channel 1. In addition, each key is only valid within a preset time length, the preset time length is fixed time defined by a timer, if the preset time length is exceeded, the data represented by the key is considered to be overdue, and the overdue data is deleted by the redis.
In some embodiments, as shown in fig. 3, step S220 specifically includes the steps of:
and S310, if the initial sending rate is different from the current sending rate of the channel to be sent, updating the current sending rate of the channel to be sent so as to calculate and obtain the target sending rate of the channel to be sent.
In step S310, if the reported initial sending rate of the channel to be sent is different from the current sending rate of the channel to be sent, that is, the channel to be sent has a new sending rate, the current sending rate is updated by using the reported initial sending rate, so as to obtain a target sending rate of the channel to be sent.
In some embodiments, as shown in fig. 4, step S220 specifically includes the steps of:
s410, if the initial sending rate is the same as the current sending rate of the channel to be sent, acquiring an initial state reported by the channel to be sent, and updating the current state of the channel to be sent according to the initial state to calculate a target state of the channel to be sent;
and S420, calculating the target sending rate of the channel to be sent according to the target state of the channel to be sent.
In step S410, if the initial transmission rate reported by the channel to be transmitted is the same as the current transmission rate, the channel to be transmitted may fail, and the initial state reported by the channel to be transmitted is obtained from the third-party component. The initial state is the latest state of the channel, and the current state of the channel to be sent is updated according to the initial state to obtain the target state of the channel to be sent.
In step S420, if the target status of the channel to be sent is the offline status, the target sending rate of the channel to be sent is set to zero. The target sending rate of the channel is zero, which indicates that the channel is offline and does not send any data. And if the target state of the channel to be sent is an online state and a new online state, taking the target sending rate of the channel to be sent as a preset rate threshold value, and sending data at the preset rate. And if the target state of the channel to be sent is an online state and is not a new online state, taking the current sending rate of the channel to be sent as the target sending rate of the channel to be sent. When the initial sending rate is the same as the current sending rate, the target state of the channel is an online state and is not a new online state, which indicates that the channel is normal, and the sending rate of the channel is not updated, so that the data is still sent according to the current sending rate.
It should be noted that, when the reported initial sending rate is the same as the current sending rate, the channel may fail, and the failed channel may be identified by updating the state of the channel, and data is not distributed to the failed channel. In addition, the channel which is recovered to be normal can be identified by continuously updating the channel state, so that data can be distributed to the channel which is recovered to be normal without manual intervention.
It should be further noted that, when the channel reports the initial state, the initial state is reported to the third-party component in a heartbeat manner. The heartbeat is realized by a timing task, namely, a timer is adopted to define fixed time, for example, the heartbeat is carried once every 30s, and the initial state information of the channel is carried to a third-party component. The third party component takes redis as an example, and stores the initial state of the channel by adopting a map data structure, namely { channel identifier: last heartbeat time, the last heartbeat time being the current time of the server. Similarly, the initial state of the channel is obtained from the third party component by using a timer to define a fixed time. And the on-line and off-line of the channel are judged according to the difference value between the obtained reported initial state and the current obtaining time and preset time, if the difference value is greater than a preset time threshold value, the target state of the channel is off-line, and if the difference value is less than or equal to the time threshold value, the target state of the channel is on-line. For example, the preset time threshold is one and a half minutes, after the initial state reported by the channel is obtained from the third-party component, if the difference between the last heartbeat time in the initial state and the current obtaining time is more than one and a half minutes, that is, no initial state of the channel is reported for 3 consecutive heartbeats, the channel is determined to be offline; otherwise, the channel is judged to be on-line. Because the current sending rate of the new online channel is zero, after the channel is judged to be online, whether the channel is newly online can be judged by judging whether the current sending rate of the channel is zero or not.
It will be appreciated that the transmission rates for both the new upstream and downstream lanes are zero.
In some embodiments, as shown in fig. 5, step S140 specifically includes the steps of:
s510, acquiring an initial weight of a channel to be sent;
and S520, calculating to obtain the target weight of the channel to be sent according to the sum of the initial weight of the channel to be sent and the target sending rate of the channel to be sent.
In step S510, the initial weight of the channel to be transmitted is zero.
In step S520, if the initial weight of the channel to be transmitted is W1 and the target transmission rate of the channel to be transmitted is S, the target weight of the channel to be transmitted is W1+ S, and the target weight of each channel to be transmitted can be calculated.
It should be noted that, after the target transmission channel is determined, the initial weight W1 of each channel to be transmitted is updated, that is, W1 is SGeneral assembly-W, wherein SGeneral assemblyIs the sum of the target transmission rates of a plurality of channels to be transmitted.
It should be further noted that, if the data is sent in the first target sending channel at the first target sending rate, the next data is sent in the second target sending channel at the second target sending rate, and the ratio of the first target sending rate to the second target sending rate is S1: s2, considering the data as per S1: the ratio of S2 is distributed to the first target transmission channel and the second target transmission channel, enabling data to be allocated according to the ratio of the target transmission rates. For example, the target transmission rate ratio for three channels is 1000: 500: 100, then the ratio of received data for the three channels is 10: 5: 1.
in some embodiments, as shown in fig. 6, the data transmission method includes, but is not limited to, steps S610 to S690.
S610, acquiring a short message to be sent;
s620, acquiring at least two channels to be sent according to short message parameters submitted by the short messages to be sent;
s630, judging whether the sending rate of the channel to be sent is updated; if yes, go to step S640; if the determination result is negative, go to step S650;
s640, updating the sending rate of a channel to be sent;
s650, judging whether the heartbeat time of the channel to be sent exceeds a limited time; if yes, go to step S660; if the determination result is negative, executing step S670;
s660, updating the sending rate of the channel to be sent to be zero;
s670, judging whether the sending rate of a channel to be sent is zero; if yes, go to step S680, otherwise, go to step S690;
s680, setting the sending rate of a channel to be sent as a fixed rate threshold;
and S690, determining a target transmission channel according to the transmission rate of the channel to be transmitted, and completing the transmission of the short message to be transmitted.
In step S660, the heartbeat time of the channel to be transmitted exceeds the limit time, which indicates that the channel to be transmitted is offline, and therefore the transmission rate of the channel to be transmitted is updated to be zero.
In step S680, the heartbeat time of the channel to be transmitted does not exceed the limited time, which indicates that the channel to be transmitted is online, and when the transmission rate is not updated, the transmission rate is zero, which indicates that the channel to be transmitted is a new online channel, and the transmission rate of the channel to be transmitted is updated to be the fixed rate threshold. The channel can automatically adjust the sending rate according to the actual situation, and data backlog or channel resource waste is avoided.
According to the data transmission method provided by the embodiment of the disclosure, data to be transmitted is acquired, at least two channels to be transmitted are acquired according to the data to be transmitted, target weight of the channels to be transmitted is calculated by calculating target transmission rate corresponding to the channels to be transmitted, the target transmission channels of the data to be transmitted are determined from the channels to be transmitted according to the target weight of the channels to be transmitted, and the data to be transmitted is transmitted according to the target transmission channels. By calculating the corresponding target sending rate of the channel to be sent, the actual sending rate of the channel can be obtained, data can be distributed to each channel according to the proportion of the actual sending rate, waste of channel resources or data backlog is avoided, the target sending channel is determined according to the actual sending rate, and the data can be sent to the client in time.
The embodiment of the present disclosure further provides a data sending apparatus, as shown in fig. 7, which can implement the data sending method, and the apparatus includes a first obtaining module 710, a second obtaining module 720, a first calculating module 730, a second calculating module 740, a third obtaining module 750, and a data sending module 760. The first obtaining module 710 is configured to obtain data to be sent; the second obtaining module 720 is configured to obtain at least two channels to be sent according to data to be sent; the first calculating module 730 is configured to calculate a target sending rate corresponding to a channel to be sent; the second calculating module 740 is configured to calculate a target weight of the channel to be sent according to a target sending rate of the channel to be sent; the third obtaining module 750 is configured to determine, according to the target weight of the channel to be sent, a target sending channel of data to be sent from the multiple channels to be sent; the data sending module 760 is configured to send data to be sent according to the target sending channel. The data sending apparatus in the embodiments of the present disclosure is configured to execute the data sending method in the embodiments, and a specific processing procedure of the data sending apparatus is the same as that of the data sending method in the embodiments, which is not described herein again.
The data transmission device provided by the embodiment of the disclosure acquires data to be transmitted by using a first acquisition module, analyzes the data to be transmitted to acquire at least two channels to be transmitted, calculates a target transmission rate corresponding to the channels to be transmitted by using a first calculation module, calculates a target weight of the channels to be transmitted according to the target transmission rate of the channels to be transmitted calculated by using the second calculation module, determines a target transmission channel of the data to be transmitted from a plurality of channels to be transmitted according to the target weight of the channels to be transmitted, and transmits the data to be transmitted according to the target transmission channel by using the data transmission module after determining the target transmission channel. By calculating the corresponding target sending rate of the channel to be sent, the actual sending rate of the channel can be obtained, data can be distributed to each channel according to the proportion of the actual sending rate, waste of channel resources or data backlog is avoided, the target sending channel is determined according to the actual sending rate, and the data can be sent to the client in time.
An embodiment of the present disclosure further provides a computer device, including:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions for execution by the at least one processor to cause the at least one processor, when executing the instructions, to implement a method as in any one of the embodiments of the first aspect of the application.
The computer device includes: a processor, a memory, an input/output interface, a communication interface, and a bus.
A processor, which may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute a relevant program to implement the technical solution provided by the embodiments of the present disclosure;
the Memory may be implemented in the form of a ROM (Read Only Memory), a static Memory device, a dynamic Memory device, or a RAM (Random Access Memory). The memory may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present disclosure is implemented by software or firmware, the relevant program codes are stored in the memory and called by the processor to execute the data transmission method according to the embodiments of the present disclosure;
the input/output interface is used for realizing information input and output;
the communication interface is used for realizing communication interaction between the equipment and other equipment, and can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like); and
a bus that transfers information between various components of the device (e.g., processor, memory, input/output interfaces, and communication interfaces);
wherein the processor, the memory, the input/output interface and the communication interface are communicatively connected to each other within the device by a bus.
The disclosed embodiments also provide a storage medium, which is a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the data transmission method of the disclosed embodiments.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The embodiments described in the embodiments of the present disclosure are for more clearly illustrating the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation to the technical solutions provided in the embodiments of the present disclosure, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present disclosure are also applicable to similar technical problems with the evolution of technology and the emergence of new application scenarios.
Those skilled in the art will appreciate that the solutions shown in fig. 1-6 are not meant to limit embodiments of the present disclosure, and may include more or fewer steps than those shown, or may combine certain steps, or different steps.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present disclosure have been described above with reference to the accompanying drawings, and therefore do not limit the scope of the claims of the embodiments of the present disclosure. Any modifications, equivalents and improvements within the scope and spirit of the embodiments of the present disclosure should be considered within the scope of the claims of the embodiments of the present disclosure by those skilled in the art.

Claims (10)

1. A method for transmitting data, the method comprising:
acquiring data to be transmitted;
acquiring at least two channels to be sent according to the data to be sent;
calculating a target sending rate corresponding to the channel to be sent;
calculating a target weight of the channel to be sent according to the target sending rate of the channel to be sent;
determining a target transmission channel of the data to be transmitted from a plurality of channels to be transmitted according to the target weight of the channel to be transmitted;
and transmitting the data to be transmitted according to the target transmission channel.
2. The method according to claim 1, wherein said calculating a target transmission rate corresponding to the channel to be transmitted includes:
acquiring an initial sending rate of the report of the channel to be sent;
and calculating the target sending rate of the channel to be sent according to the initial sending rate.
3. The method as claimed in claim 2, wherein said calculating the target sending rate of the channel to be sent according to the initial sending rate comprises:
and if the initial sending rate is different from the current sending rate of the channel to be sent, updating the current sending rate of the channel to be sent so as to calculate and obtain the target sending rate of the channel to be sent.
4. The method as claimed in claim 3, wherein said calculating a target sending rate of the channel to be sent according to the initial sending rate further comprises:
if the initial sending rate is the same as the current sending rate of the channel to be sent, acquiring an initial state reported by the channel to be sent, and updating the current state of the channel to be sent according to the initial state to calculate a target state of the channel to be sent;
and calculating the target sending rate of the channel to be sent according to the target state of the channel to be sent.
5. The data transmission method according to claim 4, wherein said calculating a target transmission rate of the channel to be transmitted according to the target state of the channel to be transmitted comprises:
if the target state of the channel to be sent is the offline state, taking the target sending rate of the channel to be sent as zero;
if the target state of the channel to be sent is an online state and a new online state, taking the target sending rate of the channel to be sent as a preset rate threshold;
and if the target state of the channel to be sent is an online state and is not a new online state, taking the current sending rate of the channel to be sent as the target sending rate of the channel to be sent.
6. The method according to claim 1, wherein said calculating a target weight of the channel to be transmitted according to the target transmission rate of the channel to be transmitted comprises:
acquiring an initial weight of a channel to be sent;
and calculating to obtain the target weight of the channel to be sent according to the sum of the initial weight of the channel to be sent and the target sending rate of the channel to be sent.
7. The method according to claim 1, wherein the determining a target transmission channel of the data to be transmitted from a plurality of channels to be transmitted according to the target weight of the channel to be transmitted comprises:
and selecting the channel to be sent with the maximum target weight from the plurality of channels to be sent as a target sending channel of data to be sent.
8. A data transmission apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring data to be sent;
the second acquisition module is used for acquiring at least two channels to be sent according to the data to be sent;
the first calculation module is used for calculating a target sending rate corresponding to the channel to be sent;
a second calculating module, configured to calculate a target weight of the channel to be sent according to the target sending rate of the channel to be sent;
a third obtaining module, configured to determine, according to the target weight of the channel to be sent, a target sending channel of the data to be sent from the multiple channels to be sent;
and the data sending module is used for sending the data to be sent according to the target sending channel.
9. A computer device comprising a memory and a processor, wherein the memory has stored therein a program, and wherein the processor is configured to perform, when the program is executed by the processor:
the method of any one of claims 1 to 7.
10. A storage medium which is a computer-readable storage medium, wherein the computer-readable storage stores a computer program, and when the computer program is executed by a computer, the computer is configured to perform:
the method of any one of claims 1 to 7.
CN202111561087.6A 2021-12-15 2021-12-15 Data transmission method and device, computer equipment and storage medium Active CN114422079B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111561087.6A CN114422079B (en) 2021-12-15 2021-12-15 Data transmission method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111561087.6A CN114422079B (en) 2021-12-15 2021-12-15 Data transmission method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114422079A true CN114422079A (en) 2022-04-29
CN114422079B CN114422079B (en) 2023-02-28

Family

ID=81268534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111561087.6A Active CN114422079B (en) 2021-12-15 2021-12-15 Data transmission method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114422079B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117254887A (en) * 2023-11-20 2023-12-19 苏州联讯仪器股份有限公司 Channel locking method, device and system and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106255081A (en) * 2016-10-11 2016-12-21 福建方维信息科技有限公司 A kind of note transmission method and system
CN110072295A (en) * 2019-04-30 2019-07-30 努比亚技术有限公司 Dual-channels communication method, apparatus, first terminal and medium
CN110493734A (en) * 2019-07-22 2019-11-22 苏宁云计算有限公司 The channel selection method and device that short message is sent
CN110611891A (en) * 2019-08-29 2019-12-24 深圳市梦网科技发展有限公司 Short message sending method and device
CN111093162A (en) * 2019-12-18 2020-05-01 上海良鑫网络科技有限公司 Method for intelligently selecting short message sending channel

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106255081A (en) * 2016-10-11 2016-12-21 福建方维信息科技有限公司 A kind of note transmission method and system
CN110072295A (en) * 2019-04-30 2019-07-30 努比亚技术有限公司 Dual-channels communication method, apparatus, first terminal and medium
CN110493734A (en) * 2019-07-22 2019-11-22 苏宁云计算有限公司 The channel selection method and device that short message is sent
CN110611891A (en) * 2019-08-29 2019-12-24 深圳市梦网科技发展有限公司 Short message sending method and device
CN111093162A (en) * 2019-12-18 2020-05-01 上海良鑫网络科技有限公司 Method for intelligently selecting short message sending channel

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117254887A (en) * 2023-11-20 2023-12-19 苏州联讯仪器股份有限公司 Channel locking method, device and system and computer storage medium
CN117254887B (en) * 2023-11-20 2024-04-09 苏州联讯仪器股份有限公司 Channel locking method, device and system and computer storage medium

Also Published As

Publication number Publication date
CN114422079B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
EP3873066A1 (en) Method for managing resource state information, and resource downloading system
CN106790696B (en) Message transmission method and device
US20200334189A1 (en) Method and apparatus for decoding oscilloscope signal and oscilloscope
US10135672B2 (en) Log data collection system, terminal device, and log data collection method
US11734077B2 (en) Evaluation device, evaluation method and evaluation program
CN109286957B (en) Switching method and device of return link, electronic equipment and storage medium
CN112737897B (en) Link monitoring and scheduling method, device, equipment and storage medium
CN110087141A (en) Method of transmitting video data, device, client and server
CN114422079B (en) Data transmission method and device, computer equipment and storage medium
US20200204624A1 (en) Data processing system, method and apparatus
CN110912805B (en) Message reading state synchronization method, terminal, server and system
CN107196980B (en) Method, system and device for controlling page display flow
CN107306200B (en) Network fault early warning method and gateway for network fault early warning
EP3082282A1 (en) Method for time synchronization
CN107707395B (en) Data transmission method, device and system
CN112838980B (en) Message processing method, system, device, electronic equipment and storage medium
CN106921992B (en) Method for determining wireless network connection state, client and server
CN110266574B (en) Adjustment method of conflict resolution scheduling table, related device and storage medium
CN107171915B (en) Communication protocol changing method and device
CN113590017A (en) Method, electronic device and computer program product for processing data
CN114466321B (en) Message sending method and device, electronic equipment and storage medium
CN111371675B (en) Intelligent addressing method, device, equipment and storage medium thereof
CN110233744B (en) Conference state display method, conference state updating method and device
CN110351331A (en) A kind of data acquisition, sending method and system
CN108574622B (en) Instant message processing method and device based on XMPP

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant