RS485 chip transmission parameter confirmation method and device

By dynamically monitoring the signal information and baud rate fluctuation range of the RS485 chip and adaptively adjusting the timing, the timing garbled code problem in the RS485 communication protocol is solved, improving the stability and real-time performance of data transmission.

CN120216434BActive Publication Date: 2026-01-16BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510318684.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2026-01-16
Estimated Expiration
2045-03-18

AI Technical Summary

Technical Problem

The timing error in the existing RS485 communication protocol leads to data corruption and poor real-time performance, and the fixed delay time cannot meet the communication needs in different environments.

Method used

By dynamically monitoring the signal information of the RS485 chip, calculating the baud rate fluctuation range, determining the reference baud rate and delay using a preset baud rate delay lookup table, generating a reference chip transmission parameter group, and selecting the target chip transmission parameter group according to the performance evaluation weight, the timing is adaptively adjusted.

Benefits of technology

It improves the stability and real-time performance of RS485 chip data transmission, adapts to communication needs in different environments, reduces unnecessary waiting time, and improves communication reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216434B_ABST
    Figure CN120216434B_ABST
Patent Text Reader

Abstract

The application provides an RS485 chip transmission parameter confirmation method and device, wherein the RS485 chip transmission parameter confirmation method comprises the following steps: obtaining target signal information of a target RS485 chip in a preset time interval; calculating a target baud rate fluctuation interval of the target RS485 chip in the preset time interval according to the target signal information; determining at least one reference baud rate and at least one reference delay in a preset baud rate delay table according to the target baud rate fluctuation interval, wherein the preset baud rate delay table comprises delay time intervals and baud rate intervals set in a gradient; generating at least one reference chip transmission parameter group according to the at least one reference baud rate and the at least one reference delay, and calculating the performance evaluation weight corresponding to each reference chip transmission parameter group, wherein the chip transmission parameter group comprises a baud rate and a delay; and determining the target chip transmission parameter group corresponding to the target RS485 chip in the at least one reference chip transmission parameter group according to the performance evaluation weight.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a RS485 chip transmission parameter confirmation method. The present application also relates to a RS485 chip transmission parameter confirmation device, a computing device, a computer readable storage medium and a computer program product. BACKGROUND

[0002] RS485 is a commonly used industrial communication standard, which has the characteristics of one-to-many, long-distance transmission, strong anti-interference ability, etc. It is widely used in industrial control, building automation, security monitoring, energy management and other scenes. RS485 adopts differential signal transmission, so a special transceiver circuit is needed to realize communication. RS485 transceiver circuit has the advantages of high anti-interference ability, long-distance transmission, multi-point communication, low cost, etc.

[0003] The RS485 communication protocol has the problem of timing garbled code, which is manifested as that the received data appears garbled code, error or inconsistency with the sent data. The current common processing method is to set a fixed delay time to solve the timing garbled code problem. For example, a 50ms delay is set after sending data, and the receiving end is stabilized before receiving data. However, setting a fixed delay time also has the problems of poor adaptability and affecting the real-time performance of communication. Therefore, how to better solve the timing garbled code problem of RS485 has become a problem that technicians need to solve. SUMMARY

[0004] Therefore, the embodiments of the present application provide a RS485 chip transmission parameter confirmation method. The present application also relates to a RS485 chip transmission parameter confirmation device, a computing device, a computer readable storage medium and a computer program product to solve the above problems existing in the prior art.

[0005] According to a first aspect of the embodiments of the present application, a RS485 chip transmission parameter confirmation method is provided, comprising:

[0006] obtaining target signal information of a target RS485 chip in a preset time interval;

[0007] calculating a target baud rate fluctuation interval of the target RS485 chip in the preset time interval according to the target signal information;

[0008] determining at least one reference baud rate and at least one reference delay according to the target baud rate fluctuation interval in a preset baud rate delay reference table, wherein the preset baud rate delay reference table includes a delay time interval and a baud rate interval set according to a gradient;

[0009] generate at least one reference chip transmission parameter group according to the at least one reference baud rate and the at least one reference delay, and calculate a performance evaluation weight corresponding to each reference chip transmission parameter group, wherein the chip transmission parameter group comprises a baud rate and a delay;

[0010] determine a target chip transmission parameter group corresponding to the target RS485 chip in the at least one reference chip transmission parameter group according to the performance evaluation weights.

[0011] According to a second aspect of the embodiment of the present application, an RS485 chip transmission parameter confirmation device is provided, comprising:

[0012] The obtaining module is configured to obtain target signal information of a target RS485 chip in a preset time interval;

[0013] The calculating module is configured to calculate a target baud rate fluctuation interval of the target RS485 chip in the preset time interval according to the target signal information;

[0014] The first determining module is configured to determine at least one reference baud rate and at least one reference delay in a preset baud rate and delay reference table according to the target baud rate fluctuation interval, wherein the preset baud rate and delay reference table comprises delay time intervals and baud rate intervals set in a gradient manner;

[0015] The generating module is configured to generate at least one reference chip transmission parameter group according to the at least one reference baud rate and the at least one reference delay, and calculate a performance evaluation weight corresponding to each reference chip transmission parameter group, wherein the chip transmission parameter group comprises a baud rate and a delay;

[0016] The second determining module is configured to determine a target chip transmission parameter group corresponding to the target RS485 chip in the at least one reference chip transmission parameter group according to the performance evaluation weights.

[0017] According to a third aspect of the embodiment of the present application, a computing device is provided, comprising:

[0018] a memory and a processor;

