CN114244750A - RS485 communication circuit system based on mobile terminal TYPEC interface - Google Patents

RS485 communication circuit system based on mobile terminal TYPEC interface Download PDF

Info

Publication number
CN114244750A
CN114244750A CN202210062953.5A CN202210062953A CN114244750A CN 114244750 A CN114244750 A CN 114244750A CN 202210062953 A CN202210062953 A CN 202210062953A CN 114244750 A CN114244750 A CN 114244750A
Authority
CN
China
Prior art keywords
data transmission
transmission channel
pin
module
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210062953.5A
Other languages
Chinese (zh)
Other versions
CN114244750B (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 Haocheng Technology Co.,Ltd.
Original Assignee
Shenzhen Haocheng Communication 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 Haocheng Communication Technology Co ltd filed Critical Shenzhen Haocheng Communication Technology Co ltd
Priority to CN202210062953.5A priority Critical patent/CN114244750B/en
Publication of CN114244750A publication Critical patent/CN114244750A/en
Application granted granted Critical
Publication of CN114244750B publication Critical patent/CN114244750B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/083Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability for increasing network speed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/0833Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability for reduction of network energy consumption

Abstract

The invention relates to an RS485 communication circuit system based on a TYPEC interface of a mobile terminal, in particular to the technical field of electronic communication, which comprises an acquisition module, a data transmission module and a data transmission module, wherein the acquisition module is used for acquiring data transmission parameters of RS485 data of the mobile terminal in real time; the analysis module is used for carrying out data analysis on the acquired data transmission parameters, is connected with the acquisition module, and is also used for calculating a transmission channel influence coefficient W according to the data transmission parameters in a preset data test period and adjusting the transmission channel influence coefficient W according to the maximum flow Dmax of single data transmission in the test period; the control module is used for controlling the transmission process of the RS485 data of the mobile terminal according to the data analysis result and is connected with the analysis module; and the correction module is used for correcting the transmission process of the RS485 data of the mobile terminal and is connected with the control module. The invention effectively improves the safety and the transmission efficiency of the RS485 data transmission of the mobile terminal.

Description

RS485 communication circuit system based on mobile terminal TYPEC interface
Technical Field
The invention relates to the technical field of electronic communication, in particular to an RS485 communication circuit system based on a TYPEC interface of a mobile terminal.
Background
RS485 is a standard defined to balance the electrical characteristics of drivers and receivers in digital multipoint systems, defined by the telecommunications industry association and the electronics industry consortium, and digital communication networks using this standard can efficiently transmit signals under long-distance conditions and in environments where electrical noise is high. The application of the RS485 interface has been in history for decades, and covers a plurality of application fields, and industrial and civil use are mastery forces, such as being widely applied to the fields of industrial control, instruments, meters, multimedia networks, mechatronic products and the like.
In the prior art, a desktop host is mostly connected with an industrial device, data transmission between the industrial device and a cloud end is realized through a network cable, at present, RS485 data transmission is performed through connection of a mobile terminal and the industrial device, and the problems of low data transmission safety, low efficiency and the like exist.
Disclosure of Invention
Therefore, the invention provides an RS485 communication circuit system based on a TYPEC interface of a mobile terminal, which is used for overcoming the problem of low data transmission efficiency caused by the fact that the data transmission process of the RS485 mobile terminal cannot be accurately controlled in the prior art.
To achieve the above objects, the present invention provides an RS485 communication circuit system based on a TYPEC interface of a mobile terminal, comprising,
the acquisition module is used for acquiring data transmission parameters of RS485 data of the mobile terminal in real time;
the analysis module is used for carrying out data analysis on the acquired data transmission parameters, is connected with the acquisition module, is also used for calculating a transmission channel influence coefficient W according to the data transmission parameters in a preset data test period, and is used for adjusting the transmission channel influence coefficient W according to the maximum single data transmission flow Dmax in the test period, and is also used for correcting the adjusted transmission channel influence coefficient W' according to the maximum single data transmission duration Fmax in the test period;
the control module is used for controlling the transmission process of the RS485 data of the mobile terminal according to the data analysis result, is connected with the analysis module, and is also used for selecting a corresponding data transmission channel according to the corrected transmission channel influence coefficient W';
the correction module is used for correcting the transmission process of the RS485 data of the mobile terminal, is connected with the control module, and is further used for calculating a correction coefficient R in real time according to the data transmission parameters acquired in real time and correcting the influence coefficient of the transmission channel in real time according to the correction coefficient R so as to reselect the data transmission channel.
Further, when the analysis module performs data analysis, the analysis module is provided with a data test period Ta, where Ta is a preset value, and when the mobile terminal performs data transmission for the first time, the analysis module calculates a transmission channel influence coefficient W according to data transmission parameters acquired in the test period, and sets W to be 0.5 × D/D0+0.3 × E/E0+0.2 × F/F0, where D is a total data transmission flow rate in the acquired test period, D0 is a total preset data transmission flow rate, E is a data transmission frequency in the acquired test period, E0 is a preset data transmission frequency, F is a total data transmission duration in the acquired test period, and F0 is a total preset data transmission duration.
Further, when adjusting the influence coefficient W of the transmission channel, the analysis module compares the maximum single data transmission flow Dmax with the preset single data transmission flow Da in the collected test period, and adjusts the influence coefficient W of the transmission channel according to the comparison result, wherein,
when Dmax is less than or equal to Da, the analysis module does not adjust;
when Dmax > Da, the analysis module adjusts the transmission channel influence coefficient to W ', sets W' ═ W + W × (Dmax-Da)/Dmax.
Further, when the analysis module corrects the adjusted transmission channel influence coefficient, the analysis module compares the maximum single data transmission time Fmax in the collected test period with the preset single data transmission time Fa, and corrects the adjusted transmission channel influence coefficient W' according to the comparison result, wherein,
when Fmax is less than or equal to Fa, the analysis module does not carry out correction;
when Fmax > Fa, the analysis module corrects the transmission channel influence coefficient to W ", setting W ═ W '+ W' × (Fmax-Fa)/Fmax.
Further, after the analysis module finishes correcting the influence coefficient of the transmission channel, the control module compares the corrected influence coefficient W' of the transmission channel with each preset influence coefficient of the transmission channel, and adjusts the data transmission channel of the RS485 data according to the comparison result, wherein,
when W is less than or equal to W1, the control module takes the first preset channel as a data transmission channel;
when W1 is more than or equal to W2, the control module takes a second preset channel as a data transmission channel;
when W is more than W2, the control module takes a third preset channel as a data transmission channel;
wherein, W1 is the first predetermined transmission channel influence coefficient, W2 is the second predetermined transmission channel influence coefficient, W1 < W2.
Further, after the control module determines the data transmission channel, the correction module corrects the data transmission channel according to the data transmission parameters acquired in real time, the correction module is provided with a correction coefficient R, and R is set to be 0.5 × Ds/Δ D +0.5 × Fs/. DELTA.f, where Ds is the single data transmission flow acquired in real time, Δ D is the average value of the single data transmission flow in the test period, Δ D is D/s, s is the data transmission frequency in the test period, Fs is the single data transmission duration acquired in real time, Δ F is the average value of the single data transmission duration in the test period, and Δ F is F/s.
Further, when the correction module corrects the data transmission channel, the correction module compares the correction coefficient R calculated in real time with each preset correction coefficient and corrects the data transmission channel according to the comparison result, wherein,
when R is less than R1, the correction module corrects the transmission channel influence coefficient to be Ws1, sets Ws1 to be W' -X (R1-R)/R1, and reselects a data transmission channel according to the corrected transmission channel influence coefficient Ws 1;
when R1 is not less than R2, the correction module judges that data transmission is normal and does not perform correction;
when R2 is less than R, the correcting module corrects the transmission channel influence coefficient to Ws2, sets Ws2 to W "+ W" × (R-R2)/R, and reselects the data transmission channel according to the corrected transmission channel influence coefficient Ws 2;
wherein R1 is a first preset correction coefficient, R2 is a second preset correction coefficient, and R1 is less than R2.
Further, the RS485 communication circuit includes,
the CPU module is used for controlling the receiving and sending of RS485 data and is provided with a serial port receiving pin RX, a general input and output pin GPIO and a serial port transmitting pin TX;
the electronic device comprises a level conversion unit, a power supply, a CPU module and a power supply module, wherein the level conversion unit is provided with PINs PIN1-12, the PINs PIN1, PIN2 and PIN8 of the level conversion unit are all connected with the power supply, the PIN7 of the level conversion unit is connected with the ground, the PIN3 of the level conversion unit is connected with a serial port receiving PIN RX of the CPU module, the PIN4 of the level conversion unit is connected with a general input and output PIN GPIO of the CPU module, and the PIN6 of the level conversion unit is connected with a serial port transmitting PIN TX of the CPU module;
the transceiver unit is used for receiving and transmitting RS485 data and is provided with PINs of PIN1-8, wherein a PIN1 PIN of the transceiver unit is connected with a PIN12 PIN of the level conversion unit, PIN2 and PIN3 PINs of the transceiver unit are both connected with a PIN11 PIN of the level conversion unit, a PIN4 PIN of the transceiver unit is connected with a PIN9 PIN of the level conversion unit, a PIN5 PIN of the transceiver unit is connected with a PIN7 PIN of the level conversion unit, a PIN8 PIN of the transceiver unit is connected with a PIN1 PIN of the level conversion unit, and meanwhile, the PIN8 PIN of the transceiver unit is also connected with a power supply;
connector element for be connected with the external world, it is equipped with PIN foot SBU1, PIN foot SBU2 and public terminal GND, connector element's PIN foot SBU1 with transceiver element's PIN7 foot is connected, connector element's PIN foot SBU2 with transceiver element's PIN6 foot is connected, connector element's public terminal GND with transceiver element's PIN5 foot is connected.
Further, when receiving RS485 data, the CPU module sets the voltage level of the GPIO PIN connected to the PIN4 of the level shifter unit to C1, and when sending RS485 data, the CPU module sets the voltage level of the GPIO PIN connected to the PIN4 of the level shifter unit to C2, where C1 is a first preset voltage level, C2 is a second preset voltage level, and C1 < C2.
Further, the connector unit further comprises PINs a1-a12 and PINs B1-B12, wherein PINs a1, a12, B1 and B12 of the connector unit are connected with PIN5 PIN of the transceiver unit, PIN A8 of the connector unit is connected with PIN7 PIN of the transceiver unit, and PIN B8 of the connector unit is connected with PIN6 PIN of the transceiver unit.
Compared with the prior art, the system has the advantages that the system is applied to the mobile terminal to monitor the RS485 data transmission process of the mobile terminal, and the data transmission channel meeting the requirements is selected through accurate data analysis, so that the data loss and loss caused when the RS485 data is transmitted to the cloud end through a mobile phone are avoided, the safety of the RS485 data transmission of the mobile terminal is improved, the data transmission efficiency is improved, the analysis module is internally provided with a test period, the data transmission is accurately analyzed in the test period, the transmission channel meeting the requirements is selected for data transmission, the data transmission efficiency is improved, the analysis module is provided with a transmission channel influence coefficient W, the authenticity and the validity of a calculation result can be effectively ensured through calculation according to the data transmission parameters in the test period, the accuracy of selecting the transmission channel is further ensured, and therefore the data transmission efficiency is improved. .
Particularly, after the analysis module completes the calculation of the influence coefficient of the transmission channel, the analysis module also adjusts the influence coefficient of the transmission channel according to the maximum flow Dmax of single data transmission in the test period, if the maximum flow Dmax is within the preset value, the analysis module does not adjust the influence coefficient of the transmission channel, if the maximum flow Dmax is greater than the preset value, the adjusted influence coefficient of the transmission channel is calculated according to the difference value between the maximum flow Dmax and the preset value, so as to increase the influence coefficient of the transmission channel, improve the accuracy of the selection of the transmission channel, further improve the safety and the efficiency of data transmission, meanwhile, after the adjustment is completed, the analysis module also corrects the adjusted influence coefficient of the transmission channel according to the maximum time length fmx of single data transmission in the test period, if the maximum flow is within the preset value, the analysis module does not correct the influence coefficient of the transmission channel, if the maximum flow is greater than the preset value, the corrected influence coefficient of the transmission channel is calculated according to the difference value between the maximum time length fmx and the preset value, the influence coefficient of the transmission channel is increased, the accuracy of the influence coefficient of the transmission channel is further improved, the accuracy of selecting the data transmission channel is improved, and the safety and the efficiency of data transmission are further improved.
In particular, after the control module determines the data transmission channel according to the data transmission parameters in the test period, the correction module corrects the data transmission channel in real time according to the real-time data transmission parameters so as to further improve the accuracy of selecting the data transmission channel, thereby improving the safety and efficiency of data transmission, the correction module calculates the correction coefficient R according to the real-time data transmission parameters, and comparing the calculated correction coefficient R with a preset value, correcting the data transmission channel according to the comparison result, and when the correction coefficient R is smaller than the preset value, the data transmission channel is reselected by decreasing the transmission channel influence coefficient, and the data transmission channel is reselected by increasing the transmission channel influence coefficient when the transmission channel influence coefficient is larger than a preset value, therefore, the accuracy of selecting the data transmission channel is improved, and the safety and the efficiency of data transmission are further improved.
Drawings
Fig. 1 is a schematic structural diagram of an RS485 communication circuit based on a TYPEC interface of a mobile terminal according to the embodiment;
fig. 2 is a schematic diagram illustrating a pin network definition of a TYPEC interface of the connector unit according to the embodiment;
fig. 3 is a schematic structural diagram of an RS485 communication circuit system based on a TYPEC interface of the mobile terminal according to the embodiment.
Detailed Description
In order that the objects and advantages of the invention will be more clearly understood, the invention is further described below with reference to examples; it should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and do not limit the scope of the present invention.
Furthermore, it should be noted that, in the description of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
Referring to fig. 1, it is a schematic structural diagram of an RS485 communication circuit based on a TYPEC interface of a mobile terminal according to the embodiment, the circuit includes,
the CPU module is used for controlling the receiving and sending of RS485 data and is provided with a serial port receiving pin RX, a general input and output pin GPIO and a serial port transmitting pin TX;
the electronic device comprises a level conversion unit, a power supply, a CPU module and a power supply module, wherein the level conversion unit is provided with PINs PIN1-12, the PINs PIN1, PIN2 and PIN8 of the level conversion unit are all connected with the power supply, the PIN7 of the level conversion unit is connected with the ground, the PIN3 of the level conversion unit is connected with a serial port receiving PIN RX of the CPU module, the PIN4 of the level conversion unit is connected with a general input and output PIN GPIO of the CPU module, and the PIN6 of the level conversion unit is connected with a serial port transmitting PIN TX of the CPU module;
the transceiver unit is used for receiving and transmitting RS485 data and is provided with PINs of PIN1-8, wherein a PIN1 PIN of the transceiver unit is connected with a PIN12 PIN of the level conversion unit, PIN2 and PIN3 PINs of the transceiver unit are both connected with a PIN11 PIN of the level conversion unit, a PIN4 PIN of the transceiver unit is connected with a PIN9 PIN of the level conversion unit, a PIN5 PIN of the transceiver unit is connected with a PIN7 PIN of the level conversion unit, a PIN8 PIN of the transceiver unit is connected with a PIN1 PIN of the level conversion unit, and meanwhile, the PIN8 PIN of the transceiver unit is also connected with a power supply;
connector element for be connected with the external world, it is equipped with PIN foot SBU1, PIN foot SBU2 and public terminal GND, connector element's PIN foot SBU1 with transceiver element's PIN7 foot is connected, connector element's PIN foot SBU2 with transceiver element's PIN6 foot is connected, connector element's public terminal GND with transceiver element's PIN5 foot is connected.
Specifically, when receiving RS485 data, the CPU module sets the voltage level of the GPIO PIN connected to the PIN4 of the level shifter unit to C1, and when sending RS485 data, the CPU module sets the voltage level of the GPIO PIN connected to the PIN4 of the level shifter unit to C2, where C1 is a first preset voltage level, C2 is a second preset voltage level, and C1 < C2. In this embodiment, the CPU module controls the receiving and sending of the RS485 data by controlling the voltage level of the GPIO pin, reduces the voltage level of the GPIO pin when receiving the RS485 data, and increases the voltage level of the GPIO pin when sending the RS485 data.
Specifically, in this embodiment the circuit is applied to mobile terminal, mobile terminal includes equipment such as cell-phone, panel computer to be connected with industrial equipment through mobile terminal TYPEC interface, utilize mobile terminal's wireless network and RS485 function to realize the RS485 data transmission between high in the clouds and the industrial equipment, thereby improve industrial equipment RS485 data transmission's real-time and convenience, thereby improve data transmission efficiency.
Please refer to fig. 2, which is a schematic diagram illustrating a PIN network definition of a TYPEC interface of a connector unit of this embodiment, the connector unit includes PINs a1-a12 and PINs B1-B12, wherein PINs a1, a12, B1 and B12 of the connector unit are connected to PIN5 PIN of the transceiver unit, PIN A8 of the connector unit is connected to PIN7 PIN of the transceiver unit, and PIN B8 of the connector unit is connected to PIN6 PIN of the transceiver unit.
Referring to fig. 3, it is a schematic structural diagram of an RS485 communication circuit system based on a TYPEC interface of a mobile terminal according to this embodiment, the system includes,
the data transmission parameters comprise single data transmission flow, data transmission frequency, single data transmission duration, total data transmission flow and total data transmission duration, and the data transmission frequency is the data transmission times in unit time;
the analysis module is used for carrying out data analysis on the acquired data transmission parameters and is connected with the acquisition module;
the control module is used for controlling the transmission process of the RS485 data of the mobile terminal according to the data analysis result and is connected with the analysis module;
and the correction module is used for correcting the transmission process of the RS485 data of the mobile terminal and is connected with the control module.
Specifically, the system in this embodiment is applied to the mobile terminal to monitor the RS485 data transmission process of the mobile terminal, and select the data transmission channel meeting the requirement through accurate data analysis, thereby avoiding data loss and loss caused when the RS485 data is transmitted to the cloud end through the mobile phone, and improving the security of RS485 data transmission of the mobile terminal, so as to improve the data transmission efficiency.
Specifically, when the analysis module performs data analysis, the analysis module is provided with a data test period Ta, where Ta is a preset value, and when the mobile terminal performs data transmission for the first time, the analysis module calculates a transmission channel influence coefficient W according to data transmission parameters acquired in the test period, and sets W to be 0.5 × D/D0+0.3 × E/E0+0.2 × F/F0, where D is a total data transmission flow rate in the acquired test period, D0 is a preset data total transmission flow rate, E is a data transmission frequency in the acquired test period, E0 is a preset data transmission frequency, F is a total data transmission duration in the acquired test period, and F0 is a preset data total transmission duration.
Specifically, in this embodiment, a test period is provided in the analysis module, and the data transmission is accurately analyzed in the test period to select a transmission channel satisfying requirements for data transmission, so as to improve the data transmission efficiency. It can be understood that, in this embodiment, the transmission channel of the test period is not limited, and the data transmission channel can be freely set in the test period, but it should be noted that, different data transmission channels have different capacities, and a data transmission channel with a larger capacity should be set as the data transmission channel in the test period, so as to ensure that no data is lost in the data transmission process in the test period, thereby ensuring the test accuracy, and further improving the data transmission security and efficiency.
Specifically, after calculating the influence coefficient W of the transmission channel, the analysis module compares the maximum single data transmission flow Dmax in the acquired test period with the preset single data transmission flow Da, and adjusts the influence coefficient W of the transmission channel according to the comparison result, wherein,
when Dmax is less than or equal to Da, the analysis module does not adjust;
when Dmax > Da, the analysis module adjusts the transmission channel influence coefficient to W ', sets W' ═ W + W × (Dmax-Da)/Dmax.
Specifically, after the transmission channel influence coefficient is adjusted, the analysis module compares the maximum single data transmission time Fmax in the acquired test period with the preset single data transmission time Fa, and corrects the adjusted transmission channel influence coefficient W' according to the comparison result, wherein,
when Fmax is less than or equal to Fa, the analysis module does not carry out correction;
when Fmax > Fa, the analysis module corrects the transmission channel influence coefficient to W ", setting W ═ W '+ W' × (Fmax-Fa)/Fmax.
Specifically, in this embodiment, after the analysis module completes the calculation of the influence coefficient of the transmission channel, the analysis module further adjusts the influence coefficient of the transmission channel according to the maximum flow Dmax of single data transmission in the test period, if the maximum flow Dmax is within the preset value, the analysis module does not adjust the influence coefficient of the transmission channel, if the maximum flow Dmax is greater than the preset value, the analysis module calculates the influence coefficient of the transmission channel after adjustment according to the difference between the maximum flow Dmax and the preset value, so as to increase the influence coefficient of the transmission channel, improve the accuracy of the influence coefficient of the transmission channel, and further improve the safety and efficiency of data transmission, meanwhile, after the adjustment, the analysis module further corrects the influence coefficient of the transmission channel after adjustment according to the maximum time Fmax of single data transmission in the test period, if the maximum time Fmax is within the preset value, the analysis module does not correct the influence coefficient of the transmission channel, if the maximum time Fmax is greater than the preset value, the influence coefficient of the transmission channel after correction is calculated according to the difference between the maximum time Fmax and the preset value, the influence coefficient of the transmission channel is increased, the accuracy of the influence coefficient of the transmission channel is further improved, the accuracy of selecting the data transmission channel is improved, and the safety and the efficiency of data transmission are further improved.
Specifically, after the analysis module finishes correcting the influence coefficient of the transmission channel, the control module compares the corrected influence coefficient W "of the transmission channel with the influence coefficients of the preset transmission channels, and adjusts the data transmission channel of the RS485 data according to the comparison result, wherein,
when W is less than or equal to W1, the control module takes the first preset channel as a data transmission channel;
when W1 is more than or equal to W2, the control module takes a second preset channel as a data transmission channel;
when W is more than W2, the control module takes a third preset channel as a data transmission channel;
wherein, W1 is the first predetermined transmission channel influence coefficient, W2 is the second predetermined transmission channel influence coefficient, W1 < W2.
Specifically, in this embodiment, the control module selects a data transmission channel according to the modified transmission channel influence coefficient, so as to ensure the security of data transmission. It can be understood that, in this embodiment, the number of the data transmission channels is not limited, and three data transmission channels are provided in this embodiment, and a person skilled in the art can set a plurality of data transmission channels for transmission selection, but when setting a plurality of transmission channels, a plurality of preset transmission channel influence coefficients should be set for data comparison, and according to the value range where the corrected transmission channel influence coefficient is located, the corresponding data transmission channel is selected for data transmission, so as to ensure the data transmission efficiency.
Specifically, after the control module determines a data transmission channel, the correction module corrects the data transmission channel according to a data transmission parameter acquired in real time, the correction module is provided with a correction coefficient R, and R is set to be 0.5 × Ds/Δ D +0.5 × Fs/. DELTA.f, where Ds is a single data transmission flow acquired in real time, Δ D is an average value of the single data transmission flow in a test period, Δ D is D/s, s is a data transmission frequency in the test period, Fs is a single data transmission duration acquired in real time, Δ F is an average value of the single data transmission duration in the test period, and Δ F is F/s.
Specifically, the correction module compares the correction coefficient R calculated in real time with each preset correction coefficient, and corrects the data transmission channel according to the comparison result, wherein,
when R is less than R1, the correction module corrects the transmission channel influence coefficient to be Ws1, sets Ws1 to be W' -X (R1-R)/R1, and reselects a data transmission channel according to the corrected transmission channel influence coefficient Ws 1;
when R1 is not less than R2, the correction module judges that data transmission is normal and does not perform correction;
when R2 is less than R, the correcting module corrects the transmission channel influence coefficient to Ws2, sets Ws2 to W "+ W" × (R-R2)/R, and reselects the data transmission channel according to the corrected transmission channel influence coefficient Ws 2;
wherein R1 is a first preset correction coefficient, R2 is a second preset correction coefficient, and R1 is less than R2.
Specifically, after the control module determines the data transmission channel according to the data transmission parameters in the test period, the correction module corrects the data transmission channel in real time according to the real-time data transmission parameters so as to further improve the accuracy of selecting the data transmission channel, thereby improving the safety and efficiency of data transmission, the correction module calculates the correction coefficient R according to the real-time data transmission parameters, and comparing the calculated correction coefficient R with a preset value, correcting the data transmission channel according to the comparison result, and when the correction coefficient R is smaller than the preset value, the data transmission channel is reselected by decreasing the transmission channel influence coefficient, and the data transmission channel is reselected by increasing the transmission channel influence coefficient when the transmission channel influence coefficient is larger than a preset value, therefore, the accuracy of selecting the data transmission channel is improved, and the safety and the efficiency of data transmission are further improved. It should be understood that, in this embodiment, no specific limitation is made on each preset correction coefficient, but the value of R1 should be less than 1, and the value of R2 should be greater than 1, and the best implementation mode is that R1 takes 0.7, and R2 takes 1.3, so as to ensure the accuracy of the correction result.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

Claims (10)

1. An RS485 communication circuit system based on a TYPEC interface of a mobile terminal is characterized by comprising,
the acquisition module is used for acquiring data transmission parameters of RS485 data of the mobile terminal in real time;
the analysis module is used for carrying out data analysis on the acquired data transmission parameters, is connected with the acquisition module, is also used for calculating a transmission channel influence coefficient W according to the data transmission parameters in a preset data test period, and is used for adjusting the transmission channel influence coefficient W according to the maximum single data transmission flow Dmax in the test period, and is also used for correcting the adjusted transmission channel influence coefficient W' according to the maximum single data transmission duration Fmax in the test period;
the control module is used for controlling the transmission process of the RS485 data of the mobile terminal according to the data analysis result, is connected with the analysis module, and is also used for selecting a corresponding data transmission channel according to the corrected transmission channel influence coefficient W';
the correction module is used for correcting the transmission process of the RS485 data of the mobile terminal, is connected with the control module, and is further used for calculating a correction coefficient R in real time according to the data transmission parameters acquired in real time and correcting the influence coefficient of the transmission channel in real time according to the correction coefficient R so as to reselect the data transmission channel.
2. The RS485 communication circuit system based on the TYPEC interface of the mobile terminal of claim 1, wherein the analysis module is configured to have a data test period Ta when performing data analysis, and the analysis module is configured to calculate a transmission channel influence coefficient W according to data transmission parameters collected during the test period when the mobile terminal performs data transmission for the first time, where W is 0.5 × D/D0+0.3 × E/E0+0.2 × F/F0, where D is a total data transmission flow rate during the collected test period, D0 is a total data transmission flow rate, E is a data transmission frequency during the collected test period, E0 is a preset data transmission frequency, F is a total data transmission duration during the collected test period, and F0 is a preset total data transmission duration.
3. The RS485 communication circuit system based on the TYPEC interface of the mobile terminal according to claim 2, wherein the analysis module compares the maximum single data transmission traffic Dmax with the preset single data transmission traffic Da in the collected test period when adjusting the transmission channel influence factor W, and adjusts the transmission channel influence factor W according to the comparison result,
when Dmax is less than or equal to Da, the analysis module does not adjust;
when Dmax > Da, the analysis module adjusts the transmission channel influence coefficient to W ', sets W' ═ W + W × (Dmax-Da)/Dmax.
4. The RS485 communication circuit system based on the TYPEC interface of the mobile terminal according to claim 3, wherein the analysis module compares the maximum single data transmission duration Fmax in the collected test period with the preset single data transmission duration Fa when modifying the adjusted transmission channel influence coefficient, and modifies the adjusted transmission channel influence coefficient W' according to the comparison result,
when Fmax is less than or equal to Fa, the analysis module does not carry out correction;
when Fmax > Fa, the analysis module corrects the transmission channel influence coefficient to W ", setting W ═ W '+ W' × (Fmax-Fa)/Fmax.
5. The RS485 communication circuit system based on the TYPEC interface of the mobile terminal according to claim 4, wherein the control module compares the modified transmission channel influence coefficient W "with each preset transmission channel influence coefficient after the modification of the transmission channel influence coefficient is completed by the analysis module, and adjusts the data transmission channel of the RS485 data according to the comparison result, wherein,
when W is less than or equal to W1, the control module takes the first preset channel as a data transmission channel;
when W1 is more than or equal to W2, the control module takes a second preset channel as a data transmission channel;
when W is more than W2, the control module takes a third preset channel as a data transmission channel;
wherein, W1 is the first predetermined transmission channel influence coefficient, W2 is the second predetermined transmission channel influence coefficient, W1 < W2.
6. The RS485 communication circuit system based on the TYPEC interface of the mobile terminal according to claim 5, wherein the control module corrects the data transmission channel according to the data transmission parameters collected in real time after determining the data transmission channel, the correction module is provided with a correction coefficient R, and R is set to be 0.5 × Ds/. DELTA.D +0.5 × Fs/. DELTA.F, where Ds is a single data transmission flow collected in real time, Δ D is an average value of the single data transmission flow in a test period, Δ D is D/s, s is a data transmission frequency in the test period, Fs is a single data transmission time collected in real time, Δ F is an average value of the single data transmission time in the test period, and Δ F is F/s.
7. The RS485 communication circuit system based on the TYPEC interface of the mobile terminal according to claim 6, wherein the correction module compares the correction coefficient R calculated in real time with each preset correction coefficient when correcting the data transmission channel, and corrects the data transmission channel according to the comparison result, wherein,
when R is less than R1, the correction module corrects the transmission channel influence coefficient to be Ws1, sets Ws1 to be W' -X (R1-R)/R1, and reselects a data transmission channel according to the corrected transmission channel influence coefficient Ws 1;
when R1 is not less than R2, the correction module judges that data transmission is normal and does not perform correction;
when R2 is less than R, the correcting module corrects the transmission channel influence coefficient to Ws2, sets Ws2 to W "+ W" × (R-R2)/R, and reselects the data transmission channel according to the corrected transmission channel influence coefficient Ws 2;
wherein R1 is a first preset correction coefficient, R2 is a second preset correction coefficient, and R1 is less than R2.
8. The mobile terminal TYPEC interface-based RS485 communication circuitry according to any of claims 1-7, wherein the RS485 communication circuitry comprises,
the CPU module is used for controlling the receiving and sending of RS485 data and is provided with a serial port receiving pin RX, a general input and output pin GPIO and a serial port transmitting pin TX;
the electronic device comprises a level conversion unit, a power supply, a CPU module and a power supply module, wherein the level conversion unit is provided with PINs PIN1-12, the PINs PIN1, PIN2 and PIN8 of the level conversion unit are all connected with the power supply, the PIN7 of the level conversion unit is connected with the ground, the PIN3 of the level conversion unit is connected with a serial port receiving PIN RX of the CPU module, the PIN4 of the level conversion unit is connected with a general input and output PIN GPIO of the CPU module, and the PIN6 of the level conversion unit is connected with a serial port transmitting PIN TX of the CPU module;
the transceiver unit is used for receiving and transmitting RS485 data and is provided with PINs of PIN1-8, wherein a PIN1 PIN of the transceiver unit is connected with a PIN12 PIN of the level conversion unit, PIN2 and PIN3 PINs of the transceiver unit are both connected with a PIN11 PIN of the level conversion unit, a PIN4 PIN of the transceiver unit is connected with a PIN9 PIN of the level conversion unit, a PIN5 PIN of the transceiver unit is connected with a PIN7 PIN of the level conversion unit, a PIN8 PIN of the transceiver unit is connected with a PIN1 PIN of the level conversion unit, and meanwhile, the PIN8 PIN of the transceiver unit is also connected with a power supply;
connector element for be connected with the external world, it is equipped with PIN foot SBU1, PIN foot SBU2 and public terminal GND, connector element's PIN foot SBU1 with transceiver element's PIN7 foot is connected, connector element's PIN foot SBU2 with transceiver element's PIN6 foot is connected, connector element's public terminal GND with transceiver element's PIN5 foot is connected.
9. The mobile terminal TYPEC interface based RS485 communication circuitry according to claim 8, characterized in that said CPU module when receiving RS485 data sets the voltage level of said general purpose input and output PIN GPIO connected to PIN4 of said level shifter unit to C1, and when sending RS485 data sets the voltage level of said general purpose input and output PIN GPIO connected to PIN4 of said level shifter unit to C2, where C1 is a first preset voltage level, C2 is a second preset voltage level, and C1 < C2.
10. The mobile terminal TYPEC interface-based RS485 communication circuitry according to claim 8, characterized in that said connector unit further comprises PINs a1-a12 and PINs B1-B12, wherein PINs a1, a12, B1 and B12 of said connector unit are connected with PIN5 PIN of said transceiver unit, PIN A8 of said connector unit is connected with PIN7 PIN of said transceiver unit, and PIN B8 of said connector unit is connected with PIN6 PIN of said transceiver unit.
CN202210062953.5A 2022-01-20 2022-01-20 RS485 communication circuit system based on TYPE EC interface of mobile terminal Active CN114244750B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210062953.5A CN114244750B (en) 2022-01-20 2022-01-20 RS485 communication circuit system based on TYPE EC interface of mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210062953.5A CN114244750B (en) 2022-01-20 2022-01-20 RS485 communication circuit system based on TYPE EC interface of mobile terminal

Publications (2)

Publication Number Publication Date
CN114244750A true CN114244750A (en) 2022-03-25
CN114244750B CN114244750B (en) 2023-09-05

Family

ID=80746917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210062953.5A Active CN114244750B (en) 2022-01-20 2022-01-20 RS485 communication circuit system based on TYPE EC interface of mobile terminal

Country Status (1)

Country Link
CN (1) CN114244750B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120171965A1 (en) * 2010-12-31 2012-07-05 Chu-Ping Shen Anti-Interference and Anti-Piracy Methods For Improving Stability of RF Signals for Two-Way Remote Control System
WO2015092307A1 (en) * 2013-12-19 2015-06-25 Oberthur Technologies Method for testing and updating the system of a terminal by means of a subscriber identity module and associated devices
CN110177091A (en) * 2019-05-20 2019-08-27 广西电网有限责任公司电力科学研究院 Realize the multiple services system and method for equipment for monitoring power quality
CN110766926A (en) * 2019-09-26 2020-02-07 重庆溢希恩真节能电力设备有限公司 Wireless data acquisition and monitoring system for stamping equipment
CN111756600A (en) * 2020-06-24 2020-10-09 厦门长江电子科技有限公司 Multi-communication system and method for realizing multiple switch test machines
CN112165415A (en) * 2020-04-26 2021-01-01 北京航天科颐技术有限公司 1553B bus control equipment, control system and control method
DE102019123146A1 (en) * 2019-08-29 2021-03-04 WAGO Verwaltungsgesellschaft mit beschränkter Haftung DIAGNOSTICS AND / OR PARAMETER DATA TRANSFER BETWEEN CONTROL MODULE AND INPUT / OUTPUT MODULE
CN112714190A (en) * 2021-01-28 2021-04-27 百科荣创(山东)科技发展有限公司 Internet of things communication system
CN113777423A (en) * 2021-08-19 2021-12-10 武汉铁路职业技术学院 Test system based on electric automation equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120171965A1 (en) * 2010-12-31 2012-07-05 Chu-Ping Shen Anti-Interference and Anti-Piracy Methods For Improving Stability of RF Signals for Two-Way Remote Control System
WO2015092307A1 (en) * 2013-12-19 2015-06-25 Oberthur Technologies Method for testing and updating the system of a terminal by means of a subscriber identity module and associated devices
CN110177091A (en) * 2019-05-20 2019-08-27 广西电网有限责任公司电力科学研究院 Realize the multiple services system and method for equipment for monitoring power quality
DE102019123146A1 (en) * 2019-08-29 2021-03-04 WAGO Verwaltungsgesellschaft mit beschränkter Haftung DIAGNOSTICS AND / OR PARAMETER DATA TRANSFER BETWEEN CONTROL MODULE AND INPUT / OUTPUT MODULE
CN110766926A (en) * 2019-09-26 2020-02-07 重庆溢希恩真节能电力设备有限公司 Wireless data acquisition and monitoring system for stamping equipment
CN112165415A (en) * 2020-04-26 2021-01-01 北京航天科颐技术有限公司 1553B bus control equipment, control system and control method
CN111756600A (en) * 2020-06-24 2020-10-09 厦门长江电子科技有限公司 Multi-communication system and method for realizing multiple switch test machines
CN112714190A (en) * 2021-01-28 2021-04-27 百科荣创(山东)科技发展有限公司 Internet of things communication system
CN113777423A (en) * 2021-08-19 2021-12-10 武汉铁路职业技术学院 Test system based on electric automation equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
P. VISCONTI ET AL: ""Monitoring system of thermo-solar plant based on touch-screen interface manageable locally by PC and remotely by Android-based mobile devices"", 《2015 IEEE WORKSHOP ON ENVIRONMENTAL, ENERGY, AND STRUCTURAL MONITORING SYSTEMS (EESMS) PROCEEDINGS》 *
鲁刚强;王万岗;冉会中;李林;: "一种RS485总线通讯终端的设计", 中国农机化学报, no. 05 *

Also Published As

Publication number Publication date
CN114244750B (en) 2023-09-05

Similar Documents

Publication Publication Date Title
EP2433442B1 (en) Automatic detection of erroneous connections between antenna ports and radio frequency paths
CA2869097C (en) System and method for power control in mimo systems
US7447260B2 (en) Equalizer, equalization method, and transmitter
EP1879389A2 (en) Method and apparatus for automatic compensation of video signal losses from transmission over conductors
EP3041297B1 (en) Method and device for adjusting sending power
CN102223208B (en) The optimization method and device of the signal quality parameter of high-speed serial channel
CN114244750A (en) RS485 communication circuit system based on mobile terminal TYPEC interface
US7313197B2 (en) Data transceiver and method for transceiving data performing equalization and pre-emphasis adaptive to transmission characteristics of receiving part
JP2011228826A (en) Interface device
CN101068122B (en) Multi-switch-in terminal maximum transmission power obtaining method
CN107359942B (en) Method and apparatus for generating a signal
US8494034B2 (en) Communication device and communication system
US10812190B1 (en) Active optical cable (AOC) device and operation control method thereof
US7477704B1 (en) Digital signal detection for high speed signaling systems
CN103262451B (en) Optical communication apparatus
KR20210028816A (en) Active Optical Cable Device for One-way optical communication
CN106332139B (en) Wireless access equipment detection method and system
US20150365262A1 (en) Electrical dispersion compensator and tap coefficient calculation method suitably applicable thereto
US9325459B2 (en) Radio frequency communication
CN114244431B (en) Transmission parameter calibration method and optical communication equipment
CN108540171A (en) A kind of radiofrequency signal segment equalization circuit and method
CN103516409A (en) Method and device for detecting performance of multi-channel equipment
KR20210028819A (en) Active Optical Cable Device for Two-way optical communication
KR20210028821A (en) Active Optical Cable Device for One-way optical communication
KR20210028822A (en) Active Optical Cable Device for Two-way optical communication

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
CP01 Change in the name or title of a patent holder

Address after: 518000 Science Park b2-1703, 05, Kexing Science Park, 15 Keyuan Road, Central District, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Haocheng Technology Co.,Ltd.

Address before: 518000 Science Park b2-1703, 05, Kexing Science Park, 15 Keyuan Road, Central District, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN HAOCHENG COMMUNICATION TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder