CN117499980B - Data communication method, electronic equipment and storage medium - Google Patents

Data communication method, electronic equipment and storage medium Download PDF

Info

Publication number
CN117499980B
CN117499980B CN202311845114.1A CN202311845114A CN117499980B CN 117499980 B CN117499980 B CN 117499980B CN 202311845114 A CN202311845114 A CN 202311845114A CN 117499980 B CN117499980 B CN 117499980B
Authority
CN
China
Prior art keywords
data
transmission rate
data transmission
credit
receiving end
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311845114.1A
Other languages
Chinese (zh)
Other versions
CN117499980A (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.)
Shenzhen Feasycom Technology Co ltd
Original Assignee
Shenzhen Feasycom 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 Shenzhen Feasycom Technology Co ltd filed Critical Shenzhen Feasycom Technology Co ltd
Priority to CN202311845114.1A priority Critical patent/CN117499980B/en
Publication of CN117499980A publication Critical patent/CN117499980A/en
Application granted granted Critical
Publication of CN117499980B publication Critical patent/CN117499980B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The invention relates to a data communication method, electronic equipment and a storage medium, wherein the method comprises the following steps: when the data receiving end receives data, judging the data transmission rate of the data transmission process according to the received data of the data receiving end; when the data transmission rate is judged to be reduced, a preset number of test credits are sent to the data sending end through the data receiving end; and acquiring the variation trend of the data transmission rate, and judging that the credit is lost in the data transmission process when the data transmission rate rises. By implementing the method and the device, whether the abnormality in the data communication is caused by credit loss can be rapidly identified, so that the rapid positioning of partial communication abnormality is realized.

Description