[0019] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which realize the steps of the above-mentioned RS485 chip transmission parameter confirmation method when executed by the processor.

[0020] According to a fourth aspect of the embodiment of the present application, a computer readable storage medium is provided, which stores computer programs / instructions, which realize the steps of the above-mentioned RS485 chip transmission parameter confirmation method when executed by the processor.

[0021] According to a fifth aspect of the embodiments of the present application, a computer program product is provided, comprising computer programs / instructions which, when executed by a processor, implement the steps of the RS485 chip transmission parameter confirmation method described above.

[0022] The RS485 chip transmission parameter confirmation method provided by the present application comprises: obtaining target signal information of a target RS485 chip in a preset time interval; calculating a target baud rate fluctuation interval of the target RS485 chip in the preset time interval according to the target signal information; determining at least one reference baud rate and at least one reference delay according to the target baud rate fluctuation interval in a preset baud rate delay lookup table, wherein the preset baud rate delay lookup table comprises delay time intervals and baud rate intervals set according to gradients; generating at least one reference chip transmission parameter group according to the at least one reference baud rate and the at least one reference delay, and calculating performance evaluation weights corresponding to each reference chip transmission parameter group, wherein a chip transmission parameter group comprises a baud rate and a delay; and determining a target chip transmission parameter group corresponding to the target RS485 chip in the at least one reference chip transmission parameter group according to the performance evaluation weights.

[0023] An embodiment of the present application realizes a method of dynamically monitoring communication link quality, obtains target signal information of an RS485 chip, calculates a baud rate fluctuation interval of the chip through the target signal information, and matches at least one reference baud rate and at least one reference delay according to the baud rate fluctuation interval. A plurality of reference chip transmission parameter groups are combined according to the at least one reference baud rate and the at least one reference delay, and a target chip transmission parameter group is selected according to performance evaluation weights of the reference chip transmission parameter groups. Through this method, the stability of the RS485 chip in the data transmission process is improved, so that it can adaptively adjust the timing and adapt to the communication requirements in different environments, thereby improving the communication stability. The method can also reduce unnecessary waiting through dynamic adjustment of the delay, thereby improving the real-time performance of the communication. The method can also improve the reliability of the communication through error processing and feedback optimization. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 FIG. 1 is a flowchart of an RS485 chip transmission parameter confirmation method according to an embodiment of the present application;

[0025] Figure 2 FIG. 2 is a monitoring structure diagram of an RS485 chip according to an embodiment of the present application;

[0026] Figure 3 FIG. 3 is a processing flowchart of an RS485 chip transmission parameter confirmation method according to an embodiment of the present application;

[0027] Figure 4is a structural schematic diagram of a RS485 chip transmission parameter confirmation device provided by an embodiment of the present application.

[0028] Figure 5 is a structural block diagram of a computing device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0029] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced without the specific details, and it is understood that the present application is not limited to the embodiments described herein. In other instances, well-known methods, procedures, components, and circuits have not been described in detail as not to unnecessarily obscure aspects of the present application.

[0030] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present application. As used in one or more embodiments of the present application and the accompanying claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in one or more embodiments of the present application, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0031] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It is to be further understood that the terms "comprises," "comprising," "includes," "including," "has," "having" and the like, when used in the specification and claims, specify the presence of stated features, integers, steps, operations, elements, and / or components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It is to be understood that the terms "even number" and "odd number" include both positive and negative integers, unless the context clearly indicates otherwise. It is to be understood that the term "if' as used herein can be interpreted as meaning "when" or "in response to determining" depending on the context.

[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards in relevant regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0033] First, the terms involved in one or more embodiments of the present application are explained.

[0034] RS458: is a standard serial communication protocol, which defines a set of rules for data communication on the cable, suitable for long distance, high speed, multi-device data transmission in industrial environment. RS458 is a half-duplex communication interface, that is, only one-way data transmission can be carried out at the same time. It uses an additional control pin to switch the sending and receiving mode.

[0035] RS458 is a commonly used industrial communication standard, with the characteristics of one-to-many, long-distance transmission, strong anti-interference ability, etc. It is widely used in industrial control, building automation, security monitoring, energy management. RS485 communication adopts differential signal transmission, so a special transceiver circuit is needed to realize communication. RS485 transceiver circuit has the advantages of high anti-interference ability, long distance transmission, multi-point communication, low cost, etc. But also need additional circuit design, precise matching, communication.

[0036] RS485 communication protocol has the problem of timing garbled code, which shows that the received data appears garbled, error or inconsistent with the sent data. The current common processing method is to set a fixed delay time to solve the timing garbled code problem. For example, set a 50ms delay after sending data, and start receiving data after the receiving end is stable. However, setting a fixed delay time cannot adapt to the communication needs in all environments, resulting in reduced communication efficiency in some cases; the fixed delay may affect the real-time performance of communication, especially in high-speed communication scenarios; in addition, in a larger interference environment, the fixed delay may also not effectively solve the timing garbled code problem.

[0037] Based on this, in the present application, an RS485 chip transmission parameter confirmation method is provided, and the present application also relates to an RS485 chip transmission parameter confirmation device, a computing device, a computer readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.

[0038] Figure 1 A flowchart of an RS485 chip transmission parameter confirmation method according to an embodiment of the present application is shown, which specifically includes the following steps:

[0039] Step 102: Obtain target signal information of the target RS485 chip in a preset time interval.

[0040] Among them, the target RS485 chip is an important part of realizing the RS485 protocol, which is responsible for converting digital signals into differential signals suitable for RS485 interface transmission, and converting the received differential signals back to digital signals. The preset time interval can be understood as the time interval of data transmission of the target RS485 chip, for example, obtaining the target signal information of the target RS485 chip in the past 10 minutes.

[0041] The target signal information can be understood as real signal information generated by the target RS485 chip in a preset time interval in a business data communication process. In the method provided in the embodiments of the present application, the target signal information specifically refers to signal information from which signal noise has been removed.

[0042] In a specific embodiment provided in the present application, the target signal information of the target RS485 chip in a preset time interval is obtained, including:

[0043] Reference signal information of the target RS485 chip in a preset time interval is obtained.

[0044] It is determined whether signal noise exists in the reference signal information.

[0045] If yes, the signal noise is removed from the reference signal information to obtain the target signal information.

[0046] If no, the reference signal information is determined as the target signal information.

[0047] In actual application, the reference signal information is first obtained by the target RS485 chip in a data transmission process, which can be understood as signal information collected by the target RS485 chip. The collected signal information can have signal noise. After removing the signal noise, the collected reference signal information can be converted into real target signal information. If there is no signal noise in the collected reference signal information, the reference signal information can be directly determined as the target signal information.

[0048] The determination of whether signal noise exists in the reference signal information includes:

[0049] Reference signal level in the reference signal information is obtained.

[0050] It is determined whether the reference signal level is within a preset signal level interval.

[0051] If yes, it is determined that no signal noise exists in the reference signal information.

[0052] If no, it is determined that signal noise exists in the reference signal information.

[0053] In the specific embodiments provided in the present application, it is generally necessary to determine whether signal noise exists in the reference signal information according to the level of the reference signal information. Based on this, after obtaining the reference signal information, the reference signal information is converted into its corresponding reference signal level. Then, the reference signal level is compared with the preset signal level interval. If the reference signal level is within the preset signal level interval, it is determined that no signal noise exists in the reference signal information, and vice versa.

[0054] For example, in a specific embodiment provided by the present application, a preset signal level interval of (-5V, 5V) is taken as an example for explanation and description. After processing the received reference signal information, the corresponding reference signal level is obtained. If the reference signal level is 3V, it indicates that the reference signal level is within the preset signal level interval, and it is determined that there is no signal noise in the reference signal information. If the reference signal level is 8V, it indicates that the reference signal level is not within the preset signal level interval, and it is determined that there is signal noise in the reference signal information.

[0055] In a specific embodiment provided by the present application, the reference signal information of the target RS485 chip in a preset time interval is obtained, including:

[0056] The reference signal information of the target RS485 chip when acquiring the service data sent by the external device is obtained based on the signal monitoring circuit.

[0057] In the embodiment, the corresponding signal monitoring circuit is set to monitor the target RS485 chip. Specifically, the reference signal information of the target RS485 chip when receiving and transmitting service data with the external device is monitored.

[0058] Referring to the following Figure 2 , Figure 2 The monitoring structure schematic diagram of the RS485 chip provided by an embodiment of the present application is shown, as shown in Figure 2 The signal monitoring circuit monitors the information in the process of the RS485 chip and the external device transmitting and receiving service data through the RS485 protocol. The monitoring result is fed back to the CPU, and the data processing (real-time conversion into an analog quantity, and then compared with the service data received or sent by the CPU) is performed in the CPU.

[0059] Specifically, the signal monitoring circuit includes a differential receiver, an operational amplifier, and an analog-to-digital converter.

[0060] The reference signal information of the target RS485 chip when acquiring the service data sent by the external device is obtained based on the signal monitoring circuit, including:

[0061] The initial signal of the target RS485 receiving service data is received by the differential receiver, and the initial signal is converted into a reference voltage signal;

[0062] The reference voltage signal is amplified by the operational amplifier to obtain an operational amplifier output signal;

[0063] The operational amplifier output signal is converted into reference signal information by the analog-to-digital converter.

[0064] In practical applications, the signal monitoring circuit includes a differential receiver, an operational amplifier and an analog-to-digital converter. The differential receiver is used to receive the RS485 signal and convert it into a single-ended signal, and finally output it as a reference voltage signal proportional to the amplitude (or intensity) of the RS485 signal.

[0065] In order to measure the signal strength more accurately, the output signal of the differential receiver can be amplified by using an operational amplifier (op-amp). By selecting appropriate gain and bandwidth, the op-amp can amplify the weak differential signal to a level suitable for subsequent processing.

[0066] The op-amp transmission signal after the op-amp is input into the analog-to-digital converter to convert it into digital signal reference signal information for subsequent processing by the CPU or microcontroller.

[0067] Step 104: Calculate the target baud rate fluctuation range of the target RS485 chip in the preset time interval according to the target signal information.

[0068] Where baud rate refers to the number of bits transmitted per second, which is a unit for measuring data communication speed, usually expressed in bps (bits per second).

[0069] RS485 supports multiple baud rates, including but not limited to 300bps, 600bps, 1200bps, 2400bps, 4800bps, 9600bps, etc. The RS485 interface supports higher transmission rates, with a maximum of 10Mbps (megabits per second) or higher. However, this is usually achieved under ideal conditions and over short distances. In practical applications, due to various factors (such as transmission distance, signal attenuation, noise environment, etc.), the baud rate often cannot achieve the highest transmission efficiency.

[0070] In the method provided in the present application, the target signal information of the target RS485 chip in the preset time is used to restore its transmission waveform in the preset time interval. By the transmission waveform, the fluctuation range of the target transmission baud rate of the RS485 chip in the preset time interval is determined, thereby determining the target baud rate fluctuation range.

