Remote control signal copying method, remote control copier, and storage medium

By switching the local oscillator clock frequency and mixing, the working mode and transmission frequency of the remote control signal are determined, thus solving the problems of accuracy and security in long-distance remote control signal replication and achieving efficient replication of the remote control signal.

CN119418512BActive Publication Date: 2026-06-26SHENZHEN SHUMA ELECTRONICS TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN SHUMA ELECTRONICS TECH
Filing Date
2024-10-15
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately replicate remote control signals over long distances, and the replication process is complex and may pose security risks, especially for non-professional users.

Method used

By receiving signals from the remote control device to be copied, different local oscillator clock frequencies are switched for mixing to obtain intermediate frequency signals. The operating mode and transmission frequency of the remote control signal are determined based on the frequency value of the intermediate frequency signal, and the accurate frequency value is used for parsing to copy the remote control commands.

Benefits of technology

It enables accurate replication of remote control signals over long distances, simplifies the operation process, reduces safety risks, and is suitable for ordinary users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119418512B_ABST
    Figure CN119418512B_ABST
Patent Text Reader

Abstract

The application relates to a remote control signal copying method, a remote control copier and a storage medium, and the method comprises the following steps: receiving a remote control signal of a remote control device to be copied; switching different local oscillator clock frequency values, for each local oscillator clock frequency value, performing mixing processing on the received remote control signal and each local oscillator clock frequency value to obtain an intermediate frequency signal; when the intermediate frequency signal is a continuous and stable square wave signal, obtaining a corresponding target local oscillator clock frequency value and multiple frequency values of the intermediate frequency signal; determining a working mode of the remote control signal according to the multiple frequency values of the intermediate frequency signal; processing the multiple frequency values of the intermediate frequency signal and the target local oscillator clock frequency value by using a frequency determination rule in the working mode to determine a transmission frequency value of the remote control signal; and based on a decoding rule corresponding to the working mode, analyzing the remote control signal by using the transmission frequency value to copy a remote control instruction corresponding to the remote control signal. The method can still realize remote control function under the condition of a long distance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of remote control technology, and in particular to a method for copying remote control signals, a remote control copier, and a storage medium. Background Technology

[0002] With the continuous development of the market economy and the large-scale application of wireless remote control technology, a large number of products using wireless remote controls have appeared on the market, such as electric vehicles, roller shutters, barrier gates, and electric railings. These electrical products can often be remotely controlled to open or close from a distance using their accompanying wireless remote controls. The problem that arises is that when users need to add multiple remote controls, they need to find the manufacturer of the compatible electrical appliances to purchase dedicated remote controls and follow specific operating procedures to learn and pair them with the new remote controls before they can be used.

[0003] There are two main challenges. First, ordinary users may not be able to purchase the correct remote control model. The market offers a wide variety of remote controls, and even identical-looking ones can be incompatible. Second, different manufacturers often have different remote control learning and pairing processes. Some manufacturers even require disassembling the main unit and opening the circuit board to perform the learning and pairing operation for a new remote control. This poses a risk of electric shock or presents operational difficulties for non-professional users. The traditional method involves comparing signal power under different frequency operating conditions to copy data from the wireless remote control. However, remote controls copied using this method often only function at close range. Summary of the Invention

[0004] Therefore, it is necessary to provide a method for copying remote control signals, a remote control copier, and a storage medium to address the aforementioned technical problems, so that remote control functionality can still be achieved even at long distances.

[0005] A method for copying remote control signals, the method comprising:

[0006] Receive the remote control signal from the remote control device to be copied;

[0007] Switch different local oscillator clock frequency values. For each local oscillator clock frequency value, perform frequency mixing processing between the received remote control signal and each local oscillator clock frequency value to obtain an intermediate frequency signal.

[0008] When the intermediate frequency signal is a continuous and stable square wave signal, the corresponding target local oscillator clock frequency value is obtained, and the frequency value of the intermediate frequency signal is obtained multiple times;

[0009] The operating mode of the remote control signal is determined based on multiple frequency values ​​of the intermediate frequency signal;

[0010] The frequency values ​​of the multiple intermediate frequency signals and the target local oscillator clock frequency value are processed using the frequency determination rules in the aforementioned working mode to determine the transmission frequency value of the remote control signal;

[0011] Based on the decoding rules corresponding to the working mode, the remote control signal is parsed using the transmission frequency value to copy the remote control command corresponding to the remote control signal.

[0012] A remote control copier is provided for implementing the steps of various remote control signal copying method embodiments.

[0013] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of various remote control signal copying method embodiments.

[0014] The aforementioned remote control signal copying method, remote control copier, and storage medium receive the remote control signal from the device to be copied, switch different local oscillator clock frequencies, and perform frequency mixing processing based on the remote control signal and the local oscillator clock frequency to obtain an intermediate frequency (IF) signal. When the IF signal is a continuous and stable square wave signal, the transmission frequency of the remote control signal is close to the receiving frequency of the remote control copier. Under this condition, the frequency of the obtained IF signal will still fluctuate, and the operating mode of the remote control signal is unknown. Therefore, it is necessary to determine the operating mode of the remote control signal based on multiple frequency values ​​of the IF signal. The frequency determination rules under the operating mode are used to process the frequency value of the IF signal and the target local oscillator clock frequency to determine the transmission frequency value, resulting in a more accurate frequency value of the obtained remote control signal. This transmission frequency value is then used to analyze the remote control signal to copy the corresponding remote control command. The use of a more accurate frequency value for signal analysis makes the analyzed signal more complete, allowing the remote control copier to still achieve remote control functionality even at long distances. Attached Figure Description

[0015] Figure 1 This is an application environment diagram of the remote control signal copying method in one embodiment;

[0016] Figure 2 This is a flowchart illustrating a remote control signal copying method in one embodiment;

[0017] Figure 3 This is a schematic diagram of PWM encoding in one embodiment;

[0018] Figure 4 This is a schematic diagram of MAN codes in one embodiment;

[0019] Figure 5 This is a schematic diagram of NRZ encoding in one embodiment. Detailed Implementation

[0020] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0022] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly. The connection can be a direct connection or an indirect connection.

[0023] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.

[0024] It is understood that the term "connection" in the following embodiments should be understood as "electrical connection," "communication connection," etc., if the connected circuits, modules, units, etc., have electrical signal or data transmission with each other.

[0025] The method for copying remote control devices provided in this application can be applied to, for example... Figure 1 In the application environment. Figure 1 This is an application environment diagram of a remote control device copying method in one embodiment. It includes a remote control device 110 to be copied and a remote control copier 120. The remote control copier 120 is used to copy the remote control commands carried in the remote control signal of the remote control device 110 to be copied, and the copied remote control commands are stored in different locations according to different buttons.

