One-line communication conversion box and communication conversion method

Through a communication conversion method, the MCU is used to perform compatible processing of communication data of electric bicycle components, solving the convenience of processing of different types of communication data, and realizing highly accurate signal analysis and matching communication protocol screening.

CN118200761BActive Publication Date: 2025-02-11HANGZHOU AMXI TECH SERVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410296840.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-15
Publication Date
2025-02-11
Estimated Expiration
2044-03-15

AI Technical Summary

Technical Problem

How to achieve compatible processing of different types of communication data, and improve the convenience of independent detection and testing of electric bicycle parts.

Method used

Through a communication conversion method, the MCU (microcontroller) uses a MCU (microcontroller) to determine whether the signal is an interfering signal based on the amplitude characteristics and waveform variation characteristics of the level change signal, and match the protocol similarity with the preset communication protocol to determine the matching communication protocol for signal resolution.

Benefits of technology

Accurate screening of level-changing signals is achieved, avoid interference signal interference, improve the accuracy of signal analysis results, and ensure accurate screening of matching communication protocols is ensured by dynamically adjusting the signal analysis cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118200761B_ABST
    Figure CN118200761B_ABST
Patent Text Reader

Abstract

The present invention provides a one-line communication conversion box and a communication conversion method, which belong to the technical field of communication data processing, and specifically include: when in a signal receiving state: taking a preset communication protocol that meets the protocol similarity requirement as a similar communication protocol, and determining the signal analysis period of the data bus according to the number of similar communication protocols and the protocol similarities of different similar communication protocols, determining the matching communication protocol of the level change signal based on the analysis result of the level change signal of the signal analysis period, and outputting the signal analysis result of the data bus through the matching communication protocol; when in a signal output state: converting a frame to be sent into a one-line protocol timing high and low level that meets the internal definition of an MCU, and then sending it to the data bus through a one-line data sending circuit, thereby ensuring the accuracy of the communication conversion result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of communication data processing, and in particular relates to a one-line communication conversion box and a communication conversion method. Background Art

[0002] With the rapid popularization of electric bicycles in recent years, the implementation of the new national standard for electric bicycles has put forward higher requirements for the safety of electric bicycle use and charging, which has led to the need for independent testing of components such as battery BMS, vehicle ECU, charger, controller, display module, etc., and therefore requires independent communication, command simulation, fault injection and other test operations for each component. Therefore, how to achieve compatible processing of different types of communication data and improve the convenience of test operations has become a technical problem that needs to be solved urgently.

[0003] In view of the above technical problems, the present invention provides a one-line communication conversion box and a communication conversion method. Summary of the invention

[0004] To achieve the purpose of the present invention, the present invention adopts the following technical solutions:

[0005] According to one aspect of the present invention, a communication conversion method is provided.

[0006] A communication conversion method, characterized by comprising:

[0007] When in signal receiving state:

[0008] The level change signal on the data bus is transmitted to the MCU, and when it is determined that the level change signal is not an interference signal according to different level amplitude characteristics and waveform change characteristics within a preset time period, the next step is entered;

[0009] Acquire the level timing characteristics of the data bus within a preset time period, and determine the protocol similarity between the level change signal and different preset communication protocols in combination with different level amplitude characteristics within the preset time period, and when there is a preset communication protocol whose protocol similarity meets the requirements, proceed to the next step;

[0010] The preset communication protocol that meets the protocol similarity requirement is used as a similar communication protocol, and the signal analysis period of the data bus is determined according to the number of similar communication protocols and the protocol similarities of different similar communication protocols, and the matching communication protocol of the level change signal is determined based on the analysis result of the level change signal of the signal analysis period, and the signal analysis result of the data bus is output through the matching communication protocol;

[0011] When in signal output state:

[0012] The frames to be sent are converted into high and low levels of the one-line protocol timing sequence that conforms to the internal definition of the MCU, and then sent to the data bus through the one-line data sending circuit.

[0013] A further technical solution is that the MCU includes a 51 single-chip microcomputer, a microprocessor based on an ARM architecture or a MIPS architecture.

[0014] A further technical solution is that the waveform change characteristics include the waveform change rate and change duration of the high level in the rising stage and the falling stage, and the duration of the high level in the stable stage.

