Cross-medium remote control communication method and device, equipment and storage medium
By using dynamic parameter adjustment and spectrum analysis technology in the cross-media communication system, the problem of signal attenuation and transmission instability in the water-air interface environment is solved, and remote control communication with low latency and high success rate is achieved.
Patent Information
- Application Number
- CN202510532627.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-06-27
AI Technical Summary
The existing cross-media communication technology has problems such as severe signal attenuation, unstable transmission, high delay and low reliability in water-air interface environments.
By generating a modulated electrical signal in response to user key operation at the transmitter, and dynamic parameter adjustment is performed according to environmental parameter information, the signal is converted into a modulated optical signal through LED. After receiving the optical signal, the receiving end performs amplification and digitization processing, extracts frequency characteristic information through spectrum analysis, and finally parses out the control instructions and performs the corresponding equipment control operations.
It realizes cross-media remote control communication with low latency and high success rate in the water-air interface environment, solving the problems of signal attenuation and transmission instability.
Smart Images

Figure CN120220375A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cross - medium remote control, and particularly to a cross - medium remote control communication method, device, equipment and storage medium. Background Art
[0002] Traditional wireless communication technologies face severe challenges in cross - medium scenarios, especially in the air - to - water environment. When radio frequency signals propagate in water, significant attenuation occurs and the penetration depth is limited; acoustic wave communication can transmit underwater, but has disadvantages such as high latency and being easily interfered by multipath effects; while existing optical communication systems are mostly one - way underwater optical communication, lacking an effective solution for the "air → water" dynamic cross - medium environment.
[0003] Especially under harsh water quality conditions, when optical signals enter water from air, due to physical effects such as refraction, scattering and absorption, a large amount of energy is lost, resulting in severe signal attenuation. Coupled with water surface fluctuations and environmental light interference, accurate and reliable cross - medium remote control communication becomes extremely difficult. Existing technologies cannot simultaneously meet the requirements of low latency, high reliability and low power consumption, severely restricting the remote control ability of underwater devices. Summary of the Invention
[0004] The main purpose of the present invention is to solve the technical problems of severe signal attenuation, unstable transmission, high latency and low reliability in existing cross - medium communication technologies; In the first aspect of the present invention, a cross - medium remote control communication method is provided. The cross - medium remote control communication method is applied to a cross - medium remote control system. The cross - medium remote control system includes a transmitting end and a receiving end. The cross - medium remote control communication method includes: In response to a pressing operation of any function key on the transmitting end, generating a corresponding key signal, and performing encoding processing on the key signal to generate a modulated electrical signal including a synchronization header signal and an instruction frequency signal; Collecting environmental parameter information, dynamically adjusting the parameters of the modulated electrical signal according to the environmental parameter information, and converting the adjusted modulated electrical signal into a modulated optical signal through an LED; Using the receiving end to receive the cross - medium transmitted optical signal formed after the modulated optical signal is transmitted through the water - air interface, and performing amplification and digital processing on the cross - medium transmitted optical signal, and extracting frequency characteristic information in the cross - medium transmitted optical signal through spectrum analysis; Analyzing the control instruction according to the frequency characteristic information, and performing a device control operation of the function key corresponding to the pressing operation according to the control instruction.
[0005] Optionally, in the first implementation manner of the first aspect of the present invention, the generating a corresponding key signal in response to a pressing operation of the user on any function key on the transmitting end and performing visible light communication modulation on the key signal to generate a visible light modulation signal includes: Responding to a pressing operation of the user on any function key on the transmitting end through the key detection interface of the MCU of the transmitting end to obtain an initial key signal; Performing conversion processing on the initial key signal according to a preset key mapping relationship to obtain a corresponding function instruction code; Invoking the timer resource of the MCU to generate a synchronization header signal with a preset frequency through pulse frequency modulation and maintaining a first preset duration; Invoking the frequency generation unit of the MCU to generate an instruction frequency signal corresponding to the function instruction code through frequency shift keying and maintaining a second preset duration; Using the signal combination module of the MCU to cascade the synchronization header signal and the instruction frequency signal according to the timing relationship, and setting the signal duty cycle parameter through the waveform modulation unit to generate the modulated electrical signal.
[0006] Optionally, in the second implementation manner of the first aspect of the present invention, the collecting environmental parameter information, dynamically adjusting the parameters of the modulated electrical signal according to the environmental parameter information, and converting the adjusted modulated electrical signal into a modulated optical signal through an LED includes: Realtime sampling the environmental light parameter through the photosensitive sensing element of the transmitting end, and inputting the environmental light parameter into a preset environmental adaptability algorithm model for calculation to generate an output parameter adjustment coefficient; Invoking the waveform modulation unit of the MCU according to the output parameter adjustment coefficient to dynamically adjust the waveform parameters of the modulated electrical signal to obtain an adjusted modulated electrical signal adapted to the current environment; Transmitting the adjusted modulated electrical signal to the gate driving unit of the transmitting end through a current driving circuit, and converting the adjusted modulated electrical signal into a gate control signal through the gate driving unit; Driving a power switching device through the gate control signal to regulate the supply current of the LED according to the frequency and waveform parameters of the adjusted modulated electrical signal, so that the LED emits a modulated optical signal corresponding to the frequency and intensity characteristics of the adjusted modulated electrical signal.
[0007] Optionally, in the third implementation manner of the first aspect of the present invention, the inputting the environmental light parameter into a preset environmental adaptability algorithm model for calculation to generate an output parameter adjustment coefficient includes: Input the environmental light parameter into the data preprocessing unit of the environmental adaptability algorithm model, perform normalization processing on the light intensity data, and obtain a standardized environmental light intensity value; Input the standardized environmental light intensity value into the light intensity grading unit of the environmental adaptability algorithm model, and determine the current environmental light intensity level through threshold comparison; Input the environmental light intensity level into the parameter selection unit of the environmental adaptability algorithm model, and select the corresponding basic parameter template from the preset parameter library according to the light intensity level; Input the basic parameter template into the parameter adjustment unit of the environmental adaptability algorithm model, execute the nonlinear mapping algorithm to calculate the real-time adjustment value, and obtain a preliminary adjustment coefficient; Input the preliminary adjustment coefficient and the historical light intensity data into the dynamic compensation unit of the environmental adaptability algorithm model, execute the weighted fusion algorithm, and obtain an output parameter adjustment coefficient.
[0008] Optionally, in the fourth implementation manner of the first aspect of the present invention, the method for using the receiving end to receive the cross-media transmission optical signal formed after the modulated optical signal is transmitted through the water-air interface, and amplifying and digitizing the cross-media transmission optical signal, and extracting the frequency feature information in the cross-media transmission optical signal through spectrum analysis includes: Receive the cross-media transmission optical signal through the solar panel of the receiving end, and convert the cross-media transmission optical signal into a corresponding current signal; Successively perform analog signal amplification processing on the current signal through the secondary operational amplifier unit and the triode amplifier unit in the receiving end; Convert the amplified analog signal into a digital signal through an ADC, and transmit the digital signal to the FPGA; Execute the weak light detection algorithm of the receiving end in the FPGA to process the digital signal, and extract the frequency feature information in the cross-media transmission optical signal.
[0009] Optionally, in the fifth implementation manner of the first aspect of the present invention, the method for executing the weak light detection algorithm of the receiving end in the FPGA to process the digital signal and extract the frequency feature information in the cross-media transmission optical signal includes: Perform time-domain accumulation processing on the digital signal according to a preset sampling window through the time accumulator inside the FPGA to reduce the influence of random noise, and obtain an accumulated digital signal; Call the built-in FFT operation module of the FPGA to perform a fast Fourier transform with a preset number of points on the accumulated digital signal, convert the time-domain signal into a frequency-domain signal, and obtain an FFT result; Set a time window with adjustable width, select the valid data segment in the FFT result, and perform spectral peak tracking on the valid data segment by moving the time window to obtain window spectral feature data; Perform correlation analysis on the window spectral feature data and the preset synchronization header frequency feature. When the correlation degree exceeds the threshold, it is confirmed that the synchronization header signal is detected; After detecting the synchronization header signal, start a multi-channel parallel filter according to the synchronization timing relationship, and perform frequency division processing on the command frequency signal received after the synchronization header signal to obtain the energy distribution of each frequency channel; Apply a preset logic sequence decision mechanism according to the energy distribution to perform pattern matching on the detected frequency sequence to obtain a matching result, and output corresponding frequency feature information according to the matching result.
[0010] Optionally, in the sixth implementation manner of the first aspect of the present invention, the device control operation of parsing the control command according to the frequency feature information and executing the function key corresponding to the pressing operation according to the control command includes: Input the frequency feature information into the instruction mapping database, query and match through the frequency-instruction comparison table to obtain the original instruction code; Perform a check algorithm detection on the original instruction code, calculate the check value and compare it with the preset check standard to confirm the instruction integrity and obtain a valid instruction code; Encapsulate and transmit the valid instruction code through the UART interface according to the preset communication protocol format, and send it to the control system to obtain the control system reception confirmation; After the control system receives the valid instruction code, execute the instruction parsing program to convert the original instruction code into a corresponding function module call command; Activate the corresponding execution unit according to the function module call command, complete the device control operation of the function key corresponding to the pressing operation, and return the execution status information to the FPGA.
[0011] The second aspect of the present invention provides a cross-media remote control communication device. The cross-media remote control communication device is applied to a cross-media remote control system. The cross-media remote control system includes a transmitting end and a receiving end. The cross-media remote control communication device includes: A signal generation module, which is used to respond to the pressing operation of any function key on the transmitting end by the user, generate a corresponding key signal, and perform encoding processing on the key signal to generate a modulated electrical signal including a synchronization header signal and an instruction frequency signal; A signal adjustment module, which is used to collect environmental parameter information, perform dynamic parameter adjustment on the modulated electrical signal according to the environmental parameter information, and convert the adjusted modulated electrical signal into a modulated optical signal through an LED; A signal receiving module, configured to receive, by using the receiving end, the cross-media transmission optical signal formed after the modulated optical signal is transmitted through the water-air interface, amplify and digitize the cross-media transmission optical signal, and extract frequency feature information in the cross-media transmission optical signal through spectrum analysis; An instruction execution module, configured to parse a control instruction according to the frequency feature information, and perform a device control operation on a function key corresponding to the pressing operation according to the control instruction.
[0012] A third aspect of the present invention provides a cross-media remote control communication device, including: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected through a line; the at least one processor calls the instructions in the memory to enable the cross-media remote control communication device to execute the steps of the above-mentioned cross-media remote control communication method.
[0013] A fourth aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, and when the instructions are run on a computer, the computer is enabled to execute the steps of the above-mentioned cross-media remote control communication method.
[0014] In the above-mentioned cross-media remote control communication method, device, equipment and storage medium, the transmitting end in the cross-media remote control system responds to the user's key operation, generates a key signal and performs encoding processing to generate a modulated electrical signal including a synchronization header signal and an instruction frequency signal; collects environmental parameter information, dynamically adjusts the modulated electrical signal accordingly, and converts the adjusted modulated electrical signal into a modulated optical signal through an LED; the receiving end receives the cross-media transmission optical signal, performs amplification and digitization processing, and extracts frequency feature information through spectrum analysis; parses a control instruction according to the frequency feature information and performs a corresponding device control operation. Through specific time-frequency signal structure design and multi-level signal processing technology, the present invention effectively solves the problem of the stability of signal transmission at the water-air interface, and realizes cross-media remote control communication with low latency and high success rate.
[0015] Other features and advantages of the present invention will be described in the following specification, and partly become obvious from the specification, or are understood by implementing the present invention. The objectives and other advantages of the present invention are realized and obtained by the structures specifically pointed out in the specification, claims and drawings.
[0016] To make the above objectives, features and advantages of the present invention more obvious and understandable, the following specific preferred embodiments are given, and in conjunction with the accompanying drawings, the detailed description is as follows. Description of the Drawings
[0017] Figure 1 It is a schematic diagram of the first embodiment of the cross-media remote control communication method in the embodiment of the present invention; Figure 2 Schematic diagram of an embodiment of the cross-media remote control communication device in the embodiment of the present invention; Figure 3 Schematic diagram of an embodiment of the cross-media remote control communication equipment in the embodiment of the present invention; Figure 4 Schematic diagram of the component topology of the transmitting end of the cross-media remote control system in the embodiment of the present invention; Figure 5 Schematic diagram of the component topology of the receiving end of the cross-media remote control system in the embodiment of the present invention. Detailed implementation manners
[0018] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0019] The terms "include" and "have" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but optionally further includes other unlisted steps or units, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0020] For ease of understanding of this embodiment, first, a cross-media remote control communication method disclosed in the embodiments of the present invention will be introduced in detail. The cross-media remote control communication method is applied to a cross-media remote control system, and the cross-media remote control system includes a transmitting end and a receiving end. As Figure 1 shown, the method includes the following steps: 101. In response to a pressing operation of any function button on the transmitting end by a user, generate a corresponding button signal, and perform encoding processing on the button signal to generate a modulated electrical signal including a synchronization header signal and an instruction frequency signal; In an embodiment of the present invention, generating a corresponding key signal in response to a user's pressing operation on any function key on the transmitting end, and performing visible light communication modulation on the key signal to generate a visible light modulation signal includes: responding to the user's pressing operation on any function key on the transmitting end through the key detection interface of the MCU of the transmitting end to obtain an initial key signal; performing conversion processing on the initial key signal according to a preset key mapping relationship to obtain a corresponding function instruction code; calling the timer resource of the MCU to generate a synchronization header signal with a preset frequency through pulse frequency modulation and maintaining a first preset duration; calling the frequency generation unit of the MCU to generate an instruction frequency signal corresponding to the function instruction code through frequency shift keying and maintaining a second preset duration; using the signal combination module of the MCU to cascade the synchronization header signal and the instruction frequency signal according to the timing relationship, and setting the signal duty cycle parameter through the waveform modulation unit to generate the modulation electrical signal.
[0021] Specifically, first, the response processing of the user's key operation is realized through the key detection interface of the MCU of the transmitting end. The component topology diagram of the transmitting end is as Figure 4 shown. When the user presses any function key on the transmitting end, the key detection interface uses the interrupt function of the GPIO input pin to capture the pressing event, and at the same time eliminates the jitter phenomenon of the mechanical key through the key debounce circuit to ensure that the obtained initial key signal is accurate. The key debounce circuit adopts the method of combining RC delay and software sampling, and performs secondary sampling confirmation after a 20ms delay after the physical key signal is triggered to filter out possible electrical interference. After the MCU receives the stable key signal, it reads the high and low level status of the current key from the GPIO input register to complete the acquisition process of the initial key signal. This hardware-software combined key detection mechanism not only improves the reliability of signal capture but also lays a foundation for subsequent signal processing.
[0022] Specifically, after obtaining the initial key signal, it is converted according to the preset key mapping relationship to obtain the corresponding function instruction code. The key mapping relationship is stored in the Flash memory of the MCU and a lookup table is used to establish the correspondence between the physical position of the key and the function instruction code. For example, the forward key corresponds to the instruction code 0x01, the backward key corresponds to the instruction code 0x02, the left turn key corresponds to the instruction code 0x03, and the right turn key corresponds to the instruction code 0x04. The MCU reads the mapping table data through the internal bus, uses the initial key signal (such as GPIO port number, pin number) as an index to query and extract the corresponding function instruction code. The conversion process also includes an effectiveness verification step, such as checking the instruction code format, range, and check value to ensure that the conversion result meets the expectations. After the conversion is completed, the function instruction code is temporarily stored in the RAM of the MCU as the basis for subsequent signal modulation.
[0023] Specifically, the timer resources of the MCU are called, and a synchronization header signal with a preset frequency is generated through pulse frequency modulation. The internal timer of the MCU is configured in the output compare mode, and the frequency of the output signal is precisely controlled by setting the prescaler value and the count period value of the timer. The timer count value is set to a parameter corresponding to the preset frequency, and at the same time, the timer interrupt service routine is started. In the interrupt, the level state of the output pin is flipped to generate a square wave signal. This pulse frequency modulation method utilizes the high-precision counting characteristic of the timer to ensure the stability of the generated synchronization header signal frequency. The synchronization header signal lasts for the first preset duration, which is controlled by a software timer. When the preset time threshold is reached, it automatically switches to the signal generation process of the next stage. The synchronization header signal serves as the starting mark of the entire communication frame, and its stability and recognizability directly affect the synchronization establishment effect of the communication.
[0024] Specifically, the frequency generation unit of the MCU is called, and a corresponding instruction frequency signal is generated according to the function instruction code through frequency shift keying. The frequency generation unit is based on a timer, DDS (Direct Digital Synthesis), or PWM peripheral. According to different function instruction codes, the division factor and count value of the timer are dynamically adjusted to generate a specific frequency signal corresponding one-to-one with the instruction code. The MCU performs a look-up table operation, reads the frequency configuration parameters corresponding to the current function instruction code from the pre-established instruction-frequency mapping table, and sets them into the timer control register. The instruction frequency signal also maintains the second preset duration through a software timing mechanism to ensure that the receiving end has enough time window to capture and parse the signal. Frequency shift keying, as an efficient modulation method, carries instruction information through frequency changes and has advantages such as strong anti-interference ability and simple demodulation.
[0025] Specifically, the synchronization header signal and the instruction frequency signal are cascaded according to the timing relationship by using the signal combination module of the MCU. The signal combination module controls the switching timing of the signals through a software state machine to ensure that the instruction frequency signal is immediately switched after the synchronization header signal is completed, seamlessly connecting the two parts of the signals. During the combination process, the duty cycle parameter of the signal is adjusted by the waveform modulation unit so that the finally output PWM waveform has a suitable duty cycle attribute on the basis of the frequency characteristics. The waveform modulation unit can finely adjust the high and low level time ratio of the PWM waveform, which directly affects the switching timing of the LED drive circuit. The setting of the signal duty cycle parameter takes into account the balance between power efficiency and signal quality, and usually a 50% duty cycle is selected to obtain the best signal strength. After this series of processing, a complete modulated electrical signal is finally generated and ready to be transmitted to the LED drive circuit for optical signal conversion.
[0026] 102. Collect environmental parameter information, dynamically adjust the modulated electrical signal according to the environmental parameter information, and convert the adjusted modulated electrical signal into a modulated optical signal through the LED; In one embodiment of the present invention, the collection of environmental parameter information, the dynamic parameter adjustment of the modulated electrical signal according to the environmental parameter information, and the conversion of the adjusted modulated electrical signal into a modulated optical signal through an LED include: real-time sampling of environmental light parameters by the photosensitive sensing element of the transmitting end, and inputting the environmental light parameters into a preset environmental adaptability algorithm model for calculation to generate an output parameter adjustment coefficient; calling the waveform modulation unit of the MCU according to the output parameter adjustment coefficient to dynamically adjust the waveform parameters of the modulated electrical signal to obtain an adjusted modulated electrical signal adapted to the current environment; transmitting the adjusted modulated electrical signal to the gate driving unit of the transmitting end through a current driving circuit, and converting the adjusted modulated electrical signal into a gate control signal through the gate driving unit; driving the power switch device through the gate control signal to regulate the supply current of the LED according to the frequency and waveform parameters of the adjusted modulated electrical signal, so that the LED emits a modulated optical signal corresponding to the frequency and intensity characteristics of the adjusted modulated electrical signal.
[0027] Specifically, first, the environmental light parameters are real-time sampled by the photosensitive sensing element of the transmitting end. The photosensitive sensing element uses a photosensitive resistor and a precision resistor to form a voltage dividing circuit. The resistance value of the photosensitive resistor changes with the environmental light intensity, thereby generating different voltage dividing values. These voltage dividing values are digitally sampled through the input channel of the analog-to-digital converter (ADC) of the MCU. The sampling frequency is set to 10 Hz, which is sufficient to capture the dynamic changes of the environmental light. The ADC has a 12-bit precision and maps the analog voltage value of 0 - 3.3 V to a digital value of 0 - 4095. The system performs a moving average filter on the sampled data, and takes the average value of 5 consecutive samples as the digital representation of the current environmental light intensity, filtering out short-term light fluctuations. This digital representation value is the environmental light parameter, which reflects the background light intensity level in the current environment and is directly related to the subsequent optical signal transmission quality. The collected environmental light parameters are input into a preset environmental adaptability algorithm model for further processing.
[0028] Specifically, after receiving the environmental light parameters, the environmental adaptability algorithm model first performs normalization processing, mapping the 12-bit ADC value (0 - 4095) to the standardized interval (0 - 1) to obtain the normalized environmental light intensity. Then, it compares the normalized intensity value with the preset multi-level light thresholds (such as 0.2, 0.4, 0.6, 0.8) to divide the current environmental light conditions into five levels: extremely weak light, weak light, medium light, strong light, and extremely strong light. For each light level, the model retrieves the corresponding basic parameter template from the parameter library, including the duty cycle reference value of PWM, the modulation depth parameter, and the photocurrent threshold, etc. Next, the algorithm performs linear or non-linear interpolation calculations within the corresponding level range according to the specific normalized intensity value to refine and adjust the parameter values. Finally, considering the light change trend, the algorithm compares the current sample with historical data, calculates the change rate, and predicts the short-term light trend, and accordingly makes a forward-looking correction to the adjusted parameters. This series of calculation processes outputs the final parameter adjustment coefficient, which is directly used for subsequent signal modulation parameter adjustment.
[0029] Specifically, according to the generated output parameter adjustment coefficient, the system calls the waveform modulation unit of the MCU to dynamically adjust the waveform parameters of the modulated electrical signal. The waveform modulation unit is implemented based on the PWM module of the MCU, and controls the frequency and duty cycle of the output waveform by adjusting the period register value and the comparison register value of PWM. In the specific implementation, the parameter adjustment coefficient is applied to two aspects of the PWM configuration: First, keep the frequency of PWM consistent with the frequency of the modulated electrical signal to ensure that the frequency characteristics of the signal remain unchanged; Second, modify the duty cycle value of PWM according to the adjustment coefficient to adjust the time ratio of high and low levels. In a strong light environment, the system increases the PWM duty cycle to increase the average power output of the LED; in a weak light environment, the system appropriately reduces the duty cycle to save energy consumption and avoid overexposure. In addition, the waveform modulation unit also controls the rise / fall time of the signal by changing the slope of the PWM edge to optimize the time-domain characteristics of the optical signal. After these adjustments, the system generates a modulated electrical signal suitable for the current environment, which has intensity characteristics more suitable for the current environment while maintaining the frequency encoding information.
[0030] Specifically, the adjusted modulated electrical signal is transmitted to the gate drive unit at the transmitting end through the current drive circuit. The current drive circuit is composed of a high-speed operational amplifier, providing sufficient current drive capability to ensure that the signal is not distorted during transmission. The gate drive unit is implemented using a dedicated MOS drive chip (such as IR2110), which has level conversion and dead-time control functions and can convert the 3.3V / 5V MCU signal into a high-voltage gate signal suitable for driving power MOS transistors. After receiving the modulated electrical signal, the gate drive unit automatically generates complementary high-side drive and low-side drive signals according to the internal logic circuit and inserts an appropriate dead time (usually 200 - 500ns) during the switching process of the two signals to avoid through-current. The processed gate control signal has a higher voltage swing (typical value 12 - 15V) and stronger current drive capability, which can quickly charge and discharge the gate capacitance of the MOS transistor to achieve high-speed switching control. The waveform of the gate control signal is consistent with the original modulated electrical signal, but the power level has been significantly improved.
[0031] The adjusted modulated electrical signal is transmitted to the gate drive unit at the transmitting end through the current drive circuit. The generated gate control signal is used to precisely regulate the supply current of the LED by driving the power switch device. The power switch device usually uses an N-channel enhancement-mode MOSFET (such as IRFZ44N), which has the characteristics of low on-resistance and high switching speed. When the gate control signal is at a high level, the MOS transistor conducts, and the current flows from the power supply through the LED to the ground; when the gate control signal is at a low level, the MOS transistor turns off, and the LED current is cut off. This fast switching operation makes the on / off state of the LED fully follow the frequency change of the modulated electrical signal. To protect the LED from being damaged by overcurrent, a current-limiting resistor is also set in the circuit to limit the working current of the LED within a safe range. The selected LED for the system is a blue-green LED in the 450 - 550nm band, which has the best penetration in water. Under the precise regulation of the gate control signal, the LED emits a modulated optical signal that exactly corresponds to the frequency and intensity characteristics of the modulated electrical signal. This optical signal carries the control instruction information encoded in the frequency and has sufficient intensity to penetrate the water-air interface to achieve cross-media transmission.
[0032] Further, inputting the environmental light parameter into a preset environmental adaptability algorithm model for calculation to generate an output parameter adjustment coefficient includes: inputting the environmental light parameter into the data preprocessing unit of the environmental adaptability algorithm model to perform normalization processing on the light intensity data to obtain a standardized environmental light intensity value; inputting the standardized environmental light intensity value into the light intensity grading unit of the environmental adaptability algorithm model to determine the current environmental light intensity level through threshold comparison; inputting the environmental light intensity level into the parameter selection unit of the environmental adaptability algorithm model to select a corresponding basic parameter template from a preset parameter library according to the light intensity level; inputting the basic parameter template into the parameter adjustment unit of the environmental adaptability algorithm model to execute a non-linear mapping algorithm to calculate a real-time adjustment value to obtain a preliminary adjustment coefficient; and jointly inputting the preliminary adjustment coefficient and historical light intensity data into the dynamic compensation unit of the environmental adaptability algorithm model to execute a weighted fusion algorithm to obtain the output parameter adjustment coefficient.
[0033] Specifically, first input the environmental light parameter into the data preprocessing unit of the environmental adaptability algorithm model for processing. The data preprocessing unit receives the ADC digital values collected from the photoresistor. These raw data usually range between 0 - 4095 (for 12-bit ADC) or 0 - 1023 (for 10-bit ADC), and the light intensity varies greatly at different time periods and under different weather conditions. The data preprocessing unit first performs denoising processing on the input light parameter, using the median filtering algorithm to eliminate abnormal sampling points, and taking the middle value of 5 consecutive sampling values as valid data. Then it performs normalization conversion processing, linearly mapping the filtered ADC value into the standardized interval [0, 1]. The normalization formula takes into account the non-linear characteristics of the sensor, using logarithmic mapping in the low light region to improve sensitivity and linear mapping in the high light region to avoid saturation. In addition, the preprocessing unit also records the absolute light intensity value and relative change rate at the current moment. After these processes are completed, the obtained standardized environmental light intensity value has a unified numerical range and physical meaning, facilitating subsequent processing units to perform parameter matching and decision-making calculations.
[0034] Specifically, the standardized ambient light intensity value is then input into the light intensity grading unit of the environmental adaptability algorithm model. The light intensity grading unit is built with a multi-level light intensity threshold judgment mechanism. According to experimental data and actual application requirements, the lighting environment is divided into multiple levels. In a specific implementation, the system sets four key threshold points: 0.15, 0.35, 0.65, and 0.85. By comparing with the standardized ambient light intensity value, the ambient light conditions are divided into five levels: extremely weak light environment (0 - 0.15), weak light environment (0.15 - 0.35), medium lighting environment (0.35 - 0.65), strong light environment (0.65 - 0.85), and extremely strong light environment (0.85 - 1.0). The grading judgment is implemented using a multiplexer structure. When the standardized ambient light intensity value falls into a certain interval, the corresponding ambient light intensity level is determined. To avoid jitter in the level judgment caused by frequent fluctuations of the ambient light intensity near the critical value, the light intensity grading unit sets a hysteresis threshold. Only when the light intensity value exceeds a certain amplitude (usually ±5% of the threshold) of the current level boundary value will the level switch be triggered. This grading mechanism discretizes the continuous light intensity value into a finite number of levels, simplifies the subsequent parameter selection logic, and at the same time retains the sensitivity to environmental changes.
[0035] Specifically, after determining the ambient light intensity level, the system inputs this level information into the parameter selection unit of the environmental adaptability algorithm model. The parameter selection unit manages a preset parameter library, which stores basic parameter templates optimized for different lighting levels. Each basic parameter template contains multiple groups of key parameters, such as the PWM duty cycle reference value (controlling the average brightness of the LED), the modulation depth parameter (controlling the fluctuation range of the signal), the frequency compensation value (used to maintain the signal frequency accuracy in different environments), and the current limit threshold (a safety parameter for protecting components). The parameter selection unit indexes and extracts the corresponding basic parameter template from the parameter library according to the input ambient light intensity level. For example, in an extremely weak light environment (level 1), a parameter template with a low duty cycle (about 20%) and a high modulation depth (about 80%) is selected to save energy consumption and maintain sufficient signal discrimination; while in an extremely strong light environment (level 5), a parameter template with a high duty cycle (above 60%) and a relatively low modulation depth (about 40%) is selected to provide sufficient signal strength to penetrate ambient light interference. The selected basic parameter template is used as a set of initial configuration values, providing a basic framework for subsequent fine-tuning.
[0036] Specifically, after the basic parameter template is selected, the system inputs it into the parameter adjustment unit of the environmental adaptability algorithm model. The parameter adjustment unit executes a non-linear mapping algorithm and finely adjusts each parameter in the basic parameter template according to the specific position of the normalized ambient light intensity value within the current level range. The non-linear mapping algorithm uses a piecewise S-shaped curve, which changes smoothly in the middle region of each light level and changes rapidly in the region near the boundary, so as to provide stable parameters in the center of the interval and ensure smooth transition at the interval boundary. In specific implementation, the system calculates the adjustment amount for each parameter item separately. For example, for the PWM duty cycle, a non-linear mapping with an accelerating increase is adopted in the transition region from medium light to strong light; for the modulation depth, a decreasing non-linear mapping is adopted in the strong light region. This multi-parameter synchronous non-linear adjustment mechanism takes into account the complex relationship between the LED emission characteristics and the interaction with ambient light, and avoids the mismatch problem that may be caused by simple linear mapping. After being processed by the parameter adjustment unit, the basic parameter template is precisely fine-tuned to form preliminary adjustment coefficients suitable for the current specific light conditions.
[0037] Specifically, the system inputs the preliminary adjustment coefficients and historical light intensity data into the dynamic compensation unit of the environmental adaptability algorithm model together. The dynamic compensation unit maintains a circular buffer to store the normalized ambient light intensity values in the past 60 seconds, with a sampling interval of 1 second, forming a historical data sequence with a length of 60. The compensation unit first calculates the short-term trend of the historical data, uses the linear regression method to obtain the light intensity change rate, and judges whether the ambient light is in an increasing, decreasing or relatively stable state. Then, it performs prospective compensation on the preliminary adjustment coefficients according to the light intensity change trend. For an increasing trend, the power parameters are increased in advance; for a decreasing trend, the power parameters are correspondingly decreased. The compensation amount is proportional to the change rate, and the faster the change, the greater the compensation. In addition, the dynamic compensation unit also calculates the fluctuation intensity of the historical data, evaluates the stability of the ambient light through the standard deviation, and increases the modulation depth parameter for a more fluctuating environment to improve the robustness of the signal. Finally, the compensation unit comprehensively considers various factors through a weighted fusion algorithm and finely adjusts the preliminary adjustment coefficients to obtain the final output parameter adjustment coefficients. These coefficients are directly used in the subsequent waveform modulation unit to achieve precise control of the LED drive signal and ensure stable signal transmission performance under changing environmental conditions.
[0038] 103. Use the receiving end to receive the cross-media transmission optical signal formed after the modulated optical signal is transmitted through the water-air interface, amplify and digitize the cross-media transmission optical signal, and extract the frequency characteristic information in the cross-media transmission optical signal through spectrum analysis; In an embodiment of the present invention, the method of receiving, by the receiving end, the cross-media transmission optical signal formed after the modulated optical signal is transmitted through the water-air interface, and amplifying and digitizing the cross-media transmission optical signal, and extracting frequency characteristic information in the cross-media transmission optical signal through spectrum analysis includes: receiving the cross-media transmission optical signal by the solar panel of the receiving end, and converting the cross-media transmission optical signal into a corresponding current signal; sequentially performing analog signal amplification processing on the current signal through the secondary operational amplifier unit and the triode amplification unit in the receiving end; converting the amplified analog signal into a digital signal through an ADC, and transmitting the digital signal to an FPGA; performing a weak light detection algorithm of the receiving end on the digital signal in the FPGA to process the digital signal and extract the frequency characteristic information in the cross-media transmission optical signal.
[0039] Specifically, first, the cross-media transmission optical signal is received by the solar panel of the receiving end, and the component topology diagram of the receiving end is as Figure 5 shown. When the modulated optical signal is transmitted underwater through the water-air interface, the PN junction on the solar panel senses the incident photons, generates electron-hole pairs, and forms a current change proportional to the intensity of the optical signal. This optoelectronic conversion process retains the frequency characteristics of the original modulated optical signal and converts the time-domain information contained in the optical signal into current-domain information. Due to the absorption and scattering of light by water, the intensity of the optical signal reaching the solar panel is usually very weak and contains ambient light interference. Therefore, the generated current signal has a small amplitude, background noise, and a DC component. The optoelectronic conversion characteristics of the solar panel enable it to respond to rapidly changing optical signals. Although the generated current signal is weak, it contains complete control instruction information, which can be extracted only by appropriate processing through subsequent circuits.
[0040] Specifically, after the current signal is generated, primary analog signal processing is performed through the secondary operational amplifier unit in the receiving end. The secondary operational amplifier processing is divided into two series stages: First, the current signal enters the first-stage transimpedance amplifier, which converts the current output by the solar panel into a voltage signal. The transimpedance conversion is achieved through a feedback resistor. The current flowing through the feedback resistor generates a voltage drop proportional to it, and the conversion gain is determined by the value of the feedback resistor. At the same time, the parallel capacitor in the feedback circuit is used to filter out high-frequency noise and prevent the amplifier from self-oscillating. After the current-voltage conversion, the signal enters the second-stage band-pass filter amplifier. The band-pass filtering function is achieved through an RC network, which performs frequency-domain selective processing on the signal, attenuating the noise and interference outside the frequency band. The center frequency is designed around the instruction frequency range, and the bandwidth is wide enough to cover all possible instruction frequencies, while effectively suppressing low-frequency ambient light fluctuations and high-frequency electronic noise. The second-stage circuit also provides additional voltage gain to raise the signal voltage to a level sufficient to be processed by subsequent circuits.
[0041] Specifically, the voltage signal processed by the second-stage operational amplifier enters the transistor amplification unit for further enhancement. The transistor amplification adopts a multi-stage transistor amplification architecture, and each stage has a specific function. The first stage serves as a pre-amplifier, providing a high input impedance to avoid loading the previous-stage circuit and performing preliminary voltage amplification simultaneously. The second stage serves as an intermediate amplifier, providing the main voltage gain and performing necessary phase correction. The third stage serves as a power amplifier, increasing the current driving ability of the signal to ensure that the subsequent ADC circuit can be driven normally. The overall gain of the entire three-stage amplification link is controlled by the FPGA. The bias resistance value is adjusted through a digital potentiometer to change the amplification factor. During the gain control process, the FPGA monitors the output signal strength in real time, automatically searches for the optimal gain setting point through a feedback closed-loop, and avoids the situation where the signal is too weak to be detected or too strong to cause saturation distortion. The transistor amplification circuit also includes a temperature compensation network to ensure stable amplification characteristics at different ambient temperatures and prevent temperature drift from affecting the accuracy of signal processing.
[0042] Specifically, the amplified analog signal is converted into a digital signal by the ADC. The ADC conversion process first passes through a sample-and-hold circuit, which captures the signal voltage instantaneously and keeps it stable, enabling the ADC to have enough time to complete the quantization process. The sampling operation is performed at a frequency of 40 kHz, and each sampling is completed within an extremely short time (usually in the microsecond range). The quantization process compares the held voltage value with an internal reference voltage and converts the analog voltage into a digital code value through successive approximation or other algorithms. After the ADC completes one conversion, it transmits the digital result to the FPGA through an SPI or other serial interface and starts the next sampling cycle simultaneously. After receiving the digitized signal data, the FPGA first performs data verification and preprocessing, checks the data integrity, and removes obvious outliers. Subsequently, the valid data is stored in a buffer and organized into a data structure suitable for subsequent algorithm processing. The buffer manages the data stream using a circular queue or a double-buffer mechanism to ensure that continuous sampled data can be seamlessly passed to the signal processing algorithm, avoiding data loss or processing delay.
[0043] Specifically, the FPGA executes the weak light detection algorithm at the receiving end to process the digital signal. The algorithm processing starts with a time integration operation, which accumulates and averages the data of multiple consecutive sampling points to form a sliding average window. Each window generates an integration value. The time integration process significantly improves the signal-to-noise ratio of the signal, making the weak periodic signal more prominent in the noise background. The integrated data enters the FFT processing link. The system performs a fast Fourier transform on the collected time-domain data to convert the time-domain signal to the frequency domain. The FFT implementation uses a radix-4 algorithm structure and efficiently completes the transformation calculation through a butterfly operation network. The FFT result is a set of complex values, representing the amplitude and phase information of the signal at each frequency component. The system calculates the power spectrum of each frequency point to obtain a frequency-energy distribution map. The peak detection module analyzes the power spectrum, identifies the frequency points where the energy is concentrated, and uses an adaptive threshold technique to distinguish the effective signal peaks from the noise peaks. When an energy peak at the preset synchronization header frequency is detected, the synchronization detection logic is triggered to start the timing controller. The timing controller accurately calculates the time window position of the subsequent command frequency signal according to the duration characteristics of the synchronization header signal. Within this window, the system activates a multi-channel parallel filter bank. Each channel corresponds to a possible command frequency, and the actual received command frequency is determined through frequency-selective filtering and energy comparison. The entire processing flow finally outputs frequency feature information, which is directly mapped to specific control commands to complete the extraction process from the optical signal to the command information.
[0044] Further, the process of executing the weak light detection algorithm at the receiving end in the FPGA to process the digital signal and extract the frequency feature information from the cross-media transmission optical signal includes: performing time-domain accumulation processing on the digital signal according to a preset sampling window through a time accumulator inside the FPGA to reduce the influence of random noise and obtain the accumulated digital signal; calling the built-in FFT operation module of the FPGA to perform a fast Fourier transform with a preset number of points on the accumulated digital signal to convert the time-domain signal into a frequency-domain signal and obtain the FFT result; setting a time window with an adjustable width, selecting the valid data segment from the FFT result, and performing spectrum peak tracking on the valid data segment by moving the time window to obtain the window spectrum feature data; performing a correlation analysis on the window spectrum feature data and the preset synchronization header frequency feature. When the correlation degree exceeds the threshold, it is confirmed that the synchronization header signal is detected; after detecting the synchronization header signal, starting a multi-channel parallel filter according to the synchronization timing relationship to perform frequency division processing on the command frequency signal received after the synchronization header signal to obtain the energy distribution of each frequency channel; applying a preset logic sequence decision mechanism to the energy distribution to perform pattern matching on the detected frequency sequence to obtain a matching result, and outputting the corresponding frequency feature information according to the matching result.
[0045] Specifically, the FPGA first processes digital signals through an internal time accumulator. The time accumulator receives the original digital sampling data stream from the ADC, groups the data according to a preset sampling window, and each group contains 64 consecutive sampling points. For each group of data, the accumulator performs a moving average operation, weighted accumulates the amplitudes of these 64 points to form a cumulative value. The weight coefficient adopts the Hamming window function distribution, with the largest weight at the window center and smaller weights at the edges. This weighting method not only retains the main frequency characteristics of the signal but also suppresses the spectral leakage that may be introduced at the window edges. The time accumulation process is essentially a low-pass filter, which can effectively smooth the random noise fluctuations and improve the signal-to-noise ratio of the signal. In the internal implementation of the FPGA, the accumulator is composed of multiple adders and shift registers, and efficiently processes the continuous data stream through a pipeline structure. The number of data points output by the accumulator is reduced to 1 / 64 of the original sampling data, but each cumulative point carries more effective information and suppresses the influence of random noise. The accumulated digital signal still retains the frequency characteristics of the original signal, but the signal-to-noise ratio has been significantly improved, laying a foundation for subsequent spectral analysis.
[0046] Specifically, the accumulated digital signal is sent to the built-in FFT operation module in the FPGA for processing. The FFT module receives the time-domain signal data, performs a 512-point fast Fourier transform, and converts the time-domain signal into a frequency-domain representation. The FFT operation is implemented based on the radix-4 algorithm, decomposes the 512-point transform into multiple levels of butterfly operations, and greatly reduces the computational complexity. To ensure the operation accuracy, fixed-point number operations are adopted inside the FPGA. The input data is in the 14-bit fixed-point number format, and the intermediate calculation process is extended to 18 bits to prevent overflow. During the execution of the FFT operation, the data first undergoes bit-reversal sorting, and then flows in the butterfly operation network. Each level of butterfly unit performs complex number addition, subtraction, multiplication, and division operations. The calculation network consists of multiple multipliers, adders, and phase coefficient storage units. The entire FFT calculation process is completed within 128 FPGA clock cycles, and the data processing adopts a parallel pipeline architecture to ensure real-time performance. The FFT result is 512 complex values, representing the amplitude and phase information of the signal at different frequency points. The system calculates the square of the modulus of each complex number to obtain the power spectrum, which intuitively reflects the energy distribution of different frequency components. The FFT result starts from frequency 0, with a step size of the sampling rate / 512, covering the frequency range from 0 to the sampling rate / 2, which contains all the spectral information of the synchronization header signal and the command frequency signal.
[0047] Specifically, the system then sets an adjustable-width time window to further process the FFT results. The time window mechanism first selects the valid data segment from the FFT results, that is, the spectrum data within the concerned frequency range. The system only retains the spectrum data within the range of 4 kHz to 15 kHz according to the preset frequency interval, because this range covers all possible synchronization header frequencies and instruction frequencies. To track the time-varying characteristics of the signal, the system implements a moving time window mechanism. Each FFT analysis result is stored in a circular buffer, forming two-dimensional time-frequency data. The window slides in the time dimension, retaining the most recent 8 frames of FFT results each time. By comparing the energy changes of the same frequency point in consecutive multiple frames, the system can identify the continuously existing frequency components and instantaneous noise. The spectrum peak tracking uses a local maximum detection algorithm to find the frequency positions where the energy exceeds adjacent frequency points for each frame of FFT results. The system records these peak frequency points and their energy change trends in consecutive multiple frames, forming a three-dimensional frequency-time-energy feature map, from which the window spectrum feature data is extracted. These feature data include the center frequency, bandwidth, energy magnitude, and time duration characteristics of the main frequency components, comprehensively characterizing the frequency-domain behavior pattern of the original optical signal.
[0048] Specifically, the window spectrum feature data is then subjected to a correlation analysis with the preset synchronization header frequency features. The synchronization header frequency features are defined as a set of parameters, including the center frequency, frequency band width, minimum duration, and energy threshold. The system calculates the matching degree between the window spectrum feature data and this set of parameters, and uses the weighted Euclidean distance to measure the correlation. During the calculation process, the frequency deviation, bandwidth difference, duration, and energy magnitude each have different weights, reflecting the importance of each parameter in the identification process. For example, the matching degree of the center frequency accounts for a relatively large weight because the frequency of the synchronization header signal is its most prominent feature. The system calculates the correlation score for each detected frequency peak. When the correlation score of a certain frequency peak exceeds the preset threshold, the system confirms the detection of the synchronization header signal. The threshold setting takes into account the signal changes under different water quality conditions. The threshold can be set higher in clear water to reduce false positives, and appropriately lowered in turbid water quality to increase the detection rate. Once the system confirms the detection of the synchronization header signal, it will record the current timestamp and store the specific parameters of the synchronization header signal (such as the exact frequency, start time, and duration) in a temporary register, preparing for the subsequent instruction frequency analysis.
[0049] Specifically, after detecting the sync header signal, the system starts a multi-channel parallel filter according to the sync timing relationship. The sync timing relationship is based on the known signal format. After the sync header signal lasts for 64 ms, the command frequency signal will last for 128 ms. The system accurately calculates the start time of the command frequency signal and the sampling window position according to the recorded timestamp of the sync header signal. When the time enters the command frequency window, the system activates the multi-channel parallel filter bank to perform frequency division processing on the received command frequency signal. The parallel filter bank consists of multiple digital bandpass filters, and each filter corresponds to a possible command frequency. For example, bandpass filters with center frequencies of 5 kHz, 6 kHz, 7 kHz, etc. are respectively set, and the bandwidth is about 400 Hz. The filter is implemented using the FIR structure, and each filter contains 32 tap coefficients, and the coefficients are generated by the Hanning window design method. The filtered signal obtains the energy values of each frequency band through square-integration operation. The system records the variation curve of the energy of each frequency band over time and identifies the frequency band where the energy peak is located. The energy distribution diagram intuitively shows the magnitude of the signal energy in each frequency channel. The high-energy channel corresponds to the actually received command frequency, and these energy distribution data provide a decision basis for the final command recognition.
[0050] Specifically, according to the energy distribution of each frequency channel, the system applies a preset logic sequence decision mechanism for pattern matching. The logic sequence decision first sorts the energy values of each frequency channel and identifies the several channels with the highest energy. Considering the complexity of the underwater environment, the decision mechanism not only focuses on the highest-energy channel but also analyzes the second-highest-energy channel, calculates the ratio of the highest energy to the second-highest energy, and ensures the reliability of the recognition result. The system adopts the "0101" decision mode, that is, four time points are continuously sampled to check the presence or absence of the command frequency to form a binary sequence. For example, when the occurrence pattern of a certain frequency at four sampling points is "present - absent - present - absent", it corresponds to the "0101" decision mode. This decision method greatly improves the anti-interference ability because random noise is difficult to present a specific pattern at multiple time points. The system matches the detected frequency sequence with the pre-stored command-frequency mapping table. When a completely matching pattern is found, it is determined as a valid command, and the matching result is obtained. According to the matching result, the system outputs the corresponding frequency feature information, including the command type, parameter value, and reliability score. These frequency feature information are formatted and transmitted to the control system through the output interface of the FPGA, completing the extraction process from the optical signal to the command information, enabling the underwater device to accurately execute the control commands sent by the transmitting end.
[0051] 104. Analyze the control command according to the frequency feature information, and execute the device control operation of pressing the function key corresponding to the control command.
[0052] In one embodiment of the present invention, the device control operation of parsing the control instruction according to the frequency feature information and executing the function key corresponding to the pressing operation according to the control instruction includes: Input the frequency feature information into the instruction mapping database, query and match through the frequency-instruction comparison table to obtain the original instruction code; perform a verification algorithm detection on the original instruction code, calculate the verification value and compare it with the preset verification standard to confirm the integrity of the instruction, and obtain the valid instruction code; encapsulate and transmit the valid instruction code through the UART interface according to the preset communication protocol format, send it to the control system, and obtain the receipt confirmation of the control system; after the control system receives the valid instruction code, execute the instruction parsing program, convert the original instruction code into the corresponding function module call command; activate the corresponding execution unit according to the function module call command, complete the device control operation of the function key corresponding to the pressing operation, and return the execution status information to the FPGA.
[0053] Specifically, after receiving the frequency feature information extracted by the FPGA, the system first inputs it into the instruction mapping database for processing. The instruction mapping database is stored in the read-only memory of the control system and is organized in a hash table structure to achieve fast query mapping between frequency features and instruction codes. The key value of the database is the digital representation of the frequency feature, including the center frequency value, bandwidth feature, and duration parameter; the corresponding value is the predefined original instruction code. During the query process, the system first performs a normalization process on the input frequency feature information, converts each parameter into a fixed format, and eliminates the slight fluctuations caused by signal transmission. The normalized feature information is used as an index key for table lookup operations, supporting fuzzy matching and nearest neighbor search. Even if there are slight deviations in the frequency feature, the most similar matching item can still be found. After finding the table item with the highest matching degree, the system extracts the corresponding original instruction code. The original instruction code is usually an 8-bit or 16-bit binary value, and each bit or group of bits has a specific meaning. For example, the high 4 bits represent the instruction type (forward, backward, steering, etc.), and the low 4 bits represent the parameter value (speed level, angle, etc.). The instruction mapping process completes the conversion from the frequency domain to the instruction domain, translating the physical signal features into semantic control instructions.
[0054] Specifically, after obtaining the original instruction code, the system performs a verification algorithm detection on it to ensure the integrity and correctness of the instruction. The verification process adopts multiple mechanisms. First, parity check is applied to calculate the number of "1"s in the original instruction code and check whether it conforms to the predetermined odd or even rule. Then, cyclic redundancy check (CRC) is performed. The original instruction code is regarded as polynomial coefficients and modulo-2 division operation is carried out with a predefined generating polynomial to obtain the check remainder. The system compares the calculated check value with the preset verification standard, which is stored in the system configuration table corresponding to the valid verification ranges of different types of instructions. The influence of the transmission environment is considered during the comparison, and the check value is allowed to fluctuate within a certain fault tolerance range. When the check value meets the preset standard, the system confirms the instruction integrity and marks the original instruction code as a valid instruction code. If the verification fails, the system will execute different processing strategies according to the error type: for minor errors, attempt to recover the original data through an error correction algorithm; for serious errors, discard the current instruction and request retransmission. The verification mechanism significantly improves the system's ability to resist interference and ensures that only complete and correct instructions will be executed.
[0055] Specifically, after confirming the valid instruction code, the system encapsulates and transmits it to the control system through the UART interface. UART communication adopts an asynchronous serial mode, with the baud rate set to 115200 bps and the data format being 8 data bits, 1 stop bit, and no parity check. The encapsulation process follows a preset communication protocol format, embedding the valid instruction code into a complete data frame. Each data frame consists of a frame header, frame length, instruction type, instruction code, additional parameters, and frame tail. The frame header uses a fixed byte sequence (0xAA, 0x55) to identify the start of the data frame; the frame length indicates the number of bytes of the entire data frame; the instruction type uses one byte to represent the major category of the instruction; the instruction code field carries the previously generated valid instruction code; the additional parameters provide auxiliary information required to execute the instruction; the frame tail uses a checksum to end the data frame. The encapsulated data frame is sent byte by byte from the UART transmit buffer, and at the same time, a timeout timer is started to wait for the response of the control system. After receiving the data, the control system parses and verifies the integrity of the data frame and returns a reception confirmation message. The reception confirmation adopts a simple ACK / NAK mechanism. A correct reception returns an ACK frame, and an incorrect reception returns a NAK frame requesting retransmission. UART communication has the characteristics of simple implementation and good compatibility, and is suitable for short-distance and medium-rate instruction transmission requirements.
[0056] Specifically, after receiving a valid instruction code, the control system immediately executes an instruction parsing program for processing. The instruction parsing program runs on the microprocessor of the control system and is implemented using a state machine architecture. The parsing process first verifies the correctness of the instruction format, checking whether the field length, value range, etc. conform to the specifications. Then, according to the instruction type and instruction code, it queries the system function mapping table, which stores the correspondence between the instruction code and the specific function module. The mapping table adopts a hierarchical structure. The first layer determines the major function categories according to the instruction type (such as motion control, status query, parameter setting, etc.), and the second layer determines the specific function according to the specific instruction code. The parsing program constructs a function module call command in a unified format, including the identifier of the calling module, the operation type, and the operation parameters. For example, the call command generated after parsing the forward instruction includes the identifier of the motor drive module, the forward rotation operation type, and the speed parameter value. The call command uses the internal standard format of the system, eliminating the format differences of instructions from different sources, providing a unified function module interface, and enabling the system to consistently process instruction requests from different control sources.
[0057] Specifically, according to the generated function module call command, the control system activates the corresponding execution unit to complete the actual control operation. The control system internally implements a modular design, and each function module communicates with each other through standard interfaces. The activation process of the execution unit first sends the call command to the target function module through the system bus. After receiving the command, the function module parses out the operation type and parameters. Then, the module internally converts the high-level operation into a low-level hardware control sequence. For example, it converts the "forward" command into a PWM control signal for the motor driver. The execution unit adjusts the characteristics of the output signal according to the command parameters, such as using the PID algorithm to generate an appropriate drive voltage according to the target speed. The system monitors the execution status in real time, collects relevant sensor data to feedback the execution effect, such as detecting whether the actual rotation speed of the motor reaches the instruction requirement through an encoder. After the execution is completed, the control system generates an execution status report, including the execution result code, the completion timestamp, and the key status parameters. The execution status information is sent to the FPGA through the reverse communication channel to form a complete instruction execution closed-loop.
[0058] In this embodiment, the transmitting end in the cross-media remote control system responds to the user's key operation, generates a key signal and performs encoding processing to generate a modulated electrical signal including a synchronization header signal and an instruction frequency signal; collects environmental parameter information, dynamically adjusts the parameters of the modulated electrical signal accordingly, and converts the adjusted modulated electrical signal into a modulated optical signal through an LED; the receiving end receives the cross-media transmitted optical signal, performs amplification and digital processing, and extracts frequency feature information through spectrum analysis; parses out the control instruction according to the frequency feature information and executes the device control operation corresponding to the function key of the pressing operation. Through the specific time-frequency signal structure design and multi-stage signal processing technology, the present invention effectively solves the stability problem of water-air interface signal transmission and realizes low-latency and high-success-rate cross-media remote control communication.
[0059] The cross-media remote control communication method in the embodiment of the present invention is described above. Next, the cross-media remote control communication device in the embodiment of the present invention will be described. The cross-media remote control communication device is applied to a cross-media remote control system, and the cross-media remote control system includes a transmitting end and a receiving end. For the cross-media remote control communication device, please refer to Figure 2 , an embodiment of the cross-media remote control communication device in the embodiment of the present invention includes: A signal generation module 201, configured to respond to the pressing operation of the user on any function key on the transmitting end, generate a corresponding key signal, and perform encoding processing on the key signal to generate a modulated electrical signal including a synchronization header signal and an instruction frequency signal; A signal adjustment module 202, configured to collect environmental parameter information, dynamically adjust the parameters of the modulated electrical signal according to the environmental parameter information, and convert the adjusted modulated electrical signal into a modulated optical signal through an LED; A signal receiving module 203, configured to use the receiving end to receive the cross-media transmitted optical signal formed after the modulated optical signal is transmitted through the water-air interface, perform amplification and digital processing on the cross-media transmitted optical signal, and extract the frequency feature information in the cross-media transmitted optical signal through spectrum analysis; An instruction execution module 204, configured to parse out a control instruction according to the frequency feature information, and execute the device control operation of the function key corresponding to the pressing operation according to the control instruction.
[0060] In an embodiment of the present invention, the cross-media remote control communication device operates the above cross-media remote control communication method. The cross-media remote control communication device responds to a user's key operation through a transmitting end in a cross-media remote control system, generates a key signal and performs encoding processing to generate a modulated electrical signal including a synchronization header signal and an instruction frequency signal; collects environmental parameter information, dynamically adjusts the modulated electrical signal accordingly, and converts the adjusted modulated electrical signal into a modulated optical signal through an LED; the receiving end receives the cross-media transmitted optical signal, performs amplification and digital processing, and extracts frequency feature information through spectrum analysis; resolves a control instruction according to the frequency feature information and executes corresponding device control operations. Through specific time-frequency signal structure design and multi-stage signal processing technology, the present invention effectively solves the problem of the stability of water-air interface signal transmission and realizes cross-media remote control communication with low latency and high success rate.
[0061] above Figure 2 The cross-media remote control communication device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. Next, the cross-media remote control communication device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0062] Figure 3 FIG. is a schematic structural diagram of a cross-media remote control communication device provided by an embodiment of the present invention. The cross-media remote control communication device 300 may vary greatly due to configuration or performance differences, and may include one or more processors (central processing units, CPUs) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 for storing application programs 333 or data 332 (for example, one or more mass storage device ends). Among them, the memory 320 and the storage media 330 may be transient storage or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the cross-media remote control communication device 300. Further, the processor 310 may be configured to communicate with the storage media 330 and execute a series of instruction operations in the storage media 330 on the cross-media remote control communication device 300 to implement the steps of the above cross-media remote control communication method.
[0063] The cross-media remote control communication device 300 may further include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art can understand that Figure 3The structure of the cross-media remote control communication device shown does not constitute a limitation on the cross-media remote control communication device provided by the present invention, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0064] The present invention also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are run on a computer, the computer is caused to execute the steps of the cross-media remote control method.
[0065] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described system, device, or unit can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0066] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage media include: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which can store program codes.
[0067] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A cross-media remote control communication method, characterized in that: The cross-medium remote control communication method is applied to a cross-medium remote control system, the cross-medium remote control system includes a transmitting end and a receiving end, and the cross-medium remote control communication method includes: In response to a user pressing any function key on the transmitting end, a corresponding key signal is generated, and the key signal is encoded to generate a modulated electrical signal including a synchronization header signal and a command frequency signal; Collecting environmental parameter information, dynamically adjusting the parameters of the modulated electrical signal according to the environmental parameter information, and converting the adjusted modulated electrical signal into a modulated optical signal through an LED; The receiving end receives the cross-medium transmission optical signal formed after the modulated optical signal is transmitted through the water-air interface, amplifies and digitizes the cross-medium transmission optical signal, and extracts frequency characteristic information from the cross-medium transmission optical signal through spectrum analysis; A control instruction is parsed according to the frequency characteristic information, and a device control operation of the function key corresponding to the pressing operation is executed according to the control instruction.
2. The cross-media remote control communication method according to claim 1, characterized in that: In response to a user pressing an operation on any function key on the transmitting end, generating a corresponding key signal, and performing visible light communication modulation on the key signal to generate a visible light modulation signal comprises: Responding to a user pressing any function key on the transmitting end through a key detection interface of the MCU of the transmitting end, an initial key signal is acquired; The initial key signal is converted and processed according to a preset key mapping relationship to obtain a corresponding function instruction code; Calling the timer resource of the MCU to generate a synchronization header signal of a preset frequency through a pulse frequency modulation method and maintaining a first preset duration; Calling the frequency generation unit of the MCU to generate a command frequency signal corresponding to the function instruction code by frequency keying and maintaining the second preset time length; The signal combination module of the MCU is used to cascade the synchronization header signal and the instruction frequency signal according to a timing relationship, and the signal duty cycle parameter is set through a waveform modulation unit to generate the modulated electrical signal.
3. The cross-media remote control communication method according to claim 2, characterized in that: The collecting of environmental parameter information, dynamically adjusting the parameters of the modulated electrical signal according to the environmental parameter information, and converting the adjusted modulated electrical signal into a modulated optical signal through an LED comprises: The ambient light parameters are sampled in real time by the light-sensitive sensor element of the transmitting end, and the ambient light parameters are input into a preset environment adaptability algorithm model for calculation to generate an output parameter adjustment coefficient; Calling the waveform modulation unit of the MCU according to the output parameter adjustment coefficient to dynamically adjust the waveform parameters of the modulated electrical signal to obtain an adjusted modulated electrical signal adapted to the current environment; Transmitting the adjusted modulated electrical signal to the gate driving unit of the transmitting end through a current driving circuit, and converting the adjusted modulated electrical signal into a gate control signal through the gate driving unit; The gate control signal drives the power switch device to regulate the power supply current of the LED according to the frequency and waveform parameters of the adjusted modulated electrical signal, so that the LED emits a modulated light signal corresponding to the frequency and intensity characteristics of the adjusted modulated electrical signal.
4. The cross-media remote control communication method according to claim 3, characterized in that: The step of inputting the ambient light parameters into a preset environment adaptability algorithm model for calculation to generate an output parameter adjustment coefficient includes: Inputting the ambient light parameters into a data preprocessing unit of an environmental adaptability algorithm model, normalizing the light intensity data, and obtaining a standardized ambient light intensity value; Inputting the standardized ambient light intensity value into the light intensity grading unit of the environmental adaptability algorithm model, and determining the current ambient light intensity level by threshold comparison; Inputting the ambient light intensity level into the parameter selection unit of the environmental adaptability algorithm model, and selecting the corresponding basic parameter template from the preset parameter library according to the light intensity level; Inputting the basic parameter template into the parameter adjustment unit of the environmental adaptability algorithm model, executing the nonlinear mapping algorithm to calculate the real-time adjustment value, and obtaining the preliminary adjustment coefficient; The preliminary adjustment coefficient and the historical light intensity data are inputted into the dynamic compensation unit of the environmental adaptability algorithm model, and the weighted fusion algorithm is executed to obtain the output parameter adjustment coefficient.
5. The cross-media remote control communication method according to claim 1, characterized in that: The step of receiving the cross-medium transmission optical signal formed by transmitting the modulated optical signal through the water-air interface by the receiving end, amplifying and digitalizing the cross-medium transmission optical signal, and extracting frequency characteristic information from the cross-medium transmission optical signal by spectrum analysis comprises: receiving the cross-medium transmission optical signal through the solar cell panel at the receiving end, and converting the cross-medium transmission optical signal into a corresponding current signal; The current signal is sequentially amplified by the secondary operational amplifier unit and the tertiary tube amplifier unit in the receiving end for analog signal amplification processing; Convert the amplified analog signal into a digital signal through the ADC, and transmit the digital signal to the FPGA; A receiving-end weak light detection algorithm is executed in the FPGA to process the digital signal and extract frequency characteristic information from the cross-medium transmission optical signal.
6. The cross-media remote control communication method according to claim 5, characterized in that: The executing of the receiving end weak light detection algorithm in the FPGA to process the digital signal and extract the frequency characteristic information in the cross-medium transmission optical signal comprises: The digital signal is accumulated in the time domain according to a preset sampling window by a time accumulator inside the FPGA to reduce the influence of random noise and obtain an accumulated digital signal; Call the built-in FFT operation module of FPGA to perform fast Fourier transform of preset points on the accumulated digital signal, convert the time domain signal into frequency domain signal, and obtain the FFT result; Setting a time window with adjustable width, selecting a valid data segment in the FFT result, tracking the spectrum peak of the valid data segment by moving the time window, and obtaining window spectrum feature data; Performing correlation analysis on the window spectrum feature data and a preset synchronization head frequency feature, and confirming that a synchronization head signal is detected when the correlation exceeds a threshold; After the synchronization header signal is detected, a multi-channel parallel filter is started according to the synchronization timing relationship, and a frequency division process is performed on the command frequency signal received after the synchronization header signal to obtain the energy distribution of each frequency channel; A preset logic sequence decision mechanism is applied according to the energy distribution to perform pattern matching on the detected frequency sequence to obtain a matching result, and corresponding frequency characteristic information is output according to the matching result.
7. The cross-media remote control communication method according to claim 1, characterized in that: The step of parsing a control instruction according to the frequency characteristic information and executing a device control operation of a function key corresponding to the pressing operation according to the control instruction includes: Input the frequency characteristic information into the instruction mapping database, query and match through the frequency-instruction comparison table to obtain the original instruction code; Execute a verification algorithm test on the original instruction code, calculate a verification value and compare it with a preset verification standard, confirm the integrity of the instruction, and obtain a valid instruction code; The valid instruction code is packaged and transmitted through the UART interface according to a preset communication protocol format, and sent to the control system to obtain a reception confirmation from the control system; After receiving the valid instruction code, the control system executes the instruction parsing program to convert the original instruction code into a corresponding function module calling command; The corresponding execution unit is activated according to the function module calling command, the device control operation of the function key corresponding to the pressing operation is completed, and the execution status information is returned to the FPGA.
8. A cross-media remote control communication device, characterized in that: The cross-medium remote control communication device is applied to a cross-medium remote control system, the cross-medium remote control system includes a transmitting end and a receiving end, and the cross-medium remote control communication device includes: A signal generating module, for generating a corresponding key signal in response to a user pressing any function key on the transmitting end, and encoding the key signal to generate a modulated electrical signal including a synchronization header signal and a command frequency signal; A signal adjustment module, used for collecting environmental parameter information, dynamically adjusting the parameters of the modulated electrical signal according to the environmental parameter information, and converting the adjusted modulated electrical signal into a modulated optical signal through an LED; A signal receiving module, used to receive, by the receiving end, a cross-medium transmission optical signal formed after the modulated optical signal is transmitted through the water-air interface, amplify and digitize the cross-medium transmission optical signal, and extract frequency characteristic information from the cross-medium transmission optical signal through spectrum analysis; The instruction execution module is used to parse out the control instruction according to the frequency characteristic information, and execute the device control operation of the function key corresponding to the pressing operation according to the control instruction.
9. A cross-media remote control communication device, characterized in that: The cross-media remote control communication device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the cross-media remote control communication device to perform the steps of the cross-media remote control communication method according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the cross-media remote control communication method as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Visible light communication method and underwater cleaning system
CN120729421A
Background interference elimination method and device, controller and storage medium
CN121176871A
Wireless optical communication link indication system and method
CN121841470A
Transimpedance amplifier with integrated reconfigurable filter
US12689343B2
Transimpedance Amplifier with Integrated Reconfigurable Filter
US20250070734A1