Data communication method, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data communication method, an electronic device, and a storage medium.
Background
In bluetooth data transmission, based on the start of the RFCOMM protocol, before data transmission, a receiving data person gives a certain credit number to a transmitting data person, when data transmission is performed, the transmitting data person consumes a credit number every time a data packet is transmitted, after a certain number of credit numbers are consumed, the receiving data person gives the same number of credit numbers to the transmitting data person. For example: the recipient would grant credit to the sent data=4. The sender is allowed to send 4 packets, and each time the receiver receives one packet, the number of receivable packets is equal to-1, and when the number of receivable packets is < = 2, the receiver can credit the sender again. Since the maximum receivable credit is set to 4, the recipient will send an authorized 2 new credit packets to the sender (calculation formula: newCredits = maxCredits-usedbeds, i.e. newCredits = 4-2, i.e. newCredits = 2), and the sender will continue to send packets or otherwise drop the data transmission. The sender, once the number of authorized credits is used up, is in a congestion state, and waits for the authorization of the recipient to be used, before continuing to send.
In the actual bluetooth data transmission, the interference of the external environment may occur, for example, initially, the receiving data person grants 4 credits to the sending data person, the sending data person consumes 2 credits after the data transmission is twice (generally, the receiving data person receives two data and then reissues the number of credits once), and the receiving data person is required to reissue the credit package (2 credits in one credit package) to the sending data person. When the credit packet is lost, the sender does not receive 2 new authorized credits, and the recipient considers that there are 4 credit units, but for the sender, 2 new credits are not received and the remaining available credits are only 2 due to the authorized credit packet loss, so that when the data packet or the credit packet loss occurs again, the transmission rate is reduced or even the rate is 0.
In practice, the situation of reducing the data transmission rate in the actual bluetooth data transmission process is diversified, and the countermeasures required for the reduction are different based on different situations of reducing the data transmission, so that it is also important to identify whether the reduction of the data is caused by the credit loss in the data communication process.
Disclosure of Invention
The invention aims to solve the technical problems of the prior art and provides a data communication method, electronic equipment and a storage medium.
The technical scheme adopted for solving the technical problems is as follows: a data communication method is constructed, comprising the steps of:
when the data receiving end receives data, judging the data transmission rate of the data transmission process according to the received data of the data receiving end;
when the data transmission rate is judged to be reduced, a preset number of test credits are sent to a data sending end through the data receiving end;
and acquiring the change trend of the data transmission rate, and judging that the credit is lost in the data transmission process when the data transmission rate rises.
Preferably, in the data communication method according to the present invention, the method further includes:
acquiring an RSSI value of the data receiving end so as to acquire a target data transmission rate corresponding to the data transmission process according to the RSSI value;
and acquiring the transmission rate descending degree of the data transmission rate relative to the target data transmission rate, so as to judge the credit loss number according to the transmission rate descending degree.
Preferably, in the data communication method of the present invention, the data transmission rate in the data transmission process is determined according to the received data of the data receiving end; comprising the following steps:
the method comprises the steps that received data of a data receiving end sequentially pass through a first buffer area and a second buffer area which are arranged at the data receiving end, and a first data passing rate of the received data relative to the first buffer area and a second data passing rate of the second buffer area are obtained;
and when the second data passing rate is larger than the first data passing rate and the variation value of the first data passing rate relative to the second data passing rate exceeds a preset threshold, judging that the data transmission rate is reduced.
Preferably, in the data communication method of the present invention, the data receiving end sends a preset number of test credits to the data sending end; comprising the following steps:
and acquiring the actual credit number sent by the current data receiving end to the data sending end, and increasing the credit number according to a preset proportion on the basis of the actual credit number to obtain the test credit.
Preferably, in the data communication method of the present invention, the trend of the change in the data transmission rate is obtained; comprising the following steps:
acquiring a first data transmission rate corresponding to a complete first preset time interval, and judging the change trend of the data transmission rate according to the first data transmission rate; the first preset time interval is a time period formed by taking the starting point of the test credit starting transmission time point as a starting point and taking a first preset time length as an interval.
Preferably, in the data communication method of the present invention, the trend of the change in the data transmission rate is obtained; further comprises:
stopping the transmission of the test credit from the data receiving end to the data transmitting end, and recovering the actual credit number transmitted from the data receiving end to the data transmitting end;
acquiring a second data transmission rate corresponding to a complete second preset time interval, and judging the change trend of the data transmission rate according to the first data transmission rate and the second data transmission rate; the second preset time interval is a time period formed by taking the sending stopping time point of the test credit as a starting point and taking a second preset time length as an interval.
Preferably, in the data communication method of the present invention, the trend of the change in the data transmission rate is obtained; further comprises:
repeating the process of transmitting the preset number of test credits through the data receiving terminal for preset times to obtain the corresponding data transmission rate change condition each time;
and acquiring the change trend of the data transmission rate according to all the change conditions of the data transmission rate.
Preferably, in the data communication method according to the present invention, the method further includes:
and when the change trend of the data transmission rate obtained according to the random data transmission rate change condition is not in an ascending state, recovering the data receiving end to send the actual credit number to the data sending end.
The invention also constructs an electronic device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement a method as claimed in any one of the preceding claims.
The present invention also constructs a computer storage medium having stored thereon a computer program which, when executed by a processor, implements a method as described in any of the above.
The data communication method, the electronic equipment and the storage medium have the following beneficial effects: whether the abnormality in the data communication is caused by credit loss or not can be rapidly identified, so that the rapid positioning of partial communication abnormality is realized.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flow chart of a method for communicating data according to an embodiment of the present invention;
FIG. 2 is a program flow diagram of another embodiment of a data communication method of the present invention;
fig. 3 is a program flow chart of another embodiment of a data communication method of the present invention.
Detailed Description
For a clearer understanding of technical features, objects and effects of the present invention, a detailed description of embodiments of the present invention will be made with reference to the accompanying drawings.
As shown in fig. 1, in a first embodiment of a data communication method of the present invention, the method includes the steps of: s1, when a data receiving end receives data, judging the data transmission rate of a data transmission process according to the received data of the data receiving end. Specifically, the data transmitting end generates communication data, and the data receiving end is used for receiving the communication data. Wherein the communication data may be understood as target data. When the data receiving end receives communication data, the process of receiving the communication data by the data receiving end can be judged, and the data transmission rate between the current data sending end and the data receiving end is judged according to the data receiving process of the data receiving end.
And S2, when the data transmission rate is judged to be reduced, sending a preset number of test credits to a data sending end through the data receiving end. Specifically, when it can be determined that the data transmission rate between the current data transmitting end and the data receiving end is reduced, the data receiving end may be caused to enter the credit test mode. When the data receiving end enters a credit test mode, a preset number of test credits are sent to the data sending end. The process of sending the preset number of test credits can be set according to different application scenarios, and when the test credits are sent, the data receiving end can send the preset credits, namely target credits, to the data sending end according to the previous working scenario, so that the actually sent credit data of the data receiving end can be increased when the data receiving end performs credit test.
S3, acquiring the change trend of the data transmission rate, and judging that credit loss occurs in the data transmission process when the data transmission rate rises. Specifically, in a normal case, if the current data transmission rate is decreased due to the loss of credit, the data transmission rate should be increased by adding credit, i.e., supplementing the credit of certain data. Based on this, it can be determined whether the data transmission rate drop is due to a credit loss, based on whether the data transmission rate is rising. And finally, judging whether credit loss occurs in the data transmission process. The purpose of rapidly positioning credit abnormity in the communication process is realized, and meanwhile, the automatic recovery of the data transmission rate can be realized through reissuing the credit.
As shown in fig. 2, optionally, in the data communication method of the present invention, further includes: s4, acquiring an RSSI value of the data receiving end so as to acquire a target data transmission rate corresponding to the data transmission process according to the RSSI value; s5, obtaining the transmission rate descending degree of the data transmission rate relative to the target data transmission rate, and judging the credit loss number according to the transmission rate descending degree. Specifically, when the number of credits is different, the data characteristics of the data transmission are different, wherein the difference of the data characteristics is that the data transmission rate received by the data receiving end is also different when the data transmitting end performs data communication data transmission under the condition of different numbers of credits. Meanwhile, in the data transmission process, the transmission rate is affected by the distance between the data receiving end and the data transmitting end, and the transmission rate also decreases along with the increase of the distance. At this time, the distance between the data receiving end and the data transmitting end is determined by acquiring the RSSI value between the data receiving end and the data transmitting end. For example, in one embodiment, when the RSSI value between the data receiving end and the data transmitting end is-45, the distance between the data receiving end and the data transmitting end is 1m; when the RSSI value between the data receiving end and the data transmitting end is-90, the distance between the data receiving end and the data transmitting end is 8m. At this time, the rate interval corresponding to the data characteristic changes, i.e. the data characteristics corresponding to different RSSI values are different. And when the credit is not lost, when the RSSI value between the data receiving end and the data transmitting end is-45, the data transmission rate between the data receiving end and the data transmitting end is 30kB/s, and when 2 credit data are lost, the data transmission rate can be changed to about 10kB/s, namely, the corresponding change interval based on the data characteristics is 8-12 kB/s. Under the condition that the credit is not lost, when the RSSI value between the data receiving end and the data transmitting end is-90, the data transmission rate is 10kB/s, if 2 credit data are lost, the data transmission rate is detected to be about 6kB/s, and the corresponding interval based on the data characteristics is 5-7 kB/s. Therefore, a relation between the RSSI value and the target data transmission rate can be established, and the relation between the current actual data transmission rate and the target data transmission rate is obtained, namely the transmission rate reduction degree of the data transmission rate relative to the target data transmission rate is obtained, so that the credit loss number is judged according to the transmission rate reduction degree. The determining process may be a table look-up process, that is, a relationship among each RSSI value, a target data transmission rate, a transmission rate degradation degree, and a credit loss number is obtained, and table look-up is performed based on an actual RSSI value and an actual transmission rate degradation degree to obtain an actual credit loss number. The process can be based on different application scenes to test to obtain the table relation corresponding to each scene.
Optionally, as shown in fig. 3, the data transmission rate in the data transmission process is determined according to the received data of the data receiving end; comprising the following steps: s11, enabling the received data of the data receiving end to sequentially pass through a first buffer area and a second buffer area which are arranged at the data receiving end, and acquiring a first data passing rate of the received data relative to the first buffer area and a second data passing rate of the second buffer area. And S12, judging that the data transmission rate is reduced when the second data passing rate is larger than the first data passing rate and the change value of the first data passing rate relative to the second data passing rate exceeds a preset threshold. Specifically, the detection process of the data transmission rate in the data communication process may be that, when the data receiving end receives data, two buffer areas, namely, a first buffer area and a second buffer area, are constructed for buffering a preset amount of data. For example: the first buffer area can store 10 data with speed, and calculate the average transmission speed of the data in the first buffer area. The second buffer area also stores the same number of data, namely 10 data with the same rate, and calculates the average transmission rate of the data in the second buffer area. The data of the two buffer areas are updated in a sliding way in a first-in first-out way. The data in the first buffer will slide to the second buffer. When the newly generated rate data exists, the earliest stored data of the second buffer area is discarded, namely the data positioned at the forefront, the 9 data stored later is moved forwards, the earliest stored data of the first buffer area, namely the forefront data is copied to the rearmost of the second buffer area, the earliest stored data is discarded by the first buffer area, the 9 data stored later is moved forwards, the newly generated rate data is stored in the rearmost of the first buffer area, and the change of the rate is detected dynamically in real time. And comparing the values of the two data passing rates corresponding to the two buffer areas respectively, thereby obtaining whether the transmission rate is reduced. For example, the average data passing rate of the second buffer is 30kB/s, and the average data passing rate of the first buffer is 18kB/s, which indicates that the transmission rate is reduced. It should be understood that the rate detection is real-time detection, and in the data transmission process, the rate may fluctuate, and when the fluctuation range is within a certain interval, it may be determined that the fluctuation is within a reasonable range. The data amount in the buffer area may be rate data, that is, the rate refers to the total amount of data in a unit time divided by the unit time, and by setting two counters, one counter calculates the total bytes of the data amount and the other counter calculates the time, so as to calculate the rate.
Optionally, in the data communication method of the present invention, the data receiving end sends a preset number of test credits to the data sending end; comprising the following steps: and acquiring the actual credit number sent by the current data receiving end to the data sending end, and increasing the credit number according to a preset proportion on the basis of the actual credit number to obtain the test credit. Specifically, when the data receiving end enters the credit test mode, the number of credits actually sent to the data sending end by the current data receiving end, namely, the target credit number in the current data communication process, can be obtained, and the number of test credits is set according to the target credit number. The number of signals to be increased can be obtained according to a certain proportion to obtain the number of test credits. For example, the number of the reissued test credits is half of the total number of credits given to the data sending end by the current data receiving end, i.e. the number of the test credits is half of the number of the original target credits. The number of credits actually sent by the data receiving end is 1.5 times of the number of the original target signals. In a specific implementation process, for example, during normal data communication, the data receiving end grants 4 credits to the data transmitting end. In order to detect whether the credit packet is lost, the data receiving end gives 2 test credits, for example, one test credit packet to the data transmitting end, and at this time, the actual number of credits given to the data transmitting end by the data receiving end is 4+2, which is 6.
Optionally, in the data communication method of the present invention, the trend of the data transmission rate is obtained; comprising the following steps: acquiring a first data transmission rate corresponding to a complete first preset time interval, and judging the change trend of the data transmission rate according to the first data transmission rate; the first preset time interval is a time period formed by taking the starting point of the test credit starting transmission time point as a starting point and taking a first preset time length as an interval. Specifically, after the credit test is initiated, the transmission rate for a complete time period is obtained and determined as the current test rate. The complete time period is understood as that, starting from the time point when the test credit starts to be sent, the time period is divided according to a preset time interval, for example, a time period is divided every 1s, and a complete time period is obtained, for example, the data transmission rate of a complete 1s time period is obtained as the first data transmission rate. It will be appreciated that if the data transmission rate for one complete 1s period cannot be obtained, the remaining data for that period is discarded, and the data transmission rate for the next complete 1s period is obtained as the first data transmission rate. The trend of the change in the data transmission rate can be obtained according to the change in the first data transmission rate relative to the data transmission rate before the credit test.
Optionally, in the data communication method of the present invention, the trend of the data transmission rate is obtained; further comprises: stopping the transmission of the test credit from the data receiving end to the data transmitting end, and recovering the actual credit number transmitted from the data receiving end to the data transmitting end; acquiring a second data transmission rate corresponding to a complete second preset time interval, and judging the change trend of the data transmission rate according to the first data transmission rate and the second data transmission rate; the second preset time interval is a time period formed by taking the sending stopping time point of the test credit as a starting point and taking a second preset time length as an interval. Specifically, the test credit sending can be stopped, and the actual credit number is returned to be sent to the data sending end through the data receiving end, so that the transmission rate of a complete time period at the moment is obtained, and the current test rate is determined. The complete time period is understood to be that, starting from the time point when the test credit stops being sent, the time period is divided according to a preset time interval, for example, a time period is divided every 1s, and a complete time period is obtained, for example, the data transmission rate of a complete 1s time period is obtained as the second data transmission rate. It will be appreciated that if a complete 1s period of data transmission rate cannot be obtained, the remaining data for that period is discarded and the next complete 1s period of data transmission rate is obtained as the second data transmission rate. The second data transfer rate may be compared to the data characteristic. In the time sequence, the time for issuing the instruction in the credit test is not fixed and may exist at any time point, so that when the credit test is performed, the time point for issuing the instruction is not a complete 1s time period from the next second node, and a part of data between the time point for issuing the instruction and the next second node needs to be discarded, so that the transmission data in the test is ensured to be effective in a complete 1s time period. The method has the characteristics of high calculation speed and high response speed. After the second data transmission rate is obtained, the second data transmission rate may be compared with the first data transmission rate to further verify the trend of the data transmission rate during the credit test. If the credit is lost, the first data transmission rate is increased relative to the initial data transmission rate by supplementing the test credit. When the normal signal is restored, the second data transmission rate is a decreasing trend relative to the first data transmission rate. The second data transmission rate also corresponds to the initial data transmission rate.
In an embodiment, the average test value after the data rate of the first buffer is updated completely may also be used as the test rate in the credit test and the obtained data transmission rate in the normal data communication process.
According to a specific application environment, the credit mechanism can be triggered only when the data receiving end detects that the data transmission rate is 0, so that false triggering caused by rate reduction due to other factors is overcome, and the detection correction accuracy is improved. When the transmission rate is 0, the credit test is also performed by the same method as above.
Optionally, in the data communication method of the present invention, the trend of the data transmission rate is obtained; further comprises: repeating the process of transmitting the preset number of test credits through the data receiving terminal for preset times to obtain the corresponding data transmission rate change condition each time; and acquiring the change trend of the data transmission rate according to all the change conditions of the data transmission rate. Specifically, the credit test can be performed for multiple times, and the normal data transmission process is restored after each credit test, so as to obtain multiple data change trends to judge whether credit loss occurs in the data transmission process.
Further, when the obtained trend of the data transmission rate according to the random data transmission rate change condition is not in the ascending state, the data receiving end is restored to send the actual credit number to the data sending end. Specifically, when the credit loss cannot be determined once, that is, the data transmission rate change trend is not the expected change trend, it can be determined that no credit loss abnormality exists in the current data communication process, that is, it is determined that the occurrence of the data transmission rate drop is not the rate drop caused by the credit packet loss, the credit test process is ended, and the data receiving end resumes the sending of the target credit number to the data sending end. The method has the advantages that data transmission is always performed, the condition of data transmission suspension does not occur, and the test is performed in real time. In order to ensure the identification accuracy, each round of credit test needs to identify a process of transmitting test credit when the rate rises once and a process of ending transmitting test credit when the rate drops once, and any time the actual value does not accord with the expected value, the credit test is stopped and the credit number is restored to the number before the test, so that the data overflow caused by forgetting credit recovery is prevented.
In addition, the electronic device of the invention can also comprise a memory and a processor; the memory is used for storing a computer program; the processor is configured to execute the computer program to implement the method of any of the above. In particular, according to embodiments of the present invention, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may perform the above-described functions defined in the methods of embodiments of the present invention when downloaded and installed and executed by an electronic device. The electronic equipment in the invention can be a terminal such as a notebook, a desktop, a tablet computer, a smart phone and the like, and also can be a server.
In addition, a computer storage medium of the present invention has stored thereon a computer program which, when executed by a processor, implements the method of any of the above. In particular, it should be noted that the computer readable medium of the present invention may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
It is to be understood that the above examples only represent preferred embodiments of the present invention, which are described in more detail and are not to be construed as limiting the scope of the invention; it should be noted that, for a person skilled in the art, the above technical features can be freely combined, and several variations and modifications can be made without departing from the scope of the invention; therefore, all changes and modifications that come within the meaning and range of equivalency of the claims are to be embraced within their scope.

