CN114244750B - RS485 communication circuit system based on TYPE EC interface of mobile terminal - Google Patents

RS485 communication circuit system based on TYPE EC interface of mobile terminal Download PDF

Info

Publication number
CN114244750B
CN114244750B CN202210062953.5A CN202210062953A CN114244750B CN 114244750 B CN114244750 B CN 114244750B CN 202210062953 A CN202210062953 A CN 202210062953A CN 114244750 B CN114244750 B CN 114244750B
Authority
CN
China
Prior art keywords
data transmission
transmission channel
data
influence coefficient
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210062953.5A
Other languages
Chinese (zh)
Other versions
CN114244750A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

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 control module and a control 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 single data transmission maximum flow Dmax 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 TYPE EC interface of mobile terminal
Technical Field
The invention relates to the technical field of electronic communication, in particular to an RS485 communication circuit system based on a TYPE EC interface of a mobile terminal.
Background
RS485 is a standard defining the electrical characteristics of drivers and receivers in balanced digital multipoint systems, which is defined by the telecommunications industry association and the electronics industry association, with which digital communication networks can efficiently transmit signals under remote conditions and in environments where electronic noise is large. The application of the RS485 interface has been in decades, and a plurality of application fields are covered, and industrial and civil use is the dominant force, such as the fields of industrial control, instruments, meters, multimedia networks, electromechanical integrated products and the like.
In the prior art, a desktop host is mostly adopted to be connected with industrial equipment, data transmission between the industrial equipment and a cloud end is realized through a network cable, at present, RS485 data transmission is carried out through connection between a mobile terminal and the industrial equipment, 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 solving the problem of low data transmission efficiency caused by the fact that the RS485 data transmission process of the mobile terminal cannot be accurately controlled in the prior art.
In order to achieve the above object, the present invention provides an RS485 communication circuit system based on a type ec 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 also used for adjusting the transmission channel influence coefficient W according to the single data transmission maximum flow Dmax in the test period, and is also used for correcting the adjusted transmission channel influence coefficient W' according to the single data transmission maximum 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 also used for calculating a correction coefficient R in real time according to the data transmission parameters acquired in real time, correcting the influence coefficient of the transmission channel in real time according to the correction coefficient R, and reselecting the data transmission channel;
when the analysis module performs data analysis, the analysis module is provided with a data test period Ta, ta is a preset value, 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=0.5xD/D0+0.3xE/E0+0.2xF/F0, wherein D is the total data transmission flow in the acquired test period, D0 is the preset data total transmission flow, E is the data transmission frequency in the acquired test period, E0 is the preset data transmission frequency, F is the total data transmission duration in the acquired test period, and F0 is the preset total data transmission duration.
Further, when the analysis module adjusts the transmission channel influence coefficient W, comparing the acquired single-time data transmission maximum flow Dmax with the preset single-time data transmission flow Da in the test period, and adjusting the transmission channel influence coefficient 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 ', setting W' =w+w× (Dmax-Da)/Dmax.
Further, when the analysis module corrects the adjusted transmission channel influence coefficient, comparing the acquired maximum time Fmax of single data transmission in the test period with the preset single data transmission time Fa, correcting 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 correct;
when Fmax > Fa, the analysis module corrects the transmission channel influence coefficient to W ", setting W" =w '+w' × (Fmax-Fa)/Fmax.
Further, after the correction of the transmission channel influence coefficient is completed, the control module compares the corrected transmission channel influence coefficient W' with each preset transmission channel influence coefficient, adjusts the data transmission channel of the RS485 data according to the comparison result,
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 less than W and less than or equal to W2, the control module takes the 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 a first preset transmission channel influence coefficient, W2 is a second preset transmission channel influence coefficient, and W1 is less than 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=0.5 xds/+Δd+0.5xfs/Δf is set, 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=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=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,
when R is smaller than R1, the correction module corrects the transmission channel influence coefficient to Ws1, ws1=W '-W' -X (R1-R)/R1 is set, and the data transmission channel is selected again according to the corrected transmission channel influence coefficient Ws 1;
when R1 is more than or equal to R2, the correction module judges that data transmission is normal and correction is not performed;
when R2 is less than R, the correction module corrects the transmission channel influence coefficient to Ws2, sets Ws2=W "+W" × (R-R2)/R, and reselects a 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 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 system comprises a level conversion unit, a power supply and a power supply, wherein the level conversion unit is provided with PIN1-12 PINs, the PIN1 PIN, the PIN2 PIN and the PIN8 PIN of the level conversion unit are all connected with the power supply, the PIN7 PIN of the level conversion unit is connected with the ground, the PIN3 PIN of the level conversion unit is connected with a serial port receiving PIN RX of a CPU module, the PIN4 PIN of the level conversion unit is connected with a general input and output PIN GPIO of the CPU module, and the PIN6 PIN 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 1-8, wherein PIN1 of the transceiver unit is connected with PIN12 of the level conversion unit, PIN2 of the transceiver unit and PIN3 of the transceiver unit are connected with PIN11 of the level conversion unit, PIN4 of the transceiver unit is connected with PIN9 of the level conversion unit, PIN5 of the transceiver unit is connected with PIN7 of the level conversion unit, PIN8 of the transceiver unit is connected with PIN1 of the level conversion unit, and meanwhile PIN8 of the transceiver unit is also connected with a power supply;
the connector unit is used for being connected with the outside and is provided with a PIN foot SBU1, a PIN foot SBU2 and a public end GND, the PIN foot SBU1 of the connector unit is connected with a PIN7 foot of the transceiver unit, the PIN foot SBU2 of the connector unit is connected with a PIN6 foot of the transceiver unit, and the public end GND of the connector unit is connected with a PIN5 foot of the transceiver unit.
Further, when receiving RS485 data, the CPU module sets the voltage level of the general purpose input and output PIN GPIO connected to the PIN4 of the level conversion unit to C1, and when sending RS485 data, the CPU module sets the voltage level of the general purpose input and output PIN GPIO connected to the PIN4 of the level conversion unit to C2, where C1 is a first preset voltage level, C2 is a second preset voltage level, and C1 is less than 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 of the transceiver unit, PIN A8 of the connector unit is connected with PIN7 of the transceiver unit, and PIN B8 of the connector unit is connected with PIN6 of the transceiver unit.
Compared with the prior art, the system has the beneficial effects that the system is applied to the mobile terminal to monitor the RS485 data transmission process of the mobile terminal, and the accurate data analysis is adopted to select the data transmission channel meeting the requirement, so that the data loss and loss caused when the RS485 data is transmitted to the cloud by the mobile phone are avoided, the safety of the RS485 data transmission of the mobile terminal is improved, and the data transmission efficiency is improved. .
In particular, after the calculation of the influence coefficient of the transmission channel is completed, the analysis module adjusts the influence coefficient of the transmission channel according to the maximum single data transmission flow Dmax in the test period, if the influence coefficient of the transmission channel is not adjusted within the preset value, if the influence coefficient of the transmission channel is greater than the preset value, the adjusted influence coefficient of the transmission channel is calculated according to the difference value between the influence coefficient of the transmission channel and the preset value, so as to increase the influence coefficient of the transmission channel, and the accuracy of the influence coefficient of the transmission channel is improved, and the accuracy of the selection of the data transmission channel is improved, so that the safety and the efficiency of the 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, compares the calculated correction coefficient R with a preset value, corrects the data transmission channel according to the comparison result, and when the correction coefficient R is smaller than the preset value, the transmission channel influence coefficient is reduced to reselect the data transmission channel, and when the correction coefficient is larger than the preset value, the transmission channel influence coefficient is increased to reselect the data transmission channel, thereby improving the accuracy of selecting the data transmission channel, and further improving the safety and efficiency of data transmission.
Drawings
Fig. 1 is a schematic structural diagram of an RS485 communication circuit based on a TYPEC interface of the mobile terminal according to this embodiment;
fig. 2 is a schematic diagram showing the definition of the pin network of the TYPEC interface of the connector unit according to the present 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 this embodiment.
Detailed Description
In order that the objects and advantages of the invention will become more apparent, the invention will be further described with reference to the following examples; it should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of 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 merely for explaining the technical principles of the present invention, and are not intended to limit the scope of the present invention.
Furthermore, it should be noted that, in the description of the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those skilled in the art according to the specific circumstances.
Referring to fig. 1, a schematic structure diagram of an RS485 communication circuit based on a TYPEC interface of a mobile terminal according to this embodiment is shown, where 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 system comprises a level conversion unit, a power supply and a power supply, wherein the level conversion unit is provided with PIN1-12 PINs, the PIN1 PIN, the PIN2 PIN and the PIN8 PIN of the level conversion unit are all connected with the power supply, the PIN7 PIN of the level conversion unit is connected with the ground, the PIN3 PIN of the level conversion unit is connected with a serial port receiving PIN RX of a CPU module, the PIN4 PIN of the level conversion unit is connected with a general input and output PIN GPIO of the CPU module, and the PIN6 PIN 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 1-8, wherein PIN1 of the transceiver unit is connected with PIN12 of the level conversion unit, PIN2 of the transceiver unit and PIN3 of the transceiver unit are connected with PIN11 of the level conversion unit, PIN4 of the transceiver unit is connected with PIN9 of the level conversion unit, PIN5 of the transceiver unit is connected with PIN7 of the level conversion unit, PIN8 of the transceiver unit is connected with PIN1 of the level conversion unit, and meanwhile PIN8 of the transceiver unit is also connected with a power supply;
the connector unit is used for being connected with the outside and is provided with a PIN foot SBU1, a PIN foot SBU2 and a public end GND, the PIN foot SBU1 of the connector unit is connected with a PIN7 foot of the transceiver unit, the PIN foot SBU2 of the connector unit is connected with a PIN6 foot of the transceiver unit, and the public end GND of the connector unit is connected with a PIN5 foot of the transceiver unit.
Specifically, when receiving RS485 data, the CPU module sets the voltage level of the general purpose input and output PIN GPIO connected to the PIN4 of the level conversion unit to C1, and when sending RS485 data, the CPU module sets the voltage level of the general purpose input and output PIN GPIO connected to the PIN4 of the level conversion unit to C2, where C1 is a first preset voltage level, C2 is a second preset voltage level, and C1 is less than C2. In this embodiment, the CPU module controls the reception and transmission of the RS485 data by controlling the voltage levels of the general purpose input and output pins GPIO, and adjusts the voltage levels of the general purpose input and output pins GPIO down when receiving the RS485 data, and adjusts the voltage levels of the general purpose input and output pins GPIO up when transmitting the RS485 data.
Specifically, the circuit in this embodiment is applied to a mobile terminal, where the mobile terminal includes a mobile phone, a tablet computer, and other devices, and is connected with an industrial device through a type ec interface of the mobile terminal, and RS485 data transmission between the cloud and the industrial device is implemented by using a wireless network and an RS485 function of the mobile terminal, so that real-time performance and convenience of RS485 data transmission of the industrial device are improved, and data transmission efficiency is improved.
Referring to fig. 2, a schematic diagram of a PIN network definition of a TYPEC interface of a connector unit according to the present embodiment is shown, where the connector unit includes PINs A1-a12 and PINs B1-B12, PINs A1, a12, B1 and B12 of the connector unit are connected with PIN5 of the transceiver unit, PIN A8 of the connector unit is connected with PIN7 of the transceiver unit, and PIN B8 of the connector unit is connected with PIN6 of the transceiver unit.
Referring to fig. 3, a schematic structural diagram of an RS485 communication circuit system based on a TYPEC interface of the mobile terminal according to the present embodiment is shown, where the system includes,
the acquisition module is used for acquiring data transmission parameters of RS485 data of the mobile terminal in real time, wherein 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 number of 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 a mobile terminal to monitor an RS485 data transmission process of the mobile terminal, and selects a data transmission channel meeting requirements through accurate data analysis, so as to avoid data loss and loss caused when RS485 data is transmitted to a cloud terminal through a mobile phone, so as to improve the security of RS485 data transmission of the mobile terminal, and improve the data transmission efficiency.
Specifically, when the analysis module performs data analysis, the analysis module is provided with a data test period Ta, ta is a preset value, 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=0.5xd/d0+0.3xe/e0+0.2xf/F0, where D is a total data transmission flow in the acquired test period, D0 is a preset total data transmission flow, 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 total data transmission duration.
Specifically, in this embodiment, a test period is set in the analysis module, and data transmission is accurately analyzed in the test period to select a transmission channel meeting the requirement for data transmission, so as to improve the data transmission efficiency, and the analysis module is set with a transmission channel influence coefficient W, and by calculating according to the data transmission parameters in the test period, the authenticity and the validity of the calculation result can be effectively ensured, so that the accuracy of selecting the transmission channel is further ensured, and the data transmission efficiency is improved. It can be understood that the transmission channels of the test period are not limited in the embodiment, and the data transmission channels can be freely set in the test period, but it should be noted that the data transmission channels with larger capacity should be set as the data transmission channels in the test period, so as to ensure no data loss in the data transmission process in the test period, thereby ensuring the accuracy of the test and further improving the safety and efficiency of the data transmission.
Specifically, the analysis module compares the acquired single-data transmission maximum flow Dmax with the preset single-data transmission flow Da in the test period after calculating the transmission channel influence coefficient W, and adjusts the transmission channel influence coefficient 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 ', setting W' =w+w× (Dmax-Da)/Dmax.
Specifically, after the adjustment of the influence coefficient of the transmission channel is completed, the analysis module compares the acquired maximum time Fmax of single data transmission in the test period with the preset single data transmission time Fa, and corrects the adjusted influence coefficient W' of the transmission channel according to the comparison result,
when Fmax is less than or equal to Fa, the analysis module does not correct;
when Fmax > Fa, the analysis module corrects the transmission channel influence coefficient to W ", setting W" =w '+w' × (Fmax-Fa)/Fmax.
Specifically, after the calculation of the transmission channel influence coefficient is completed, the analysis module in this embodiment also adjusts the transmission channel influence coefficient according to the maximum single data transmission flow Dmax in the test period, if the transmission channel influence coefficient is within the preset value, the adjustment is not performed, if the transmission channel influence coefficient is greater than the preset value, the adjusted transmission channel influence coefficient is calculated according to the difference between the transmission channel influence coefficient and the preset value, so as to increase the transmission channel influence coefficient, and the accuracy of the transmission channel influence coefficient is improved, so that the accuracy of data transmission channel selection is improved, and further the safety and efficiency of data transmission are improved.
Specifically, after the correction of the transmission channel influence coefficient is completed, the control module compares the corrected transmission channel influence coefficient W' with each preset transmission channel influence coefficient, adjusts the data transmission channel of the RS485 data according to the comparison result,
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 less than W and less than or equal to W2, the control module takes the 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 a first preset transmission channel influence coefficient, W2 is a second preset transmission channel influence coefficient, and W1 is less than W2.
Specifically, in this embodiment, the control module selects the 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 the number of the data transmission channels is not limited in this embodiment, three data transmission channels are set in this embodiment, and a person skilled in the art may set a plurality of data transmission channels for transmission selection, but when a plurality of transmission channels are set, a plurality of preset transmission channel influence coefficients should be set for data comparison, and according to the numerical range where the corrected transmission channel influence coefficients are located, the corresponding data transmission channels are selected for data transmission, so as to ensure the data transmission efficiency.
Specifically, 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=0.5 xds/+Δd+0.5xfs/Δf is set, 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=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=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 smaller than R1, the correction module corrects the transmission channel influence coefficient to Ws1, ws1=W '-W' -X (R1-R)/R1 is set, and the data transmission channel is selected again according to the corrected transmission channel influence coefficient Ws 1;
when R1 is more than or equal to R2, the correction module judges that data transmission is normal and correction is not performed;
when R2 is less than R, the correction module corrects the transmission channel influence coefficient to Ws2, sets Ws2=W "+W" × (R-R2)/R, and reselects a 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, in this embodiment, after the control module determines the data transmission channel according to the data transmission parameter in the test period, the correction module corrects the data transmission channel in real time according to the real-time data transmission parameter, so as to further improve the accuracy of selecting the data transmission channel, thereby improving the safety and efficiency of data transmission. It can be understood that in this embodiment, the preset correction coefficients are not specifically limited, but the value of R1 should be smaller than 1, the value of R2 should be larger than 1, and in the best embodiment, R1 takes 0.7 and R2 takes 1.3, so as to ensure the accuracy of the correction result.
Thus far, the technical solution of the present invention has 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 protection of the present invention is not limited to these specific embodiments. Equivalent modifications and substitutions for related technical features may be made by those skilled in the art without departing from the principles of the present invention, and such modifications and substitutions will be within the scope of the present invention.