[0071] Step 106: Determine at least one reference baud rate and at least one reference delay according to the target baud rate fluctuation range in the preset baud rate delay lookup table, wherein the preset baud rate delay lookup table includes delay time intervals and baud rate intervals set by gradient.

[0072] The preset baud rate delay contrast table is a preset gradient contrast table of baud rate and delay. In actual application, a delay time interval and a baud rate interval in a sufficient range are set according to a manual of the 485 chip. Specifically, the baud rate interval supported by the chip is marked on the chip manual. The smaller the baud rate, the slower the transmission rate. The delay between the delay interval and the baud rate interval is set according to the gradient.

[0073] For example, by default, the delay corresponding to the baud rate of 12 Mbps is 0 ms, and the delay corresponding to the baud rate of 300 bps is 1000 ms. The baud rate is set in descending order, and the delay is set in ascending order, so that the preset baud rate delay contrast table is set in advance.

[0074] After the target baud rate fluctuation interval is determined, at least one reference baud rate and at least one reference delay can be determined in the preset baud rate delay contrast table according to the target baud rate fluctuation interval.

[0075] The reference baud rate can be understood as a usable baud rate of the target RS485 chip for business data transmission, and the reference delay is a usable delay determined according to the gradient setting of the usable baud rate.

[0076] In a specific embodiment provided in the present application, at least one reference baud rate and at least one reference delay are determined in the preset baud rate delay contrast table according to the target baud rate fluctuation interval, including:

[0077] At least one reference baud rate is determined in the preset baud rate delay contrast table according to the target baud rate fluctuation interval.

[0078] At least one reference delay corresponding to each reference baud rate is determined in the preset baud rate delay contrast table.

[0079] In actual application, the preset baud rate delay contrast table stores the corresponding relationship between the delay and the baud rate. In the method provided in the present application, at least one reference baud rate is first determined in the preset baud rate delay contrast table according to the target baud rate fluctuation interval. For example, the target baud rate fluctuation interval is (960000 bps, 12000000 bps). At least one reference baud rate (960000 bps, 1000000 bps, 4000000 bps, 6000000 bps, 8000000 bps, 10000000 bps, 12000000 bps) is determined in the preset baud rate delay contrast table according to the target baud rate fluctuation interval.

[0080] According to the preset baud rate delay table, the reference time delay corresponding to each reference baud rate is determined, so as to determine at least one reference time delay. According to the above example, the reference time delay determined according to the reference baud rate is (300 ms, 200 ms, 100 ms, 80 ms, 60 ms, 40 ms, 3 ms).

[0081] Step 108: generating at least one reference chip transmission parameter group according to the at least one reference baud rate and the at least one reference time delay, and calculating the performance evaluation weight corresponding to each reference chip transmission parameter group, wherein the chip transmission parameter group includes baud rate and time delay.

[0082] After the reference baud rate and the reference time delay are determined, at least one reference chip transmission parameter group can be generated according to the random combination of the reference baud rate and the reference time delay, and the performance evaluation weight corresponding to each reference chip transmission group is calculated respectively. The performance evaluation weight is used to determine the performance weight of each reference chip transmission parameter group in the process of service data transmission. The higher the performance evaluation weight is, the higher the efficiency of service data transmission is.

[0083] In a specific embodiment provided in the present application, generating at least one reference chip transmission parameter group according to the at least one reference baud rate and the at least one reference time delay includes:

[0084] selecting a to-be-processed reference baud rate from the at least one reference baud rate and selecting a to-be-processed reference time delay from the at least one reference time delay;

[0085] composing a reference chip transmission parameter group according to the to-be-processed reference baud rate and the to-be-processed reference time delay.

[0086] In actual application, the process of generating a reference chip transmission parameter group according to a reference baud rate and a reference time delay is the permutation and combination of parameters in two sets. Specifically, a to-be-processed reference baud rate is selected from the reference baud rate, a to-be-processed reference time delay is selected from the reference time delay, and the two are composed into a reference chip transmission parameter group.

[0087] For example, the reference baud rates are (S1, S2, S3, …, S6), and the reference time delays are (T1, T2, T3, …, T6). One parameter is selected from each of the two sets to form a reference chip transmission parameter set. For example, S1 is selected from the reference baud rates as a to-be-processed reference baud rate, and T1 is selected from the reference time delays as a to-be-processed reference time delay, which can form a reference chip transmission parameter set (S1, T1). In order to ensure that no data is missed, the to-be-processed reference baud rate and the to-be-processed reference time delay are sequentially selected from the reference baud rates and the reference time delays, thereby generating a plurality of reference chip transmission parameter sets. For example, the reference chip transmission parameter sets are (S1, T1), (S1, T2), (S1, T3), …, (S6, T5), and (S6, T6).

[0088] In a specific embodiment provided in the present application, the performance evaluation weight corresponding to each reference chip transmission parameter set is calculated, including:

[0089] A to-be-processed reference chip transmission parameter set is determined from the reference chip transmission parameter sets, and a to-be-processed reference baud rate and a to-be-processed reference time delay in the to-be-processed reference chip transmission parameter set are obtained.

[0090] The performance evaluation weight corresponding to the to-be-processed reference chip transmission parameter set is calculated according to the to-be-processed reference baud rate and the to-be-processed reference time delay.

