The content of the invention
In order to solve the above-mentioned technical problem, can the invention provides a kind of serial duplex signaling method, apparatus and computer
Storage medium is read, communication speed can be adaptively adjusted according to transmission situation.
In order to reach the object of the invention, the embodiments of the invention provide a kind of serial duplex signaling method, including:
Data are transmitted by serial mode and opposite end, and count transmission quality information;The transmission quality information is used for anti-
The situation of communication interference when reflecting transmission data;
According to the transmission quality information, communication speed is adaptively adjusted.
Alternatively, the transmission quality information includes:It is continuous to receive errors number and continuously receive correct number.
Alternatively, it is described that data are transmitted by serial mode and opposite end, and count transmission quality information and include:
Data and the corresponding check code that opposite end is sent are received by serial mode, verification is calculated according to the data received
Code, and be compared with the check code received, if inconsistent, judgement makes a mistake, and abandons the data received, continuously connects
Receive errors number and add one, continuously receive correct number and reset;If consistent, judge to receive correctly, correct instruction will be received and sent
To opposite end, continuously receive correct number and add one, the continuous errors number that receives is reset.
Alternatively, it is described to be included according to the transmission quality information, the adaptive communication speed that adjusts:
Errors number threshold value is received when the continuous reception errors number is more than, and data reception rate is not up to minimum connect
When receiving speed, receiving velocity is reduced, the continuous errors number that receives is reset;Correct number is continuously received when described more than reception correctly
Frequency threshold value, and when data reception rate is not up to highest receiving velocity, improves receiving velocity, it is clear continuously to receive correct number
Zero;Or
When the continuous reception errors number threshold value for receiving errors number and being more than current level, and data reception rate is not
When reaching minimum receiving velocity, one rank of receiving velocity is reduced;Correct number is continuously received more than current level when described
Correct frequency threshold value is received, and when data reception rate is not up to highest receiving velocity, improves one rank of receiving velocity.
Alternatively, the transmission quality information includes:Continuously transmit errors number and continuously transmit correct number.
Alternatively, it is described that data are transmitted by serial mode and opposite end, and count transmission quality information and include:
Data and corresponding check code are sent to by opposite end and timing by serial mode;If in timeout threshold time range
The reception for inside receiving opposite end transmission correctly indicates, then continuously transmits correct number and add one, continuously transmits errors number clearing;If
The reception for not receiving opposite end transmission also more than timeout threshold correctly indicates, then resends the data, continuously transmits wrong time
Number plus one, continuously transmit correct number and reset.
Alternatively, it is described to be included according to the transmission quality information, the adaptive communication speed that adjusts:
When it is described continuously transmit errors number and be more than send errors number threshold value, and data transmission rate is not up to minimum hair
During transmission rate, transmission rate is reduced, continuously transmits errors number clearing;Correct number is continuously transmitted when described more than transmission correctly
Frequency threshold value, and when data transmission rate is not up to highest transmission rate, improves transmission rate, it is clear continuously to receive correct number
Zero;Or
When the transmission errors number threshold value for continuously transmitting errors number and being more than current level, and data transmission rate is not
When reaching minimum transmission rate, one rank of transmission rate is reduced;Correct number is continuously transmitted more than current level when described
Correct frequency threshold value is sent, and when data transmission rate is not up to highest transmission rate, improves one rank of transmission rate.
The embodiment of the present invention also provides a kind of serial duplex signaling device, including:Memory, processor and it is stored in storage
Following steps are realized on device and the computer program that can run on a processor, during the computing device described program:
Data are transmitted by serial mode and opposite end, and count transmission quality information;The transmission quality information is used for anti-
The situation of communication interference when reflecting transmission data;
According to the transmission quality information, communication speed is adaptively adjusted.
Alternatively, the transmission quality information includes:It is continuous to receive errors number and continuously receive correct number;The place
Reason device is also realized when performing described program:
Data and the corresponding check code that opposite end is sent are received by serial mode, verification is calculated according to the data received
Code, and be compared with the check code received, if inconsistent, judgement makes a mistake, and abandons the data received, continuously connects
Receive errors number and add one, continuously receive correct number and reset;If consistent, judge to receive correctly, correct instruction will be received and sent
To opposite end, continuously receive correct number and add one, the continuous errors number that receives is reset.
Alternatively, also realized during the computing device described program:
Errors number threshold value is received when the continuous reception errors number is more than, and data reception rate is not up to minimum connect
When receiving speed, receiving velocity is reduced, the continuous errors number that receives is reset;Correct number is continuously received when described more than reception correctly
Frequency threshold value, and when data reception rate is not up to highest receiving velocity, improves receiving velocity, it is clear continuously to receive correct number
Zero;Or
When the continuous reception errors number threshold value for receiving errors number and being more than current level, and data reception rate is not
When reaching minimum receiving velocity, one rank of receiving velocity is reduced;Correct number is continuously received more than current level when described
Correct frequency threshold value is received, and when data reception rate is not up to highest receiving velocity, improves one rank of receiving velocity.
Alternatively, the transmission quality information includes:Continuously transmit errors number and continuously transmit correct number;The place
Reason device is also realized when performing described program:
Data and corresponding check code are sent to by opposite end and timing by serial mode;If in timeout threshold time range
The reception for inside receiving opposite end transmission correctly indicates, then continuously transmits correct number and add one, continuously transmits errors number clearing;If
The reception for not receiving opposite end transmission also more than timeout threshold correctly indicates, then resends the data, continuously transmits wrong time
Number plus one, continuously transmit correct number and reset.
Alternatively, also realized during the computing device described program:
When it is described continuously transmit errors number and be more than send errors number threshold value, and data transmission rate is not up to minimum hair
During transmission rate, transmission rate is reduced, continuously transmits errors number clearing;Correct number is continuously transmitted when described more than transmission correctly
Frequency threshold value, and when data transmission rate is not up to highest transmission rate, improves transmission rate, it is clear continuously to receive correct number
Zero;Or
When the transmission errors number threshold value for continuously transmitting errors number and being more than current level, and data transmission rate is not
When reaching minimum transmission rate, one rank of transmission rate is reduced;When it is described continuously transmit correct number be more than send work as prime
Other correct frequency threshold value, and when data transmission rate is not up to highest transmission rate, improve one rank of transmission rate.
The embodiment of the present invention also provides a kind of computer-readable recording medium, is stored on the computer-readable recording medium
There is computer program, the step of serial duplex signaling method as described above is realized when the computer program is executed by processor
Suddenly.
The embodiment of the present invention includes:Data are transmitted by serial mode and opposite end, and count transmission quality information;The biography
The situation of communication interference when transmission quality information is used to reflect transmission data;According to the transmission quality information, adaptive adjustment is logical
Interrogate speed.Because transmission quality information can reflect the situation of communication interference, so in embodiments of the present invention, will can communicate
Communication speed is adjusted flexibly as decision-making foundation in the situation of interference.Further, by adaptively adjusting communication speed, into
In the case of this is not increased, solving the problems, such as that communication link is disturbed causes failure, has ensured the safety of unmanned plane, protecting makes
The property safety of user.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights
Specifically noted structure is realized and obtained in claim and accompanying drawing.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with accompanying drawing to the present invention
Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application
Feature can mutually be combined.
Can be in the computer system of such as one group computer executable instructions the flow of accompanying drawing illustrates the step of
Perform.Also, although logical order is shown in flow charts, in some cases, can be with suitable different from herein
Sequence performs shown or described step.
As shown in figure 1, the serial duplex signaling method of the embodiment of the present invention includes:
Step 101, data are transmitted by serial mode and opposite end, and counts transmission quality information;
The situation of communication interference when the transmission quality information is used to reflect transmission data, such as:By continuously receiving mistake
Communication is dry when number/continuously receive correct number, continuously transmit errors number/continuously transmits correct number reflection transmission data by mistake
Situation about disturbing:The continuous more explanation interference of reception errors number or linkup transmit errors number are more serious;On the contrary, continuous receive
Correct number or to continuously transmit the more explanation interference of correct number smaller.
Step 102, according to the transmission quality information, communication speed is adaptively adjusted.
Wherein, adaptively adjustment communication speed refers to:Communication two party can be communicated by a variety of speed, different rates
Switching be automatically performed, without the external world intervene.
Because transmission quality information can reflect the situation of communication interference, so in embodiments of the present invention, will can lead to
The situation of interference is interrogated as decision-making foundation, communication speed is adjusted flexibly.Further, by adaptively adjusting communication speed,
In the case of cost is not increased, solving the problems, such as that communication link is disturbed causes failure, has ensured the safety of unmanned plane, has protected
The property safety of user.
In one embodiment, the transmission quality information includes:It is continuous to receive errors number and continuously receive correct time
Number.
In one embodiment, step 101, data are transmitted by serial mode and opposite end, and counts transmission quality information
Including:Data and the corresponding check code that opposite end is sent are received by serial mode, check code is calculated according to the data received,
And be compared with the check code received, if inconsistent, judgement makes a mistake, and abandons the data received, continuous to receive
Errors number adds one, continuously receives correct number and resets;If consistent, judge to receive correctly, correct instruction will be received and be sent to
Opposite end, continuously receive correct number and add one, the continuous errors number that receives is reset.
In one embodiment, step 102, included according to the transmission quality information, the adaptive communication speed that adjusts:When
It is described it is continuous receive errors number and be more than receive errors number threshold value, and when data reception rate is not up to minimum receiving velocity,
Receiving velocity is reduced, the continuous errors number that receives is reset;When it is described continuously receive correct number and be more than receive correct frequency threshold value,
And data reception rate improves receiving velocity when being not up to highest receiving velocity, continuously receive correct number and reset.
For example if receiving errors number threshold value is set as 5, reach 6, and data receiver speed when continuously receiving errors number
When rate is not up to minimum receiving velocity, receiving velocity is reduced, the continuous errors number that receives is reset;Errors number is received when continuous again
6 are once had reached, and when data reception rate is not up to minimum receiving velocity, may proceed to reduce receiving velocity, by that analogy.
It is appreciated that being also same reason according to continuously receiving correct number to improve receiving velocity method, repeat no more here.
Further, in other embodiments, can also set when the continuous errors number that receives is more than or equal to reception
Errors number threshold value, and when data reception rate is not up to minimum receiving velocity, reduces receiving velocity, continuously receive errors number
Reset;Correct number is continuously received more than or equal to the correct frequency threshold value of reception when described, and data reception rate is not up to highest
During receiving velocity, receiving velocity is improved, correct number is continuously received and resets.How to set the standard compared is based on reception mistake
Frequency threshold value and the setting for receiving correct frequency threshold value, if such as errors number threshold value will be received in the program be set to 6, in fact with
It is the same that the comparative result that errors number threshold value is 5 is received in such scheme, is all continuously to receive errors number or continuous
The adjustment that speed is carried out when correct number reaches 6 is received, it can be considered that the program falls within the protection of such scheme
In the range of.
It is appreciated that receiving the setting of errors number threshold value and the correct frequency threshold value of reception can be carried out according to specific occasion
Setting, is not strict with here.
Wherein, receiving velocity can be divided into multiple ranks, when reducing receiving velocity every time, then reduce a rate level,
Until reaching minimum receiving velocity;When improving receiving velocity every time, then a rate level is improved, until reaching highest receives speed
Rate.
In another embodiment, when the continuous reception errors number threshold value for receiving errors number and being more than current level
When, the continuous errors number that receives may not necessarily be reset;When it is described continuously receive correct number more than current level reception it is correct
During frequency threshold value, continuously receiving correct number may not necessarily reset, continuous to receive errors number and continuously receive correct number use
Accumulative mode is counted, now, can (zeros data is likely to be continuous and receives mistake according to the last zeros data
Number is reset, it is also possible to is continuously to receive correct number to reset) corresponding to rank set one to receive errors number to every grade
Threshold value and the correct frequency threshold value of reception, i.e., it is that dynamic becomes that errors number threshold value is received corresponding to every grade and receives correct frequency threshold value
Change.
Wherein, step 102, included according to the transmission quality information, the adaptive communication speed that adjusts:Continuously connect when described
The reception errors number threshold value that errors number is more than current level is received, and when data reception rate is not up to minimum receiving velocity,
Reduce by one rank of receiving velocity;When the correct frequency threshold value of reception for continuously receiving correct number and being more than current level, and
When data reception rate is not up to highest receiving velocity, one rank of receiving velocity is improved.
In an application scenarios, if receiving velocity is divided into first~fifth level by rank, wherein first level is speed
Minimum rank, fifth level are speed highest rank.If the last zeros data is occurred in the continuous of third level
Receive errors number to reset, then one can be set to receive errors number threshold value and receive correct number to each corresponding level according to this
Threshold value, for example the reception errors number threshold value of third level is 5, the reception error thresholds of second level are 10, first level
It is 15 to receive error thresholds, and the correct frequency threshold value of reception of third level is 5, and the correct frequency threshold value of reception of fourth level is
10, the correct frequency threshold value of reception of fifth level is 15.If current level is third level, the continuous reception errors number is big
One rank of receiving velocity will be reduced when 5 to second level, at this moment current level is changed into second level, continuously receives mistake
Number can continue to add up, and when the continuous reception errors number is more than 10, will continue to reduce by one rank of receiving velocity
To first level.Certainly, 1 situation is added (continuously to receive mistake if there is the correct number of one-time continuous reception in second level
Number is cleared), then it can again be reset to each corresponding level and errors number threshold value and reception are received corresponding to one according to this
Correct frequency threshold value.
In one embodiment, the transmission quality information includes:Continuously transmit errors number and continuously transmit correct time
Number.
In one embodiment, step 101, data are transmitted by serial mode and opposite end, and counts transmission quality information
Including:Data and corresponding check code are sent to by opposite end and timing by serial mode;If in timeout threshold time range
The reception for receiving opposite end transmission correctly indicates, then continuously transmits correct number and add one, continuously transmits errors number clearing;It is if super
Cross timeout threshold do not receive also opposite end transmission reception correctly indicate, then resend the data, continuously transmit errors number
Add one, continuously transmit correct number and reset.
Wherein, before data and corresponding check code being sent into opposite end by serial mode, carried out according to the data
Calculate, obtain the check code, check code algorithm can use:CRC, odd-even check, code distance, Hamming check etc.,
The present invention is not specifically limited.
In one embodiment, step 102, included according to the transmission quality information, the adaptive communication speed that adjusts:When
It is described continuously transmit errors number and be more than send errors number threshold value, and when data transmission rate is not up to minimum transmission rate,
Transmission rate is reduced, continuously transmits errors number clearing;When it is described continuously transmit correct number and be more than send correct frequency threshold value,
And data transmission rate improves transmission rate when being not up to highest transmission rate, continuously receive correct number and reset.
For example if sending errors number threshold value is set as 5, reach 6 when continuously transmitting errors number, and data send speed
When rate is not up to minimum transmission rate, transmission rate is reduced, continuously transmits errors number clearing;When continuously transmitting errors number again
6 are once had reached, and when data transmission rate is not up to minimum transmission rate, may proceed to reduce transmission rate, by that analogy.
It is appreciated that being also same reason according to continuously transmitting correct number to improve transmission rate method, repeat no more here.
Further, in other embodiments, can also set when the errors number that continuously transmits is more than or equal to transmission
Errors number threshold value, and when data transmission rate is not up to minimum transmission rate, reduces transmission rate, continuously transmit errors number
Reset;Correct number is continuously transmitted more than or equal to the correct frequency threshold value of transmission when described, and data transmission rate is not up to highest
During transmission rate, transmission rate is improved, correct number is continuously transmitted and resets.How to set the standard compared is based on transmission mistake
Frequency threshold value and the setting for sending correct frequency threshold value, if such as errors number threshold value will be sent in the program be set to 6, in fact with
It is the same that the comparative result that errors number threshold value is 5 is sent in such scheme, is all to continuously transmit errors number or continuous
The adjustment that speed is carried out when correct number reaches 6 is sent, it can be considered that the program falls within the protection of such scheme
In the range of.
It is appreciated that sending the setting of errors number threshold value and the correct frequency threshold value of transmission can be carried out according to specific occasion
Setting, is not strict with here.
Wherein, transmission rate can be divided into multiple ranks, when reducing transmission rate every time, then reduce a rate level,
Until reaching minimum transmission rate;When improving transmission rate every time, then a rate level is improved, until reaching highest sends speed
Rate.
In another embodiment, when the transmission errors number threshold value for continuously transmitting errors number and being more than current level
When, continuously transmitting errors number may not necessarily reset;When it is described continuously transmit correct number more than current level transmission it is correct
During frequency threshold value, continuously receiving correct number may not necessarily reset, and be counted with accumulative mode, now, can be according to nearest
(zeros data is likely to be continuously transmits errors number clearing to zeros data, it is also possible to is to continuously transmit correct time
Number is reset) corresponding to rank set one to send errors number threshold value to every grade and send correct frequency threshold value, i.e. every grade of correspondence
Transmission errors number threshold value and to send correct frequency threshold value be dynamic change.
Wherein, step 102, included according to the transmission quality information, the adaptive communication speed that adjusts:When the continuous hair
Errors number is sent to be more than the transmission errors number threshold value of current level, and when data transmission rate is not up to minimum transmission rate,
Reduce by one rank of transmission rate;When the correct frequency threshold value of transmission for continuously transmitting correct number and being more than current level, and
When data transmission rate is not up to highest transmission rate, one rank of transmission rate is improved.
In an application scenarios, if transmission rate is divided into first~fifth level by rank, wherein first level is speed
Minimum rank, fifth level are speed highest rank.If the last zeros data is occurred in the continuous of third level
Send errors number to reset, then one can be set to send errors number threshold value and send correct number to each corresponding level according to this
Threshold value, for example the transmission errors number threshold value of third level is 5, the transmission error thresholds of second level are 10, first level
It is 15 to send error thresholds, and the correct frequency threshold value of transmission of third level is 5, and the correct frequency threshold value of transmission of fourth level is
10, the correct frequency threshold value of transmission of fifth level is 15.If current level is third level, described to continuously transmit errors number big
One rank of receiving velocity will be reduced when 5 to second level, at this moment current level is changed into second level, continuously transmits mistake
Number can continue to add up, when it is described continuously transmit errors number more than 10 when, will continue reduce by one rank of transmission rate
To first level.Certainly, 1 situation is added (to continuously transmit mistake if there is the correct number of one-time continuous transmission in second level
Number is cleared), then it can again be reset to each corresponding level and errors number threshold value and transmission are sent corresponding to one according to this
Correct frequency threshold value.
As shown in Fig. 2 the serial duplex signaling application scenarios schematic diagram of example is applied for the present invention, wherein, dual serial
Duplex signaling device is communicated using serial duplex mode, the serial duplex signaling device using one of them as local, another
As the serial duplex signaling device of opposite end, illustrated herein by taking the serial duplex signaling device of local as an example, if do not had
Special instruction, serial duplex signaling device refers both to local serial duplex signaling device in text, and the implementation process of opposite end can be with
It is local the same, repeat no more.
Serial duplex signaling device is connected with host module, and serial duplex signaling device is provided with data write-in interface sum
According to interface is read, serial duplex signaling device is by host module transmission bandwidth indication signal, informing that host module is currently adopted
Bandwidth rates, host module write data according to the bandwidth rates currently indicated to data write-in interface.When serial duplex
Communication device receives the data of opposite end transmission, when judging that data are correct, stores the data, waits host module from data read-out
Interface reads data.
Using example one
As shown in figure 3, the present invention includes following steps using the serial duplex signaling device received data packet of example one:
Step 301, data and the check code that opposite end is sent are received.
Wherein, data are generally sent and received in a manner of packet.
Step 302, check code is calculated according to the data received, and is compared with the check code received, if differing
Cause, then judge to make a mistake, perform step 303, if unanimously, judging that reception is correct, performing step 308.
Step 303, the data received are abandoned, the continuous errors number that receives adds one, continuously receives correct number and resets.
Step 304, whether the continuous errors number that receives is judged more than errors number threshold value is received, if so, performing step
305, if it is not, performing step 306.
Step 305, judge whether data reception rate reaches minimum receiving velocity, if so, performing step 306;If it is not, hold
Row step 307.
Step 306, keep current receiving velocity constant.
Wherein, errors number threshold value is received if continuously receiving errors number and being more than, and data reception rate reaches minimum and connect
Speed is received, then can be alerted, represents that transmission line is likely to occur failure, or the too strong unsuitable transmission data of interference.
Step 307, one rank of receiving velocity is reduced, the continuous errors number that receives is reset.
Step 308, wait host module to read data from data read-out interface, and correct instruction will be received and be sent to pair
End, continuously receives correct number and adds one, and the continuous errors number that receives is reset.
Step 309, judge continuously to receive whether correct number is more than the correct frequency threshold value of reception, if so, performing step
310, if it is not, performing step 306.
Step 310, judge whether data reception rate reaches highest receiving velocity, if so, step 306 is then performed, if it is not,
Then perform step 311.
Step 311, one rank of receiving velocity is improved, correct number is continuously received and resets.
Comprise the following steps as shown in figure 4, the present invention sends data using the serial duplex signaling device of example one:
Step 401, the data of host module write-in and corresponding check code are sent to opposite end and timing.
Step 402, judge that whether not receiving the reception that opposite end is sent in timeout threshold time range correctly indicates, if
It is then to perform step 403, if it is not, then performing step 408.
Step 403, the data are resend, errors number is continuously transmitted and adds one, correct number is continuously transmitted and resets.
Step 404, judge to continuously transmit whether errors number is more than transmission errors number threshold value, if so, then performing step
405, if it is not, then performing step 406.
Step 405, judge whether data transmission rate reaches minimum transmission rate, if so, step 406 is then performed, if it is not,
Then perform step 407.
Step 406, keep currently transmitted speed constant.
Wherein, errors number threshold value is sent if continuously transmitting errors number and being more than, and data transmission rate reaches minimum hair
It transmission rate, then can be alerted, represent that transmission line is likely to occur failure, or the too strong unsuitable transmission data of interference.
Step 407, one rank of transmission rate is reduced, and host module is informed by bandwidth indication signal, is continuously transmitted
Errors number is reset.
Step 408, continuously transmit correct number and add one, continuously transmit errors number clearing.
Step 409, judge to continuously transmit whether correct number is more than the correct frequency threshold value of transmission, if so, then performing step
410, if it is not, then performing step 406.
Step 410, judge whether data transmission rate reaches highest transmission rate, if so, step 406 is then performed, if it is not,
Then perform step 411.
Step 411, one rank of transmission rate is improved, and host module is informed by bandwidth indication signal, it is continuous to receive
Correct number is reset.
Using example two
As shown in figure 5, the present invention includes following steps using the serial duplex signaling device received data packet of example two:
Step 501, data and the check code that opposite end is sent are received.
Wherein, data are generally sent and received in a manner of packet.
Step 502, check code is calculated according to the data received, and is compared with the check code received, if differing
Cause, then judge to make a mistake, perform step 503, if unanimously, judging that reception is correct, performing step 508.
Step 503, the data received are abandoned, the continuous errors number that receives adds one, continuously receives correct number and resets.
Step 504, the continuous reception errors number threshold value for receiving errors number and whether being more than current level is judged, if so,
Step 505 is performed, if it is not, performing step 506.
Step 505, judge whether data reception rate reaches minimum receiving velocity, if so, performing step 506;If it is not, hold
Row step 507.
Step 506, keep current receiving velocity constant.
Wherein, if continuously receiving the reception errors number threshold value that errors number is more than current level, and data reception rate
Reach minimum receiving velocity, then can be alerted, represent that transmission line is likely to occur failure, or the too strong unsuitable biography of interference
Transmission of data.
Step 507, one rank of receiving velocity is reduced.
Step 508, wait host module to read data from data read-out interface, and correct instruction will be received and be sent to pair
End, continuously receives correct number and adds one, and the continuous errors number that receives is reset.
Step 509, judge continuously to receive the correct frequency threshold value of reception whether correct number is more than current level, if so,
Step 510 is performed, if it is not, performing step 506.
Step 510, judge whether data reception rate reaches highest receiving velocity, if so, step 506 is then performed, if it is not,
Then perform step 511.
Step 511, one rank of receiving velocity is improved.
Comprise the following steps as shown in fig. 6, the present invention sends data using the serial duplex signaling device of example two:
Step 601, the data of host module write-in and corresponding check code are sent to opposite end and timing.
Step 602, judge that whether not receiving the reception that opposite end is sent in timeout threshold time range correctly indicates, if
It is then to perform step 603, if it is not, then performing step 608.
Step 603, the data are resend, errors number is continuously transmitted and adds one, correct number is continuously transmitted and resets.
Step 604, judge to continuously transmit the transmission errors number threshold value whether errors number is more than current level, if so,
Step 605 is then performed, if it is not, then performing step 606.
Step 605, judge whether data transmission rate reaches minimum transmission rate, if so, step 606 is then performed, if it is not,
Then perform step 607.
Step 606, keep currently transmitted speed constant.
Wherein, errors number threshold value is sent if continuously transmitting errors number and being more than, and data transmission rate reaches minimum hair
It transmission rate, then can be alerted, represent that transmission line is likely to occur failure, or the too strong unsuitable transmission data of interference.
Step 607, one rank of transmission rate is reduced, and host module is informed by bandwidth indication signal.
Step 608, continuously transmit correct number and add one, continuously transmit errors number clearing.
Step 609, judge to continuously transmit the correct frequency threshold value of transmission whether correct number is more than current level, if so,
Step 610 is then performed, if it is not, then performing step 606.
Step 610, judge whether data transmission rate reaches highest transmission rate, if so, step 606 is then performed, if it is not,
Then perform step 611.
Step 611, one rank of transmission rate is improved, and host module is informed by bandwidth indication signal.
In the embodiment of the present invention, by using the serial duplex signaling mode of rate adaptation, in noiseless or interference
In the case of small, communicated using high-speed, improve bandwidth, improve unmanned plane during flying quality, ensure that task high quality is carried out;In
In the case of degree interference or serious interference, communication speed is reduced, ensures master data demand, unmanned plane is ensured substantially
Safe flight and make a return voyage or start emergency measure.
It should be noted that the situation that communication is disturbed when transmission quality information is used to reflect transmission data, in above-described embodiment
In, for receiving data, transmission quality information includes:It is continuous to receive errors number and continuously receive correct number;For sending
Data, transmission quality information include continuously transmitting errors number and continuously transmit correct number.But the invention is not restricted to this, transmits
Quality information can also be represented with other information, for example, in other embodiments, for receiving data, transmission quality information can
With including:Successful receiving rate and/or reception failure rate;For sending data, transmission quality information can include sending success rate
And/or send mortality.
Wherein, successful receiving rate can be that (such as 5 minutes) receive correctly in the range of current receiving velocity lower specified time
Number divided by always receive number;Reception failure rate can be that (such as 5 minutes) connect in the range of current receiving velocity lower specified time
Receive errors number divided by always receive number.It can be (such as 5 points in the range of currently transmitted speed lower specified time to send success rate
Clock) send correct number divided by total transmission times;It can be (example in the range of currently transmitted speed lower specified time to send mortality
Such as 5 minutes) send errors number divided by total transmission times.
The embodiment of the present invention additionally provides a kind of serial duplex signaling device, and the device is used to realize above-described embodiment and reality
Mode is applied, had carried out repeating no more for explanation.
The serial duplex signaling device of the embodiment of the present invention, including:Memory, processor and storage are on a memory and can
The computer program run on a processor, following steps are realized during the computing device described program:
Data are transmitted by serial mode and opposite end, and count transmission quality information;The transmission quality information is used for anti-
The situation of communication interference when reflecting transmission data;
According to the transmission quality information, communication speed is adaptively adjusted.
In one embodiment, the transmission quality information includes:It is continuous to receive errors number and continuously receive correct time
Number.
In one embodiment, also realized during the computing device described program:
Data and the corresponding check code that opposite end is sent are received by serial mode, verification is calculated according to the data received
Code, and be compared with the check code received, if inconsistent, judgement makes a mistake, and abandons the data received, continuously connects
Receive errors number and add one, continuously receive correct number and reset;If consistent, judge to receive correctly, correct instruction will be received and sent
To opposite end, continuously receive correct number and add one, the continuous errors number that receives is reset.
In one embodiment, also realized during the computing device described program:When the continuous reception errors number
More than receiving errors number threshold value, and when data reception rate is not up to minimum receiving velocity, receiving velocity is reduced, it is continuous to receive
Errors number is reset;Correct number is continuously received more than the correct frequency threshold value of reception when described, and data reception rate is not up to
During highest receiving velocity, receiving velocity is improved, correct number is continuously received and resets.
In one embodiment, also realized during the computing device described program:When the continuous reception errors number
More than the reception errors number threshold value of current level, and when data reception rate is not up to minimum receiving velocity, reduce and receive speed
One rank of rate;When the correct frequency threshold value of reception for continuously receiving correct number and being more than current level, and data receiver is fast
When rate is not up to highest receiving velocity, one rank of receiving velocity is improved.
In one embodiment, the transmission quality information includes:Continuously transmit errors number and continuously transmit correct time
Number.
In one embodiment, also realized during the computing device described program:
Data and corresponding check code are sent to by opposite end and timing by serial mode;If in timeout threshold time range
The reception for inside receiving opposite end transmission correctly indicates, then continuously transmits correct number and add one, continuously transmits errors number clearing;If
The reception for not receiving opposite end transmission also more than timeout threshold correctly indicates, then resends the data, continuously transmits wrong time
Number plus one, continuously transmit correct number and reset.
In one embodiment, also realized during the computing device described program:
When it is described continuously transmit errors number and be more than send errors number threshold value, and data transmission rate is not up to minimum hair
During transmission rate, transmission rate is reduced, continuously transmits errors number clearing;Correct number is continuously transmitted when described more than transmission correctly
Frequency threshold value, and when data transmission rate is not up to highest transmission rate, improves transmission rate, it is clear continuously to receive correct number
Zero.
In one embodiment, also realized during the computing device described program:
When the transmission errors number threshold value for continuously transmitting errors number and being more than current level, and data transmission rate is not
When reaching minimum transmission rate, one rank of transmission rate is reduced;When it is described continuously transmit correct number be more than send work as prime
Other correct frequency threshold value, and when data transmission rate is not up to highest transmission rate, improve one rank of transmission rate.
In embodiments of the present invention, communication speed can be adjusted flexibly using the situation for communicating interference as decision-making foundation.Enter
One step, by adaptively adjusting communication speed, in the case of cost is not increased, solution communication link is disturbed to be caused to fail
The problem of, the safety of unmanned plane has been ensured, has protected the property safety of user.
The embodiment of the present invention additionally provides a kind of serial duplex signaling device, and the device is used to realize above-described embodiment and reality
Mode is applied, had carried out repeating no more for explanation.As used below, term " module " can realize the soft of predetermined function
The combination of part and/or hardware.Although device described by following examples can be realized with software, hardware, or soft
The realization of the combination of part and hardware is also what may and be contemplated.
As shown in fig. 7, the serial duplex signaling device of the embodiment of the present invention includes:
Transport module 71, for transmitting data by serial mode and opposite end, and count transmission quality information;The transmission
The situation of communication interference when quality information is used to reflect transmission data;
Adjusting module 72, for according to the transmission quality information, adaptively adjusting communication speed.
In one embodiment, the transmission quality information includes:It is continuous to receive errors number and continuously receive correct time
Number.
In one embodiment, the transport module 71, is further used for:
Data and the corresponding check code that opposite end is sent are received by serial mode, verification is calculated according to the data received
Code, and be compared with the check code received, if inconsistent, judgement makes a mistake, and abandons the data received, continuously connects
Receive errors number and add one, continuously receive correct number and reset;If consistent, judge to receive correctly, correct instruction will be received and sent
To opposite end, continuously receive correct number and add one, the continuous errors number that receives is reset.
In one embodiment, the adjusting module 72, is further used for:
Errors number threshold value is received when the continuous reception errors number is more than, and data reception rate is not up to minimum connect
When receiving speed, receiving velocity is reduced, the continuous errors number that receives is reset;
Correct number is continuously received more than the correct frequency threshold value of reception when described, and data reception rate is not up to highest and connect
When receiving speed, receiving velocity is improved, correct number is continuously received and resets.
In one embodiment, the adjusting module 72, is further used for:
When the continuous reception errors number threshold value for receiving errors number and being more than current level, and data reception rate is not
When reaching minimum receiving velocity, one rank of receiving velocity is reduced;
When the correct frequency threshold value of reception for continuously receiving correct number and being more than current level, and data reception rate is not
When reaching highest receiving velocity, one rank of receiving velocity is improved.
In one embodiment, the transmission quality information includes:Continuously transmit errors number and continuously transmit correct time
Number.
In one embodiment, the transport module 71, is further used for:
Data and corresponding check code are sent to by opposite end and timing by serial mode;If in timeout threshold time range
The reception for inside receiving opposite end transmission correctly indicates, then continuously transmits correct number and add one, continuously transmits errors number clearing;If
The reception for not receiving opposite end transmission also more than timeout threshold correctly indicates, then resends the data, continuously transmits wrong time
Number plus one, continuously transmit correct number and reset.
In one embodiment, the adjusting module 72, is further used for:
When it is described continuously transmit errors number and be more than send errors number threshold value, and data transmission rate is not up to minimum hair
During transmission rate, transmission rate is reduced, continuously transmits errors number clearing;
Correct number is continuously transmitted more than the correct frequency threshold value of transmission when described, and data transmission rate is not up to most occurred frequently
During transmission rate, transmission rate is improved, correct number is continuously received and resets.
In one embodiment, the adjusting module 72, is further used for:
When the transmission errors number threshold value for continuously transmitting errors number and being more than current level, and data transmission rate is not
When reaching minimum transmission rate, one rank of transmission rate is reduced;
When the correct frequency threshold value of transmission for continuously transmitting correct number and being more than current level, and data transmission rate is not
When reaching highest transmission rate, one rank of transmission rate is improved.
In embodiments of the present invention, communication speed can be adjusted flexibly using the situation for communicating interference as decision-making foundation.Enter
One step, by adaptively adjusting communication speed, in the case of cost is not increased, solution communication link is disturbed to be caused to fail
The problem of, the safety of unmanned plane has been ensured, has protected the property safety of user.
Embodiments of the invention additionally provide a kind of storage medium.In the present embodiment, above-mentioned storage medium can be set
It is set to the program code that storage is used to perform following steps:
S1, data are transmitted by serial mode and opposite end, and count transmission quality information;The transmission quality information is used for
The situation of communication interference during reflection transmission data;
S2, according to the transmission quality information, adaptively adjust communication speed.
In the present embodiment, above-mentioned storage medium can include but is not limited to:USB flash disk, read-only storage (ROM, Read-
Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc.
It is various can be with the medium of store program codes.
Example in the present embodiment may be referred to the example described in above-described embodiment and embodiment, and the present embodiment exists
This is repeated no more.
The present embodiment additionally provides a kind of serial duplex signaling device, and the device includes processor, and processor is used to realize
The function of above-mentioned transport module 71 and adjusting module 72, specifically, it performs following process:Transmitted by serial mode and opposite end
Data, and count transmission quality information;The situation of communication interference when the transmission quality information is used to reflect transmission data;According to
The transmission quality information, adaptively adjusts communication speed.
Obviously, those skilled in the art should be understood that the module of the above-mentioned embodiment of the present invention or step can be used and led to
Computing device realizes that they can be concentrated on single computing device, or be distributed in multiple computing device institutes group
Into network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are deposited
Storage is performed by computing device in the storage device, and in some cases, can be with different from order execution institute herein
The step of showing or describing, they are either fabricated to integrated circuit modules respectively or by the multiple modules or step in them
Suddenly single integrated circuit module is fabricated to realize.So, the embodiment of the present invention is not restricted to any specific hardware and software
With reference to.
Although disclosed herein embodiment as above, described content be only readily appreciate the present invention and use
Embodiment, it is not limited to the present invention.Technical staff in any art of the present invention, taken off not departing from the present invention
On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation
Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.