[0015] A further technical solution is that the stable stage is determined based on the amplitude variation between adjacent moments of the high level.

[0016] A further technical solution is that when the amplitude of the level is greater than a preset amplitude, the level is determined to be a high level.

[0017] A further technical solution is that the level timing feature includes time intervals between different adjacent high levels.

[0018] A further technical solution is that the method for determining the matching communication protocol of the level change signal is:

[0019] The matching communication protocol of the level change signal is determined according to the protocol similarity between the level change signal in the signal analysis period and similar communication protocols in different similar protocol intervals.

[0020] In a second aspect, the present invention provides a one-line communication conversion box, which adopts the above-mentioned communication conversion method, and is characterized in that it specifically includes:

[0021] A signal receiving module and a signal sending module, wherein the signal receiving module includes an interference signal judging module, a similarity judging module, and an analysis result output module;

[0022] The interference signal evaluation module is responsible for transmitting the level change signal on the data bus to the MCU, and determining whether the level change signal is an interference signal according to different level amplitude characteristics and waveform change characteristics within a preset time period;

[0023] The similarity evaluation module is responsible for obtaining the level timing characteristics of the data bus within a preset time period, and determining the protocol similarity between the level change signal and different preset communication protocols in combination with different level amplitude characteristics within the preset time period;

[0024] The analysis result output module is responsible for taking the preset communication protocol that meets the protocol similarity requirement as the similar communication protocol, and determining the signal analysis period of the data bus according to the number of similar communication protocols and the protocol similarities of different similar communication protocols, determining the matching communication protocol of the level change signal based on the analysis result of the level change signal of the signal analysis period, and outputting the signal analysis result of the data bus through the matching communication protocol;

[0025] The signal sending module is responsible for converting the frames to be sent into high and low levels that conform to the one-line protocol timing defined inside the MCU, and then sending them to the data bus through the one-line data sending circuit.

[0026] The beneficial effects of the present invention are:

[0027] 1. Determine whether the level change signal is an interference signal based on the different level amplitude characteristics and waveform change characteristics within a preset time period, thereby realizing the screening of interference signals from two perspectives: the level amplitude characteristics and the fluctuation characteristics of the level change signal, avoiding the interference of the interference signal of the data bus, and further improving the accuracy of the signal analysis results of the data bus.

[0028] 2. The signal analysis period of the data bus is determined according to the number of similar communication protocols and the protocol similarity of different similar communication protocols, thereby avoiding the technical problem of inaccurate analysis results of level change signals due to a large number of similar communication protocols. The signal analysis period is dynamically adjusted through similar situations of similar communication protocols, thereby achieving accurate screening of matching communication protocols and ensuring the accuracy of signal analysis results.

[0029] Other features and advantages will be described in the following description. The objects and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and drawings.

[0030] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.

[0032] Figure 1 is a flow chart of a communication conversion method;

[0033] Figure 2 is a flow chart of a method for determining the protocol similarity between a level change signal and a preset communication protocol;

[0034] Figure 3 The present invention is a flow chart of a method for determining a signal analysis cycle of a data bus. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0036] The following will further explain from two perspectives: Example 1 and Example 2.

[0037] Example 1

[0038] To solve the above problems, according to one aspect of the present invention, Figure 1 As shown, a communication conversion method is provided, which is characterized by specifically comprising:

[0039] When in signal receiving state:

[0040] The level change signal on the data bus is transmitted to the MCU, and when it is determined that the level change signal is not an interference signal according to different level amplitude characteristics and waveform change characteristics within a preset time period, the next step is entered;

[0041] Furthermore, the MCU includes a 51 single-chip microcomputer, a microprocessor based on an ARM architecture or a MIPS architecture.

[0042] It should be noted that the waveform change characteristics include the waveform change rate and change duration of the high level in the rising stage and the falling stage, and the duration of the high level in the stable stage.

[0043] It should be noted that the stable stage is determined based on the amplitude variation between adjacent moments of the high level.

[0044] Specifically, when the amplitude of the level is greater than a preset amplitude, the level is determined to be a high level.

[0045] In one possible embodiment, determining that the level change signal is not an interference signal specifically includes:

[0046] Determine level deviations of different high levels by using level amplitude characteristics and waveform variation characteristics of different high levels within the preset time period, and divide the high level into a deviation level and a matching level by using the level deviation;

[0047] Acquire the number of deviation levels in the preset time period, and determine the comprehensive deviation amount of the deviation level in the preset time period in combination with the number of deviation levels in different divided time periods in the preset time period and the level deviation amounts of different deviation levels;

[0048] Acquire the number of matching levels in the preset time period, and determine the comprehensive deviation of the matching levels in the preset time period in combination with the number of matching levels in different divided time periods in the preset time period and the level deviations of different matching levels;

[0049] The signal interference probability within the preset time period is determined by the comprehensive deviation of the matching level within the preset time period and the comprehensive deviation of the deviation level, and whether the level change signal is an interference signal is determined based on the signal interference probability.

[0050] Further, when the signal interference probability does not meet the requirement, it is determined that the level change signal is an interference signal.

[0051] In another possible embodiment, determining that the level change signal is not an interference signal specifically includes:

[0052] S11 determines the level deviation of different high levels by using the level amplitude characteristics and waveform change characteristics of different high levels within the preset time period, and determines whether there is a deviation level in the high level by the level deviation, if yes, proceeds to the next step, if no, determines that the level change signal is not an interference signal;

[0053] S12 divides the high level into a deviation level and a matching level according to the level deviation amount, and determines whether the amount of the deviation level meets the requirement, if so, proceeds to the next step, if not, proceeds to step S14;

[0054] S13 determines the deviation levels in different divided time periods according to the moments when different deviation levels are matched, and judges whether the number of divided time periods with deviation levels meets the requirement. If so, it is determined that the level change signal is not an interference signal. If not, proceed to the next step.

[0055] S14: obtaining the number of deviation levels in the preset time period, and determining the comprehensive deviation amount of the deviation level in the preset time period in combination with the number of deviation levels in different divided time periods in the preset time period and the level deviation amounts of different deviation levels, and judging whether the comprehensive deviation amount of the deviation level meets the requirement, if so, proceeding to the next step, if not, determining that the level change signal is an interference signal;

[0056] S15 obtains the number of matching levels in the preset time period, and determines the comprehensive deviation of the matching levels in the preset time period in combination with the number of matching levels in different divided time periods in the preset time period and the level deviations of different matching levels. The signal interference probability in the preset time period is determined by the comprehensive deviation of the matching levels in the preset time period and the comprehensive deviation of the deviation levels, and whether the level change signal is an interference signal is determined based on the signal interference probability.

[0057] In another possible embodiment, determining that the level change signal is not an interference signal specifically includes:

[0058] Determine the level deviation of different high levels by using the level amplitude characteristics and waveform change characteristics of different high levels within the preset time period, divide the high level into a deviation level and a matching level by the level deviation, and determine that the level change signal does not belong to an interference signal when the number of the deviation levels is less than the preset number of levels;

[0059] When the number of the deviation levels is not less than the preset number of levels, determining whether the number of the deviation levels is greater than the level quantity limit, if so, determining that the level change signal is an interference signal, if not, proceeding to the next step;

[0060] Determine the deviation levels in different divided time periods according to the moments when different deviation levels are matched, and judge whether the number of divided time periods in which the deviation levels exist meets the requirement, and if so, determine that the level change signal does not belong to the interference signal, and if not, proceed to the next step;

[0061] Determine the time period level deviation amount of different divided time periods based on the number of deviation levels of different divided time periods and the level deviation amount of the deviation level, and judge whether the number of divided time periods whose time period level deviation amount does not meet the requirement meets the requirement, if so, proceed to the next step, if not, determine that the level change signal is an interference signal;

[0062] Acquire the number of deviation levels in the preset time period, and determine the comprehensive deviation amount of the deviation level in the preset time period in combination with the number of deviation levels in different divided time periods in the preset time period and the time period level deviation amounts of different divided time periods;

[0063] The number of matching levels in the preset time period is obtained, and the comprehensive deviation of the matching levels in the preset time period is determined in combination with the number of matching levels in different divided time periods in the preset time period and the level deviations of different matching levels. The signal interference probability in the preset time period is determined by the comprehensive deviation of the matching levels in the preset time period and the comprehensive deviation of the deviation levels, and whether the level change signal is an interference signal is determined based on the signal interference probability.