Claims (10)

1. A method of data communication comprising the steps of:
when the data receiving end receives data, judging the data transmission rate of the data transmission process according to the received data of the data receiving end;
when the data transmission rate is judged to be reduced, a preset number of test credits are sent to a data sending end through the data receiving end;
and acquiring the change trend of the data transmission rate, and judging that the credit is lost in the data transmission process when the data transmission rate rises.
2. The data communication method according to claim 1, characterized in that the method further comprises:
acquiring an RSSI value of the data receiving end so as to acquire a target data transmission rate corresponding to the data transmission process according to the RSSI value;
and acquiring the transmission rate descending degree of the data transmission rate relative to the target data transmission rate, so as to judge the credit loss number according to the transmission rate descending degree.
3. The method according to claim 1, wherein the data transmission rate of the data transmission process is determined based on the received data at the data receiving end; comprising the following steps:
the method comprises the steps that received data of a data receiving end sequentially pass through a first buffer area and a second buffer area which are arranged at the data receiving end, and a first data passing rate of the received data relative to the first buffer area and a second data passing rate of the second buffer area are obtained;
and when the second data passing rate is larger than the first data passing rate and the variation value of the first data passing rate relative to the second data passing rate exceeds a preset threshold, judging that the data transmission rate is reduced.
4. The data communication method according to claim 1, wherein the predetermined number of test credits is transmitted to a data transmitting terminal through the data receiving terminal; comprising the following steps:
and acquiring the actual credit number sent by the current data receiving end to the data sending end, and increasing the credit number according to a preset proportion on the basis of the actual credit number to obtain the test credit.
5. The data communication method according to claim 4, wherein the acquisition of the trend of variation in the data transmission rate; comprising the following steps:
acquiring a first data transmission rate corresponding to a complete first preset time interval, and judging the change trend of the data transmission rate according to the change of the first data transmission rate relative to the data transmission rate before sending the test credit; the first preset time interval is a time period formed by taking the starting point of the test credit starting transmission time point as a starting point and taking a first preset time length as an interval.
6. The data communication method according to claim 5, wherein the acquisition of the trend of variation of the data transmission rate; further comprises:
stopping the transmission of the test credit from the data receiving end to the data transmitting end, and recovering the actual credit number transmitted from the data receiving end to the data transmitting end;
acquiring a second data transmission rate corresponding to a complete second preset time interval, and judging the change trend of the data transmission rate according to the first data transmission rate and the second data transmission rate; the second preset time interval is a time period formed by taking the sending stopping time point of the test credit as a starting point and taking a second preset time length as an interval.
7. The data communication method according to claim 4, wherein the acquisition of the trend of variation in the data transmission rate; further comprises:
repeating the process of transmitting the preset number of test credits through the data receiving terminal for preset times to obtain the corresponding data transmission rate change condition each time;
and acquiring the change trend of the data transmission rate according to all the change conditions of the data transmission rate.
8. The method of data communication according to claim 7, wherein the method further comprises:
and when the change trend of the data transmission rate obtained according to the random data transmission rate change condition is not in an ascending state, recovering the data receiving end to send the actual credit number to the data sending end.
9. An electronic device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the method of any one of claims 1 to 8.
10. A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1 to 8.
CN202311845114.1A 2023-12-29 2023-12-29 Data communication method, electronic equipment and storage medium Active CN117499980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311845114.1A CN117499980B (en) 2023-12-29 2023-12-29 Data communication method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311845114.1A CN117499980B (en) 2023-12-29 2023-12-29 Data communication method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117499980A CN117499980A (en) 2024-02-02
CN117499980B true CN117499980B (en) 2024-03-12