[0091] In the process of calculating the performance evaluation weight corresponding to each reference chip transmission parameter set, the reference baud rate and the reference time delay in the reference chip transmission parameter set are used. In the present embodiment, one of the plurality of reference chip transmission parameter sets is taken as an example for explanation and description. Specifically, a to-be-processed reference chip transmission parameter set is selected from each reference chip transmission parameter set. When the to-be-processed reference chip transmission parameter set is determined, the to-be-processed reference baud rate and the to-be-processed reference time delay in the to-be-processed reference chip transmission parameter set can be obtained at the same time. The to-be-processed reference chip transmission parameter set is calculated according to the to-be-processed reference baud rate and the to-be-processed reference time delay.

[0092] Specifically, the baud rate represents the number of bits of service data transmitted per second. When the to-be-processed reference baud rate is determined, the data transmission time required for transmitting one frame of service data can be further calculated according to the to-be-processed reference baud rate. That is, the data transmission time is the reciprocal of the to-be-processed reference baud rate.

[0093] When the data transmission time required for transmitting one frame of service data is determined, the performance evaluation weight can be calculated according to the following formula 1.

[0094] A = T1 / (T1+T2) Formula 1

[0095] Wherein, A represents a performance evaluation weight, T1 is a data transmission time required for transmitting one frame of service data, and T2 is a to-be-processed reference delay. Through the above formula 1, the performance evaluation weight corresponding to each to-be-processed reference chip transmission parameter group can be calculated.

[0096] Step 110: determining a target chip transmission parameter group corresponding to the target RS485 chip from at least one reference chip transmission parameter group according to each performance evaluation weight.

[0097] After calculating the performance evaluation weight corresponding to each reference chip transmission parameter group, the target chip transmission parameter group corresponding to the target RS495 chip can be determined according to each performance evaluation weight. The target chip transmission parameter group can be understood as a preferred chip transmission parameter group of the target RS485 chip in the current application. Applying the target chip transmission parameter group to the target RS485 chip for transmitting service data can make the transmission speed of the target RS485 chip faster and the delay smaller.

[0098] In a specific embodiment provided in the present application, determining a target chip transmission parameter group corresponding to the target RS485 chip from at least one reference chip transmission parameter group according to each performance evaluation weight comprises:

[0099] sequencing at least one reference chip transmission parameter group in descending order according to each performance evaluation weight;

[0100] determining the target chip transmission parameter group corresponding to the target RS485 chip according to the sequencing result.

[0101] In actual application, the performance evaluation weight is used to determine the performance of each reference chip transmission parameter group. The greater the performance evaluation weight is, the better the performance of the reference chip transmission parameter group is. Therefore, each reference chip transmission parameter group is sequenced in descending order according to each performance evaluation weight. After determining the final sequencing result, the first-ranked reference chip transmission parameter group can be selected as the target chip transmission parameter group.

[0102] In actual application, the target chip transmission parameter group is not fixed and can also be adjusted in real time during the transmission process of service data. In a specific embodiment provided in the present application, the method further comprises:

[0103] transmitting service data according to the target chip transmission parameter group and detecting a data transmission state of the service data;

[0104] in a case where the data transmission state is transmission abnormality, eliminating the target chip transmission parameter group from at least one reference chip transmission parameter group and determining a new target chip transmission parameter group according to each performance evaluation weight.

[0105] After the target chip transmission parameter group is determined, the target chip transmission parameter group can be applied to the target RS485 chip, and the transmission of service data is performed through the target chip transmission parameter group, and the data transmission state of the service data is detected.

[0106] When the data transmission state is abnormal, it indicates that the target chip transmission parameter group selected is problematic, and the target chip transmission parameter group can be excluded from the at least one reference chip transmission parameter group. In the remaining reference chip transmission parameter groups, the performance evaluation weight of each reference chip transmission parameter group is used to determine a new target chip transmission parameter group, so as to realize the purpose of dynamic adjustment of the target chip transmission parameter group for the target RS485 chip.

[0107] Through the method provided in the embodiment of the application, the target signal information of the RS485 chip is obtained by dynamically monitoring the quality of the communication link, the baud rate fluctuation interval of the chip is calculated through the target signal information, and at least one reference baud rate and at least one reference delay are matched according to the baud rate fluctuation interval. At least one reference baud rate and at least one reference delay are combined to form a plurality of reference chip transmission parameter groups, and a target chip transmission parameter group is selected according to the performance evaluation weight of each reference chip transmission parameter group. Through the method, the stability of the RS485 chip in the data transmission process is improved, so that it can adaptively adjust the timing and adapt to the communication requirements in different environments to improve the communication stability. The dynamic adjustment of the delay can also reduce unnecessary waiting and improve the real-time performance of the communication. Error processing and feedback optimization can also be used to improve the reliability of the communication.

[0108] The following describes the RS485 chip transmission parameter confirmation method provided in the application with reference to the accompanying drawings. Figure 3 The RS485 chip transmission parameter confirmation method provided in the application is further described by taking the application of the RS485 chip transmission parameter confirmation method as an example. In the application, Figure 3 FIG. 1 shows a processing flowchart of an RS485 chip transmission parameter confirmation method provided in an embodiment of the application, which specifically includes the following steps:

[0109] Step 302: Determine a target RS485 chip and a target external device, and obtain reference signal information of the target RS485 chip in a preset time interval.

[0110] Step 304: Obtain a reference signal level in the reference signal information, determine whether there is signal noise in the reference signal information, and determine target signal information according to the determination result.

[0111] Step 306: Calculate a target baud rate fluctuation interval of the target RS485 chip in the preset time interval according to the target signal information.

[0112] Step 308: determining at least one reference baud rate according to the target baud rate fluctuation interval in the preset baud rate delay table.