[0064] Acquire the level timing characteristics of the data bus within a preset time period, and determine the protocol similarity between the level change signal and different preset communication protocols in combination with different level amplitude characteristics within the preset time period, and when there is a preset communication protocol whose protocol similarity meets the requirements, proceed to the next step;

[0065] Specifically, the level timing characteristics include time intervals between different adjacent high levels.

[0066] In one possible embodiment, a method for determining the protocol similarity between the level change signal and the preset communication protocol is:

[0067] Determine the number of amplitude deviation high levels within a preset time period based on the level amplitude characteristics of different high levels within a preset time period and the level amplitude characteristics of the high level of the preset communication protocol, and judge whether the number of amplitude deviation high levels meets the requirement, if so, proceed to the next step, if not, determine that the protocol similarity of the preset communication protocol does not meet the requirement;

[0068] Determine the number of high levels with deviations in the time intervals within the preset time period by using the time intervals between different adjacent high levels of the preset communication protocol within the preset time period, and use it as a timing deviation level, and judge whether the number of the timing deviation levels meets the requirements, if so, proceed to the next step, if not, determine that the protocol similarity of the preset communication protocol does not meet the requirements;

[0069] Determine the amplitude feature similarity based on the number of the amplitude deviation high levels and the deviation amounts of the level amplitude features of different amplitude deviation high levels, and judge whether the amplitude feature similarity meets the requirements, if so, proceed to the next step, if not, determine that the protocol similarity of the preset communication protocol does not meet the requirements;

[0070] Determine the similarity of timing characteristics by the deviation amount of the time intervals of different timing deviation levels and the number of timing deviation levels, and judge whether the timing characteristic similarity meets the requirements, if so, proceed to the next step, if not, determine that the protocol similarity of the preset communication protocol does not meet the requirements;

[0071] The protocol similarity between the level change signal and the preset communication protocol is determined based on the timing feature similarity and the amplitude feature similarity.

[0072] Further, when the protocol similarity of the preset communication protocol is greater than a preset similarity threshold, it is determined that the protocol similarity of the preset communication protocol meets the requirement.

[0073] In one possible embodiment, Figure 2 As shown, the method for determining the protocol similarity between the level change signal and the preset communication protocol is:

[0074] Determine the number of amplitude deviation high levels within a preset time period based on different high level level amplitude characteristics within a preset time period and the high level level amplitude characteristics of the preset communication protocol, and determine the amplitude feature similarity in combination with the deviation amounts of the level amplitude characteristics of the different amplitude deviation high levels;

[0075] Determine the number of high levels with deviations in the time intervals within the preset time period by using the time intervals between different adjacent high levels of the preset communication protocol, and use it as the timing deviation level, and determine the timing feature similarity by the deviation amounts of the time intervals of different timing deviation levels and the number of timing deviation levels;

[0076] The protocol similarity between the level change signal and the preset communication protocol is determined based on the timing feature similarity and the amplitude feature similarity.

[0077] In another possible embodiment, a method for determining the protocol similarity between the level change signal and the preset communication protocol is:

[0078] Determine the number of high levels with amplitude deviation within the preset time period based on the level amplitude characteristics of different high levels within the preset time period and the level amplitude characteristics of the high level of the preset communication protocol, and determine the number of high levels with deviation in the time interval within the preset time period using the time intervals between different adjacent high levels within the preset time period and the preset communication protocol, and use it as the timing deviation level;

[0079] When the sum of the number of amplitude deviation high levels and the number of timing deviation levels does not meet the requirement:

[0080] It is determined that the protocol similarity of the preset communication protocol does not meet the requirement;

[0081] When the sum of the number of amplitude deviation high levels and the number of timing deviation levels meets the requirement:

[0082] Determine the amplitude feature similarity in different divided time periods based on the number of the amplitude deviation high levels in different divided time periods within a preset time period and the deviation amount of the level amplitude features of different amplitude deviation high levels, and judge whether the number of divided time periods whose amplitude feature similarity does not meet the requirement meets the requirement, if so, proceed to the next step, if not, determine that the protocol similarity of the preset communication protocol does not meet the requirement;

