Signal processing method, device, electronic device and readable storage medium
By detecting the cumulative duration of the level signal within the preset observation window, the target level signal is determined, which solves the problem of noise impact when converting binary level bit signals, improves the accuracy of bit signal identification and the byte data reliability.
Patent Information
- Application Number
- CN202110669294.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-17
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-06-17
AI Technical Summary
The existing technology is easily affected by noise when converting binary levels into bit signals, resulting in insufficient accuracy and reliability of byte data.
By detecting the cumulative duration of the level signal within the preset observation window, the target level signal is determined to be a bit signal 0 or 1 or an idle signal, avoiding the collection of high-level rising edges and falling edges, and improving the accuracy of bit signal identification. .
It improves the accuracy of bit signal conversion and the reliability of byte data, and reduces the impact of noise on recognition.
Smart Images

Figure CN113298033B
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing, and in particular, to a signal processing method, device, electronic device and readable storage medium. Background Art
[0002] There are electronic devices on the market that receive data based on hardware implementation. The hardware provides an upper-layer communication interface for receiving data by byte, and the software processes data frames organized by byte. Data reception implemented by hardware is usually: the received level signal is converted into byte data, during which the level signal that needs to undergo continuous gradual changes is converted into a binary level, and then the binary level is converted into a bit signal 0 / 1, and finally the bit signal 0 / 1 is converted into byte data. Among them, the binary level is a level signal including a high level and a low level. At present, in the process of converting the binary level into a bit signal, it is easy to affect the accuracy of the binary level conversion bit signal due to the noise in the binary level, thereby causing errors in the converted byte data. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a signal processing method, device, electronic device and readable storage medium, which can improve the accuracy of binary level conversion bit signals and enhance the accuracy and reliability of byte data obtained based on bit signal conversion.
[0004] In order to achieve the above purpose, the embodiments of the present application are implemented in the following manner:
[0005] In a first aspect, an embodiment of the present application provides a signal processing method, the method comprising:
[0006] Determine a target level signal from the received input level signal, wherein the target level signal is a level signal of the input level signal within a preset observation window, and the input level signal includes a high level and / or a low level;
[0007] When the target level signal has a high level and the accumulated duration of the high level in the target level signal is within a first preset duration range, it is determined that the target level signal includes a bit signal 0.
[0008] In the above-mentioned embodiment, by utilizing a preset observation window to observe the input level signal, the cumulative duration of the high level within the window can be detected without having to determine the bit signal by collecting the rising and falling edges of the high level. This is beneficial to improving the accuracy of bit signal recognition and avoiding the accuracy of bit signal recognition being affected by noise.
[0009] In combination with the first aspect, in some optional implementations, the method further includes:
[0010] When the target level signals are all low levels, or when the target level signals have a high level and the accumulated duration of the high level in the target level signals is not within the first preset duration range, it is determined that the target level signals include bit signal 1 or an idle signal.
[0011] In the above-mentioned embodiment, in the preset observation window, the target level signal whose cumulative duration of the low level or high level is not within the first preset duration range can be determined as bit signal 1 or idle signal. In this way, the influence of the sudden high level noise in the low level signal on the identification of the bit signal can be eliminated, thereby improving the accuracy of bit signal identification.
[0012] In combination with the first aspect, in some optional implementations, determining that the target level signal includes a bit signal 1 or an idle signal includes:
[0013] Determine, from the input level signal, a first time interval between the target level signal and a first bit signal 0, wherein the first bit signal 0 is a bit signal 0 in the input level signal that is before the target level signal and has a closest time interval to the target level signal;
[0014] When the first time interval is greater than or equal to a second preset duration, determining that the target level signal includes the idle signal, and the second preset duration is greater than a maximum value in the range of the first preset duration;
[0015] When the target level signal is between the first bit signal 0 and the second bit signal 0, and the second time interval between the first bit signal 0 and the second bit signal 0 is less than the second preset duration, it is determined that the target level signal includes the bit signal 1, and the second bit signal 0 is the first bit signal 0 in the input level signal after the first bit signal 0.
[0016] In the above-mentioned implementation, bit signal 1 is usually accompanied by bit signal 0, and the idle signal is usually at a low level for a long time. Therefore, based on the electrical characteristics of bit signal 1 and the idle signal, combined with the period of occurrence of bit signal 0, it is possible to quickly and accurately determine whether the low-level target signal is bit signal 1 or idle signal.
[0017] In combination with the first aspect, in some optional implementations, the method further includes:
[0018] According to the input sequence of the bit signal 0 and the bit signal 1 and a preset decoding strategy, the bit signal 0 and / or the bit signal 1 corresponding to the input level signal are converted to obtain byte data.
[0019] In the above-mentioned implementation, since the accuracy and reliability of converting the input level signal into the bit signal 0 / 1 are high, when the bit signal 0 / 1 is used to convert the byte data, the accuracy and reliability of the obtained byte data can be improved.
[0020] In combination with the first aspect, in some optional implementations, the input level signal includes a level signal based on the KNX protocol;
[0021] The bit signal 0 includes a high level signal that first lasts for 35 microseconds and then a low level signal that lasts for 69 microseconds;
[0022] The bit signal 1 is a low level signal lasting 104 microseconds;
[0023] The observation duration corresponding to the preset observation window is any duration greater than or equal to 35 microseconds and less than or equal to 104 microseconds.
[0024] In the above-mentioned embodiment, the observation duration of the preset observation window is between 35 microseconds and 104 microseconds, which is conducive to observing the high-level part of the bit signal 0, avoiding missing the observation of the high level or avoiding exceeding the duration of a single bit signal, which affects the validity of the counted cumulative duration of the high level.
[0025] In combination with the first aspect, in some optional implementations, the first preset time range is greater than or equal to 20 microseconds and less than or equal to the observation time.
[0026] In a second aspect, the present application further provides a signal processing device, the device comprising:
[0027] a first determining unit, configured to determine a target level signal from a received input level signal, wherein the target level signal is a level signal of the input level signal within a preset observation window, and the input level signal includes a high level and / or a low level;
[0028] The second determining unit is configured to determine that the target level signal includes a bit signal 0 when the target level signal has a high level and a cumulative duration of the high level in the target level signal is within a first preset duration range.
[0029] In conjunction with the second aspect, in some optional implementations, the second determining unit is further configured to:
[0030] When the target level signals are all low levels, or when the target level signals have a high level and the accumulated duration of the high level in the target level signals is not within the first preset duration range, it is determined that the target level signals include bit signal 1 or an idle signal.
[0031] In a third aspect, the present application further provides an electronic device, comprising a processor and a memory coupled to each other, wherein the memory stores a computer program, and when the computer program is executed by the processor, the electronic device executes the above method.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed on a computer, the computer executes the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1a A schematic diagram of the waveform of the bit signal 0 provided in an embodiment of the present application.
[0035] Figure 1b One of the waveform diagrams of the bit signal 0 with noise provided in an embodiment of the present application.
[0036] Figure 1c The second waveform diagram of the bit signal 0 with noise provided in the embodiment of the present application.
[0037] Figure 2a A waveform diagram of the bit signal 1 provided in an embodiment of the present application.
[0038] Figure 2b A waveform diagram of a bit signal 1 with noise provided in an embodiment of the present application.
[0039] Figure 3 A timing diagram of an input level signal provided in an embodiment of the present application.
[0040] Figure 4 A flowchart of a signal processing method provided in an embodiment of the present application.
[0041] Figure 5 A flowchart of a signal processing device provided in an embodiment of the present application.
[0042] Icon: 200 - signal processing device; 210 - first determination unit; 220 - second determination unit. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. It should be noted that the terms "first", "second" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.
[0044] The present application provides an electronic device that can receive data based on hardware implementation. The electronic device can receive an input level signal sent by other devices or modules, and then convert the input level signal into a bit signal 0 / 1. Among them, the input level signal is other devices or modules, and the data to be transmitted is encoded into a level signal formed by high and low levels through a preset coding strategy. Other devices or modules are devices that send input level signals to electronic devices, which can be flexibly determined according to actual conditions and are not specifically limited here.
[0045] The electronic device may convert the bit signal 0 / 1 converted by the electronic device into byte data according to a decoding strategy corresponding to the preset encoding strategy. In other embodiments, the electronic device may send the bit signal 0 / 1 to a decoding device, and the decoding device may convert the bit signal 0 / 1 into byte data. The preset encoding strategy and the decoding strategy may be flexibly determined according to actual conditions, which are well known to those skilled in the art and will not be described in detail here.
[0046] If no error occurs in the input level signal during the transmission and decoding process, the input level signal is converted and decoded, and the obtained byte data is the same as the data to be transmitted.
[0047] Please refer to Figure 1a , Figure 1b , Figure 2a , Figure 2b and Figure 3 In the level signal based on the KNX protocol (KNX protocol is the abbreviation of Konnex protocol, which is a global residential and building control standard), the normal bit signal 0 is Figure 1a As shown in FIG. 1 , bit signal 0 is a high level signal that starts at 35 microseconds (symbol us) and then continues at a low level for 69 microseconds. Bit signal 0 may contain noise during generation or transmission, such as Figure 1b As shown, the noise appears as a low level with a shorter duration during a high level of 35 microseconds; or the noise appears as a high level with a shorter duration during a low level of 69 microseconds.
[0048] The normal bit signal 1 is a low level that lasts for 104 microseconds. Figure 2a As shown. The bit signal 1 with noise is Figure 2b As shown, the high level with a shorter duration that appears in the low level of 104 microseconds is the noise signal.
[0049] The waveform timing diagram of the input level signal received by the electronic device is as follows Figure 3 As shown, it can be understood that the input level signal is composed of level signals corresponding to the continuous bit signal 0 and the bit signal 1.
[0050] It should be noted that the order of bit signal 0 and bit signal 1 is determined according to the actual situation and is not limited to Figure 3 In addition, the waveform of the bit signal 0 with noise is not limited to Figure 1b As shown, the waveform of the bit signal 1 with noise is not limited to Figure 2b As shown, the position and duration of the noise in the bit signal are determined according to actual conditions and are not specifically limited here.
[0051] In this embodiment, the electronic device may include a processing module and a storage module. The storage module stores a computer program, and when the computer program is executed by the processing module, the electronic device can perform each step in the following method.
[0052] It should be noted that the electronic device is a device with a data communication function, which can be determined according to actual conditions and is not specifically limited here. It is understandable that the electronic device may also include other modules, for example, the electronic device may also include a communication module for transmitting data.
[0053] Please refer to Figure 4 The present application provides a signal processing method, which can be applied to the above-mentioned electronic device, and each step of the method is executed or implemented by the electronic device. The method may include the following steps:
[0054] Step S110, determining a target level signal from the received input level signal, wherein the target level signal is a level signal of the input level signal within a preset observation window, and the input level signal includes a high level and / or a low level;
[0055] Step S120 : when the target level signal has a high level and the accumulated duration of the high level in the target level signal is within a first preset duration range, determining that the target level signal includes a bit signal 0.
[0056] In the above-mentioned embodiment, by utilizing a preset observation window to observe the input level signal, the cumulative duration of the high level within the window can be detected without having to determine the bit signal by collecting the rising and falling edges of the high level. This is beneficial to improving the accuracy of bit signal recognition and avoiding the accuracy of bit signal recognition being affected by noise.
[0057] The following is a detailed description of each step of the method:
[0058] In step S110, the input level signal is determined according to the data to be transmitted and the preset encoding strategy. For example, the input level signal can be a level signal based on the above-mentioned KNX protocol, or a level signal with electrical characteristics similar to the level signal of the KNX protocol. The type of the input level signal is not specifically limited here.
[0059] The data to be transmitted can be flexibly determined according to the actual situation, including but not limited to the physical address of the source device, the data collected by the sensor (such as the temperature data collected by the temperature sensor), which is not specifically limited here. The source device can be a host device or a host computer connected to the sensor, which is used to output the data collected by the sensor to the above-mentioned electronic device.
[0060] Exemplarily, the local timing diagram of the input level signal can be as follows Figure 3 As shown. Figure 3 The input level signal shown includes a noise signal.
[0061] In this embodiment, the electronic device can observe and process the received input level signal through a preset observation window to determine the target level signal. The input level signal within the preset observation window is the target level signal. Figure 3 shown.
[0062] The electronic device can observe and process the input level signal periodically through the preset observation window at a preset period to obtain the target level signal corresponding to each preset observation window. The preset period can be the duration of a bit signal. For example, if the duration of a bit signal is 104 microseconds, the electronic device can use 104 microseconds as the time interval between two adjacent observations, and the time interval refers to the time interval between the start times of the two preset observation windows. In this way, the input level signal of each preset observation window can be identified as a bit signal to avoid missed detection.
[0063] In step S120, the electronic device may determine whether the target level signal is a bit signal 0 based on the electrical characteristics of the target level signal in the preset window. The first preset time range may be determined according to actual conditions.
[0064] For example, when the input level signal is a level signal based on the KNX protocol, bit signal 0 includes a high level signal that first lasts for 35 microseconds and then a low level signal that lasts for 69 microseconds. Bit signal 1 is a low level signal that lasts for 104 microseconds. At this time, the observation duration corresponding to the preset observation window can be greater than or equal to 35 microseconds and less than or equal to any duration in 104 microseconds. The first preset duration range can be greater than or equal to 20 microseconds and less than or equal to the observation duration.
[0065] For example, the first preset duration range may be 20 microseconds to 75 microseconds. When the cumulative duration of the high level in the preset observation window is within the range of 20 microseconds to 75 microseconds, it is determined that the input level signal of the preset observation window includes the bit signal 0, and the starting time of the bit signal 0 is the time of the first rising edge in the preset observation window, and the ending time of the bit signal 0 is the time corresponding to 104 microseconds after the starting time.
[0066] In the above-mentioned embodiment, the observation duration of the preset observation window is between 35 microseconds and 104 microseconds, which is conducive to observing the high-level part of the bit signal 0, avoiding missing the observation of the high level or avoiding exceeding the duration of a single bit signal, which affects the validity of the counted cumulative duration of the high level.
[0067] In this embodiment, the method may further include: when the target level signals are all low levels, or when the target level signals have a high level and the cumulative duration of the high level in the target level signal is not within the first preset duration range, determining that the target level signal includes a bit signal 1 or an idle signal.
[0068] Understandably, in the preset observation window, the electronic device can determine the target level signal whose cumulative duration of high level is not within the first preset duration as bit signal 1 or idle signal, or determine the target level signal that is continuously at a low level as bit signal 1 or idle signal. In this way, it is possible to avoid the accuracy of identifying bit signal 1 or idle signal due to the sudden appearance of high level noise in low level signal, thereby improving the accuracy of bit signal recognition and filtering out the influence of noise on bit signal recognition.
[0069] Please refer to Figure 1c , if the coordinate O-TV is established by time-level, the T axis represents time, and the V axis represents level. The above detection method of determining bit signal 0, bit signal 1 and idle signal by accumulating the duration of high level in the preset observation window and filtering out the interference of noise is essentially area integration, which can be called "area method filtering algorithm". That is, the total duration of high level can be replaced by the total area of the area where the high level waveform is projected on the reference line of low level, such as Figure 1c shown.
[0070] In this embodiment, the idle signal and the bit signal 1 are usually continuous low levels, the difference is that the bit signal 1 is accompanied by the bit signal 0, and the idle signal is usually a low level with a longer duration. Based on this, it can be determined whether the level signal other than the bit signal 0 is the bit signal 1 or the idle signal according to the duration of the continuous low level. For example, determining that the target level signal includes the bit signal 1 or the idle signal may include:
[0071] Determine, from the input level signal, a first time interval between the target level signal and a first bit signal 0, wherein the first bit signal 0 is a bit signal 0 in the input level signal that is before the target level signal and has a closest time interval to the target level signal;
[0072] When the first time interval is greater than or equal to a second preset duration, determining that the target level signal includes the idle signal, and the second preset duration is greater than a maximum value in the range of the first preset duration;
[0073] When the target level signal is between the first bit signal 0 and the second bit signal 0, and the second time interval between the first bit signal 0 and the second bit signal 0 is less than the second preset duration, it is determined that the target level signal includes the bit signal 1, and the second bit signal 0 is the first bit signal 0 in the input level signal after the first bit signal 0.
[0074] Among them, the first bit signal 0 can be understood as the first bit signal 0 before the current target level signal, the second bit signal 0 can be understood as the first bit signal 0 after the current target level signal, and the second preset duration can be set according to actual conditions. For example, the second preset duration can be 1 millisecond, 10 milliseconds, or other longer durations relative to a single bit signal.
[0075] Understandably, when it is determined that the current target level signal is not bit signal 0, and it is not possible to directly determine that the target level signal is bit signal 1 or an idle signal at this time, the bit signal detection is continued for the level after the target level signal, and if there is bit signal 0 within the second preset time length after the target level signal, it can be determined that the target level signal is bit signal 1. If there is no bit signal 0 within the second preset time length after the target level signal, and it is still a continuous low level, the target level signal is determined to be an idle signal.
[0076] Please refer again Figure 3For example, assuming that the input level signal is a level signal based on the KNX protocol, the first preset duration range may be 20 microseconds to 75 microseconds, the observation duration of the preset observation window may be 104 microseconds, and the second preset duration may be 1 millisecond. At this time, through the preset observation window, it can be determined that the A segment of the input level signal is a bit signal 0, and then the B segment level signal is observed and identified. Since the high level of the B segment level signal is not within the first preset duration range (20 microseconds to 75 microseconds), the B segment level signal is a non-bit signal 0, and it is necessary to continue to detect the level after the B segment level signal. When detecting the C-segment level signal through the preset observation window, it can be determined that the duration of the high level (assuming it is 30 microseconds) in the preset observation window is within 20 microseconds to 75 microseconds. Therefore, it can be determined that the C-segment level signal is bit signal 0, and then based on the fact that both A and C segments are bit signal 0 and the interval duration with the B-segment level signal is less than 1 millisecond, it is determined that the B-segment level signal is bit signal 1. Among them, the time point of the A, B, and C segment level signals can be determined based on the preset observation window at the rising edge of segment A, and then based on the time of the rising edge, gradually increase 104 microseconds to obtain the level signals of the single segments B and C.
[0077] In the above-mentioned implementation, bit signal 1 is usually accompanied by bit signal 0, and the idle signal is usually at a low level for a long time. Therefore, based on the electrical characteristics of bit signal 1 and the idle signal, combined with the period of occurrence of bit signal 0, the influence of noise on bit signal recognition can be filtered out, and it is possible to quickly and accurately determine whether the low-level target signal is bit signal 1 or idle signal, thereby simplifying the processing flow of bit signal recognition.
[0078] In this embodiment, the method may further include:
[0079] According to the input sequence of the bit signal 0 and the bit signal 1 and a preset decoding strategy, the bit signal 0 and / or the bit signal 1 corresponding to the input level signal are converted to obtain byte data.
[0080] The preset decoding strategy can be determined according to actual conditions. In this embodiment, since the accuracy and reliability of converting the input level signal into the bit signal 0 / 1 are high, when the byte data is obtained by converting the bit signal 0 / 1 with high reliability, the accuracy and reliability of the obtained byte data can be improved.
[0081] Please refer to Figure 5, the embodiment of the present application also provides a signal processing device 200, which can be applied to the above-mentioned electronic device to execute each step in the method. The signal processing device 200 includes at least one software function module that can be stored in the storage module in the form of software or firmware (Firmware) or solidified in the operating system (OS) of the electronic device. The processing module is used to execute the executable module stored in the storage module, such as the software function module and computer program included in the signal processing device 200.
[0082] The signal processing device 200 may include a first determining unit 210 and a second determining unit 220, and the operations that may be performed are as follows:
[0083] A first determining unit 210, configured to determine a target level signal from a received input level signal, wherein the target level signal is a level signal of the input level signal within a preset observation window, and the input level signal includes a high level and / or a low level;
[0084] The second determining unit 220 is configured to determine that the target level signal includes a bit signal 0 when the target level signal has a high level and the accumulated duration of the high level in the target level signal is within a first preset duration range.
[0085] Optionally, the second determination unit 220 is also used to: when the target level signals are all low levels, or when the target level signals have a high level and the cumulative duration of the high level in the target level signal is not within the first preset duration range, determine that the target level signal includes a bit signal 1 or an idle signal.
[0086] Optionally, the second determining unit 220 is further configured to:
[0087] Determine, from the input level signal, a first time interval between the target level signal and a first bit signal 0, wherein the first bit signal 0 is a bit signal 0 in the input level signal that is before the target level signal and has a closest time interval to the target level signal;
[0088] When the first time interval is greater than or equal to a second preset duration, determining that the target level signal includes the idle signal, and the second preset duration is greater than a maximum value in the range of the first preset duration;
[0089] When the target level signal is between the first bit signal 0 and the second bit signal 0, and the second time interval between the first bit signal 0 and the second bit signal 0 is less than the second preset duration, it is determined that the target level signal includes the bit signal 1, and the second bit signal 0 is the first bit signal 0 in the input level signal after the first bit signal 0.
[0090] Optionally, the signal processing device 200 may further include a decoding unit for converting the bit signal 0 and / or the bit signal 1 corresponding to the input level signal according to the input order of the bit signal 0 and the bit signal 1 and a preset decoding strategy to obtain byte data.
[0091] In this embodiment, the processing module may be an integrated circuit chip having the ability to process signals. The above-mentioned processing module may be a general-purpose processor. For example, the processor may be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and may implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.
[0092] The storage module may be, but is not limited to, a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, etc. In this embodiment, the storage module may be used to store a first preset time range, a second preset time range, a preset observation window, etc. Of course, the storage module may also be used to store a program, and the processing module executes the program after receiving the execution instruction.
[0093] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device described above can refer to the corresponding process of each step in the aforementioned method, and will not be elaborated here.
[0094] The embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is run on a computer, the computer executes the signal processing method described in the above embodiment.
[0095] Through the description of the above implementation methods, technical personnel in this field can clearly understand that the present application can be implemented by hardware, and can also be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0096] In summary, the present application provides a signal processing method, device, electronic device and readable storage medium. The method includes: determining a target level signal from a received input level signal, the target level signal being a level signal in the input level signal within a preset observation window, the input level signal including a high level and / or a low level; when the target level signal has a high level, and the cumulative duration of the high level in the target level signal is within a first preset duration range, determining that the target level signal includes a bit signal 0. In this solution, by observing the input level signal using a preset observation window, the cumulative duration of the high level in the window can be detected, and there is no need to determine the bit signal by collecting the rising edge and falling edge of the high level, which is conducive to improving the accuracy of bit signal recognition and avoiding the influence of noise on the accuracy of bit signal recognition.
[0097] In the embodiments provided in the present application, it should be understood that the disclosed device, system and method can also be implemented in other ways. The above-described device, system and method embodiments are merely schematic, for example, the flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a part of a module, a program segment or a code, and a part of the module, program segment or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. In addition, each functional module in each embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0098] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A signal processing method, characterized in that: The method comprises: Determine a target level signal from the received input level signal, wherein the target level signal is a level signal of the input level signal within a preset observation window, and the input level signal includes a high level and / or a low level; When the target level signal has a high level and the accumulated duration of the high level in the target level signal is within a first preset duration range, determining that the target level signal includes a bit signal 0; The method further includes: when the target level signals are all low levels, or when the target level signals have a high level and the accumulated duration of the high level in the target level signals is not within the first preset duration range, determining that the target level signal includes a bit signal 1 or an idle signal; The determining that the target level signal includes a bit signal 1 or an idle signal includes: determining a first time interval between the target level signal and a first bit signal 0 from the input level signal, the first bit signal 0 being a bit signal 0 in the input level signal that is before the target level signal and has the closest time interval to the target level signal; when the first time interval is greater than or equal to a second preset time length, determining that the target level signal includes the idle signal, and the second preset time length is greater than a maximum value in the first preset time length range; when the target level signal is between the first bit signal 0 and the second bit signal 0, and the second time interval between the first bit signal 0 and the second bit signal 0 is less than the second preset time length, determining that the target level signal includes the bit signal 1, and the second bit signal 0 is the first bit signal 0 in the input level signal after the first bit signal 0; The method further includes: converting the bit signal 0 and / or the bit signal 1 corresponding to the input level signal according to the input sequence of the bit signal 0 and the bit signal 1 and a preset decoding strategy to obtain byte data.
2. The method according to claim 1, characterized in that The input level signal includes a level signal based on the KNX protocol; The bit signal 0 includes a high level signal that first lasts for 35 microseconds and then a low level signal that lasts for 69 microseconds; The bit signal 1 is a low level signal lasting 104 microseconds; The observation duration corresponding to the preset observation window is any duration greater than or equal to 35 microseconds and less than or equal to 104 microseconds.
3. The method according to claim 2, characterized in that The first preset duration range is greater than or equal to 20 microseconds and less than or equal to the observation duration.
4. A signal processing device, characterized in that: The device comprises: a first determining unit, configured to determine a target level signal from a received input level signal, wherein the target level signal is a level signal of the input level signal within a preset observation window, and the input level signal includes a high level and / or a low level; A second determining unit, configured to determine that the target level signal includes a bit signal 0 when the target level signal has a high level and the accumulated duration of the high level in the target level signal is within a first preset duration range; The second determining unit is further configured to: when the target level signals are all low levels, or when the target level signals have a high level and the accumulated duration of the high level in the target level signals is not within the first preset duration range, determine that the target level signal includes a bit signal 1 or an idle signal; The second determining unit is further used to determine, from the input level signal, a first time interval between the target level signal and a first bit signal 0, the first bit signal 0 being a bit signal 0 in the input level signal that is before the target level signal and has the closest time interval to the target level signal; when the first time interval is greater than or equal to a second preset duration, determine that the target level signal includes the idle signal, and the second preset duration is greater than a maximum value in the first preset duration range; when the target level signal is between the first bit signal 0 and the second bit signal 0, and the second time interval between the first bit signal 0 and the second bit signal 0 is less than the second preset duration, determine that the target level signal includes the bit signal 1, and the second bit signal 0 is the first bit signal 0 in the input level signal after the first bit signal 0; The signal processing device also includes a decoding unit, which is used to convert the bit signal 0 and / or the bit signal 1 corresponding to the input level signal according to the input order of the bit signal 0 and the bit signal 1 and a preset decoding strategy to obtain byte data.
5. An electronic device, characterized in that: The electronic device comprises a processor and a memory coupled to each other, wherein the memory stores a computer program. When the computer program is executed by the processor, the electronic device executes the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Methods and apparatus for encoding information on an AC line voltage
CN102017795A
Successive approximation analog to digital converter and method thereof
CN103684459A
Channel state selection method and device based on ternary coding
CN104581589A
Digital filter
CN105978532A
Method and apparatus for transferring power and data
CN106102827A