[0026] In one embodiment, the remote control replicator includes a wireless ISM transceiver, a low-noise amplifier, and a mixer connected in sequence. When the wireless ISM transceiver is in receive mode, the received radio frequency modulated signal is input from the low-noise amplifier (LNA) to a mixer (MIXER). The mixer (MIXER) then operates according to the transmit frequency value f of the received remote control signal. SN The local oscillator clock frequency value f set by ISM LO Perform frequency mixing, when f SN Frequency and f LO When the frequency difference falls within the passband of the intermediate frequency (IF) filter, the mixing component will be output from the mixer, resulting in an IF signal f that is output as a square wave at a specific frequency. IF Therefore, the frequency value f of the intermediate frequency signal can be seen. IF =f SN -f LO Similarly, f can be derived. SN =f LO +f IF That is, it is necessary to measure the transmission frequency f of the unknown remote control signal. SN At this time, the local oscillator clock frequency f can be continuously adjusted. LO , make f SN with f LO If the frequency difference falls within the passband of the intermediate frequency filter, it can be measured by f. IF The transmission frequency value f of the unknown signal is obtained by using the following method. SN .

[0027] Based on this analysis, such as Figure 2 The diagram illustrates a flowchart of a copying method for a remote-controlled device in one embodiment. Taking the application of this method to a remote-controlled copier as an example, it includes the following steps:

[0028] Step 202: Receive the remote control signal of the remote control device to be copied.

[0029] Specifically, the remote control copier enters signal receiving mode and receives remote control signals sent by the remote control device to be copied. These signals contain remote control commands for the device to be copied, such as unlocking commands, locking commands, and trunk opening commands.

[0030] Step 204: Switch different local oscillator clock frequency values. For each local oscillator clock frequency value, perform frequency mixing processing with the received remote control signal to obtain the intermediate frequency signal.

[0031] The local oscillator clock frequency value refers to the frequency value of the local oscillator clock set in the remote control replicator.

[0032] Specifically, the remote control replicator switches between different local oscillator clock frequency values. Each time a local oscillator clock frequency value is switched, the received remote control signal is mixed with the local oscillator signal corresponding to that local oscillator clock frequency value to obtain an intermediate frequency signal.

[0033] Optionally, the remote-controlled replicator can switch the local oscillator clock frequency value, which varies by a preset frequency change amount, within a preset frequency range.

[0034] The preset frequency variation can be set as needed and stored in the remote copier. For example, the preset frequency variation can be 400kHz, 500kHz, 550kHz, 600kHz, etc., and is not limited to these. The preset frequency range can also be set as needed, and the local oscillator clock frequency value switched is within this range.

[0035] Taking a preset frequency change of 500KHz and a preset frequency range of 250MHz to 960MHz as an example, the local oscillator clock frequency value that changes with the preset frequency change can be 250MHz (initial frequency value), 250.5MHz, 251MHz, 251.5MHz...955.5MHz, 960MHz.

[0036] Specifically, the user presses buttons according to certain rules, and the remote control copier enters signal receiving mode. After entering signal receiving mode, the copier receives the remote control signal sent by the device to be copied at a set initial frequency value. It then changes the frequency in preset increments, causing the local oscillator clock frequency of the wireless transceiver in the copier to continuously change until it reaches the set maximum or minimum frequency value. Each time a frequency switch is completed, the intermediate frequency (IF) signal value is checked. Therefore, through multiple trials, the optimal receiving frequency of the device to be copied can be obtained, thereby improving the accuracy of the transmission frequency value.

[0037] Step 206: When the intermediate frequency signal is a continuous and stable square wave signal, obtain the corresponding target local oscillator clock frequency value, and obtain the frequency value of the intermediate frequency signal multiple times.

[0038] The target local oscillator clock frequency refers to the target local oscillator clock frequency value corresponding to the condition that the intermediate frequency signal is a continuous and stable square wave signal. This target local oscillator clock frequency value may have slight fluctuations, or it may remain unchanged after being selected.

[0039] Specifically, during the frequency change process, the MCU of the remote control replicator will start a timer to continuously capture the intermediate frequency (IF) signal output of the ISM wireless transceiver, detecting whether the IF signal is a continuous and stable square wave signal. Specifically, when the period and level of the IF signal are stable, it is determined that a continuous and stable square wave signal has been acquired. The acquisition of a continuous and stable square wave signal indicates that f... SNwith f LO The frequency difference falls within the passband of the intermediate frequency filter, f SN with f LO The frequency difference between them reaches its minimum value.

[0040] Step 208: Determine the operating mode of the remote control signal based on multiple frequency values ​​of the intermediate frequency signal.

[0041] The operating mode of the remote control signal can include FSK (Frequency-shift keying) or ASK (Amplitude Shift Keying). It is understood that OOK (On-Off Keying) is a special case of ASK.

[0042] Specifically, by analyzing multiple frequency values ​​of the intermediate frequency signal, the remote control copier can plot waveforms based on multiple reference frequency values ​​to determine whether two discrete peak points exist. If two discrete peak points are obtained, the operating mode of the remote control signal is determined to be frequency shift keying (FPSK). If no two discrete peak points are obtained, the operating mode of the remote control signal is determined to be amplitude frequency keying (AFSK).

[0043] Step 210: Using the frequency determination rules in the working mode, process the frequency values ​​of multiple intermediate frequency signals and the target local oscillator clock frequency value to determine the transmission frequency value of the remote control signal.

[0044] The frequency determination rules under different operating modes include those for amplitude-frequency keying (AQS) and frequency-shift keying (FPS). The frequency determination rules vary depending on the operating mode.

[0045] Specifically, when the operating mode is amplitude-frequency keying (AFS), the transmission frequency of the remote control signal can be determined by averaging multiple frequency values ​​of the intermediate frequency (IF) signal and the corresponding operating mode. When the operating mode is frequency-shift keying (FSK), the center frequency and frequency offset of the remote control signal can be determined from multiple frequency values ​​of the IF signal, which are the transmission frequency values ​​of the remote control signal.

[0046] Step 212: Based on the decoding rules corresponding to the working mode, the remote control signal is parsed using the transmission frequency value in order to copy the remote control command corresponding to the remote control signal.

[0047] Specifically, after obtaining the transmission frequency value, the remote control copier sets the local oscillator clock frequency to this transmission frequency value and demodulates the remote control signal using this transmission frequency value to obtain a complete digital signal. This digital signal is then decoded according to the decoding rules corresponding to this operating mode, thus achieving a complete copy of the remote control command corresponding to the remote control function signal. The remote control copier stores the copied remote control command in different locations based on different buttons, thus completing one copy of the remote control command. When the user presses a button, the remote control copier obtains the remote control command corresponding to the button's location and sends out the digital signal according to a certain encoding rule, thereby realizing the remote control function.

[0048] In this embodiment, the remote control signal of the remote control device to be copied is received, different local oscillator clock frequency values ​​are switched, and the remote control signal and the local oscillator clock frequency value are mixed to obtain an intermediate frequency (IF) signal. When the IF signal is a continuous and stable square wave signal, that is, the transmission frequency of the remote control signal is close to the receiving frequency of the remote control copier. Under this condition, the frequency of the obtained IF signal will still fluctuate and the working mode of the remote control signal is unknown. Therefore, it is necessary to determine the working mode of the remote control signal based on multiple frequency values ​​of the IF signal. The frequency determination rule under the working mode is used to process the frequency value of the IF signal and the target local oscillator clock frequency value to determine the transmission frequency value. The obtained frequency value of the remote control signal is more accurate. The remote control signal is analyzed using this transmission frequency value to copy the remote control command corresponding to the remote control signal. The more accurate frequency value is used for signal analysis, making the analyzed signal more complete. The remote control copier can still realize the remote control function even at a long distance.