Claims (9)

1. An RS485 communication circuit system based on a TYPE EC interface of a mobile terminal, which 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 also used for adjusting the transmission channel influence coefficient W according to the single data transmission maximum flow Dmax in the test period, and is also used for correcting the adjusted transmission channel influence coefficient W' according to the single data transmission maximum 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 also used for calculating a correction coefficient R in real time according to the data transmission parameters acquired in real time, correcting the influence coefficient of the transmission channel in real time according to the correction coefficient R, and reselecting the data transmission channel;
when the analysis module performs data analysis, the analysis module is provided with a data test period Ta, ta is a preset value, 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=0.5xD/D0+0.3xE/E0+0.2xF/F0, wherein D is the total data transmission flow in the acquired test period, D0 is the preset data total transmission flow, E is the data transmission frequency in the acquired test period, E0 is the preset data transmission frequency, F is the total data transmission duration in the acquired test period, and F0 is the preset total data transmission duration.
2. The RS485 communication circuit system based on the TYPEC interface of claim 1, wherein the analysis module compares the collected maximum single data transmission flow Dmax and the preset single data transmission flow Da in the test period when adjusting the transmission channel influence coefficient W, and adjusts the transmission channel influence coefficient 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 ', setting W' =w+w× (Dmax-Da)/Dmax.
3. The RS485 communication circuit system based on the TYPEC interface of claim 2, wherein the analysis module compares the maximum duration Fmax of the single data transmission in the collected test period with the preset single data transmission duration Fa when the adjusted transmission channel influence coefficient is corrected, and corrects 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 correct;
when Fmax > Fa, the analysis module corrects the transmission channel influence coefficient to W ", setting W" =w '+w' × (Fmax-Fa)/Fmax.
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 corrected transmission channel influence coefficient W' with each preset transmission channel influence coefficient after the transmission channel influence coefficient is corrected, and adjusts the data transmission channel of the RS485 data according to the comparison result,
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 less than W and less than or equal to W2, the control module takes the 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 a first preset transmission channel influence coefficient, W2 is a second preset transmission channel influence coefficient, and W1 is less than W2.
5. The RS485 communication circuit system based on the TYPEC interface of the mobile terminal according to claim 4, wherein after determining the data transmission channel, the correction module corrects the data transmission channel according to the data transmission parameter collected in real time, the correction module is provided with a correction coefficient R, where r=0.5 xds/+Δd+0.5xfs/Δfis set, where Ds is a single data transmission flow collected in real time, Δd is an average value of the single data transmission flow in the test period, Δd=d/s, s is a data transmission frequency in the test period, fs is a single data transmission duration collected in real time, Δf is an average value of the single data transmission duration in the test period, and Δf=f/s.
6. The RS485 communication circuit system based on the TYPEC interface of the mobile terminal according to claim 5, wherein the correction module compares the correction coefficient R calculated in real time with each preset correction coefficient when correcting the data transmission channel, corrects the data transmission channel according to the comparison result,
when R is smaller than R1, the correction module corrects the transmission channel influence coefficient to Ws1, ws1=W '-W' -X (R1-R)/R1 is set, and the data transmission channel is selected again according to the corrected transmission channel influence coefficient Ws 1;
when R1 is more than or equal to R2, the correction module judges that data transmission is normal and correction is not performed;
when R2 is less than R, the correction module corrects the transmission channel influence coefficient to Ws2, sets Ws2=W "+W" × (R-R2)/R, and reselects a 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.
7. The RS485 communication circuitry based on a mobile terminal type ec interface according to any of claims 1-6, wherein said 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 system comprises a level conversion unit, a power supply and a power supply, wherein the level conversion unit is provided with PIN1-12 PINs, the PIN1 PIN, the PIN2 PIN and the PIN8 PIN of the level conversion unit are all connected with the power supply, the PIN7 PIN of the level conversion unit is connected with the ground, the PIN3 PIN of the level conversion unit is connected with a serial port receiving PIN RX of a CPU module, the PIN4 PIN of the level conversion unit is connected with a general input and output PIN GPIO of the CPU module, and the PIN6 PIN 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 1-8, wherein PIN1 of the transceiver unit is connected with PIN12 of the level conversion unit, PIN2 of the transceiver unit and PIN3 of the transceiver unit are connected with PIN11 of the level conversion unit, PIN4 of the transceiver unit is connected with PIN9 of the level conversion unit, PIN5 of the transceiver unit is connected with PIN7 of the level conversion unit, PIN8 of the transceiver unit is connected with PIN1 of the level conversion unit, and meanwhile PIN8 of the transceiver unit is also connected with a power supply;
the connector unit is used for being connected with the outside and is provided with a PIN foot SBU1, a PIN foot SBU2 and a public end GND, the PIN foot SBU1 of the connector unit is connected with a PIN7 foot of the transceiver unit, the PIN foot SBU2 of the connector unit is connected with a PIN6 foot of the transceiver unit, and the public end GND of the connector unit is connected with a PIN5 foot of the transceiver unit.
8. The RS485 communication circuitry based on the type ec interface of mobile terminal according to claim 7, wherein said CPU module sets the voltage level of said general purpose input and output PIN GPIO connected to PIN4 of said level shift unit to C1 when receiving RS485 data, and sets the voltage level of said general purpose input and output PIN GPIO connected to PIN4 of said level shift unit to C2 when transmitting RS485 data, wherein C1 is a first preset voltage level, C2 is a second preset voltage level, and C1 < C2.
9. The RS485 communication circuitry based on a mobile terminal TYPEC interface according to claim 8, wherein 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 of the transceiver unit, PIN A8 of the connector unit is connected with PIN7 of the transceiver unit, and PIN B8 of the connector unit is connected with PIN6 of the 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 CN114244750A (en) 2022-03-25
CN114244750B true 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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* 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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 (1)