Family

ID=89671230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311845114.1A Active CN117499980B (en) 2023-12-29 2023-12-29 Data communication method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117499980B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110808884A (en) * 2019-11-20 2020-02-18 中国人民解放军国防科技大学 Network congestion control method
WO2023179538A1 (en) * 2022-03-23 2023-09-28 维沃移动通信有限公司 Data transmission method and apparatus, electronic device, and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7072299B2 (en) * 2001-08-20 2006-07-04 International Business Machines Corporation Credit-based receiver using selected transmit rates and storage thresholds for preventing under flow and over flow-methods, apparatus and program products
US7952998B2 (en) * 2007-01-10 2011-05-31 International Business Machines Corporation InfiniBand credit-less flow control for long distance links
US9887927B2 (en) * 2013-10-10 2018-02-06 Brocade Communications Systems, Inc. End-to-end credit recovery
US20190104169A1 (en) * 2017-10-03 2019-04-04 Synology Inc. Methods and computer program products for transceiving files through networks and apparatuses using the same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110808884A (en) * 2019-11-20 2020-02-18 中国人民解放军国防科技大学 Network congestion control method
WO2023179538A1 (en) * 2022-03-23 2023-09-28 维沃移动通信有限公司 Data transmission method and apparatus, electronic device, and storage medium