[0049] In one embodiment, a method for detecting a continuous and stable square wave signal includes: detecting multiple periods of an intermediate frequency signal, determining a period average based on the multiple periods; and determining that a continuous and stable square wave signal has been detected when the error between a preset number of periods and the period average is within a preset range.

[0050] The preset quantity can be set according to needs.

[0051] Specifically, the MCU continuously captures the periods T1, T2, ..., T of n intermediate frequency signals. n If T is used AVE Let T represent the periodic mean of the intermediate frequency signal. AVE = (T1+T2+…+T) n Let's take a tolerance factor δ, and assume T... i For T1~T n For any value within, if it always satisfies T i <T AVEIf the error between the preset number of periods and the average period is within a preset range (1+δ), then the current intermediate frequency signal can be considered a continuous and stable square wave signal, indicating that an effective f has been detected. IF Frequency, i.e., f LO The frequency is already similar to f SN The frequencies are close.

[0052] In this embodiment, the average value of the period is determined by multiple periods of the intermediate frequency signal. When the error between a preset number of periods and the average value of the period is within a preset range, a continuous and stable square wave signal is obtained, indicating that the target local oscillator clock frequency value is similar to the transmission frequency value of the remote control signal. After subsequent processing, an accurate transmission frequency value is obtained.

[0053] In one embodiment, determining the operating mode of the remote control signal based on multiple frequency values ​​of the intermediate frequency signal includes:

[0054] Multiple frequency averages are determined based on multiple frequency values ​​of the intermediate frequency signal;

[0055] When the average frequency meets the preset mode judgment condition, the working mode of the remote control signal is determined to be frequency shift keying; the preset mode judgment condition is that the average target frequency in the average frequency is the same as the average non-adjacent frequency, and is different from the average adjacent frequency.

[0056] When the average frequency does not meet the preset mode judgment conditions, the working mode of the remote control signal is determined to be amplitude frequency keying.

[0057] The preset mode judgment condition is that the target frequency mean is the same as the non-adjacent mean, but different from the adjacent frequency mean. The spectrum of FSK is usually represented by discrete frequency components and has two main peaks, corresponding to two different carrier frequencies; therefore, the target frequency mean is actually the maximum frequency, while the adjacent frequency mean is the minimum frequency.

[0058] Specifically, from the formula for calculating frequency and period, f = 1 / T, we can obtain f IF = (1 / T1 + 1 / T2 + ... + 1 / T) n ) / n. For T1~T n A certain group of T within i T j T k T m If m>k>j>i exists, assume

[0059] f IFi =(1 / T) i +1 / T i+1 +…+1 / T j-1 ) / (ji),

[0060] fIFj =(1 / T) j +1 / T j+1 +…+1 / T k-1 ) / (kj),

[0061] f IFk =(1 / T) k +1 / T k+1 +…+1 / T m-1 ) / (mk).

[0062] When the target frequency mean f is satisfied IFi =Mean of non-adjacent frequencies f IFk , and the target frequency mean f IFi ≠ Average of adjacent frequencies f IFj At that time, based on the frequency characteristics of FSK, it can be known that the current f SN The signal may be in FSK operating mode, in which case multiple sets of T1~T can be measured. n If any set T1~T n Inside, f is always satisfied IFi =f IFk with f IFi ≠f IFj The relationship can then be determined. SN The signal is in FSK operating mode; otherwise, it is determined that f... SN The signal is in ASK working mode.

[0063] In this embodiment, the frequency values ​​of the intermediate frequency signal are obtained multiple times, and the average frequency is calculated. It is determined whether the target frequency is the same as the average of non-adjacent frequencies and different from the average of adjacent frequencies. Then the frequency value at the maximum frequency can be obtained, thereby determining the working mode of the remote control signal and thus obtaining an accurate remote control signal.

[0064] In one embodiment, a frequency determination rule under the operating mode is used to process the frequency values ​​of multiple intermediate frequency signals and the target local oscillator clock frequency value to determine the transmission frequency value of the remote control signal, including:

[0065] When the remote control signal is in frequency shift keying mode, the center frequency value of the remote control signal is obtained by averaging the average of the target frequency and the average of the adjacent frequencies and summing it with the target local oscillator clock frequency value.

[0066] The frequency offset of the remote control signal is determined based on the difference between the average target frequency and the average values ​​of adjacent frequencies.

[0067] Specifically, when the remote control signal is in FSK working mode, due to f SN The signal contains two peak frequency points f max f min Assume the above measurement results satisfy the target frequency mean f.IFi The average of adjacent frequencies f IFj , by f max =f LO +f IFi f min =f LO +f IFj The center frequency point f of the remote control signal can be obtained. SN =f LO +(f IFi +f IFj The frequency offset of the remote control signal is (f) / 2. IFi -f IFj ) / 2.

[0068] In this embodiment, when the remote control signal operates in frequency shift keying mode, the center frequency value of the remote control signal is obtained by averaging the target frequency average and the average of adjacent frequencies and summing them with the target local oscillator clock frequency value. The frequency offset value of the remote control signal is obtained by the difference between the target frequency average and the average of adjacent frequencies. Therefore, the center frequency value and the frequency offset value can be used for analysis according to the frequency shift keying decoding method to obtain an accurate remote control signal, which can realize the remote control function at long distances.

[0069] In one embodiment, a frequency determination rule under the operating mode is used to process the frequency values ​​of multiple intermediate frequency signals and the target local oscillator clock frequency value to determine the transmission frequency value of the remote control signal, including:

[0070] When the remote control signal operates in amplitude-frequency keying mode, the average frequency values ​​of multiple intermediate frequency signals are calculated and summed with the target local oscillator clock frequency value to obtain the transmission frequency value of the remote control signal.

[0071] Specifically, when the remote control signal is in ASK working mode, the transmission frequency value f of the remote control signal can be obtained from the measurement results. SN =f LO +(1 / T1+1 / T2+…+1 / T n ) / n

[0072] In this embodiment, when the remote control signal operates in amplitude-frequency keying mode, the average frequency values ​​of multiple intermediate frequency signals are calculated and summed with the target local oscillator clock frequency value to obtain the transmission frequency value of the remote control signal, thus obtaining a more accurate frequency value.

[0073] In one embodiment, due to the presence of chip clock errors, the measurement result f is... SN There will be some error. In this case, a standard spectrum analyzer can be used for measurement and calibration to reduce the measurement error of the MCU (Microcontroller Unit). For example, for the same f... SNIf the spectrum analyzer measures f1 and the MCU measures f2, a calibration coefficient d = f1 - f2 can be used, and this coefficient can be written into the MCU for storage and use.

[0074] When the operating mode is ASK, the average frequency values ​​of multiple intermediate frequency signals are summed with the target local oscillator clock frequency value, and then calibrated based on a calibration coefficient to obtain the transmission frequency value of the remote control signal. Therefore, the measurement result of the MCU after calibration should be...