* Cited by examiner, † Cited by third party
Title
"Monitoring system of thermo-solar plant based on touch-screen interface manageable locally by PC and remotely by Android-based mobile devices";P. Visconti et al;《2015 IEEE Workshop on Environmental, Energy, and Structural Monitoring Systems (EESMS) Proceedings》;全文 *

Also Published As

Publication number Publication date
CN114244750A (en) 2022-03-25

Similar Documents

Publication Publication Date Title
US8654658B2 (en) Mobile communication system, base station controller, base station, mobile station, and base station radio parameter control method
EP3565134B1 (en) Antenna correction method and device
CA2869097C (en) System and method for power control in mimo systems
EP2095532A1 (en) Communication method and system
US9510301B2 (en) Method and apparatus for adjusting transmit power
JP2018533270A (en) Method for testing a low power radio frequency (RF) data packet signal transceiver
US20130316657A1 (en) RF Circuit and Isolation Detecting Device Thereof, And Method For Measuring a Degree of Isolation Between a First RF Circuit and a Second RF Circuit with Respect to a Frequency
CN114244750B (en) RS485 communication circuit system based on TYPE EC interface of mobile terminal
JP2012123801A (en) On-line calibration method and device therefor of universal serial bus (usb) system
US11038580B2 (en) Method for determining polarization information and related device thereof
US6131014A (en) Bidirectional communication system and upstream communication noise level determination method
CN101777955A (en) Radio frequency time template parameter test system and method for adjusting test range
KR102665186B1 (en) Active Optical Cable Device for One-way optical communication
CN115396911B (en) Communication method, device and storage medium
EP1156689A1 (en) Channel selection method for a wireless communication system and subscriber station
WO2014149427A1 (en) System and method for testing a data packet signal transceiver
KR20210028815A (en) Device for Active Optical Cable and its operation control method
CN109600174A (en) Poewr control method, test device, terminal and test macro
US8494034B2 (en) Communication device and communication system
US6957169B1 (en) Method and apparatus for optimizing data connection performance
WO2019096198A1 (en) Communication method and apparatus
CN113811012B (en) Scheduling method, device and system and storage medium
KR102665188B1 (en) Active Optical Cable Device for Two-way optical communication
KR102665205B1 (en) Active Optical Cable Device for Two-way optical communication
KR102665189B1 (en) Active Optical Cable Device for One-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
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.