[0113] Step 310: determining at least one reference delay corresponding to each reference baud rate in the preset baud rate delay table.

[0114] Step 312: selecting a to-be-processed reference baud rate from the at least one reference baud rate and a to-be-processed reference delay from the at least one reference delay.

[0115] Step 314: composing at least one reference chip transmission parameter group according to the to-be-processed reference baud rate and the to-be-processed reference delay.

[0116] Step 316: determining a to-be-processed reference chip transmission parameter group from each reference chip transmission parameter group and obtaining a to-be-processed reference baud rate and a to-be-processed reference delay in the to-be-processed reference chip transmission parameter group.

[0117] Step 318: calculating a performance evaluation weight corresponding to the to-be-processed reference chip transmission parameter group according to the to-be-processed reference baud rate and the to-be-processed reference delay.

[0118] Step 320: sorting the at least one reference chip transmission parameter group in descending order according to each performance evaluation weight and determining a target chip transmission parameter group corresponding to the target RS485 chip according to a sorting result.

[0119] Step 322: transmitting service data according to the target chip transmission parameter group and detecting a data transmission state of the service data.

[0120] Step 324: in a case where the data transmission state is an abnormal transmission, eliminating the target chip transmission parameter group from the at least one reference chip transmission parameter group and determining a new target chip transmission parameter group according to each performance evaluation weight.

[0121] Through the method provided in the embodiments of the present application, the target signal information of the RS485 chip is obtained by dynamically monitoring the quality of the communication link, the baud rate fluctuation interval of the chip is calculated through the target signal information, and at least one reference baud rate and at least one reference delay are matched according to the baud rate fluctuation interval. A plurality of reference chip transmission parameter groups are combined according to the at least one reference baud rate and the at least one reference delay, and a target chip transmission parameter group is selected according to the performance evaluation weights of the reference chip transmission parameter groups. Through the method, the stability in the data transmission process of the RS485 chip is improved, which can adaptively adjust the timing and adapt to the communication requirements in different environments to improve the communication stability. The real-time performance of the communication can also be improved by dynamically adjusting the delay to reduce unnecessary waiting. The reliability of the communication can also be improved through error processing and feedback optimization.

[0122] Corresponding to the method embodiments, the application further provides RS485 chip transmission parameter confirmation device embodiments, Figure 4 A structure diagram of an RS485 chip transmission parameter confirmation device is shown. As shown in the figure, Figure 4 The device comprises:

[0123] The acquisition module 402 is configured to acquire target signal information of a target RS485 chip in a preset time interval;

[0124] The calculation module 404 is configured to calculate a target baud rate fluctuation interval of the target RS485 chip in the preset time interval according to the target signal information;

[0125] The first determination module 406 is configured to determine at least one reference baud rate and at least one reference delay according to the target baud rate fluctuation interval in a preset baud rate delay lookup table, wherein the preset baud rate delay lookup table comprises delay time intervals and baud rate intervals set in a gradient;

[0126] The generation module 408 is configured to generate at least one reference chip transmission parameter group according to at least one reference baud rate and at least one reference delay, and calculate performance evaluation weights corresponding to each reference chip transmission parameter group, wherein the chip transmission parameter group comprises a baud rate and a delay;

[0127] The second determination module 410 is configured to determine a target chip transmission parameter group corresponding to the target RS485 chip in at least one reference chip transmission parameter group according to each performance evaluation weight.

[0128] Optionally, the acquisition module 402 is further configured to:

[0129] acquire reference signal information of the target RS485 chip in the preset time interval;

[0130] determine whether there is signal noise in the reference signal information;

[0131] if yes, remove the signal noise from the reference signal information to obtain the target signal information;

[0132] if no, determine the reference signal information as the target signal information.

[0133] Optionally, the acquisition module 402 is further configured to:

[0134] acquire a reference signal level in the reference signal information;

[0135] determine whether the reference signal level is in a preset signal level interval;

[0136] If yes, it is determined that there is no signal noise in the reference signal information;

[0137] If no, it is determined that there is signal noise in the reference signal information.

[0138] Optionally, the acquisition module 402 is further configured to:

[0139] acquire reference signal information of the target RS485 chip when acquiring service data sent by an external device based on a signal monitoring circuit.

[0140] Optionally, the signal monitoring circuit includes a differential receiver, an operational amplifier, and an analog-to-digital converter.

[0141] The acquisition module 402 is further configured to:

[0142] receive an initial signal of target RS485 receiving service data by the differential receiver, and convert the initial signal into a reference voltage signal;

[0143] perform operational amplification on the reference voltage signal by the operational amplifier to obtain an operational amplifier output signal;

[0144] convert the operational amplifier output signal into reference signal information by the analog-to-digital converter.

[0145] Optionally, the first determination module 406 is further configured to:

[0146] determine at least one reference baud rate according to the target baud rate fluctuation range in a preset baud rate delay table;

[0147] determine at least one reference delay corresponding to each reference baud rate in the preset baud rate delay table.

[0148] Optionally, the generation module 408 is further configured to:

[0149] select a to-be-processed reference baud rate from the at least one reference baud rate and select a to-be-processed reference delay from the at least one reference delay;

[0150] compose a reference chip transmission parameter group according to the to-be-processed reference baud rate and the to-be-processed reference delay.

[0151] Optionally, the generation module 408 is further configured to:

[0152] determine a to-be-processed reference chip transmission parameter group from each reference chip transmission parameter group, and acquire a to-be-processed reference baud rate and a to-be-processed reference delay in the to-be-processed reference chip transmission parameter group.