[0075] f SN =f LO +(1 / T1+1 / T2+…+1 / T n ) / n+d

[0076] When the operating mode is FSK, the transmission frequency value of the remote control signal is obtained by averaging the target frequency average and the average of the adjacent frequencies, summing this sum with the target local oscillator clock frequency value, and then calibrating based on a calibration coefficient. The measurement result of the MCU after calibration should be...

[0077] f SN =f LO +(f IFi +f IFj ) / 2+d

[0078] In this embodiment, the accuracy of the transmission frequency value can be improved by calibrating the transmission frequency value using a calibration coefficient.

[0079] In one embodiment, after setting the receiving parameters of the wireless ISM transceiver, the transceiver outputs the demodulated digital signal. At this point, the digital signal can be sampled according to common encoding rules to calculate the code rate. Common remote control signal encoding rules include NRZ (non-return-to-zero line code), PWM, and MAN (Manchester). When the MCU detects remote control signals of different encoding types, it calculates the code rate based on the characteristics of the remote control signal's encoding rules to obtain the most accurate calculation result. After completing the remote control replication, transmitting the remote control signal according to the precise code rate achieves the best remote control effect. Therefore, this remote control signal replication method also includes:

[0080] Acquire the reference period of the remote control signal; the reference period includes a high level and a low level adjacent to the high level;

[0081] The encoding type of the remote control signal is determined based on the level state conditions satisfied by the reference period;

[0082] The code rate of the remote control signal is determined based on the reference period and the corresponding number of symbols by adopting the code rate calculation rules corresponding to the encoding type.

[0083] The copied remote control signal is transmitted at the specified bit rate.

[0084] Since the encoding type of the remote control signal is unknown upon reception, and the specific period of the signal cannot be determined, a reference period is used. This involves taking a consecutive segment of high and low levels for level status detection. Level status conditions include: for non-return-to-zero (NRZ) codes, the duration of each high or low level segment is an integer multiple of the unit level duration; for pulse-width modulation (PWM) codes, the high and low levels satisfy a preset duty cycle; and for Manchester-coded codes, the high and low level durations satisfy any one of four preset level durations. Encoding types include, but are not limited to, NRZ codes, PWM codes, and Manchester codes.

[0085] Specifically, the remote control copier detects a connected high and low level segment to obtain a reference period. Based on the level conditions satisfied by the reference period, the encoding type of the remote control signal is determined. For different encoding types, the code length varies, therefore the final code rate is calculated differently. The remote control copier uses the code rate calculation rules corresponding to the encoding type, determining the code rate of the remote control signal based on the reference period and the number of codes corresponding to that reference period. The remote control copier then transmits the copied remote control signal at this code rate.

[0086] Optionally, the code rate of the remote control signal is determined based on multiple reference periods and the corresponding number of symbols by adopting the code rate calculation rules corresponding to the encoding type.

[0087] It is understandable that the determination of the encoding type and bit rate of the remote control signal can be completed before or after copying the remote control command corresponding to the remote control signal, and is not limited here.

[0088] In this embodiment, the encoding type of the remote control signal is determined by a custom reference period. The code rate calculation rule corresponding to the encoding type is adopted. The code rate of the remote control signal is determined based on the reference period and the corresponding number of code elements. The copied remote control signal is sent at this code rate, so that the remote control copier can still realize the remote control function at a long distance.

[0089] In one embodiment, determining the encoding type of the remote control signal based on the level state conditions satisfied by the reference period includes:

[0090] When multiple reference cycles meet the duty cycle condition, the encoding type of the remote control signal is determined to be pulse width modulation.

[0091] The code rate of the remote control signal is determined based on the reference period and the corresponding number of symbols, using the code rate calculation rules corresponding to the encoding type. This includes:

[0092] The code rate of the remote control signal is determined based on multiple reference periods and the number of corresponding reference periods.

[0093] Specifically, PWM (Pulse-Width Modulation) coding. The PWM signal transmits information by adjusting the duration of the high level within a clock period. As Figure 3 shown, it is a schematic diagram of PWM coding in an embodiment. In PWM coding, a set of different high and low level signals is used to represent the symbol signals "0" or "1". According to the area equivalence rule, within one coding clock period, when transmitting the symbol "1", it is represented by a duty cycle of 75%; when transmitting the symbol "0", it is represented by a duty cycle of 25%. According to the characteristics of the PWM coding rule, assuming that the MCU samples the high and low level times of a group of symbol signals, represented by H1 and L1 for the high level time and the low level time respectively, then the symbol period T1 = H1 + L1. At this time, if H1 > L1, the duty cycle M1 of the symbol "1" = H1 / T1, and the duty cycle N1 of the symbol "0" = L1 / T1; if H1 < L1, the duty cycle M1 of the symbol "1" = L1 / T1, and the duty cycle N1 of the symbol "0" = H1 / T1. Then, the duty cycle condition is that the high level duty cycle satisfies the first duty cycle (such as 75%), or the high level duty cycle satisfies the second duty cycle (such as 25%), or the low level duty cycle satisfies the first duty cycle, or the low level duty cycle satisfies the second duty cycle. According to n reference periods and the corresponding number n of reference periods, the code rate of the remote control signal can be determined.

[0094] For example, assuming that the MCU samples the high and low level times H n and L n of n groups of symbol signals, from T = H + L, the cycle times T1, T2,..., T n can be obtained. Then, for any certain T n within T1 to T i the calculated symbol "1" M i and symbol "0" N i for H i and L i , there must be M i ≈M1 or N i ≈N1, that is, the duty cycle is satisfied. If the tolerance coefficient is taken as δ, then the duty cycle condition M i <M1*(1 + δ) or N i <N1*(1 + δ) is satisfied. Otherwise, it can be determined that the current coding signal does not belong to PWM coding. If the current coding signal belongs to PWM coding, then according to the previous sampling, the average period T AVE of the symbol can be calculated = (T1 + T2 +... + Tn) / n; assuming that the transmission code rate of the coded data is B1, then B1 = 1 / T AVEAssuming the code rate of the smallest coding unit is B2, then based on the previously calculated duty cycle N1 of the code element "0", then B2 = 1 / (T AVE *N1).

[0095] It is understandable that when the remote control signal is NRZ code or PWM code, it cannot satisfy the condition that the duty cycle condition is met for multiple cycles. Therefore, it can be determined that the remote control signal is a pulse width modulation signal.

[0096] In this embodiment, when multiple reference cycles meet the duty cycle condition, the encoding type of the remote control signal is determined to be pulse width modulation. Then, the code rate of the remote control signal can be determined according to the reference cycle and the corresponding number, so that the remote control copier can still realize the remote control function at a long distance.

[0097] In one embodiment, determining the encoding type of the remote control signal based on the level state conditions satisfied by the reference period includes:

[0098] When multiple reference cycles satisfy any one of the preset level durations, the encoding type of the remote control signal is determined to be Manchester encoding.

[0099] The code rate of the remote control signal is determined based on the reference period and the corresponding number of symbols, using the code rate calculation rules corresponding to the encoding type. This includes:

[0100] The code rate of the remote control signal is determined based on multiple reference periods, the number of periods corresponding to each preset level duration, and the period coefficient corresponding to the preset level duration.

