A method for pairing a panoramic lens and a panoramic lens
By using automatic identification and dynamic acquisition of lens motion characteristic parameters, the complexity and compatibility issues of pairing gimbal control systems across different brands of equipment have been resolved, achieving intelligent cross-brand interoperability and high-precision control.
Patent Information
- Application Number
- CN202510998913.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-07-21
AI Technical Summary
Existing PTZ control systems suffer from complex pairing processes, poor compatibility, and low control precision across different brands of equipment. They rely on manual configuration and fixed parameter tables, resulting in long processing times and a high risk of errors.
By automatically identifying the gimbal controller and the panoramic lens, and using a device query frame and response frame mechanism, the camera motion characteristic parameters are dynamically obtained, a personalized control command mapping relationship is established, and combined with delay compensation parameters and a dynamic handshake interval adjustment algorithm, unified control of cross-brand devices is achieved.
It has improved the intelligence level of the PTZ control system, enhanced cross-brand interoperability, avoided manual pairing operations, adapted to changes in equipment status, solved the time synchronization problem of wireless control, and ensured the reliability and stability of the pairing process.
Smart Images

Figure CN120499508B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of panoramic lens technology, and in particular to a method for pairing panoramic lenses and a panoramic lens. Background Technology
[0002] Traditional PTZ control systems require interoperability between devices from different brands while maintaining control accuracy and real-time performance. However, significant differences exist between devices from different manufacturers in terms of communication protocols, control command formats, and motion characteristics, making device pairing and control a technical challenge.
[0003] Existing pairing technologies for PTZ controllers and panoramic lenses primarily rely on manual configuration and fixed parameter tables, which suffer from core problems such as complex pairing processes, poor cross-brand compatibility, and low control precision. Users need to manually select the target device, enter a pairing code, and set motion parameters according to the device manual. The entire pairing process is time-consuming and prone to errors. Summary of the Invention
[0004] The main objective of this invention is to provide a pairing method for panoramic lenses and a panoramic lens. This invention realizes automatic identification between the gimbal controller and the panoramic lens, eliminating the need for manual pairing operations, and improving the intelligence level and cross-brand interoperability of the gimbal control system.
[0005] To achieve the above objectives, the present invention provides a method for pairing panoramic lenses, comprising the following steps:
[0006] The PTZ controller sends a device query frame to the panoramic lens and receives device authentication data returned by the panoramic lens;
[0007] Based on the device authentication data, a motion test sequence is sent to the panoramic lens, and the lens motion feature data fed back by the panoramic lens is received.
[0008] Calculate the control delay compensation time based on the lens motion characteristic data;
[0009] The PTZ controller monitors the wireless signal strength index between itself and the panoramic lens in real time, and inputs the wireless signal strength index and the control delay compensation time into the handshake interval adjustment algorithm to obtain the handshake frame transmission time interval.
[0010] The pairing handshake process is performed based on the handshake frame transmission time interval, and a compatibility mapping relationship between the controller protocol version and the lens protocol version is established to generate wireless connection control parameters.
[0011] Optionally, in a first implementation of the first aspect of the present invention, the gimbal controller sends a device query frame to the panoramic lens and receives device authentication data returned by the panoramic lens, including:
[0012] The PTZ controller encapsulates the controller's unique identifier, protocol version list, and device type identifier according to a preset frame structure format to generate a device query frame;
[0013] The PTZ controller broadcasts the device query frame to the panoramic lens within the preset frequency band via the wireless communication module, and starts a response timeout timer to listen for the device response frame returned by the panoramic lens.
[0014] After receiving the response frame from the device, the gimbal controller verifies the validity of the frame header identifier and the verification timestamp. After the validity verification is passed, it extracts the lens device identifier, protocol version information and hardware platform parameters.
[0015] The PTZ controller matches the lens device identifier with the local device whitelist and performs a compatibility check on the protocol version information with the list of protocol versions supported by the controller to generate device authentication data.
[0016] Optionally, in a second implementation of the first aspect of the present invention, the step of sending a motion test sequence to the panoramic lens based on the device authentication data and receiving lens motion feature data fed back by the panoramic lens includes:
[0017] Based on the protocol matching result in the device authentication data, the corresponding instruction format is selected, and the horizontal angle test value, pitch angle test value and zoom magnification test value are encoded and encapsulated according to the instruction format to generate a motion test sequence.
[0018] According to the preset instruction sending time sequence, the various test instructions in the motion test sequence are sent to the panoramic lens in sequence, and the position feedback monitoring process and execution time timer are started after each test instruction is sent.
[0019] The location feedback monitoring process receives feedback data returned by the panoramic camera and establishes an association mapping between the received feedback data and the corresponding test commands.
[0020] The angle response data in the associated mapping is subjected to difference calculation and time series analysis to extract lens motion feature data containing maximum rotation speed parameter, maximum acceleration parameter and rotation range parameter.
[0021] Optionally, in a third implementation of the first aspect of the present invention, the step of calculating the control delay compensation time based on the lens motion feature data includes:
[0022] Based on the lens motion feature data, a command-motion pairing dataset for each axis is generated;
[0023] The instruction-motion pairing dataset is input into the least squares fitting algorithm for linear regression calculation to obtain the proportional coefficient and offset of each axis.
[0024] Based on the proportional coefficients and offsets of each axis, a linear mapping function from control commands to actual motion is constructed, and the accuracy parameters of the linear mapping function are verified by a goodness-of-fit test to generate a set of control command mapping functions.
[0025] Based on the control command mapping function set, the command sending timestamp and motion start timestamp during the test process are correlated and analyzed to calculate the transmission delay and execution delay of each axial command. The control delay compensation time is obtained by weighted averaging the transmission delay and the execution delay.
[0026] Optionally, in a fourth implementation of the first aspect of the present invention, the step of inputting the command-motion pairing dataset into a least squares fitting algorithm for linear regression calculation to obtain the proportional coefficients and offsets of each axis includes:
[0027] The command-motion pairing data is separated to generate horizontal axis data sequence, pitch axis data sequence and zoom axis data sequence;
[0028] Based on the horizontal axis data sequence, pitch axis data sequence, and zoom axis data sequence, respectively construct the coefficient matrix and target vector for linear regression;
[0029] The coefficient matrix and target vector are input into the matrix transpose and matrix multiplication operation module of the least squares fitting algorithm for least squares calculation to obtain the linear regression parameter vectors for each axis.
[0030] The horizontal axis scale factor and offset, pitch axis scale factor and offset, and zoom axis scale factor and offset are extracted from the linear regression parameter vector to generate the scale factor and offset data for each axis.
[0031] Optionally, in a fifth implementation of the first aspect of the present invention, the gimbal controller monitors the wireless signal strength index between itself and the panoramic lens in real time, and inputs the wireless signal strength index and the control delay compensation time into a handshake interval adjustment algorithm to obtain a handshake frame transmission time interval, including:
[0032] The PTZ controller periodically collects signal monitoring data between itself and the panoramic lens via a wireless communication module;
[0033] Calculate the wireless signal strength index based on the aforementioned signal monitoring dataset;
[0034] The wireless signal strength index and the control delay compensation time are input into the dynamic interval adjustment algorithm to generate the handshake interval time parameter.
[0035] Based on the handshake interval time parameter, a signal environment adaptability test is performed to obtain the handshake frame transmission time interval.
[0036] Optionally, in a sixth implementation of the first aspect of the present invention, the step of inputting the wireless signal strength index and the control delay compensation time into a dynamic interval adjustment algorithm to generate a handshake interval time parameter includes:
[0037] Extract the basic parameters for interval calculation from the wireless signal strength index;
[0038] The signal strength ratio in the basic parameters of the interval calculation is reverse normalized to obtain the signal attenuation factor. The signal attenuation factor is then input into the power function operation module in the dynamic interval adjustment algorithm for exponential adjustment to generate the signal strength adjustment coefficient.
[0039] The initial handshake interval value is obtained by multiplying the signal strength adjustment coefficient with the basic handshake interval time constant. The control delay compensation time is then added to the initial handshake interval value as a correction to generate the handshake interval time parameter.
[0040] Optionally, in a seventh implementation of the first aspect of the present invention, the step of performing a pairing handshake process based on the handshake frame transmission time interval, establishing a compatibility mapping relationship between the controller protocol version and the lens protocol version, and generating wireless connection control parameters includes:
[0041] Based on the handshake frame transmission time interval, a cyclic handshake process with the panoramic lens is initiated, generating handshake process monitoring data;
[0042] Based on the handshake process monitoring data, handshake frame sending and response receiving operations are executed sequentially according to the handshake frame transmission time interval to generate handshake success rate data and parameter learning accuracy data.
[0043] Based on the handshake success rate data, the parameter learning accuracy data, and the signal stability data, state transition condition judgment is performed to generate state transition matrix data, and pairing convergence verification is performed based on the state transition matrix data to generate pairing process state transition identifiers.
[0044] Based on the pairing process state transition identifier, a compatibility mapping relationship is established between the controller protocol version and the lens protocol version, and wireless connection control parameters are generated.
[0045] Optionally, in an eighth implementation of the first aspect of the present invention, the step of establishing a compatibility mapping relationship between the controller protocol version and the lens protocol version based on the pairing process state transition identifier, and generating wireless connection control parameters, includes:
[0046] Extract a protocol version data set containing the controller protocol version and the lens protocol version from the state transition identifier of the pairing process;
[0047] Based on the aforementioned protocol version data set, a protocol version compatibility mapping matrix is constructed using the controller protocol version as the row index and the lens protocol version as the column index.
[0048] Based on the protocol version compatibility mapping matrix, version selection and downgrade processing are performed to generate protocol adaptation configuration data;
[0049] Based on the protocol adaptation configuration data, wireless connection control parameters including connection protocol, transmission strategy and power consumption control are generated.
[0050] The present invention also provides a panoramic lens, comprising:
[0051] The verification module is used for the gimbal controller to send a device query frame to the panoramic lens and to receive device authentication data returned by the panoramic lens.
[0052] The testing module is used to send a motion test sequence to the panoramic lens based on the device authentication data, and to receive lens motion feature data fed back by the panoramic lens.
[0053] The calculation module is used to calculate the control delay compensation time based on the lens motion feature data;
[0054] The adjustment module is used to monitor the wireless signal strength index between the PTZ controller and the panoramic lens in real time, and input the wireless signal strength index and the control delay compensation time into the handshake interval adjustment algorithm to obtain the handshake frame transmission time interval.
[0055] The generation module is used to perform a pairing handshake process based on the handshake frame transmission time interval, establish a compatibility mapping relationship between the controller protocol version and the lens protocol version, and generate wireless connection control parameters.
[0056] In summary, the technical solution provided by this invention achieves automatic identification between the gimbal controller and the panoramic lens through a standardized device query frame and response frame mechanism, eliminating the need for manual pairing. It dynamically acquires lens motion characteristic parameters using a small-amplitude test command sequence, eliminating reliance on static parameter tables and adapting to changes in device status. A personalized control command mapping relationship is established based on least squares fitting, and the time synchronization problem of wireless control is solved by combining delay compensation parameters, enabling unified control across brands. A dynamic handshake interval adjustment algorithm optimizes the transmission strategy based on signal strength and delay characteristics, accelerating pairing under strong signals and ensuring reliability under weak signals. A pairing state transition model and Lyapunov stability analysis ensure reliable convergence of the pairing process, avoiding oscillation and divergence issues. A compatibility mapping matrix and version degradation strategy solve the interconnection problem of legacy devices, and a differentiated retransmission mechanism balances control accuracy and power consumption requirements, significantly improving the intelligence level and cross-brand interoperability of the gimbal control system. Attached Figure Description
[0057] Figure 1 This is a schematic diagram of the pairing method steps for a panoramic lens in one embodiment of the present invention.
[0058] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0060] Reference Figure 1 This embodiment provides a method for pairing panoramic lenses, including the following steps:
[0061] S1, the PTZ controller sends a device query frame to the panoramic lens and receives device authentication data returned by the panoramic lens;
[0062] The PTZ controller has a pre-set set of basic parameters for device discovery and verification. This parameter set includes the controller's unique identifier, a list of supported protocol versions, and the device type identifier of the current controller. During the initialization of the pairing process, the controller encapsulates these parameters according to a predefined query frame structure template. This frame structure uses a fixed 128-byte configuration and arranges its content according to a specified paragraph format, including a frame header field, an identity field, a protocol field, and an integrity verification field. After encapsulation, a standard device query frame with a specific frame header identifier (e.g., 0xAA55) and a timestamp is formed. The PTZ controller, through its integrated wireless communication module, selects the currently operating wireless communication frequency band (preset bands such as 2.4GHz or 5GHz ISM band) and broadcasts the device query frame to all panoramic lens devices in the channel. After the broadcast, a response timeout timer is started to monitor and control the lens device responses. The timeout timer's setting value is selected according to the protocol design, choosing an appropriate timeout window, such as between 200ms and 500ms, to control the waiting window and determine the validity of the response. When the controller receives a device response frame from any panoramic lens device within the specified time window, it performs frame header verification to ensure the frame header fields match the preset query frame. Simultaneously, it performs synchronization error detection on the timestamp field and data integrity verification on the checksum field, thus comprehensively confirming the frame's validity. After passing all verification checks, the controller extracts the core identification information of the lens device from the response frame, including the lens device identifier, its current protocol version, and lens hardware platform parameters, such as hardware model and chip architecture. The controller then matches the extracted lens device identifier against a locally stored whitelist database. This whitelist records the set of legally allowed lens device identifiers. If the lens identifier matches successfully, the controller proceeds to the protocol version compatibility verification stage. The controller compares the protocol version information provided by the lens with its supported protocol version list item by item to check if at least one protocol version is bidirectionally compatible. If compatibility is confirmed, the device authentication process is complete, and a device authentication data structure containing device identification information, protocol adaptation information, and basic platform capabilities is generated.
[0063] S2, based on device authentication data, sends a motion test sequence to the panoramic lens and receives lens motion feature data fed back by the panoramic lens;
[0064] Specifically, the command format is selected based on the protocol matching results contained in the device authentication data. Since panoramic lenses of different models or manufacturers have structural differences in motion control protocols, the controller calls the corresponding encoding template according to the confirmed protocol version type. Combined with the system's internal control protocol library, the horizontal angle, pitch angle, and zoom ratio values used for testing are embedded into the corresponding command's load structure, completing the encoding encapsulation and forming a standardized motion test sequence with protocol consistency and clear control semantics. This test sequence includes multiple command nodes with controllable variations within a small range, such as subdivided test points in the horizontal direction within ±5 degrees, pitch changes at ±3 degree intervals, and zoom ratios controlled between 1.2x and 1.5x. This small-amplitude, non-destructive testing accurately obtains the lens's response behavior over a short period. After completing the test command encoding, the controller sends the above commands sequentially to the panoramic lens according to a preset test timing strategy. The interval between each test command in the test timing is fixed, such as 100ms, to ensure the lens has sufficient response and stabilization time. Each time a test command is sent, two background processes corresponding to that command are started. The first is a position feedback monitoring process, which continuously listens for position information feedback data returned by the lens via the wireless channel, including the lens's current actual angle value and lens status code. The second is an execution timer, used to record the time consumed from the sending of the command to the actual completion of the lens movement, including key time-domain parameters such as start-up delay, execution duration, and stabilization time. As the sending and receiving of multiple test commands progresses, the controller establishes a mapping relationship between test commands and feedback data in the background, ensuring that all collected motion feedback information can be accurately associated with its corresponding test action, avoiding command-response misalignment. Angle response difference calculation is performed on the feedback data with established mapping relationships. By calculating the difference between the actual motion amplitude and the corresponding timestamp between each test point, the angle change per unit time is obtained, thereby deriving the maximum rotational speed parameters of the lens in the horizontal and pitch axes. Then, the maximum acceleration parameter is obtained by differential processing of two consecutive speed changes. By using the extreme point response data in the test sequence, the current motion limit range of the lens in the horizontal and pitch directions is statistically determined. At the same time, the boundary feedback of the zoom ratio response is used to extract the effective zoom range of the lens. Finally, they together constitute a lens motion feature dataset including the maximum rotational speed, maximum acceleration, and angle or zoom range.
[0065] S3 calculates the control delay compensation time based on the lens motion characteristic data;
[0066] It should be noted that, based on lens motion characteristic data, a paired dataset is constructed for the command input and actual response along each motion axis (including horizontal, pitch, and zoom axes). The construction of this paired dataset relies on the relationship between each standardized motion command and its corresponding actual response amplitude during the execution of previous test sequences. By mapping the target angle or magnification value set by each control command to the actual angle response or zoom magnification feedback data from the lens, a set of data samples with input-output pairs is formed along each axis. This set characterizes the mapping pattern between control commands and actual lens motion. The command-motion pairing dataset is input into the least squares fitting algorithm module for linear regression analysis to find the linear function model that minimizes the sum of squared errors. During this process, regression calculations are performed on the horizontal, pitch, and zoom axes respectively, and the corresponding linear relationship parameters along each axis are extracted, namely the scaling factor (slope term) and the offset (intercept term). These parameters reflect the degree of linear coupling between the controller's sent commands and the lens's actual response, thus revealing the dynamic response regularity and command sensitivity differences along different axes. A linear mapping function from control commands to actual motion is constructed based on the proportional coefficients and offsets for each axis. The goodness-of-fit of the linear mapping function is tested by calculating the coefficient of determination (R²). 2 The accuracy and stability of the model in explaining the input-output relationship are evaluated using statistical indicators such as the sum of squared residuals (SSR) or other statistical indicators. When the goodness of fit reaches the preset accuracy threshold, the established function model is confirmed to have practical control significance and is formally incorporated into the controller's control command mapping function set. Based on the control command mapping function set, the transmission timestamp of each test command and the start timestamp of the lens response action are correlated and analyzed to extract two key time differences before the command takes effect in each axis: one is the transmission delay, which is the time interval between the command being sent from the controller to the lens receiving it in the wireless channel; the other is the execution delay, which is the reaction time of the lens before starting the motor or zoom device after receiving the command. Both types of delays can be accurately reconstructed in frame data and feedback data. The above two delays are extracted for each test command and statistically analyzed. Combined with the command type and response direction, the axis delay characteristics are formed. The transmission delay and execution delay corresponding to each test command are weighted and averaged according to their weights. The weight coefficients are adjusted based on factors such as the importance level of the command, the execution frequency, or the frequency of direction switching, thereby obtaining the overall compensation time parameters.
[0067] S4, the PTZ controller monitors the wireless signal strength index between itself and the panoramic lens in real time, and inputs the wireless signal strength index and control delay compensation time into the handshake interval adjustment algorithm to obtain the handshake frame transmission time interval.
[0068] Specifically, a high-resolution wireless communication monitoring mechanism is integrated within the gimbal controller. This mechanism relies on the underlying channel monitoring function of the wireless communication module to periodically collect signal monitoring datasets between the current communication link and the target panoramic lens at the physical level. This dataset includes time-series samples such as received signal strength, ambient noise baseline values, link stability statistics, packet loss rate, and retransmission counts, with a sampling period set between 50 and 100 milliseconds. The controller analyzes the collected signal monitoring dataset to extract the current wireless signal strength index, primarily based on the real-time value of the received power intensity, combined with an ambient noise baseline (e.g., -95 dBmW) to calculate the current signal-to-noise strength difference. This signal strength index reflects the physical communication quality of the current link and can indirectly infer the spatial distance between the lens and the controller, the degree of obstruction, and the activity of external interference sources. Simultaneously, the controller calls upon control delay compensation time data obtained in previous stages. This data characterizes the total time delay between the issuance of a command and the start of lens execution, and is a crucial variable for judging the system's control response efficiency. The wireless signal strength index and control delay compensation time are simultaneously input into the dynamic interval adjustment algorithm. This algorithm does not use fixed-value logic, but instead generates adaptive handshake frame interval parameters based on the current channel environment and device response. When the signal strength is high and the response delay is low, the algorithm automatically compresses the current handshake interval to a shorter range, such as within 30 milliseconds, thereby accelerating the handshake frequency and improving pairing speed. Conversely, when the signal strength is weak or there is a significant delay in the control response, the algorithm widens the current handshake interval, for example, extending it to more than 120 milliseconds, to enhance data transmission stability and reduce the probability of false triggers and timeouts. To verify the applicability of the calculated handshake interval time parameter in the current environment, the controller inputs this parameter into the signal environment adaptability testing module, evaluating it by simulating the success probability during communication. In typical applications, the handshake success rate is required to reach or exceed a probability threshold of 0.95. If the simulation test results show that the current parameter has stability and a high success rate, the handshake interval time is confirmed to be effective.
[0069] S5 performs a pairing handshake process based on the handshake frame transmission time interval, establishes a compatibility mapping relationship between the controller protocol version and the lens protocol version, and generates wireless connection control parameters.
[0070] The system initiates a cyclical handshake process with the target panoramic camera, using the handshake frame transmission interval as a time-driven parameter. This handshake process runs continuously within the controller via timed scheduling, periodically sending standardized handshake frames to the camera. The system records the communication round trip, response time, and status codes for each handshake round, generating complete handshake process monitoring data including timestamps, communication status, retransmission counts, and response types. During the handshake process, each round of handshake operations is executed sequentially according to the set handshake frame transmission interval. In each round, the controller sends a handshake request frame to the camera and waits for a response frame. Upon receiving the feedback from the camera, the controller immediately parses and confirms the data to determine if it is a valid response. Simultaneously, the response time is calculated and judged to be within the allowable range. If it is valid and timely, the handshake round is considered successful and recorded as a successful interaction; if there is a timeout, frame loss, or response error, it is recorded as a failed interaction. Statistical calculations of a series of handshake rounds generate overall handshake success rate data, used to measure communication link stability and device responsiveness. During pairing, a dynamic learning process of motion parameters is performed synchronously. The controller continuously analyzes the motion response and position error in the lens feedback data, calculates the fitting error of the command mapping function in real time, and generates parameter learning accuracy data reflecting the accuracy of the learning process. This data is used to evaluate the device's adaptive capability and learning convergence trend. The handshake success rate data, parameter learning accuracy data, and signal strength fluctuation data acquired in real time throughout the communication process are used as inputs for state transition judgment. The state transition condition judgment operation of the pairing process is executed in the internal state machine logic. This judgment logic determines the current pairing state based on preset multi-dimensional condition rules, judging whether the conditions for transitioning from the "discovery state" to the "parameter detection state" or "protocol mapping state" are met. If the handshake success rate is higher than a certain threshold, the learning accuracy is lower than the preset error upper limit, and the signal stability fluctuation is within a controllable range, state transition matrix data is generated. Based on the connectivity and transition probability of the state transition paths in the matrix, the convergence verification of the pairing process is performed. This verification confirms whether the current pairing process is steadily progressing towards the target completion state and generates a state transition identifier for the pairing process, which describes the current pairing stage and its feasibility. Based on the pairing process state transition flag, the process of establishing a compatibility mapping between the controller protocol version and the lens protocol version is initiated. Intersection analysis and compatibility level assessment are performed on the protocol version sets reported by both parties. According to the internally maintained version compatibility matrix, the common version with the highest availability level is selected as the connection protocol from multiple version options. If full compatibility cannot be achieved, a downgrade strategy is implemented to enable limited compatibility or basic compatibility. The command mapping module is used to convert commands from higher to lower versions, thereby establishing a protocol compatibility mapping relationship between the controller and the lens.Once the mapping relationship is confirmed, the final wireless connection control parameters are generated. This parameter set includes protocol version docking results, handshake cycle configuration, command mapping parameters, and control delay correction data.
[0071] In one example, the pan-tilt controller sends a device query frame to the panoramic lens and receives device authentication data returned by the panoramic lens, including:
[0072] The PTZ controller encapsulates the controller's unique identifier, protocol version list, and device type identifier according to a preset frame structure format to generate a device query frame;
[0073] The PTZ controller broadcasts device query frames to the panoramic lenses within a preset frequency band via the wireless communication module, and starts a response timeout timer to listen for device response frames returned by the panoramic lenses.
[0074] After receiving the device response frame, the PTZ controller verifies the validity of the frame header identifier and verification timestamp. After the validity verification is passed, it extracts the lens device identifier, protocol version information and hardware platform parameters.
[0075] The PTZ controller matches the lens device identifier with the local device whitelist and performs a compatibility check on the protocol version information against the list of protocol versions supported by the controller, generating device authentication data.
[0076] In this example, the controller's unique identifier, i.e., the device ID code corresponding to the controller, is retrieved from the controller firmware. This ID code is unique and can be used for reverse verification with the lens to prevent unauthorized device access. Simultaneously, all protocol version information supported by the controller is read. This information represents all registered or backward-compatible communication protocol structures in an ordered list and is exported through a unified interface as part of the frame structure parameters. Furthermore, the device type identifier is determined based on the controller's hardware classification, functional capabilities, or application characteristics. This identifier is used by the lens to quickly determine whether it belongs to a compatible control device category. The controller formats and encapsulates the above three parameters—unique identifier, protocol version list, and device type identifier—according to the preset device query frame format template in the system. The entire encapsulation process is processed according to the segment field order in the frame structure, including the frame header identifier, identity field, protocol field, type field, timestamp field, and check field. The frame header identifier uses a fixed structure so that the lens can identify the start position of the message. The timestamp is used to synchronize the time series to prevent message duplication or forgery. The check field uses CRC or other methods to ensure data integrity. After all fields are encapsulated and formatted, a complete device query frame is generated and cached in the transmit buffer of the wireless communication module. After the device query frame is constructed, the controller broadcasts it via the wireless communication module to a preset frequency band. This band is either a general-purpose 2.4GHz or 5GHz band, or a specific industrial, short-range transmission band. The broadcast transmission uses a non-directional transmission mechanism to ensure that all panoramic lenses in the area that are in a listening state can receive the query request. Simultaneously, within the same logical cycle of sending the device query frame, the controller starts a response timeout timer. The timer's setting is between 200 and 500 milliseconds, depending on system requirements. During the timer's validity period, the controller's receiving module enters a listening state, continuously monitoring and waiting for device response frames from the panoramic lenses. If a data frame returned by the camera is received within the valid listening time window, the system performs frame header identifier verification on the frame to check whether it matches the preset synchronization field, thereby confirming whether it is a valid response message. Then, the timestamp field is parsed and compared with the local system clock to verify whether the response frame is the corresponding frame sent in the current session, in order to prevent outdated data or abnormal recurrence caused by channel buffering. After the frame header and timestamp verification are passed, the system calculates the verification field and confirms whether the frame structure has been damaged or lost during transmission. If all verification items pass, the device response frame is considered valid, and the system enters the data extraction stage.During the extraction phase, the controller reads the lens device identifier from the response frame. This identifier is the lens's unique identity information. It also reads the protocol version information supported by the lens, cross-referencing this information with the protocol version list sent by the controller. Furthermore, it reads the hardware platform parameters of the lens, such as the main controller model, module sequence, and computing power flags. This information helps determine the lens's overall performance level and resource constraints. All extracted information is organized locally into a structured data format. To prevent unauthorized or illegal devices from accessing the system communication link, the controller compares the lens device identifier against a locally stored device whitelist. The whitelist records the unique identifiers of authorized, registered, or long-term cooperating devices. A successful match indicates a legitimate device; a failure to match terminates the pairing process and returns an error status. If authentication is successful, a protocol version compatibility check is performed. The controller maps the protocol version returned by the lens to its own supported version list, selecting the highest priority general protocol version as the access protocol based on a preset compatibility strategy. If multiple versions are available, all feasible paths are recorded; if completely incompatible, the pairing process terminates and an error report is generated. If the identity verification and protocol compatibility analysis are both successful, the controller will integrate the extracted information structure to generate device authentication data. This data structure includes the lens's unique identification code, the selected compatible protocol version, hardware platform characteristics, and verification success status identifier, and is marked as a valid device mapping object for the current control session.
[0077] In one example, a motion test sequence is sent to the panoramic lens based on device authentication data, and lens motion feature data is received from the panoramic lens, including:
[0078] Select the corresponding instruction format based on the protocol matching result in the device authentication data, and encode and encapsulate the horizontal angle test value, pitch angle test value and zoom magnification test value according to the instruction format to generate a motion test sequence.
[0079] According to the preset instruction sending sequence, the various test instructions in the motion test sequence are sent to the panoramic lens in sequence, and the position feedback monitoring process and execution time timer are started after each test instruction is sent.
[0080] The system receives feedback data returned by the panoramic camera through a location feedback monitoring process and establishes an association mapping between the received feedback data and the corresponding test commands.
[0081] The angle response data in the association mapping is subjected to difference calculation and time series analysis to extract lens motion feature data containing maximum rotation speed parameter, maximum acceleration parameter and rotation range parameter.
[0082] In this example, the protocol matching results in the device authentication data are extracted and parsed, and the corresponding instruction format template is selected according to the determined protocol version. The template defines the field structure, parameter bit width, byte alignment, and encoding rules of each control component of the control instruction. Based on this, the controller sets standard test values in the horizontal, pitch, and zoom directions according to the motion test requirements. Multiple sets of target parameters are selected, with horizontal angle test values within ±5 degrees, pitch angle test values within ±3 degrees, and zoom ratio test values within the range of 1.2x to 1.5x. These are then encapsulated into a control instruction byte stream according to the selected instruction format to form a motion test sequence with complete semantic definition. According to the system's set test scheduling strategy and transmission timing configuration, the controller sends test commands sequentially to the target lens. Immediately after each command is sent, two key processes are initiated: a position feedback monitoring process, used to monitor motion feedback information returned from the lens in real time, including the actual angle change, zoom ratio, current position encoding value, and execution status code; and an execution time timer, used to record the time elapsed from the moment the test command is sent until the lens completes the motion feedback. After each test command is processed, the controller automatically clears the timer and enters the scheduling process for the next command, ensuring that each set of motion actions is completed in an independent control window without mutual interference. As the motion test sequence is executed item by item, the system continuously receives corresponding feedback data from the monitoring process. After verifying the frame header and confirming the validity of each feedback frame at the receiving port, a matching mechanism is invoked to establish a unique correspondence between it and the currently active test command. This is achieved through frame sequence number, timestamp, and command identifier to logically bind the command and feedback, and the bound data pairs are stored in a cache list or structured dataset, thus forming a one-to-one mapping set containing the original command parameters and the feedback execution results. After data mapping is completed, the system performs difference calculations and time series analysis on each pair of test commands and feedback data. For angle response, difference calculations are used to extract the angle change per unit time, thereby deriving the actual rotation speed. By performing time difference analysis on the speed change results under continuous commands, angular acceleration information is obtained, and the maximum rotational speed and maximum acceleration parameters of the lens under the current operating state are extracted accordingly. By statistically classifying the angle change amplitudes in all test responses, the maximum action boundaries that the lens can achieve on the horizontal and pitch axes are identified, thereby determining the rotation range boundaries in the horizontal and pitch directions. Simultaneously, the zoom magnification variation range is extracted from the feedback information of the zoom test sequence. By analyzing the limit values of the magnification increment, the effective zoom range supported by the current physical mechanism of the lens is calculated, thus forming a complete set of motion characteristic parameters including the maximum horizontal rotational speed, the maximum pitch acceleration, and the effective zoom magnification.
[0083] In one example, the control delay compensation time is calculated based on camera motion feature data, including:
[0084] Generate instruction-motion pairing datasets for each axis based on lens motion feature data;
[0085] The instruction-motion pairing dataset is input into the least squares fitting algorithm for linear regression calculation to obtain the proportional coefficient and offset of each axis.
[0086] A linear mapping function from control commands to actual motion is constructed based on the proportional coefficients and offsets of each axis. The accuracy parameters of the linear mapping function are verified by the goodness-of-fit test, and a set of control command mapping functions is generated.
[0087] Based on the set of control command mapping functions, the correlation analysis of command sending timestamps and motion start timestamps during the test process is performed to calculate the transmission delay and execution delay of commands in each axis. Then, a weighted average is performed based on the transmission delay and execution delay to obtain the control delay compensation time.
[0088] In this example, based on the motion feature data of the lens after the test, a set of standardized input-output correspondences are established for the three axes of horizontal, pitch and zoom. In each round of motion test, the controller records the current control command value (i.e. the expected rotation angle or zoom magnification) and the actual motion amount fed back by the lens (including angle response value and magnification change amplitude). These two parameters are used as a set of data points to form a pair of input-output mapping records one by one. According to the test command sequence of each axis, three-dimensional command-response paired datasets are organized. Each dataset covers multiple sample points, and the number of samples at least meets the minimum data volume threshold of the fitting requirements. The sample distribution is evenly distributed to cover the controllable range of each axis. The command-motion pairing datasets for each axis are input into the fitting module. The least squares method is used as the basic algorithm for linear fitting. An optimal linear mapping model is established by calculating the sum of squared residuals between the input command value and the actual motion response and minimizing this sum. During regression, the system solves for the proportionality coefficient and offset that best match the sample distribution characteristics. The proportionality coefficient measures the influence of changes in input commands on changes in actual motion, while the offset reflects the structural response offset or static system error present in the system under zero command input. Three sets of proportionality coefficient and offset results are obtained by independently performing linear fitting in the horizontal, pitch, and zoom directions. Based on the proportionality coefficient and offset, a linear mapping function from control commands to actual motion is constructed. This function has a fixed form, and its parameters are uniquely determined by the fitting results. To ensure the linear mapping function has sufficient accuracy and generalization ability, a goodness-of-fit verification operation is performed after the function is constructed. The effectiveness of the fitted function is evaluated through methods such as residual distribution analysis, mean squared error calculation, or regression fitting correlation coefficient. If the goodness-of-fit of the function meets the minimum accuracy threshold set by the system, it is determined to be a valid function and is included in the control command mapping function set; otherwise, regression recalculation or re-collection of samples is triggered to improve model quality. Based on this set of linear mapping functions, the system reviews the time information logs of previous test processes. In each set of test interactions, the timestamp when the control command is issued and the actual response start timestamp of the lens movement are extracted. After matching these two time points, the total time delay experienced from the controller issuing the command to the lens recognizing and starting the movement is calculated. This time delay is subdivided into transmission delay and execution delay. The former includes the physical time and parsing time spent by the command being transmitted from the controller to the lens via the wireless channel, and the latter includes the response preparation time for the lens to start the motor or zoom mechanism after receiving the command. The system uses a control command mapping function to restore the actual feedback quantity to the corresponding target command quantity, thereby calculating the real time difference between the controller and the lens between the command issuance and response. It also performs statistical analysis on the transmission delay and execution delay of each axis to obtain the typical delay characteristics of that axis.The above delay parameters are weighted and averaged. Different weights are set according to the importance of each axis in the control task, response frequency or accuracy requirements, etc. The delay parameters of all channels are integrated into a unified control delay compensation time through the weighted averaging strategy.
[0089] In one example, the command-motion pairing dataset is input into a least squares fitting algorithm for linear regression calculation to obtain the proportional coefficients and offsets for each axis, including:
[0090] The command-motion pairing data is separated to generate horizontal axis data sequences, pitch axis data sequences, and zoom axis data sequences.
[0091] Construct the coefficient matrix and target vector for linear regression based on the horizontal axis data sequence, pitch axis data sequence, and zoom axis data sequence, respectively;
[0092] The coefficient matrix and the target vector are input into the matrix transpose and matrix multiplication operation module of the least squares fitting algorithm to perform least squares calculation, and the linear regression parameter vectors for each axis are obtained.
[0093] Extract the horizontal axis scale factor and offset, pitch axis scale factor and offset, and zoom axis scale factor and offset from the linear regression parameter vector to generate the scale factor and offset data for each axis.
[0094] In this example, based on the paired data between control commands and actual responses, each record in the paired dataset contains the original control command value issued by the controller and the actual motion response value returned by the lens. Each record also indicates the control axis to which the command belongs. Therefore, the system separates all data through label filtering and structural classification, splitting the original paired data into three independent, non-overlapping subsets along the control axis: the horizontal axis data sequence, the pitch axis data sequence, and the zoom axis data sequence. Each subset consists of multiple two-dimensional paired samples composed of multiple control input values and their corresponding actual output values. These data samples cover the complete input-output relationship from the minimum motion value to the maximum response boundary along their respective axes, thus satisfying the sample requirements for regression fitting. The system performs structured matrix construction operations on the paired samples of the horizontal, pitch, and zoom axes respectively. Each data sequence is decomposed into a coefficient matrix and a target vector for linear regression. The coefficient matrix consists of the input control command values, with a constant term 1 appended to the end of each row to construct a homogeneous structure for offset fitting. The target vector consists of the corresponding actual response values and is extracted separately as the fitting target quantity. In each axis, the system constructs an input matrix with control commands as variables and pairs it with the corresponding actual motion response vectors to form a standard linear regression input structure. After the data structures for the three axes are constructed, these coefficient matrices and target vectors are sequentially input into the core module of the least squares fitting algorithm. This module performs calculations using matrix transpose and matrix multiplication as basic operations. By transposing the coefficient matrix and multiplying it with its own matrix, an intermediate result matrix is obtained. This intermediate result matrix, along with the correlation matrix of the target vector, participates in the inverse or pseudo-inverse operation steps to calculate the parameter vector required for the linear regression model. This parameter vector contains two key parameters for each axis used to map the linear relationship between control commands and actual motion responses: the proportionality coefficient and the offset. The proportionality coefficient characterizes the response gradient of the input change on the output, while the offset corrects for system static errors or mechanical zero-position offsets, thus ensuring the integrity and accuracy of the fitting model. After the least squares module completes the regression parameter solution, the system performs a structured interpretation of the regression parameter vector corresponding to each axis, extracting the principal coefficients and constant terms. It then summarizes and organizes the proportional coefficients and offsets for the horizontal, pitch, and zoom axes, generating proportional coefficient and offset data for each axis. This ultimately forms a control mapping dataset containing three sets of independent linear regression model parameters. After generating this parameter data, the system performs a numerical rationality check and model fitting accuracy verification. If the parameter values are too large or too small, or if there is a systematic shift in the regression residual distribution, the model is considered unstable and requires resampling or data correction.
[0095] In one example, the gimbal controller monitors the wireless signal strength between itself and the panoramic lens in real time, and inputs the wireless signal strength and control delay compensation time into the handshake interval adjustment algorithm to obtain the handshake frame transmission time interval, including:
[0096] The PTZ controller periodically collects signal monitoring data between itself and the panoramic lens via a wireless communication module;
[0097] Calculate wireless signal strength indicators based on signal monitoring datasets;
[0098] The wireless signal strength index and control delay compensation time are input into the dynamic interval adjustment algorithm to generate the handshake interval time parameter.
[0099] The signal environment adaptability is tested based on the handshake interval time parameter to obtain the handshake frame transmission time interval.
[0100] In this example, a continuously operating wireless communication channel monitoring module is deployed in the gimbal controller. This module, attached to the physical layer transceiver structure of the controller's wireless chip, continuously performs signal acquisition, data sampling, and link quality detection functions in a non-interrupted manner during normal system operation. Under this mechanism, the controller actively detects the wireless link status with the panoramic lens at fixed intervals, with the detection period set between 50 and 100 milliseconds to ensure that the system obtains a sufficiently dense sample of link status without causing communication congestion. Each detection process includes reading the received signal strength, acquiring the communication response time, monitoring the frame error rate, and calibrating the environmental background noise, thus forming a signal monitoring dataset with a clear temporal structure. This dataset records the physical state of the communication link with the lens at the current moment. The collected signal monitoring dataset is segmented and analyzed, focusing on extracting received signal strength data representing signal power, baseline noise values indicating environmental interference, and information such as retransmission counts and frame error rates during communication. Through statistical analysis and filtering calculations, the system extracts stable signal strength indicators from multiple time segments. These indicators represent the current link quality between the camera and controller, expressed in decibels and milliwatts (dW / mW). The closer the value is to zero, the stronger the signal; the closer it is to a negative maximum, the weaker the signal. Short-term fluctuations in the signal strength indicator are used to identify unstable factors in the link environment, such as moving obstacles, electromagnetic interference, or channel congestion. After obtaining the currently valid signal strength indicator, the system retrieves the control delay compensation time parameter calculated from previous camera motion tests. This time parameter represents the typical delay between the controller issuing the command and the camera starting execution, reflecting the current real-time performance level of the control link. The system inputs both signal strength indicators and control delay compensation time into the dynamic interval adjustment algorithm module. This module implements multi-factor sensing interval calculation logic. Its core strategy is to shorten the handshake cycle to accelerate the pairing process under strong signal and short delay conditions, while extending the handshake cycle to enhance data stability and fault tolerance under weak signal and long delay conditions. In practical implementation, the algorithm dynamically adjusts the range of handshake interval time by establishing a non-linear mapping relationship between input indicators and interval output, generating a handshake interval time parameter that adapts to the current environment. To avoid drastic changes in the handshake frequency due to short-term fluctuations in the dynamic adjustment algorithm, a signal environment adaptability verification mechanism is introduced. This mechanism verifies the usability of the generated handshake interval parameter based on the signal strength trend, bit error statistics, and command response consistency data in the current and historical cycles.The system constructs a set of pairing success probability models, channel stability functions, and feedback consistency discrimination conditions to determine whether the interval value has the characteristics of high communication success rate, low latency jitter, and low risk of false triggering in the current environment. If the verification results show that the parameter has sufficient environmental adaptability, the system confirms it as the final handshake frame transmission time interval and writes it into the pairing task scheduler. Otherwise, the system will re-collect data and trigger the adjustment algorithm to recalculate until a stable interval value that meets the judgment conditions is obtained.
[0101] In one example, the wireless signal strength index and control delay compensation time are input into the dynamic interval adjustment algorithm to generate handshake interval time parameters, including:
[0102] Extracting basic parameters for interval calculation from wireless signal strength indicators;
[0103] The signal strength ratio in the basic parameters of the interval calculation is reverse normalized to obtain the signal attenuation factor. The signal attenuation factor is then input into the power function operation module in the dynamic interval adjustment algorithm for exponential adjustment to generate the signal strength adjustment coefficient.
[0104] The initial handshake interval value is obtained by multiplying the signal strength adjustment coefficient and the basic handshake interval time constant. The control delay compensation time is then added to the initial handshake interval value to generate the handshake interval time parameter.
[0105] In this example, the current wireless signal strength index is extracted from the data structure of the completed channel sampling. This index is a dynamic statistical value obtained by continuously monitoring the lens signal feedback through the wireless communication module in the previous stage. Its original form is the power level of the received signal, expressed in decibels and milliwatts on the negative logarithmic order, such as -45dBm or -70dBm. The closer the value is to zero, the stronger the signal; conversely, the lower the value, the more severe the signal attenuation and the worse the communication quality. This index is converted into a standardized calculation basis parameter for interval calculation. It is converted into a signal strength ratio under a unified dimension through a set of normalization rules. This ratio is calculated based on the relative relationship between a predefined maximum signal strength upper limit and the current actual signal strength. The maximum signal strength upper limit is determined by the receiving capability limit of the device's wireless module. For example, if the system specifies -30dBm as the strongest usable signal, then the ratio of the current sampled value to this upper limit can be regarded as the signal strength level. After normalization, the ratio undergoes a reverse processing, transforming its meaning by subtracting the ratio from 1. This assigns a smaller value to strong signals and a larger value to weak signals, allowing the parameter to more intuitively reflect the declining trend in signal quality. This reverse normalization result is defined as the signal attenuation factor, which expresses the degree of degradation in the current communication link. The signal attenuation factor is input into the power function operation module for exponential adjustment in the dynamic interval adjustment algorithm structure. In this module, the system configures preset power function adjustment coefficients according to the device communication strategy. By using the attenuation factor as the base and the system-defined exponential sensitivity parameter as the exponent, an exponential transformation operation is performed to enhance the nonlinear response capability of signal degradation to the handshake interval adjustment result. This process establishes a rapid linkage between the signal decline trend and the extension of the handshake time, significantly increasing the handshake interval in a weak signal environment and keeping the interval as short as possible in a strong signal environment to improve pairing efficiency and reduce channel interference. The output of the power function operation is defined as the signal strength adjustment coefficient. This coefficient is a dynamic weighting factor for the system's handshake frequency adjustment based on the current link quality, representing the device's ability to adaptively adjust its pairing behavior according to external communication conditions. This signal strength adjustment coefficient is multiplied by the basic handshake interval time constant to generate the initial handshake interval time value. The basic handshake interval time constant is a standard time unit set by the system during the communication module initialization phase, for example, 50 milliseconds, representing the default frequency for periodic handshake scheduling under ideal signal conditions. The result of multiplying this basic constant by the signal strength adjustment coefficient represents the ideal handshake cycle length determined by the link state under the current signal quality conditions. A larger value indicates that the system should reduce the handshake frequency to improve communication stability; a smaller value indicates good current communication quality, allowing the system to initiate handshake requests at a higher frequency to improve pairing speed and response capability. The control delay compensation time is added to the initial handshake interval value as a correction factor.The control delay compensation time is calculated during the motion parameter testing phase based on the difference between the control command transmission time and the actual lens start time. Its value reflects the cumulative time-domain delay during communication. A larger value indicates that even with good signal quality, the system needs to appropriately extend the handshake cycle to avoid command accumulation and response misalignment. A smaller value maintains high-frequency handshakes to improve real-time response efficiency. Therefore, the system uses this control delay compensation time as a weighted correction term, adding it to the initial handshake interval time value to ultimately generate the handshake interval time parameter.
[0106] In one example, a pairing handshake process is performed based on the handshake frame transmission time interval, and a compatibility mapping relationship is established between the controller protocol version and the lens protocol version to generate wireless connection control parameters, including:
[0107] Based on the handshake frame transmission interval, a cyclic handshake process with the panoramic camera is initiated, generating handshake process monitoring data;
[0108] Based on the handshake process monitoring data, the handshake frame sending and response receiving operations are executed sequentially according to the handshake frame transmission time interval to generate handshake success rate data and parameter learning accuracy data.
[0109] Based on handshake success rate data, parameter learning accuracy data, and signal stability data, state transition condition judgment is performed to generate state transition matrix data. Based on the state transition matrix data, pairing convergence verification is performed to generate pairing process state transition identifiers.
[0110] Establish a compatibility mapping relationship between the controller protocol version and the lens protocol version based on the state transition identifier during the pairing process, and generate wireless connection control parameters.
[0111] In this example, a timed scheduling-driven handshake task loop mechanism is initiated based on the handshake frame transmission interval parameter. This loop process is triggered by the controller scheduler according to the set handshake interval as the timer trigger period, periodically broadcasting handshake request frames to the panoramic lens, and monitoring in real time whether a valid lens response frame is received within the corresponding waiting window. Throughout the process, the start time, content sent, response time, response validity, number of exceptions, and status code information of each round of handshake operation are recorded by the system and summarized into the handshake process monitoring data structure. This data structure is arranged in chronological order and gradually accumulates to form a complete pairing process log. While the cyclic handshake task continues to run, the system performs interactive statistical processing based on the sending and receiving events of each handshake frame. Following a scheduling cycle defined by the handshake frame transmission time interval, it analyzes the communication success and failure status of each frame round by round, identifying abnormal behaviors such as response timeouts, frame corruption, or protocol conflicts. Based on the communication results, the system categorizes the handshake rounds, extracting information such as the number of successful handshakes, the number of failed handshakes, and the length of consecutive failure segments from the handshake process monitoring data. The success rate of the current pairing process is calculated using ratios, reflecting the communication stability of the current wireless link, the lens's responsiveness, and the overall interactive reliability of the system. Simultaneously, the system extracts key motion response parameters from the feedback data returned by the lens in each round and compares the error with the system's preset test target values. Combined with the cumulative real-time fitting error value of least squares regression, it generates learning accuracy data for the current parameter learning stage. This data measures the controller's convergence speed in learning the lens's dynamic characteristics and the model fitting accuracy; the lower the accuracy, the more stable and reliable the control model. The system retrieves signal stability data recorded during the current communication cycle. This data reflects channel state characteristics such as the fluctuation range of the current RSSI value, the short-term average SNR change trend, and the number of noise mutations. State transition condition judgments are performed based on handshake success rate data, parameter learning accuracy data, and signal stability data. Internally, this module constructs a set of state models, including the initial state, discovery state, parameter acquisition state, mapping establishment state, and connection completion state. Transitions between each state are triggered by specific threshold conditions. For example, the system needs a handshake success rate of at least 0.8 to transition from the discovery state to the parameter acquisition state; a parameter learning accuracy of less than 0.05 to transition from the parameter acquisition state to the mapping establishment state; and a signal stability index better than 0.1 to transition from the mapping establishment state to the connection completion state. The result of each state transition condition judgment is quantified into a state transition matrix. This matrix, indexed by state number and composed of transition probabilities, characterizes the reachability and stability of the current pairing process across different stages.After the state transition matrix is constructed, a pairing convergence verification operation is performed based on this matrix structure. This involves evaluating the connectivity of state paths, the loop structure, and the stable absorption probability of the final state to determine whether the current pairing process has a tendency to evolve stably towards the completed state. If the verification result shows that the system is in an oscillation zone or that some paths experience convergence interruptions, the system will interrupt the current pairing task and send an error signal. If the verification passes, the system generates a pairing process state transition identifier, which records the current state stage of the pairing process, the reachability path to the target state, and the history of successful transitions. A compatibility mapping relationship between the controller protocol version and the lens protocol version is established based on the pairing process state transition identifier. The protocol version access logic between the controller and the lens is determined based on the state trajectory analysis results recorded in the identifier. An intersection operation is performed on the version support list extracted during the previous authentication phase. The protocol version with the highest support level for both parties is selected according to the compatibility matrix rules. The high-level instructions of the controller are mapped to a low-level instruction format recognizable by the lens through a protocol mapping function, thus constructing a protocol compatibility mapping relationship. After the mapping relationship is established, the system integrates the currently selected communication protocol version, handshake cycle configuration parameters, command offset calibration information and lens response feedback characteristics to generate the final wireless connection control parameters.
[0112] In this embodiment, the gimbal controller performs pairing convergence verification based on state transition matrix data and generates pairing process state transition identifiers. This includes: the gimbal controller extracting parameter learning error values for each pairing stage based on the state transition matrix data, including horizontal axis mapping error, pitch axis mapping error, and zoom axis mapping error; calculating the ratio of the current handshake wheel count to the initial handshake wheel count; obtaining the theoretical learning accuracy value through a negative exponential power function operation; and generating parameter learning convergence evaluation data containing both actual error and theoretical accuracy. Based on the parameter learning convergence evaluation data, the gimbal controller constructs Lyapunov candidate functions to map each axis... The sum of squared mapping errors is used as the input variable of the function. A convergence threshold and stability coefficient are set. The stability of the current pairing state is determined by comparing the function value with the preset convergence threshold, generating Lyapunov stability analysis data containing the function value and stability judgment results. The PTZ controller calculates the time derivative of the function in the current state based on the Lyapunov stability analysis data. The convergence trend of the pairing process is determined by judging the sign of the derivative and analyzing its magnitude. When the derivative is negative and its absolute value is greater than the preset convergence rate threshold, the system is confirmed to be converging positively. The number of consecutive convergence rounds and the trend of convergence rate changes are recorded, generating... The pairing process convergence trend monitoring data; based on the pairing process convergence trend monitoring data, the PTZ controller establishes a multi-dimensional convergence verification mechanism, simultaneously monitoring the handshake success rate change gradient, parameter learning accuracy change rate, and signal stability fluctuation amplitude. A weighted comprehensive evaluation algorithm is used to calculate the overall convergence confidence of the pairing process. When the confidence exceeds a preset reliability threshold, pairing convergence is confirmed as complete, generating a pairing convergence verification result containing the convergence status and confidence level. Based on the pairing convergence verification result, the PTZ controller performs abnormal state detection and processing. When oscillation, divergence, or stagnation is detected in the pairing process, a state correction mechanism is activated. The system intervenes in the state by adjusting the handshake interval parameter, resetting the learning precision counter, or switching the protocol version, and records the anomaly type, handling measures, and correction effects, generating state correction execution data containing anomaly handling records. The PTZ controller encodes the final state identifier based on the state correction execution data and the pairing convergence verification results. It encapsulates the current pairing stage identifier, convergence status code, confidence value, and anomaly handling flag in binary according to preset encoding rules, and adds timestamps and verification information to ensure the integrity and traceability of the identifier, generating a pairing process state transition identifier containing complete pairing status information and convergence guarantee.
[0113] In one example, a compatibility mapping between the controller protocol version and the lens protocol version is established based on the pairing process state transition identifier, and wireless connection control parameters are generated, including:
[0114] Extract the protocol version data set containing the controller protocol version and lens protocol version from the state transition identifier of the pairing process;
[0115] Based on the protocol version data set, a protocol version compatibility mapping matrix is constructed using the controller protocol version as the row index and the lens protocol version as the column index.
[0116] Based on the protocol version compatibility mapping matrix, version selection and downgrade processing are performed to generate protocol adaptation configuration data;
[0117] Based on protocol adaptation configuration data, wireless connection control parameters are generated, including connection protocol, transmission strategy, and power consumption control.
[0118] In this example, the core fields contained in the state transition identifier are structured and parsed. During the parsing process, the controller protocol version and lens protocol version information recorded in the pairing task are extracted. This version data comes from the protocol information description segment uploaded during the initial device authentication phase and is a subset of all protocol versions supported by the controller and lens respectively. The system formats the version number, function level, protocol capability, and version number order in key-value pairs or structures to form a set of protocol version data that clearly identifies the protocol support range of the control end and the lens end. Each element in this set contains the device end identifier, protocol version number, and protocol level description. The protocol version data set is input into the protocol version mapping matrix generation module. According to the two-dimensional mapping rule of using the controller protocol version as the row index and the lens protocol version as the column index, a protocol version compatibility mapping matrix is established. Each element of this matrix represents the interoperability between a certain controller version and a certain lens version. This capability is divided into four levels according to the system design: fully compatible, functionally limited compatible, basic compatible, and incompatible. These are encoded with numerical identifiers 0, 1, 2, 3, etc., to indicate the mapping strength and the degree of function retention, respectively. During matrix generation, the system iterates through the entire set of protocol versions supported by the controller, expanding each version as a row item on the horizontal axis of the matrix. Then, it iterates through the set of protocol versions supported by the lens, arranging them column-wise to form an m×n matrix space. Internal compatibility calculation logic performs capability matching tests on each pair of version combinations. This test determines the compatibility of each protocol version across dimensions such as control capabilities, motion command sets, status response formats, encryption support, and data packet structure, and fills the corresponding matrix positions. After matrix filling, a compatibility mapping matrix reflecting the current protocol capability adaptation status between devices is formed. The system enters the protocol version selection and downgrade processing phase. In this phase, the compatibility mapping matrix is analyzed, prioritizing the element with the highest numerical priority, i.e., the fully compatible item. This item represents that the controller and lens can achieve full functional interoperability under this version combination without protocol conversion. If multiple fully compatible items exist, the system selects the highest priority item as the target protocol combination based on protocol number order or functional set extensibility. If no fully compatible item exists, the system searches for functionally limited compatible items. In the case of functionally limited compatible items, the system simultaneously activates the protocol conversion module to downgrade some high-level commands issued by the controller, converting them into basic-level commands recognizable by the lens to ensure basic control capabilities. If only basic compatible items exist, it indicates that the protocols of both parties have a minimum level of connectivity. The system disables all extended functions in the configuration, retaining only the connection and basic attitude control channels. If all combinations are incompatible, the system terminates this pairing round and returns a failure status.After version selection, the system packages the corresponding controller version number, lens version number, compatibility level, downgrade flag, and command conversion rules into protocol adaptation configuration data. This data is used to drive protocol layer adaptation operations in the communication logic at runtime. Based on this protocol adaptation configuration data, the system enters the wireless connection control parameter generation stage. In this stage, the system confirms the connection protocol version number to be used for the current control task as the logical main protocol used throughout the communication process. Subsequently, it selects a matching transmission strategy according to the protocol adaptation level. If it is fully compatible, a high-throughput, low-latency strategy is used, employing short-interval, high-power, and low-redundancy coding for command transmission. If it is functionally limited compatible, a medium transmission strategy is used, enabling retransmission confirmation mechanisms and intermediate buffer scheduling mechanisms to ensure reliability. If it is basically compatible, an energy-saving transmission strategy is activated, employing low-rate, redundant error correction codes, and confirmation backoff mechanisms to ensure that commands can still complete the task under the lowest control channel. The system sets power consumption control parameters based on protocol level and device capabilities. For example, it enables peak power control mode under high compatibility level and low power sustaining mode under low compatibility level. During each control round, it dynamically adjusts signal transmission power, transmission interval, and module sleep rhythm to achieve an optimal balance between functionality preservation and power consumption control. The final generated wireless connection control parameters include connection protocol number, compatibility level identifier, protocol mapping function pointer, transmission strategy configuration parameters, power consumption control settings, and dynamic protocol switching flags.
[0119] In this embodiment, the gimbal controller generates wireless connection control parameters, including connection protocol, transmission strategy, and power consumption control, based on protocol adaptation configuration data. This includes: the gimbal controller performs priority classification processing on the control commands to be transmitted based on the protocol adaptation configuration data; using a command type identification algorithm, it marks emergency stop commands, collision avoidance commands, and real-time tracking commands as emergency levels, and parameter configuration commands, status query commands, and normal motion commands as normal levels; and assigns different transmission resource weight coefficients to each level of command, generating command classification management data containing command priority identifiers and resource allocation weights. The gimbal controller establishes a differentiated power adjustment strategy based on the command classification management data, adjusting the basic... Transmission power is multiplied by urgency and normality coefficients to calculate the high-power transmission parameters for urgency-level commands and the standard power transmission parameters for normal-level commands. Simultaneously, the power gain factor is dynamically adjusted based on the current signal strength, and upper and lower power limit protection mechanisms are set to generate power control configuration data containing tiered power parameters and dynamic adjustment coefficients. The PTZ controller performs intelligent retransmission interval calculation based on the power control configuration data. The retransmission time interval for each level of command is determined by the inverse proportionality between command priority weight and the basic retransmission interval. Urgent-level commands employ a short-interval, high-frequency retransmission strategy, while normal-level commands employ a long-interval, energy-saving retransmission strategy, based on historical retransmission success rates. The data dynamically optimizes interval parameters to generate retransmission timing control data that includes tiered retransmission intervals and success rate feedback. Based on this data, the PTZ controller establishes a retransmission count and timeout management mechanism. It sets a maximum retransmission count and emergency timeout threshold for emergency-level commands, and a standard retransmission count and normal timeout threshold for regular-level commands. An exponential backoff algorithm is used to gradually extend the retransmission interval when consecutive retransmission failures occur. Simultaneously, retransmission statistics and failure cause analysis are recorded, generating transmission reliability management data that includes retransmission control parameters and statistical analysis. Based on this data, the PTZ controller performs dynamic transmission strategy optimization, considering retransmission success rate, power consumption, and latency performance across multiple cameras. The algorithm adjusts transmission parameters, automatically reducing the transmission rate and increasing error correction coding strength when channel quality deterioration is detected, and activating energy-saving transmission mode to reduce power consumption when battery power is low, generating adaptive transmission optimization data that includes transmission rate, coding parameters, and energy-saving strategies. The PTZ controller integrates connection protocol version information, hierarchical retransmission strategy parameters, power control configuration, and transmission optimization parameters based on the adaptive transmission optimization data. It ensures the integrity and consistency of control parameters through structured data encapsulation and parameter validity verification, and adds parameter change timestamps and digital signatures for security protection, generating wireless connection control parameters that include complete transmission control strategies and security mechanisms.
[0120] This embodiment provides a panoramic lens, including:
[0121] The verification module is used by the PTZ controller to send device query frames to the panoramic lens and receive device authentication data returned by the panoramic lens.
[0122] The testing module is used to send motion test sequences to the panoramic lens based on device authentication data and to receive lens motion feature data fed back by the panoramic lens.
[0123] The calculation module is used to calculate the control delay compensation time based on the lens motion characteristic data;
[0124] The adjustment module is used to monitor the wireless signal strength index between the PTZ controller and the panoramic lens in real time, and input the wireless signal strength index and control delay compensation time into the handshake interval adjustment algorithm to obtain the handshake frame transmission time interval.
[0125] The generation module is used to perform the pairing handshake process based on the handshake frame transmission time interval, establish a compatibility mapping relationship between the controller protocol version and the lens protocol version, and generate wireless connection control parameters.
[0126] In this embodiment, the specific implementation of each unit in the above device embodiment is described in the above method embodiment, and will not be repeated here.
[0127] This invention achieves automatic identification between the gimbal controller and the panoramic lens through a standardized device query frame and response frame mechanism, eliminating the need for users to manually select devices or enter pairing codes, significantly simplifying the pairing process. Simultaneously, it improves pairing security and reliability through device whitelist matching and protocol version compatibility checks. It employs small-amplitude test command sequences to measure lens motion characteristics in real time, dynamically acquiring key parameters such as maximum rotation speed, maximum acceleration, and rotation range. This eliminates reliance on static parameter tables from manufacturers and adapts to the impact of factors such as equipment aging and load changes on performance, ensuring long-term stability of control accuracy. A personalized linear mapping relationship between controller command values and actual lens motion is established through least squares fitting, achieving a unified control interface across brands. Furthermore, delay compensation parameters are calculated based on timestamp analysis, effectively solving the time synchronization problem in wireless control systems and improving the accuracy of real-time control. The handshake frame transmission interval is dynamically adjusted according to wireless signal strength and delay compensation time. In strong signal environments, the interval is shortened to accelerate pairing, while in weak signal environments, the interval is extended to ensure reliability, achieving an optimal balance between pairing speed and transmission reliability, adapting to the transmission needs of different signal environments. A complete pairing state transition model was established and Lyapunov stability analysis was employed to ensure reliable convergence of the pairing process, avoiding oscillation or divergence problems that may occur in traditional systems. This provided quantitative assessment of pairing progress and fault diagnosis capabilities, enhancing the system's robustness. Through a compatibility mapping matrix and version degradation strategy, the compatibility issue between legacy controllers and new lenses was resolved, achieving seamless connectivity between devices from different manufacturers. Simultaneously, a differentiated retransmission mechanism optimized overall power consumption while ensuring the real-time performance of critical commands, achieving a balance between control accuracy and energy consumption.
[0128] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0129] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for pairing panoramic lenses, characterized in that, include: The PTZ controller sends a device query frame to the panoramic lens and receives device authentication data returned by the panoramic lens; Based on the device authentication data, a motion test sequence is sent to the panoramic lens, and the lens motion feature data fed back by the panoramic lens is received. Calculate the control delay compensation time based on the lens motion characteristic data; The PTZ controller monitors the wireless signal strength index between itself and the panoramic lens in real time, and inputs the wireless signal strength index and the control delay compensation time into the handshake interval adjustment algorithm to obtain the handshake frame transmission time interval. The pairing handshake process is performed based on the handshake frame transmission time interval, and a compatibility mapping relationship between the controller protocol version and the lens protocol version is established to generate wireless connection control parameters.
2. The method for pairing panoramic lenses according to claim 1, characterized in that, The pan-tilt controller sends a device query frame to the panoramic lens and receives device authentication data returned by the panoramic lens, including: The PTZ controller encapsulates the controller's unique identifier, protocol version list, and device type identifier according to a preset frame structure format to generate a device query frame; The PTZ controller broadcasts the device query frame to the panoramic lens within the preset frequency band via the wireless communication module, and starts a response timeout timer to listen for the device response frame returned by the panoramic lens. After receiving the response frame from the device, the gimbal controller verifies the validity of the frame header identifier and the verification timestamp. After the validity verification is passed, it extracts the lens device identifier, protocol version information and hardware platform parameters. The PTZ controller matches the lens device identifier with the local device whitelist and performs a compatibility check on the protocol version information with the list of protocol versions supported by the controller to generate device authentication data.
3. The method for pairing panoramic lenses according to claim 1, characterized in that, The process of sending a motion test sequence to the panoramic lens based on the device authentication data and receiving lens motion feature data fed back by the panoramic lens includes: Based on the protocol matching result in the device authentication data, the corresponding instruction format is selected, and the horizontal angle test value, pitch angle test value and zoom magnification test value are encoded and encapsulated according to the instruction format to generate a motion test sequence. According to the preset instruction sending time sequence, the various test instructions in the motion test sequence are sent to the panoramic lens in sequence, and the position feedback monitoring process and execution time timer are started after each test instruction is sent. The location feedback monitoring process receives feedback data returned by the panoramic camera and establishes an association mapping between the received feedback data and the corresponding test commands. The angle response data in the associated mapping is subjected to difference calculation and time series analysis to extract lens motion feature data containing maximum rotation speed parameter, maximum acceleration parameter and rotation range parameter.
4. The method for pairing panoramic lenses according to claim 1, characterized in that, The step of calculating the control delay compensation time based on the lens motion feature data includes: Based on the lens motion feature data, a command-motion pairing dataset for each axis is generated; The instruction-motion pairing dataset is input into the least squares fitting algorithm for linear regression calculation to obtain the proportional coefficient and offset of each axis. Based on the proportional coefficients and offsets of each axis, a linear mapping function from control commands to actual motion is constructed, and the accuracy parameters of the linear mapping function are verified by a goodness-of-fit test to generate a set of control command mapping functions. Based on the control command mapping function set, the command sending timestamp and motion start timestamp during the test process are correlated and analyzed to calculate the transmission delay and execution delay of each axial command. The control delay compensation time is obtained by weighted averaging the transmission delay and the execution delay.
5. The method for pairing panoramic lenses according to claim 4, characterized in that, The step of inputting the command-motion pairing dataset into a least squares fitting algorithm for linear regression calculation to obtain the proportional coefficients and offsets for each axis includes: The command-motion pairing data is separated to generate horizontal axis data sequence, pitch axis data sequence and zoom axis data sequence; Based on the horizontal axis data sequence, pitch axis data sequence, and zoom axis data sequence, respectively construct the coefficient matrix and target vector for linear regression; The coefficient matrix and target vector are input into the matrix transpose and matrix multiplication operation module of the least squares fitting algorithm for least squares calculation to obtain the linear regression parameter vectors for each axis. The horizontal axis scale factor and offset, pitch axis scale factor and offset, and zoom axis scale factor and offset are extracted from the linear regression parameter vector to generate the scale factor and offset data for each axis.
6. The method for pairing panoramic lenses according to claim 1, characterized in that, The gimbal controller monitors the wireless signal strength between itself and the panoramic lens in real time, and inputs the wireless signal strength and the control delay compensation time into the handshake interval adjustment algorithm to obtain the handshake frame transmission time interval, including: The PTZ controller periodically collects signal monitoring data between itself and the panoramic lens via a wireless communication module; Calculate the wireless signal strength index based on the aforementioned signal monitoring dataset; The wireless signal strength index and the control delay compensation time are input into the dynamic interval adjustment algorithm to generate the handshake interval time parameter. Based on the handshake interval time parameter, a signal environment adaptability test is performed to obtain the handshake frame transmission time interval.
7. The method for pairing panoramic lenses according to claim 6, characterized in that, The step of inputting the wireless signal strength index and the control delay compensation time into the dynamic interval adjustment algorithm to generate the handshake interval time parameter includes: Extract the basic parameters for interval calculation from the wireless signal strength index; The signal strength ratio in the basic parameters of the interval calculation is reverse normalized to obtain the signal attenuation factor. The signal attenuation factor is then input into the power function operation module in the dynamic interval adjustment algorithm for exponential adjustment to generate the signal strength adjustment coefficient. The initial handshake interval value is obtained by multiplying the signal strength adjustment coefficient with the basic handshake interval time constant. The control delay compensation time is then added to the initial handshake interval value as a correction to generate the handshake interval time parameter.
8. The method for pairing panoramic lenses according to claim 1, characterized in that, The pairing handshake process is performed based on the handshake frame transmission time interval, and a compatibility mapping relationship is established between the controller protocol version and the lens protocol version to generate wireless connection control parameters, including: Based on the handshake frame transmission time interval, a cyclic handshake process with the panoramic lens is initiated, generating handshake process monitoring data; Based on the handshake process monitoring data, handshake frame sending and response receiving operations are executed sequentially according to the handshake frame transmission time interval to generate handshake success rate data and parameter learning accuracy data. Based on the handshake success rate data, the parameter learning accuracy data, and the signal stability data, state transition condition judgment is performed to generate state transition matrix data, and pairing convergence verification is performed based on the state transition matrix data to generate pairing process state transition identifiers. Based on the pairing process state transition identifier, a compatibility mapping relationship is established between the controller protocol version and the lens protocol version, and wireless connection control parameters are generated.
9. The method for pairing panoramic lenses according to claim 8, characterized in that, The step of establishing a compatibility mapping relationship between the controller protocol version and the lens protocol version based on the pairing process state transition identifier, and generating wireless connection control parameters, includes: Extract a protocol version data set containing the controller protocol version and the lens protocol version from the state transition identifier of the pairing process; Based on the aforementioned protocol version data set, a protocol version compatibility mapping matrix is constructed using the controller protocol version as the row index and the lens protocol version as the column index. Based on the protocol version compatibility mapping matrix, version selection and downgrade processing are performed to generate protocol adaptation configuration data; Based on the protocol adaptation configuration data, wireless connection control parameters including connection protocol, transmission strategy and power consumption control are generated.
10. A panoramic lens, characterized in that, The step for implementing the pairing method of the panoramic lens according to any one of claims 1 to 9, wherein the panoramic lens comprises: The verification module is used for the gimbal controller to send a device query frame to the panoramic lens and to receive device authentication data returned by the panoramic lens. The testing module is used to send a motion test sequence to the panoramic lens based on the device authentication data, and to receive lens motion feature data fed back by the panoramic lens. The calculation module is used to calculate the control delay compensation time based on the lens motion feature data; The adjustment module is used to monitor the wireless signal strength index between the PTZ controller and the panoramic lens in real time, and input the wireless signal strength index and the control delay compensation time into the handshake interval adjustment algorithm to obtain the handshake frame transmission time interval. The generation module is used to perform a pairing handshake process based on the handshake frame transmission time interval, establish a compatibility mapping relationship between the controller protocol version and the lens protocol version, and generate wireless connection control parameters.
Citation Information
Patent Citations
Cradle head control method and device
CN103809603A
Holder lens regulation method and device, and handheld holder
CN109213207A