[0153] According to the to-be-processed reference baud rate and the to-be-processed reference delay, a performance evaluation weight corresponding to the to-be-processed reference chip transmission parameter group is calculated.

[0154] Optionally, the second determining module 410 is further configured to:

[0155] According to the performance evaluation weights, the at least one reference chip transmission parameter group is sorted in descending order;

[0156] According to the sorting result, a target chip transmission parameter group corresponding to the target RS485 chip is determined.

[0157] Optionally, the apparatus further comprises a detecting module configured to:

[0158] According to the target chip transmission parameter group, service data is transmitted, and a data transmission state of the service data is detected;

[0159] In a case where the data transmission state is an abnormal transmission, the target chip transmission parameter group is excluded from the at least one reference chip transmission parameter group, and a new target chip transmission parameter group is determined according to the performance evaluation weights.

[0160] Through the apparatus provided by the embodiments of the present application, the target signal information of the RS485 chip is obtained by adopting a dynamic monitoring manner of communication link quality, the baud rate fluctuation interval of the chip is calculated through the target signal information, and at least one reference baud rate and at least one reference delay are matched according to the baud rate fluctuation interval. A plurality of reference chip transmission parameter groups are combined according to the at least one reference baud rate and the at least one reference delay, and a target chip transmission parameter group is selected according to the performance evaluation weights of the reference chip transmission parameter groups. Through the method, the stability in the data transmission process of the RS485 chip is improved, so that the RS485 chip can adaptively adjust the timing and can adapt to the communication requirements in different environments, thereby improving the communication stability. The dynamic adjustment of the delay can also reduce unnecessary waiting and improve the real-time performance of the communication. The error processing and feedback optimization can also improve the reliability of the communication.

[0161] The above is a schematic scheme of the RS485 chip transmission parameter confirmation apparatus of the embodiment. It should be noted that the technical scheme of the RS485 chip transmission parameter confirmation apparatus belongs to the same concept as the technical scheme of the RS485 chip transmission parameter confirmation method described above, and the details of the technical scheme of the RS485 chip transmission parameter confirmation apparatus that are not described in detail can be seen from the description of the technical scheme of the RS485 chip transmission parameter confirmation method.

[0162] Figure 5A structural block diagram of a computing device 500 is shown, according to an embodiment of the present application. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 through a bus 530, and a database 550 is used to save data.

[0163] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or combinations of such networks, such as the Internet. The access device 540 can include one or more of any type of network interface (for example, a network interface card (NIC)), wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0164] In an embodiment of the present application, the above-mentioned components of the computing device 500 and other components not shown in the figure can be connected to each other, for example, through a bus. It should be understood that, Figure 5 the computing device 500 can be connected to each other through other means. For example, the components of the computing device 500 can be connected to each other through a point-to-point connection, a shared bus, a cross-bar switch fabric, or a network, etc. Figure 5 The structural block diagram of the computing device shown is only for the purpose of example, and is not a limitation on the scope of the present application. Other components can be added or replaced as needed by those skilled in the art.

[0165] The computing device 500 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 500 can also be a mobile or stationary server.

[0166] The processor 520 is configured to execute computer program / instructions, which, when executed by the processor, implement the steps of the RS485 chip transmission parameter confirmation method.

[0167] The above is a schematic scheme of the computing device of the embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the RS485 chip transmission parameter confirmation method belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the RS485 chip transmission parameter confirmation method.

[0168] An embodiment of the present specification also provides a computer readable storage medium storing computer program / instructions, which, when executed by a processor, implement the steps of the RS485 chip transmission parameter confirmation method.

[0169] The above is a schematic scheme of the computer readable storage medium of the embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the RS485 chip transmission parameter confirmation method belong to the same concept, and the details of the technical scheme of the storage medium that are not described in detail can be referred to the description of the technical scheme of the RS485 chip transmission parameter confirmation method.

[0170] An embodiment of the present specification also provides a computer program product comprising computer program / instructions, which, when executed by a processor, implement the steps of the RS485 chip transmission parameter confirmation method.

[0171] The above is a schematic scheme of the computer program product of the embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the RS485 chip transmission parameter confirmation method belong to the same concept, and the details of the technical scheme of the computer program product that are not described in detail can be referred to the description of the technical scheme of the RS485 chip transmission parameter confirmation method.

[0172] The above-described embodiments of the application have several aspects, no single one of which is solely responsible for the application's desirable attributes. Without limiting the scope of the application as expressed by the claims which follow, some further embodiments make these aspects even more useful. Other embodiments can result in less desirable attributes.

[0173] The computer readable medium can include any entity or apparatus capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium can include appropriate contents according to the requirements of patent practice, for example, according to the patent practice in some regions, the computer readable medium does not include electrical carrier signals and telecommunication signals.

[0174] It should be noted that for the foregoing method embodiments, the acts described can be performed in a different order from that described, and that various steps can be performed in parallel or with no breaks in between acts. Also, the various embodiments described above can be combined in any combination. Furthermore, the above-described embodiments are only preferred embodiments of the present application, and the acts and modules involved are not necessarily all required by the present application.

[0175] In the above embodiments, the description of each embodiment is focused on, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0176] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The alternative embodiments do not describe all the details and do not limit the application to the specific embodiments described. Obviously, according to the content of the present application, many modifications and changes can be made. The present application selects and describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well understand and utilize the present application. The present application is limited by the claims and their full scope and equivalents.

Claims