[0101] MAN encoding, also known as Manchester encoding, is a biphase encoding method that uses high-low level switching to represent symbol signals "0" or "1". In MAN encoding, each symbol is represented by two level signals of different phases, i.e., a square wave of one cycle. For example... Figure 4 The diagram shown illustrates a MAN code implementation in one embodiment. When transmitting a symbol "1", the clock cycle is high in the first half and low in the second half; the opposite is true for transmitting a symbol "0". According to the characteristics of MAN encoding rules, within a reference cycle, the duration of high and low levels is at most twice that of each other, therefore there are only four high / low level states. Assuming a symbol clock cycle is T, then the high-level time of one encoding unit is H = T / 2, and the low-level time of one encoding unit is L = H. Assuming T... A =1*H+1*L,T B =2*H+1*L,T C =2*H+2*L,T D = 1*H + 2*L, representing the four high and low level states respectively. When the MCU samples the high and low level times H1, H2, ..., H of n sets of signals, the time intervals are calculated. n and L1, L 2, …, L n Then for any T i =H i +L i There must be a T i ≈T A , or T i ≈T B , or T i ≈T C , or T i ≈T D This refers to four preset level durations. If the tolerance coefficient is δ, then T is satisfied. i <T A *(1+δ), or T i <T B *(1+δ), or T i <T C *(1+δ), or T i <T D *(1+δ), otherwise it can be determined that the current encoded signal does not belong to MAN encoding. That is, the reference period satisfies 1 times the high level duration + 1 times the low level duration, or 2 times the high level duration + 1 times the low level duration, or 2 times the high level duration + 2 times the low level duration, or 1 times the high level duration + 2 times the low level duration. It can be understood that within the error range, it also meets the preset level duration. Using this condition can exclude NRZ signals and PWM signals.

[0102] Specifically, the remote control copier takes multiple reference periods. When each of the multiple reference periods satisfies any one of the preset level durations, the encoding type of the remote control signal is determined to be Manchester encoding. Taking four preset durations as an example, the number of periods corresponding to each preset duration is the number of periods that satisfy T. i ≈T A The number of periods n A Satisfying T i ≈T B The number of periods n B Satisfying T i ≈T C The number of periods n c Satisfying T i ≈T D The number of periods n D Since the durations of each preset level are not exactly the same, the number of cycles needs to be multiplied by a cycle coefficient. Therefore,