[0083] Determine the similarity of timing characteristics in different divided time periods by the deviation amount of time intervals of different timing deviation levels in different divided time periods and the number of timing deviation levels, and judge whether the number of divided time periods whose timing characteristic similarity does not meet the requirement meets the requirement, if so, proceed to the next step, if not, determine that the protocol similarity of the preset communication protocol does not meet the requirement;

[0084] Determine the similarity between the level change signal in different divided time periods and the interval protocol of the preset communication protocol according to the similarity of the timing characteristics and the similarity of the amplitude characteristics, and judge whether the number of divided time periods in which the interval protocol similarity does not meet the requirement meets the requirement, if so, proceed to the next step, if not, determine that the protocol similarity of the preset communication protocol does not meet the requirement;

[0085] The protocol similarity between the level change signal and the preset communication protocol is determined by using the interval protocol similarity between the level change signal and the preset communication protocol in different divided time periods.

[0086] The preset communication protocol that meets the protocol similarity requirement is used as a similar communication protocol, and the signal analysis period of the data bus is determined according to the number of similar communication protocols and the protocol similarities of different similar communication protocols, and the matching communication protocol of the level change signal is determined based on the analysis result of the level change signal of the signal analysis period, and the signal analysis result of the data bus is output through the matching communication protocol;

[0087] Specific examples, such as Figure 3 As shown, the method for determining the signal analysis period of the data bus is:

[0088] Dividing the similar communication protocols into a first similar protocol interval and a second similar protocol interval based on the protocol similarity of the similar communication protocols;

[0089] Determine the comprehensive protocol similarity of the first similar protocol interval and the comprehensive protocol similarity of the second similar protocol interval according to the number of similar communication protocols in the first similar protocol interval and the second similar protocol interval and the protocol similarities of different similar communication protocols;

[0090] The signal comprehensive similarity of the level change signal is determined by the protocol comprehensive similarity of the first similar protocol section and the protocol comprehensive similarity of the second similar protocol section, and the signal analysis period of the data bus is determined based on the signal comprehensive similarity.

[0091] In another possible embodiment, the method for determining the signal analysis period of the data bus is:

[0092] Determine whether the number of the similar communication protocols is greater than the first similar protocol number, if so, determine the signal analysis period of the data bus through a preset analysis period, if not, proceed to the next step;

[0093] Dividing the similar communication protocols into a first similar protocol interval and a second similar protocol interval based on the protocol similarity of the similar communication protocols, determining whether the number of similar communication protocols in the first similar protocol interval is greater than a preset number of similar protocols, if so, determining the signal analysis period of the data bus through a preset analysis period, if not, proceeding to the next step;

[0094] Determine the comprehensive similarity of the protocols in the first similar protocol interval according to the number of similar communication protocols in the first similar protocol interval and the protocol similarities of different similar communication protocols, and judge whether the comprehensive similarity of the protocols in the first similar protocol interval meets the requirements; if so, determine the signal analysis period of the data bus through a preset analysis period; if not, proceed to the next step;

[0095] The comprehensive protocol similarity of the second similar protocol interval is determined according to the number of similar communication protocols in the second similar protocol interval and the protocol similarities of different similar communication protocols, the comprehensive signal similarity of the level change signal is determined by the comprehensive protocol similarity of the first similar protocol interval and the comprehensive protocol similarity of the second similarity protocol interval, and the signal analysis period of the data bus is determined based on the comprehensive signal similarity.

[0096] A further technical solution is that the method for determining the matching communication protocol of the level change signal is:

[0097] The matching communication protocol of the level change signal is determined according to the protocol similarity between the level change signal in the signal analysis period and similar communication protocols in different similar protocol intervals.

[0098] When in signal output state:

[0099] The frames to be sent are converted into high and low levels of the one-line protocol timing sequence that conforms to the internal definition of the MCU, and then sent to the data bus through the one-line data sending circuit.

[0100] Example 2

[0101] On the other hand, the present invention provides a one-line communication conversion box, which adopts the above-mentioned communication conversion method, and is characterized in that it specifically includes:

[0102] A signal receiving module and a signal sending module, wherein the signal receiving module includes an interference signal judging module, a similarity judging module, and an analysis result output module;

[0103] The interference signal evaluation module is responsible for transmitting the level change signal on the data bus to the MCU, and determining whether the level change signal is an interference signal according to different level amplitude characteristics and waveform change characteristics within a preset time period;

[0104] The similarity evaluation module is responsible for obtaining the level timing characteristics of the data bus within a preset time period, and determining the protocol similarity between the level change signal and different preset communication protocols in combination with different level amplitude characteristics within the preset time period;

[0105] The analysis result output module is responsible for taking the preset communication protocol that meets the protocol similarity requirement as the similar communication protocol, and determining the signal analysis period of the data bus according to the number of similar communication protocols and the protocol similarities of different similar communication protocols, determining the matching communication protocol of the level change signal based on the analysis result of the level change signal of the signal analysis period, and outputting the signal analysis result of the data bus through the matching communication protocol;

[0106] The signal sending module is responsible for converting the frames to be sent into high and low levels that conform to the one-line protocol timing defined inside the MCU, and then sending them to the data bus through the one-line data sending circuit.

[0107] Through the above embodiments, the present invention achieves the following beneficial effects:

[0108] 1. Determine whether the level change signal is an interference signal based on the different level amplitude characteristics and waveform change characteristics within a preset time period, thereby realizing the screening of interference signals from two perspectives: the level amplitude characteristics and the fluctuation characteristics of the level change signal, avoiding the interference of the interference signal of the data bus, and further improving the accuracy of the signal analysis results of the data bus.

[0109] 2. The signal analysis cycle of the data bus is determined according to the number of similar communication protocols and the protocol similarity of different similar communication protocols, which avoids the technical problem that the analysis results of the level change signal are not accurate due to the large number of similar communication protocols. The signal analysis cycle is dynamically adjusted through the similar situations of similar communication protocols, which realizes the accurate screening of matching communication protocols and ensures the accuracy of signal analysis results.

[0110] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0111] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0112] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.

Claims

1. A communication conversion method, characterized in that: Specifically include: When in signal receiving state: The level change signal on the data bus is transmitted to the MCU, and when it is determined that the level change signal is not an interference signal according to different level amplitude characteristics and waveform change characteristics within a preset time period, the next step is entered; Acquire the level timing characteristics of the data bus within a preset time period, and determine the protocol similarity between the level change signal and different preset communication protocols in combination with different level amplitude characteristics within the preset time period, and when there is a preset communication protocol whose protocol similarity meets the requirements, proceed to the next step; The preset communication protocol that meets the protocol similarity requirement is used as a similar communication protocol, and the signal analysis period of the data bus is determined according to the number of similar communication protocols and the protocol similarities of different similar communication protocols, and the matching communication protocol of the level change signal is determined based on the analysis result of the level change signal of the signal analysis period, and the signal analysis result of the data bus is output through the matching communication protocol; When in signal output state: Convert the frames to be sent into high and low levels that conform to the one-line protocol timing defined inside the MCU, and then send them to the data bus through the one-line data sending circuit; Determining that the level change signal is not an interference signal specifically includes: Determine level deviations of different high levels by using level amplitude characteristics and waveform variation characteristics of different high levels within the preset time period, and divide the high level into a deviation level and a matching level by using the level deviation; Acquire the number of deviation levels in the preset time period, and determine the comprehensive deviation amount of the deviation level in the preset time period in combination with the number of deviation levels in different divided time periods in the preset time period and the level deviation amounts of different deviation levels; Acquire the number of matching levels in the preset time period, and determine the comprehensive deviation of the matching levels in the preset time period in combination with the number of matching levels in different divided time periods in the preset time period and the level deviations of different matching levels; Determining the signal interference probability within the preset time period by using the comprehensive deviation amount of the matching level within the preset time period and the comprehensive deviation amount of the deviation level, and determining whether the level change signal is an interference signal based on the signal interference probability; The method for determining the protocol similarity between the level change signal and the preset communication protocol is: Determine the number of amplitude deviation high levels within a preset time period based on different high level level amplitude characteristics within a preset time period and the high level level amplitude characteristics of the preset communication protocol, and determine the amplitude feature similarity in combination with the deviation amounts of the level amplitude characteristics of the different amplitude deviation high levels; Determine the number of high levels with deviations in the time intervals within the preset time period by using the time intervals between different adjacent high levels of the preset communication protocol, and use it as the timing deviation level, and determine the timing feature similarity by the deviation amounts of the time intervals of different timing deviation levels and the number of timing deviation levels; Determining the protocol similarity between the level change signal and the preset communication protocol according to the timing feature similarity and the amplitude feature similarity; The method for determining the signal analysis period of the data bus is: Determine whether the number of the similar communication protocols is greater than the first similar protocol number, if so, determine the signal analysis period of the data bus through a preset analysis period, if not, proceed to the next step; Dividing the similar communication protocols into a first similar protocol interval and a second similar protocol interval based on the protocol similarity of the similar communication protocols, determining whether the number of similar communication protocols in the first similar protocol interval is greater than a preset number of similar protocols, if so, determining the signal analysis period of the data bus through a preset analysis period, if not, proceeding to the next step; Determine the comprehensive similarity of the protocols in the first similar protocol interval according to the number of similar communication protocols in the first similar protocol interval and the protocol similarities of different similar communication protocols, and judge whether the comprehensive similarity of the protocols in the first similar protocol interval meets the requirements; if so, determine the signal analysis period of the data bus through a preset analysis period; if not, proceed to the next step; The comprehensive protocol similarity of the second similar protocol interval is determined according to the number of similar communication protocols in the second similar protocol interval and the protocol similarities of different similar communication protocols, the comprehensive signal similarity of the level change signal is determined by the comprehensive protocol similarity of the first similar protocol interval and the comprehensive protocol similarity of the second similarity protocol interval, and the signal analysis period of the data bus is determined based on the comprehensive signal similarity.