1. A method for confirming transmission parameters of an RS485 chip, characterized in that, include: Acquire the target signal information of the target RS485 chip within a preset time interval; Calculate the target baud rate fluctuation range of the target RS485 chip within the preset time interval based on the target signal information; Based on the target baud rate fluctuation range, at least one reference baud rate and at least one reference delay are determined in a preset baud rate delay lookup table, wherein the preset baud rate delay lookup table includes a delay time range and a baud rate range set according to a gradient. At least one reference chip transmission parameter group is generated based on at least one reference baud rate and at least one reference delay, and the performance evaluation weight corresponding to each reference chip transmission parameter group is calculated. The chip transmission parameter group includes baud rate and delay. The target chip transmission parameter group corresponding to the target RS485 chip is determined in at least one reference chip transmission parameter group based on each performance evaluation weight.

2. The method of claim 1, wherein, Acquire target signal information of the target RS485 chip within a preset time interval, including: Acquire the reference signal information of the target RS485 chip within a preset time interval; Determine whether there is signal noise in the reference signal information; If so, then remove the signal noise from the reference signal information to obtain the target signal information; If not, then the reference signal information is determined to be the target signal information.

3. The method of claim 2, wherein, Determining whether there is signal noise in the reference signal information includes: Obtain the reference signal level from the reference signal information; Determine whether the reference signal level is within a preset signal level range; If so, then it is determined that there is no signal noise in the reference signal information; If not, then it is determined that there is signal noise in the reference signal information.

4. The method of claim 2, wherein, Acquire reference signal information of the target RS485 chip within a preset time interval, including: The reference signal information is obtained by the signal monitoring circuit when the target RS485 chip acquires service data sent by external devices.

5. The method of claim 4, wherein, The signal monitoring circuit includes a differential receiver, an operational amplifier, and an analog-to-digital converter; The reference signal information obtained by the signal monitoring circuit when the target RS485 chip acquires service data sent by external devices includes: The differential receiver receives the initial signal of the target RS485 received service data and converts the initial signal into a reference voltage signal. The reference voltage signal is amplified by the operational amplifier to obtain the operational amplifier output signal. The operational amplifier output signal is converted into reference signal information by the analog-to-digital converter.

6. The method of claim 1, wherein, Based on the target baud rate fluctuation range, at least one reference baud rate and at least one reference delay are determined in a preset baud rate delay lookup table, including: Based on the target baud rate fluctuation range, at least one reference baud rate is determined in a preset baud rate delay lookup table; Determine at least one reference delay corresponding to each reference baud rate in the preset baud rate delay lookup table.

7. The method of claim 1, wherein, At least one set of reference chip transmission parameters is generated based on at least one reference baud rate and at least one reference delay, including: Select a reference baud rate to be processed from the at least one reference baud rate, and select a reference delay to be processed from the at least one reference delay; According to the to-be-processed reference baud rate and the to-be-processed reference delay, a reference chip transmission parameter set is formed.

8. The method of claim 1, wherein, The performance evaluation weight corresponding to each reference chip transmission parameter set is calculated, including: In each reference chip transmission parameter set, a to-be-processed reference chip transmission parameter set is determined, and a to-be-processed reference baud rate and a to-be-processed reference delay in the to-be-processed reference chip transmission parameter set are obtained. According to the to-be-processed reference baud rate and the to-be-processed reference delay, the performance evaluation weight corresponding to the to-be-processed reference chip transmission parameter set is calculated.

9. The method of claim 1, wherein, According to each performance evaluation weight, the target chip transmission parameter set corresponding to the target RS485 chip is determined from at least one reference chip transmission parameter set, including: According to each performance evaluation weight, at least one reference chip transmission parameter set is sorted from large to small. According to the sorting result, the target chip transmission parameter set corresponding to the target RS485 chip is determined.

10. The method of claim 1, wherein, Further comprising: According to the target chip transmission parameter set, service data is transmitted, and the data transmission state of the service data is detected. In the case that the data transmission state is abnormal, the target chip transmission parameter set is excluded from at least one reference chip transmission parameter set, and a new target chip transmission parameter set is determined according to each performance evaluation weight.

11. A RS485 chip transmission parameter confirmation device, characterized in that, Including: The acquisition module is configured to acquire target signal information of the target RS485 chip in a preset time interval. The calculation module is configured to calculate a target baud rate fluctuation interval of the target RS485 chip in the preset time interval according to the target signal information. The first determination module is configured to determine at least one reference baud rate and at least one reference delay in a preset baud rate and delay reference table according to the target baud rate fluctuation interval, wherein the preset baud rate and delay reference table includes a delay time interval and a baud rate interval set according to a gradient. The generation module is configured to generate at least one reference chip transmission parameter set according to at least one reference baud rate and at least one reference delay, and calculate the performance evaluation weight corresponding to each reference chip transmission parameter set, wherein the chip transmission parameter set includes a baud rate and a delay. The second determination module is configured to determine the target chip transmission parameter set corresponding to the target RS485 chip from at least one reference chip transmission parameter set according to each performance evaluation weight.

12. A computing device, comprising: Including: A memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which realize the steps of the method in any one of claims 1 to 10 when executed by the processor.

13. A computer readable storage medium storing computer programs / instructions, characterized in that, The computer programs / instructions realize the steps of the method in any one of claims 1 to 10 when executed by the processor.

14. A computer program product comprising computer programs / instructions, characterized in that, The computer programs / instructions realize the steps of the method in any one of claims 1 to 10 when executed by the processor.

Citation Information

Patent Citations

  • High-reliability baud rate adaptive system and method

    CN114465844A

  • Method for self-adapting to Baud rate of serial communication

    CN118101125A