[0103] The code rate of the smallest coding unit, B2 = 1 / ((T1+T2+…+T…) n ) / (2n A +3n B +4nC +3n D If the transmission code rate of the encoded data is B1 = B2 / 2, then the transmission code rate of the encoded data is B1 = B2 / 2.

[0104] In this embodiment, based on the characteristics of Manchester encoding, the remote control signal using Manchester encoding satisfies any one of the preset level durations. Therefore, the code rate of the remote control signal can be determined based on multiple reference periods, the number of periods corresponding to each preset level duration, and the period coefficient corresponding to the preset level duration, so that the remote control copier can still achieve remote control function at a long distance.

[0105] In one embodiment, determining the encoding type of the remote control signal based on the level state conditions satisfied by the reference period further includes:

[0106] If the encoding type of the remote control signal is not Manchester encoding, the encoding type of the remote control signal is determined to be non-return-to-zero code when the reference period is an integer multiple of the unit level duration.

[0107] The code rate of the remote control signal is determined based on the reference period and the corresponding number of symbols, using the code rate calculation rules corresponding to the encoding type. This also includes:

[0108] The code rate of the remote control signal is determined based on multiple reference periods and integer multiples of each reference period.

[0109] Specifically, NRZ (Non-Return-to-Zero) encoding is a binary signal encoding method where each bit is converted into a signal level for one time unit. A high level for one time unit represents a symbol signal "1," and a low level for one time unit represents a symbol signal "0." During transmission, the signal remains at the corresponding level until the next binary bit needs to be encoded. For example... Figure 5 The diagram shown illustrates NRZ encoding in one embodiment. Based on the characteristics of the NRZ encoding rules, when t represents a unit of signal level time, and the MCU samples n sets of high and low level times H1, H2, ..., H... n and L 1, L 2, …, L n So for H1~H n Any H within i It must be an integer multiple of t, n Hi For L1 to L n any L i It must be an integer multiple of t, n Li Take the tolerance coefficient δ, and assume δ Hi =(H i -n Hi *t) / t,δ Li=(L i -n Li *t) / t, then δ must be satisfied Hi <δ and δ Li If n < δ, then the current encoding is not an NRZ encoding. Hi It is H i The result is obtained by dividing by t and taking the integer part.

[0110] If the current encoding conforms to the NRZ encoding rule, the periodic average value

[0111] T AVE =((H1+H2+…+H n )+(L1+L1+…+L n )) / ((n H1 +n H2 +…+n Hn )+(n L1 +n L2 +…+n Ln )),but

[0112] The transmission rate of the encoded data is B1 = 1 / T AVE .

[0113] Optionally, when the encoding type of the remote control signal is neither Manchester encoding nor pulse width modulation encoding, the encoding type of the remote control signal is determined to be non-return-to-zero code when the reference period is an integer multiple of the unit level duration.

[0114] In this embodiment, the remote control signal is determined to be a non-return-to-zero code based on the encoding characteristics of the non-return-to-zero code, i.e., the reference period satisfies an integer multiple of the unit level duration. Then, based on multiple reference periods and the integer multiples corresponding to each reference period, the code rate of the remote control signal is determined, which enables the remote control copier to still achieve remote control function at a long distance.

[0115] In one embodiment, a conventional technical solution involves setting the radio frequency (RF) chip to OOK modulation and comparing the signal power of the RF signal receiver under different frequency operating conditions to copy the data of the wireless remote control. This approach has two technical drawbacks. First, the frequency measurement is not accurate enough, resulting in poor signal integrity from the RF receiver. The copied remote control may be unusable or insensitive, and large frequency errors also lead to short remote control distances. Second, it cannot copy remote controls with FSK modulation. FSK modulation transmits signals by alternating between two different frequency values. In this case, the RF chip operating under OOK modulation cannot decode the valid digital signal, thus preventing the copying of remote control data. Since there are already many FSK-modulated remote controls on the market, this is undoubtedly a significant technical challenge. Therefore, the remote control copying method described in the embodiments of this application is proposed.

[0116] In this embodiment, the hardware system of the remote control copier includes a wireless ISM (Industrial, Scientific and Medical) transceiver, a button circuit, an MCU (Microcontroller Unit), and an indicator light circuit. The specific workflow is as follows: After the MCU measures the accurate signal frequency value, the wireless ISM transceiver can be set to the accurate signal receiving frequency and demodulate the complete digital signal. The MCU encodes and identifies the digital signal from the wireless ISM transceiver and calculates the code rate, then decodes it according to the corresponding decoding rules to achieve complete replication of the remote control signal command. The MCU stores the replicated remote control command in different locations based on different buttons. When the user presses the corresponding button, the MCU retrieves the remote control command from the corresponding location and transmits the digital signal like a replicated remote control according to certain encoding rules, thus realizing the remote control function.

[0117] 1. Introduction to the principle of wireless ISM transceiver circuit module

[0118] A wireless ISM transceiver mainly consists of a front-end receive link and a digital modem. The analog front-end receive link includes a connected low-noise amplifier (LNA), a mixer, and a receive local oscillator clock; a programmable gain amplifier (VGA) connected to the mixer; and an analog-to-digital converter connected to the VGA. The digital modem includes connected digital channel filters, a digital demodulator, automatic gain control, automatic frequency control, signal strength indication, and packet processing.

[0119] When the wireless ISM transceiver is in receive mode, the received RF modulated signal is input from the low-noise amplifier to the mixer. The mixer then mixes the received RF modulated signal (such as a remote control signal) with the ISM-set receive signal frequency value to obtain the intermediate frequency (IF) signal. The IF signal is sampled into the digital domain by an analog-to-digital converter (ADC), and the signal strength, or RSSI (Received Signal Strength Indication), can be measured using a digital peak detector.

[0120] 2. Determine the operating mode of the remote control signal.

[0121] When the wireless ISM transceiver is in receive mode, the received RF modulated signal is input from the low-noise amplifier (LNA) to a mixer. At this time, the mixer converts the received OOK / FSK modulated signal into a frequency converter. SN The local oscillator clock frequency f set by ISM LO Perform frequency mixing, when f SN Frequency and f LO When the frequency difference falls within the passband of the intermediate frequency (IF) filter, the mixing component will be output from the mixer, resulting in an IF signal f that is output as a square wave at a specific frequency. IF Therefore, it can be seen that the intermediate frequency signal frequency f IF =f SN -f LO Similarly, f can be derived. SN =f LO +f IF That is, it is necessary to measure the unknown signal f. SN When the frequency is high, the local oscillator clock frequency f can be continuously increased. LO Frequency, making f SN with f LO If the frequency difference falls within the passband of the intermediate frequency filter, it can be measured by f. IF To find the unknown signal f in the form of frequency SN The frequency.

[0122] Set the ISM local oscillator clock f LO With a starting frequency of 250MHz and a cutoff frequency of 960MHz, the MCU controls the ISM's f during frequency measurement. LO Incrementing in increments of 500kHz until f LO When the frequency is greater than or equal to the cutoff frequency, the frequency is incremented again from the starting frequency to the cutoff frequency, and this cycle repeats. During this cycle, the MCU will start a timer to continuously capture the intermediate frequency signal output of the ISM. If a remote control is transmitting a signal f at this time... SNWhen the MCU continuously captures n intermediate frequency signals with periods T1, T2, ..., T... n If T is used AVE T represents the periodic average value of the intermediate frequency signal. AVE = (T1+T2+…+T) n Let T be a tolerance factor δ, and let T be a tolerance factor δ. i For T1~T n For any value within, if it always satisfies T i <T AVE (1+δ) indicates that the current intermediate frequency signal can be considered a continuous and stable square wave signal, meaning that an effective f signal has been detected at this time. IF Frequency, i.e., f LO The frequency is already similar to f SN The frequencies are close. Then, using the formula for calculating frequency and period, f = 1 / T, we can obtain f. IF = (1 / T1 + 1 / T2 + ... + 1 / T) n ) / n. For T1~T n A certain group of T within i T j T k T m If m>k>j>i exists, assume f IFi =(1 / T) i +1 / T i+1 +…+1 / T j-1 ) / (ji), f IFj =(1 / T) j +1 / T j+1 +…+1 / T k-1 ) / (kj), f IFk =(1 / T) k +1 / T k+1 +…+1 / T m-1 ) / (mk). When f is satisfied IFi =f IFk with f IFi ≠f IFj At that time, based on the frequency characteristics of FSK, it can be known that the current f SN The signal may be in FSK operating mode, in which case multiple sets of T1~T can be measured. n If any set T1~T n Inside, f is always satisfied IFi =f IFk with f IFi ≠f IFj The relationship can then be determined. SN The signal is in FSK operating mode; otherwise, it is determined that f... SN The signal is in ASK working mode, which can specifically be OOK working mode.

[0123] 3. Calculation of remote control signal transmission frequency value

[0124] When f SN When the signal is in ASK operating mode, f can be obtained from the above measurement results. SN =f LO +(1 / T1+1 / T2+…+1 / T n Due to the existence of chip clock errors, the measurement result f at this time is ) / n. SN There will be some error. In this case, a standard spectrum analyzer can be used for measurement and calibration to reduce the measurement error of the MCU. For example, for the same f... SN If the spectrum analyzer's measurement result is f1 and the MCU's measurement result is f2, a calibration coefficient d = f1 - f2 can be used. This coefficient is then written into the MCU for storage and use. After calibration, the MCU's measurement result should be f1. SN =f LO +(1 / T1+1 / T2+…+1 / T n ) / n+d.

[0125] When f SN When the signal is in FSK operating mode, due to f SN The signal consists of two peak frequency points f max f min Composition, assuming the above measurement results satisfy f IFi >f IFj , by f max =f LO +f IFi f min =f LO +f IFj The center frequency point f of FSK can be obtained. SN =f LO +(f IFi +f IFj ) / 2, f SN The frequency offset is (f IFi -f IFj ) / 2. Similarly, after calibrating and measuring the MCU using a standard spectrum analyzer, f can be obtained. SN =f LO +(f IFi +f IFj ) / 2+d.

[0126] 4. Encoding type identification and bit rate calculation

[0127] After setting the receiving parameters of the wireless ISM transceiver, the transceiver will output the demodulated digital signal. At this time, the digital signal can be sampled according to common coding rules to calculate the code rate of the digital signal. Common remote control signal coding rules include NRZ, PWM, and MAN. When the MCU detects different coding types of remote control signals and calculates the code rate according to the characteristics of the coding rules of the remote control signal, the most accurate calculation result can be obtained. After completing the remote control replication, only by transmitting the remote control signal at the accurate code rate can the best remote control effect be achieved.

[0128] 4.1 PWM Coding Signal Recognition and Code Rate Calculation

[0129] PWM (Pulse-Width Modulation) coding. The PWM signal transmits information by adjusting the duration of the high level within a clock cycle. In PWM coding, a group of different high and low level signals are used to represent the symbol signal "0" or "1". As shown in the figure, according to the area equivalence rule, within one coding clock cycle, when transmitting the symbol "1", it is represented by a 75% duty cycle; when transmitting the symbol "0", it is represented by a 25% duty cycle. According to the characteristics of the PWM coding rule, assuming that the MCU samples the high and low level times of a group of symbol signals, and uses H1 and L1 to represent the high level time and low level time respectively, then the symbol period T1 = H1 + L1. At this time, if H1 > L1, the duty cycle M1 of the symbol "1" = H1 / T1, and the duty cycle N1 of the symbol "0" = L1 / T1; if H1 < L1, the duty cycle M1 of the symbol "1" = L1 / T1, and the duty cycle N1 of the symbol "0" = H1 / T1. Assuming that the MCU samples the high and low level times H n and L n , from T = H + L, the period times T1, T2,..., T n can be obtained. Then for any certain T n within T1 to T i for the calculated H i and L i , the calculated duty cycle M i of the symbol "1" and the duty cycle N i of the symbol "0", then there must be M i ≈ M1 or N i ≈ N1. If the tolerance coefficient is taken as δ, then it satisfies M i < M1*(1 + δ) or N i < N1*(1 + δ), otherwise it can be determined that the current coding signal does not belong to PWM coding. If the current coding signal belongs to PWM coding, then the average period T AVE of the symbol can be calculated according to the previous sampling: T = (T1 + T2 +... + Tn) / n; assuming that the transmission code rate of the coded data is B1, then B1 = 1 / TAVE Assuming the code rate of the smallest coding unit is B2, then based on the previously calculated duty cycle N1 of the code element "0", then B2 = 1 / (T AVE *N1).

[0130] 4.2 MAN Encoded Signal Identification and Code Rate Calculation

[0131] MAN encoding, also known as Manchester encoding, is a biphase encoding method that uses high-low level switching to represent symbol signals "0" or "1". In MAN encoding, each symbol is represented by two level signals with different phases, i.e., a square wave of one cycle. As shown in the diagram above, when transmitting symbol "1", the level is high in the first half of the clock cycle and low in the second half; the opposite is true when transmitting symbol "0". According to the characteristics of MAN encoding rules, there are four high-low level states. Assuming one symbol clock cycle is T, then one encoding unit of high-level time H = T / 2, and one encoding unit of low-level time L = H. Assuming HAT... A =1*H+1*L,T B =2*H+1*L,T C =2*H+2*L,T C = 1*H + 2*L, representing the four high and low level states respectively. When the MCU samples the high and low level times H1, H2, ..., H of n sets of signals, the time intervals are calculated. n and L 1, L 2, …, L n Then for any T i =H i +L i There must be a T i ≈T A , or T i ≈T B , or T i ≈T C , or T i ≈T D If the tolerance coefficient is δ, then T is satisfied. i <T A *(1+δ), or T i <T B *(1+δ), or T i <T C *(1+δ), or T i <T D *(1+δ), otherwise it can be determined that the current encoded signal does not belong to MAN encoding. If the current encoded signal belongs to MAN encoding, T can be obtained from the previous calculations. i ≈T A The number of n A T i ≈TB The number of n B T i ≈T C The number of n c T i ≈T D The number of n D The code rate of the smallest coding unit, B2, is 1 / ((T1+T2+…+T…). n ) / (n A +n B +n C +n D If the transmission code rate of the encoded data is B1 = B2 / 2, then the transmission code rate of the encoded data is B1 = B2 / 2.

[0132] 4.3 NRZ Encoded Signal Recognition and Code Rate Calculation

[0133] NRZ (Non-Return-to-Zero) encoding is a binary signal encoding method. In NRZ encoding, each bit is converted into a signal level of one time unit, where a high level represents a symbol signal "1" and a low level represents a symbol signal "0". During transmission, the signal remains at the corresponding level until the next binary bit needs to be encoded. Based on the characteristics of NRZ encoding rules, let t represent one unit of signal level time. When the MCU samples n sets of high and low level times H1, H2, ..., H... n and L 1, L 2, …, L n So for H1~H n Any H within i It must be an integer multiple of t, n Hi For L1 to L n any L i It must be an integer multiple of t, n Li Take the tolerance coefficient δ, and assume δ Hi =(H n -n Hi *t) / t,δ Li =(L n -n Li *t) / t, then δ must be satisfied Hi <δ and δ Li If the value is less than δ, then the current encoding is not NRZ encoding. If the current encoding conforms to the NRZ encoding rules, the average value T is... AVE =((H1+H2+…+H n )+(L1+L1+…+L n )) / ((δ H1 +δ H2 +…+δ Hn)+(δ L1 +δ L2 +…+δ Ln If the transmission rate of the encoded data is B1 = 1 / T, then the transmission rate of the encoded data is B1 = 1 / T. AVE .

[0134] Understandably, the MCU first checks whether the remote control signal is MAN code, and then checks whether it is NRZ code.

[0135] In this embodiment, when the MCU detects remote control signals of different encoding types, it calculates the code rate according to the encoding rules of the remote control signals to obtain the most accurate calculation results. After the remote control copying is completed, only by transmitting the remote control signal according to the accurate code rate can the best remote control effect be achieved.

[0136] In one embodiment, a remote control signal copying method includes:

[0137] Step (a1): Receive the remote control signal of the remote control device to be copied.

[0138] Step (a2): Switch different local oscillator clock frequency values. For each local oscillator clock frequency value, perform frequency mixing processing with the received remote control signal to obtain the intermediate frequency signal.

[0139] Step (a3): Detect multiple cycles of the intermediate frequency signal and determine the average value of the cycles based on the multiple cycles.

[0140] Step (a4): When the error between the preset number of cycles and the average of the cycles is within the preset range, a continuous and stable square wave signal is obtained.

[0141] In step (a5), when the intermediate frequency signal is a continuous and stable square wave signal, the corresponding target local oscillator clock frequency value is obtained, and the frequency value of the intermediate frequency signal is obtained multiple times.

[0142] Step (a6) determines multiple frequency averages based on multiple frequency values ​​of the intermediate frequency signal.

[0143] Step (a7): When the average frequency meets the preset mode judgment condition, the working mode of the remote control signal is determined to be frequency shift keying; the preset mode judgment condition is that the average target frequency in the average frequency is the same as the average non-adjacent frequency, and is different from the average adjacent frequency.

[0144] Step (a8): When the average frequency does not meet the preset mode judgment condition, the working mode of the remote control signal is determined to be amplitude frequency keying.

[0145] Step (a9): When the working mode of the remote control signal is frequency shift keying, the center frequency value of the remote control signal is obtained by averaging the average value of the target frequency and the average value of the adjacent frequencies and summing it with the target local oscillator clock frequency value.

[0146] Step (a10): Determine the frequency offset of the remote control signal based on the difference between the average target frequency and the average values ​​of adjacent frequencies.

[0147] Step (a11): When the remote control signal is in amplitude frequency keying mode, the average frequency values ​​of multiple intermediate frequency signals are calculated and summed with the target local oscillator clock frequency value to obtain the transmission frequency value of the remote control signal.

[0148] Step (a12) involves parsing the remote control signal using the transmission frequency value based on the decoding rules corresponding to the working mode, in order to copy the remote control command corresponding to the remote control signal.

[0149] Step (a13) obtains the reference period of the remote control signal. The reference period includes a high level and a low level adjacent to the high level.

[0150] Step (a14): When multiple reference cycles meet the duty cycle condition, the encoding type of the remote control signal is determined to be pulse width modulation.

[0151] Step (a15): Determine the code rate of the pulse width modulated remote control signal based on multiple reference periods and the number of corresponding reference periods.

[0152] Step (a16): When multiple reference cycles satisfy any one of the preset level durations, the encoding type of the remote control signal is determined to be Manchester encoding.

[0153] Step (a17): Determine the code rate of the Manchester-encoded remote control signal based on multiple reference cycles, the number of cycles corresponding to each preset level duration, and the cycle coefficient corresponding to the preset level duration.

[0154] Step (a18): If the encoding type of the remote control signal is not Manchester encoding, the encoding type of the remote control signal is determined to be non-return-to-zero code when the reference period is an integer multiple of the unit level duration.

[0155] Step (a19): Determine the code rate of the remote control signal that is a non-return-to-zero code based on multiple reference periods and the integer multiples corresponding to each reference period.

[0156] Step (a20) involves sending the copied remote control signal at a bit rate.

[0157] In this embodiment, the remote control signal of the device to be copied is received, different local oscillator clock frequencies are switched, and the remote control signal and local oscillator clock frequency values ​​are mixed to obtain an intermediate frequency (IF) signal. When the IF signal is a continuous and stable square wave signal, the transmission frequency of the remote control signal is close to the receiving frequency of the remote control copier. Under this condition, the frequency of the obtained IF signal will still fluctuate, and the operating mode of the remote control signal is unknown. Therefore, it is necessary to determine the operating mode of the remote control signal based on multiple frequency values ​​of the IF signal. The frequency determination rules under the operating mode are used to process the frequency value of the IF signal and the target local oscillator clock frequency value to determine the transmission frequency value, resulting in a more accurate frequency value of the obtained remote control signal. The remote control signal is then parsed using this transmission frequency value to copy the corresponding remote control command. The more accurate frequency value used for signal parsing makes the parsed signal more complete, and the remote control copier can still achieve remote control functionality even at long distances. Furthermore, by detecting remote control signals with different encoding types and calculating the code rate according to the encoding rules of the remote control signal, the most accurate calculation result can be obtained. After completing the remote control copying, the remote control signal is transmitted according to the accurate code rate to achieve the best remote control effect.

[0158] It should be understood that, although the above Figure 2 In the flowchart, the steps are shown sequentially according to the arrows, and the steps in steps (a1) to (a20) are shown sequentially according to the labels. However, these steps are not necessarily executed in the order indicated by the arrows or numbers. Unless explicitly stated herein, there is no strict order requirement for the execution of these steps; they can be executed in other orders. Figure 2 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0159] In one embodiment, a remote copier is provided for implementing the steps of the above method embodiments.

[0160] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method embodiments.

[0161] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in the above method embodiments.

[0162] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes described in the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0163] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for copying remote control signals, characterized in that, The method includes: Receive the remote control signal from the remote control device to be copied; Switch different local oscillator clock frequency values. For each local oscillator clock frequency value, perform frequency mixing processing between the received remote control signal and each local oscillator clock frequency value to obtain an intermediate frequency signal. When the intermediate frequency signal is a continuous and stable square wave signal, the corresponding target local oscillator clock frequency value is obtained, and the frequency value of the intermediate frequency signal is obtained multiple times; The operating mode of the remote control signal is determined based on multiple frequency values ​​of the intermediate frequency signal; The frequency values ​​of the multiple intermediate frequency signals and the target local oscillator clock frequency value are processed using the frequency determination rules in the aforementioned working mode to determine the transmission frequency value of the remote control signal; Based on the decoding rules corresponding to the working mode, the remote control signal is parsed using the transmission frequency value in order to copy the remote control command corresponding to the remote control signal; Determining the operating mode of the remote control signal based on multiple frequency values ​​of the intermediate frequency signal includes: Multiple frequency averages are determined based on multiple frequency values ​​of the intermediate frequency signal; When the average frequency value meets the preset mode judgment condition, the working mode of the remote control signal is determined to be frequency shift keying; the preset mode judgment condition is that the average target frequency value in the average frequency value is the same as the average non-adjacent frequency value, and is different from the average adjacent frequency value. When the average frequency does not meet the preset mode judgment condition, the working mode of the remote control signal is determined to be amplitude frequency keying.

2. The method according to claim 1, characterized in that, The method for detecting the continuous and stable square wave signal includes: Detect multiple periods of the intermediate frequency signal, and determine the average period value based on the multiple periods; When the error between a preset number of the cycles and the average value of the cycles is within a preset range, it is determined that the continuous and stable square wave signal has been detected.

3. The method according to claim 1, characterized in that, The process of using the frequency determination rules under the aforementioned operating mode to process the frequency values ​​of the multiple intermediate frequency signals and the target local oscillator clock frequency value to determine the transmission frequency value of the remote control signal includes: When the operating mode of the remote control signal is frequency shift keying, the average value of the remote control signal is obtained by averaging the average value of the target frequency and the average value of the adjacent frequencies, and the sum of the average value and the target local oscillator clock frequency value. The frequency offset of the remote control signal is determined based on the difference between the average target frequency and the average adjacent frequencies.

4. The method according to claim 1, characterized in that, The process of using the frequency determination rules under the aforementioned operating mode to process the frequency values ​​of the multiple intermediate frequency signals and the target local oscillator clock frequency value to determine the transmission frequency value of the remote control signal includes: When the remote control signal operates in amplitude frequency keying mode, the average value of the multiple intermediate frequency signals is calculated, and the sum of the average value and the target local oscillator clock frequency value is used to obtain the transmission frequency value of the remote control signal.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Obtain the reference period of the remote control signal; the reference period includes a high level and a low level adjacent to the high level; The encoding type of the remote control signal is determined based on the level state conditions satisfied by the reference period; The code rate of the remote control signal is determined based on the reference period and the corresponding number of symbols by using the code rate calculation rule corresponding to the encoding type. The copied remote control signal is transmitted at the stated bit rate.

6. The method according to claim 5, characterized in that, Determining the encoding type of the remote control signal based on the level state conditions satisfied by the reference period includes: When multiple reference cycles satisfy the duty cycle condition, the encoding type of the remote control signal is determined to be pulse width modulation. The step of determining the code rate of the remote control signal based on the reference period and the corresponding number of symbols, using the code rate calculation rule corresponding to the encoding type, includes: The code rate of the remote control signal is determined based on the multiple reference periods and the number of corresponding reference periods.

7. The method according to claim 5, characterized in that, Determining the encoding type of the remote control signal based on the level state conditions satisfied by the reference period includes: When the multiple reference cycles satisfy any one of the preset level durations, the encoding type of the remote control signal is determined to be Manchester encoding; The step of determining the code rate of the remote control signal based on the reference period and the corresponding number of symbols, using the code rate calculation rule corresponding to the encoding type, includes: The code rate of the remote control signal is determined based on multiple reference periods, the number of periods corresponding to each preset level duration, and the period coefficient corresponding to the preset level duration.

8. The method according to claim 7, characterized in that, The step of determining the encoding type of the remote control signal based on the level state conditions satisfied by the reference period further includes: If the encoding type of the remote control signal is not Manchester encoding, and the reference period is an integer multiple of the unit level duration, the encoding type of the remote control signal is determined to be non-return-to-zero code. The step of determining the code rate of the remote control signal based on the reference period and the corresponding number of symbols, using the code rate calculation rule corresponding to the encoding type, further includes: The code rate of the remote control signal is determined based on the multiple reference periods and the integer multiples corresponding to each reference period.

9. A remote-controlled copier, characterized in that, The remote-controlled copier is used to implement the steps of the method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.