2. The communication conversion method according to claim 1, characterized in that: The MCU includes a 51 single-chip microcomputer, a microprocessor based on an ARM architecture or a MIPS architecture.

3. The communication conversion method according to claim 1, characterized in that: The waveform change characteristics include the waveform change rate and change duration of the high level in the rising stage and the falling stage, and the duration of the high level in the stable stage.

4. The communication conversion method according to claim 3, characterized in that: The stable stage is determined based on the amplitude variation between adjacent moments of the high level.

5. The communication conversion method according to claim 1, characterized in that: When the signal interference probability does not meet the requirement, it is determined that the level change signal is an interference signal.

6. The communication conversion method according to claim 1, characterized in that: The level timing characteristics include time intervals between different adjacent high levels.

7. The communication conversion method according to claim 1, characterized in that: The method for determining the matching communication protocol of the level change signal is: The matching communication protocol of the level change signal is determined according to the protocol similarity between the level change signal in the signal analysis period and similar communication protocols in different similar protocol intervals.

8. A one-line communication conversion box, using a communication conversion method according to any one of claims 1 to 7, characterized in that: Specifically include: A signal receiving module and a signal sending module, wherein the signal receiving module includes an interference signal judging module, a similarity judging module, and an analysis result output module; The interference signal evaluation module is responsible for transmitting the level change signal on the data bus to the MCU, and determining whether the level change signal is an interference signal according to different level amplitude characteristics and waveform change characteristics within a preset time period; The similarity evaluation module is responsible for obtaining the level timing characteristics of the data bus within a preset time period, and determining the protocol similarity between the level change signal and different preset communication protocols in combination with different level amplitude characteristics within the preset time period; The analysis result output module is responsible for taking the preset communication protocol that meets the protocol similarity requirement as the similar communication protocol, and determining the signal analysis period of the data bus according to the number of similar communication protocols and the protocol similarities of different similar communication protocols, determining the matching communication protocol of the level change signal based on the analysis result of the level change signal of the signal analysis period, and outputting the signal analysis result of the data bus through the matching communication protocol; The signal sending module is responsible for converting the frames to be sent into high and low levels that conform to the one-line protocol timing defined inside the MCU, and then sending them to the data bus through the one-line data sending circuit.

Citation Information

Patent Citations

  • Processing method and device of pulse wave

    CN106199561A

  • Multi-protocol automatic identification and conversion method and intelligent gateway

    CN112104654A