Also Published As

Publication number Publication date
CN117499980A (en) 2024-02-02

Similar Documents

Publication Publication Date Title
US8107490B2 (en) Communication device comprising a carrier sense function and communication method
US11057400B2 (en) Device and method for detecting attack in network
US10567401B2 (en) Device and method for detecting attack in network
US11792650B2 (en) Unauthorized communication detection apparatus and recording medium
JP2012070324A (en) On-vehicle device and congestion control method
CN110677355A (en) Packet loss coping method and device, electronic equipment and storage medium
CN106656642B (en) Method, device and system for measuring round trip delay
CN109525376B (en) Fast retransmission method and device and terminal equipment
CN112929455B (en) UDP-based data transmission method, device, equipment and readable storage medium
CN109526064A (en) A kind of bypassing method of LoRaWAN channel confliction
CN113157625A (en) Data transmission method and device, terminal equipment and computer readable storage medium
CN104601521A (en) Method, device and system for dynamically selecting communication transmission protocol
US20160308663A1 (en) Method for time synchronization
JP2017526206A (en) Method and device for determining transmission buffer size
CN117499980B (en) Data communication method, electronic equipment and storage medium
CN111181664A (en) LORA device communication method, device and medium
CN109963260B (en) Method and device for determining service termination
CN110750486A (en) RDMA data stream control method, system, electronic device and readable storage medium
CN113542215B (en) Method and related device for improving streaming media transmission performance
CN106330752B (en) Method and equipment for determining receiving window in TCP flow control
CN101959297B (en) Transmission power regulating method and device for communication system
CN107249194A (en) Manage method, device and the equipment of wireless network connection
CN109347890B (en) Method, apparatus, device and medium for pseudo terminal detection
CN107592967B (en) Method and device for transmitting control frame in network, related unit and transport means
CN102791021B (en) Method and device for determining transmission power of probe

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