Pairing method of panoramic lens and panoramic lens
Through automatic identity recognition and dynamic acquisition of lens motion characteristics parameters, the problem of poor matching complexity and compatibility of cross-brand equipment in traditional gimbal control systems is solved, time synchronization and intelligent interoperability of wireless control are realized, and the adaptability and reliability of the control system are improved.
Patent Information
- Application Number
- CN202510998913.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-07-21
AI Technical Summary
When interoperating across brands, traditional gimbal control systems have problems such as complex pairing process, low control accuracy and poor compatibility. They require manual configuration and fixed parameter tables, which lead to time-consuming and error-prone.
Through the automatic identity recognition method between the gimbal controller and the panoramic lens, the device query frame and response frame mechanism is used to dynamically obtain lens motion characteristics parameters, establish a personalized control command mapping relationship, and solve the time synchronization problem of wireless control with delay compensation parameters. The transmission strategy is optimized through the dynamic handshake interval adjustment algorithm to achieve unified control across brands.
The intelligence level of the gimbal control system and the ability of cross-brand interoperability are improved, without manual pairing operation, adapting to changes in equipment status, ensuring the reliability and control accuracy of the pairing process.
Smart Images

Figure CN120499508A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of panoramic lenses, and in particular to a panoramic lens pairing method and a panoramic lens. Background Art
[0002] Traditional PTZ control systems require interoperability across multiple brands of devices while ensuring control accuracy and real-time performance. However, significant differences in communication protocols, control command formats, and motion characteristics between different manufacturers' devices make device pairing and control a technical challenge.
[0003] Existing gimbal controller and panoramic lens pairing technologies rely primarily on manual configuration and fixed parameter tables. This leads to core issues such as a complex pairing process, poor cross-brand compatibility, and low control accuracy. Users must manually select the target device, enter the pairing code, and set motion parameters according to the device manual. This entire pairing process is time-consuming and prone to errors. Summary of the Invention
[0004] The main purpose of the present invention is to provide a pairing method and a panoramic lens for a panoramic lens. The present invention realizes automatic identity recognition between the pan-tilt controller and the panoramic lens, eliminating the need for manual pairing operations, thereby improving the intelligence level and cross-brand interoperability of the pan-tilt control system.
[0005] To achieve the above object, the present invention provides a method for pairing panoramic lenses, comprising the following steps: The PTZ controller sends a device query frame to the panoramic lens and receives device authentication data returned by the panoramic lens; Sending a motion test sequence to the panoramic lens based on the device identity authentication data, and receiving lens motion feature data fed back by the panoramic lens; Calculating and controlling delay compensation time according to the lens motion characteristic data; The pan / tilt controller monitors the wireless signal strength index between the pan / tilt controller 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; A 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.
[0006] Optionally, in a first implementation of the first aspect of the present invention, 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 unique identifier, protocol version list, and device type identifier according to a preset frame structure format to generate a device query frame; The pan / tilt controller broadcasts the device query frame to the panoramic lens within a preset frequency band via the wireless communication module, and starts a response timeout timer to monitor the device response frame returned by the panoramic lens; After receiving the device response frame, the PTZ controller verifies the validity of the frame header identifier and the verification timestamp, and extracts the lens device identifier, protocol version information, and hardware platform parameters after the validity verification passes; The PTZ controller matches and compares the lens device identifier with a local device whitelist, and performs a compatibility check on the protocol version information with a list of protocol versions supported by the controller to generate device identity authentication data.
[0007] Optionally, in a second implementation of the first aspect of the present invention, sending a motion test sequence to the panoramic lens based on the device identity authentication data and receiving lens motion feature data fed back by the panoramic lens includes: Selecting a corresponding instruction format according to the protocol matching result in the device identity authentication data, and encoding and encapsulating the horizontal angle test value, the pitch angle test value, and the zoom factor test value according to the instruction format to generate a motion test sequence; Sending each test instruction in the motion test sequence to the panoramic camera in sequence according to a preset instruction sending sequence, and starting a position feedback monitoring process and an execution time timer after each test instruction is sent; Receive feedback data returned by the panoramic lens through the position feedback monitoring process, and establish an association mapping between the received feedback data and the corresponding test instructions; Difference calculation and time series analysis are performed on the angle response data in the association map to extract lens motion feature data including maximum rotation speed parameters, maximum acceleration parameters, and rotation range parameters.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the step of calculating and controlling the delay compensation time according to the lens motion feature data includes: Generate a command-motion amount pairing data set for each axis based on the lens motion feature data; Input the command-motion amount paired data set into the least squares fitting algorithm to perform linear regression calculation to obtain the proportional coefficient and offset of each axis; Constructing a linear mapping function from a control instruction to an actual motion amount based on the proportional coefficient and the offset of each axis, verifying the accuracy parameter of the linear mapping function through a goodness of fit test, and generating a control instruction mapping function set; Based on the control instruction mapping function set, the instruction sending timestamp and the movement start timestamp in the test process are correlated and analyzed, the transmission delay and execution delay of each axial instruction are calculated, and a weighted average is taken based on the transmission delay and the execution delay to obtain the control delay compensation time.
[0009] Optionally, in a fourth implementation of the first aspect of the present invention, inputting the instruction-motion amount paired data set into a least squares fitting algorithm for linear regression calculation to obtain the proportional coefficient and offset of each axis includes: performing data separation on the instruction-motion amount paired data to generate a horizontal axis data sequence, a pitch axis data sequence, and a zoom axis data sequence; Constructing a linear regression coefficient matrix and a target vector based on the horizontal axis data sequence, the pitch axis data sequence and the zoom axis data sequence respectively; Inputting the coefficient matrix and the target vector into the matrix transposition and matrix multiplication operation modules in the least squares fitting algorithm to perform least squares calculations to obtain the linear regression parameter vectors of each axis; The horizontal axis scale coefficient and offset, the pitch axis scale coefficient and offset, and the zoom axis scale coefficient and offset are extracted from the linear regression parameter vector respectively to generate scale coefficient and offset data for each axis.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the pan / tilt controller monitors a wireless signal strength indicator between the pan / tilt controller and the panoramic lens in real time, and inputs the wireless signal strength indicator and the control delay compensation time into a handshake interval adjustment algorithm to obtain a handshake frame transmission time interval, including: The PTZ controller periodically collects signal monitoring data sets between it and the panoramic lens through the wireless communication module; Calculating a wireless signal strength index based on the signal monitoring data set; Inputting the wireless signal strength indicator and the control delay compensation time into a dynamic interval adjustment algorithm to generate a handshake interval time parameter; A signal environment adaptability test is performed based on the handshake interval time parameter to obtain a handshake frame transmission time interval.
[0011] Optionally, in a sixth implementation of the first aspect of the present invention, inputting the wireless signal strength indicator and the control delay compensation time into a dynamic interval adjustment algorithm to generate a handshake interval time parameter includes: Extracting interval calculation basic parameters from the wireless signal strength indicator; Reverse normalizing the signal strength ratio in the interval calculation basic parameter to obtain a signal attenuation factor, and inputting the signal attenuation factor into a power function operation module in the dynamic interval adjustment algorithm for exponential adjustment to generate a signal strength adjustment coefficient; An initial handshake interval value is obtained by multiplying the signal strength adjustment coefficient with a basic handshake interval time constant, and the control delay compensation time is added to the initial handshake interval value as a correction amount to generate a handshake interval time parameter.
[0012] Optionally, in a seventh implementation of the first aspect of the present invention, 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 include: Initiate a cyclic handshake process with the panoramic camera based on the handshake frame transmission time interval, and generate handshake process monitoring data; Based on the handshake process monitoring data, the handshake frame sending and response receiving operations are performed in sequence according to the handshake frame transmission time interval to generate handshake success rate data and parameter learning accuracy data; Performing state transition condition judgment based on the handshake success rate data, the parameter learning accuracy data, and the signal stability data to generate state transition matrix data, performing pairing convergence verification based on the state transition matrix data, and generating a pairing process state transition identifier; A compatibility mapping relationship between the controller protocol version and the lens protocol version is established according to the pairing process state transition identifier, and wireless connection control parameters are generated.
[0013] Optionally, in an eighth implementation of the first aspect of the present invention, establishing a compatibility mapping relationship between the controller protocol version and the lens protocol version according to the pairing process state transition identifier and generating wireless connection control parameters includes: Extracting a protocol version data set including a controller protocol version and a lens protocol version from the pairing process state transition identifier; Constructing a protocol version compatibility mapping matrix based on the protocol version data set with the controller protocol version as the row index and the lens protocol version as the column index; Perform version selection and downgrade processing based on the protocol version compatibility mapping matrix to generate protocol adaptation configuration data; Wireless connection control parameters including connection protocol, transmission strategy and power consumption control are generated based on the protocol adaptation configuration data.
[0014] The present invention also provides a panoramic lens, comprising: The verification module is used for the PTZ controller to send a device query frame to the panoramic camera and receive device identity verification data returned by the panoramic camera; A testing module, configured to send a motion test sequence to the panoramic lens based on the device identity verification data, and receive lens motion feature data fed back by the panoramic lens; a calculation module, configured to calculate a control delay compensation time according to the lens motion characteristic data; An adjustment module is configured to monitor the wireless signal strength index between the pan / tilt controller and the panoramic lens in real time, and input 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; A 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.
[0015] In summary, the technical solution provided by the present invention realizes automatic identification between the pan-tilt controller and the panoramic lens through a standardized device query frame and response frame mechanism, eliminating the need for manual pairing operations. A small-amplitude test command sequence is used to dynamically obtain the lens motion characteristic parameters, breaking away from the dependence on static parameter tables and adapting to changes in device status. Based on the least squares fitting method, a personalized control command mapping relationship is established, and the time synchronization problem of wireless control is solved in combination with delay compensation parameters to achieve unified control of cross-brand devices. The dynamic handshake interval adjustment algorithm optimizes the transmission strategy according to the signal strength and delay characteristics, accelerating pairing in strong signals and ensuring reliability in weak signals. The pairing state transition model and Lyapunov stability analysis are used to ensure reliable convergence of the pairing process and avoid oscillation divergence problems. The compatibility mapping matrix and version downgrade strategy solve the problem of legacy device interconnection. The differentiated retransmission mechanism balances control accuracy and power consumption requirements, significantly improving the intelligence level and cross-brand interoperability of the pan-tilt control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 2 is a schematic diagram of the steps of a method for pairing panoramic lenses according to an embodiment of the present invention.
[0017] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present 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 only used to explain the present invention and are not intended to limit the present invention.
[0019] Reference Figure 1This embodiment provides a method for pairing panoramic lenses, including the following steps: S1, the PTZ controller sends a device query frame to the panoramic camera and receives the device authentication data returned by the panoramic camera; The gimbal controller pre-sets a set of basic parameters for device discovery and verification. These parameters include a unique controller identifier, a list of supported protocol versions, and the current controller's device type identifier. When initiating the pairing process, the controller encapsulates these parameters in a standardized query frame template. This frame uses a fixed-length 128-byte structure and arranges its contents in a specified paragraph format, including the header field, identity field, protocol field, and integrity check field. After encapsulation, a standard device query frame is formed, complete with a specific header identifier (e.g., 0xAA55) and a timestamp. The gimbal controller, through its integrated wireless communication module, selects the currently operating wireless communication frequency band (preset bands such as the 2.4 GHz or 5 GHz ISM band) and broadcasts the device query frame to all panoramic camera devices in the channel. After the broadcast, a response timeout timer is started to monitor and control the reception of responses from the camera devices. The response timer is set to an appropriate timeout window, such as between 200ms and 500ms, based on the protocol design. This timer is used to control the waiting window and determine whether the response is valid. When the controller receives a device response frame from any panoramic camera device within this time window, it performs frame header verification on the received frame data to ensure that the frame header fields are consistent with the pre-set query frame. It also performs synchronization error detection on the timestamp field in the response frame and data integrity verification on the checksum field, thereby comprehensively confirming the frame's validity. After the frame passes all verification checks, the controller extracts the camera device's core identification information from the response frame, including the camera device identifier, the currently running protocol version, and the camera hardware platform parameters, such as the hardware model and chip architecture. The controller then compares the extracted camera device identifier with a locally stored whitelist database, which records the set of legal camera device identifiers that the controller allows pairing. If the camera identifier matches, the controller enters the protocol version compatibility verification phase. The controller compares the protocol version information provided by the camera with its list of supported protocol versions, checking whether at least one protocol version is bidirectionally compatible. If compatibility is confirmed, the device authentication process is completed, and a device authentication data structure containing the device identification information, protocol adaptation information, and basic platform capabilities is generated.
[0020] S2, 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; Specifically, the command format is selected based on the protocol matching results contained in the device authentication data. Because motion control protocols vary between panoramic lenses of different models and manufacturers, the controller invokes the corresponding encoding template based on the confirmed protocol version. Combined with the system's internal control protocol library, the controller embeds the pan, tilt, and zoom factors used for testing into the corresponding command payload structure, completing the encoding encapsulation process. This creates a standardized motion test sequence with protocol consistency and clear control semantics. This test sequence includes multiple command nodes with controllable amplitudes within a small range, such as ±5-degree pan, ±3-degree pitch, and zoom factors between 1.2x and 1.5x. This small-amplitude, non-destructive testing allows for precise, short-term lens response. After encoding the test commands, the controller sends them sequentially to the panoramic lens according to a pre-set test timing strategy. The interval between each test command in the test sequence is fixed, such as 100ms, to ensure sufficient response and settling time for the lens. Whenever a test command is sent, two corresponding background processes are launched. One is the position feedback monitoring process, which continuously monitors the 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 other is the execution timer, which records the time elapsed between the command being sent and the actual completion of the lens movement. This includes key time domain parameters such as startup delay, execution duration, and stabilization time. As multiple test commands are sent and feedback is received, the controller establishes a mapping relationship between the test commands and feedback data in the background, ensuring that all collected motion feedback information is accurately associated with its corresponding test action, avoiding misalignment between commands and responses. The angle response difference of the feedback data with established mapping relationship is calculated. The actual motion amplitude and the corresponding time stamp difference between each test point are calculated to obtain the angle change per unit time, thereby deducing the maximum rotation speed parameters of the lens in the horizontal and pitch axes. The maximum acceleration parameters are then obtained by differential processing of two consecutive speed changes. The extreme point response data in the test sequence is used to calculate the current lens's motion limit range in the horizontal and pitch directions. At the same time, the boundary feedback of the zoom ratio response is used to extract the effective zoom range of the lens, which ultimately constitutes a lens motion feature data set including the maximum rotation speed, maximum acceleration and angle or zoom range.
[0021] S3, calculating and controlling the delay compensation time according to the lens motion characteristic data; It should be noted that based on the lens motion characteristic data, a paired dataset is constructed between the command input and the actual response for each motion axis (including pan, tilt, and zoom). 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 the previous test sequence. 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 paired relationships is formed for each axis. This set characterizes the mapping pattern between the control command and the actual lens motion. The command-motion paired dataset is input into the least squares fitting algorithm module for linear regression analysis, seeking a linear function model that minimizes the sum of squared errors. This process performs regression operations separately for the pan, tilt, and zoom axes, and extracts the corresponding linear relationship parameters for each axis: the scale factor (slope term) and the offset (intercept term). These parameters reflect the degree of linear coupling between the controller command and the actual lens response, thereby revealing the dynamic response regularity and command sensitivity differences along different axes. A linear mapping function from control command to actual motion is constructed based on the proportional coefficient and offset of each axis. The goodness of fit of the linear mapping function is tested by calculating the coefficient of determination (R 2 Statistical indicators such as the sum of squared residuals (SSRs) or residual sum of squares (RSS) evaluate the model's accuracy and stability in interpreting the input-output relationship. When the goodness-of-fit reaches a preset accuracy threshold, the established function model is confirmed to have practical control significance and formally incorporated into the controller's control command mapping function set. Based on this control command mapping function set, a correlation analysis is performed between the transmission timestamp of each test command and the start timestamp of the lens's response action. Two key time differences before the command takes effect on each axis are extracted: transmission delay, which is the time interval between the command being sent from the controller over the wireless channel and the lens receiving it; and execution delay, which is the reaction time before the lens activates the motor or zoom mechanism after receiving the command. Both types of delay can be accurately reproduced in the frame data and feedback data. These two delays are extracted for each test command and statistically analyzed. Axis delay characteristics are then generated by combining command type and response direction. The transmission delay and execution delay corresponding to each test command are weighted and averaged. The weight coefficient is adjusted based on factors such as the command's importance, execution frequency, or direction switching frequency, to derive the overall compensation time parameter.
[0022] S4, the pan / tilt controller monitors the wireless signal strength index between the pan / tilt controller 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; Specifically, a high-resolution wireless communication monitoring mechanism is integrated within the gimbal controller. Leveraging the underlying channel monitoring functionality of the wireless communication module, this mechanism periodically collects a signal monitoring dataset from the physical layer on the current communication link with the target panoramic lens. This dataset includes time-series samples such as received signal strength, ambient noise baseline values, link stability statistics, packet loss rate, and retransmission counts. The sampling period is set to 50 to 100 milliseconds. The controller parses the collected signal monitoring dataset to extract the current wireless signal strength indicator. This is primarily based on the real-time received power intensity value and, combined with an ambient noise reference (e.g., -95 dBm), calculates the current signal-to-noise strength difference. This signal strength indicator 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. The controller also utilizes control delay compensation time data obtained in a previous stage. This data represents the total time delay between command issuance and lens execution, and is a key variable in determining the efficiency of system control response. The wireless signal strength indicator 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 signal strength is high and response delay is low, the algorithm automatically compresses the current handshake interval to a shorter range, such as less than 30 milliseconds, thereby increasing handshake frequency and pairing speed. When signal strength is weak or there is a significant delay in control response, the algorithm relaxes the current handshake interval, for example, to more than 120 milliseconds, to enhance data transmission stability and reduce the probability of false triggering and timeouts. To verify the suitability of the calculated handshake interval parameters in the current environment, the controller inputs these parameters into the signal environment adaptability test module, which evaluates the success probability during simulated 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 demonstrate stability and a high success rate, the handshake interval is considered valid.
[0023] S5: Execute 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.
[0024] Using the handshake frame transmission interval as a time-driven parameter, a cyclic handshake process is initiated with the target panoramic camera. This handshake process runs continuously within the controller in a timed manner, periodically sending standardized handshake frames to the camera. System-level records of each handshake round, including communication round trips, response times, and status codes, are recorded. This generates complete handshake process monitoring data, including time stamps, communication status, number of retransmissions, 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 the camera to return a response frame. Upon receiving the feedback from the camera, the controller immediately parses and verifies the data to determine if it is a valid response. The response time is also calculated and determined to be within the allowable range. If the response is valid and timely, the handshake round is considered successful and recorded as a successful interaction. If it times out, suffers frame loss, or has an error response, it is recorded as a failed interaction. By statistically calculating a series of handshake rounds, an overall handshake success rate is generated, which is used to measure the stability of the communication link and the responsiveness of the device. During pairing, dynamic motion parameter learning is performed simultaneously. The controller continuously analyzes the motion response and position error in the lens feedback data, calculating the command mapping function fitting error in real time. This generates parameter learning accuracy data reflecting the accuracy of the learning process, which is used to evaluate the device's adaptability and learning convergence trend. The generated handshake success rate data, parameter learning accuracy data, and real-time signal strength fluctuation data acquired throughout the communication process serve as inputs for state transition judgment. The internal state machine logic performs state transition condition judgment for the pairing process. This judgment logic determines the current pairing state based on preset multi-dimensional conditional rules, determining 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 exceeds a certain threshold, the learning accuracy is below a preset error limit, and the signal stability fluctuation is within a controllable range, a state transition matrix is generated. Based on the connectivity and transition probabilities of the state transition paths in the matrix, the convergence of the pairing process is verified. 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, describing the current pairing stage and its feasibility. Based on the pairing process state transition identifier, the compatibility mapping process between the controller protocol version and the lens protocol version is initiated. The intersection analysis and compatibility level assessment of the protocol version sets reported by both parties are performed. Based on the internally maintained version compatibility matrix, the common version with the highest available level is prioritized among multiple version options as the connection protocol. If full compatibility cannot be achieved, functionally limited compatibility or basic level compatibility is enabled according to the downgrade strategy, and command conversion from higher version to lower version is achieved through the command mapping module, thus establishing a protocol compatibility mapping relationship between the controller and lens.After the mapping relationship is confirmed, wireless connection control parameters are finally generated. The parameter set includes protocol version docking results, handshake cycle configuration, instruction mapping parameters and control delay correction data.
[0025] In one example, the PTZ controller sends a device query frame to the panoramic camera and receives device authentication data returned by the panoramic camera, including: The PTZ controller encapsulates the controller 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 a device query frame to the panoramic lens within a preset frequency band via the wireless communication module, and starts a response timeout timer to monitor the device response frame returned by the panoramic lens; After receiving the device response frame, the PTZ controller verifies the validity of the frame header identifier and verification timestamp. After the validity verification passes, it extracts the lens device identifier, protocol version information, and hardware platform parameters. The PTZ controller matches the lens device ID 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.
[0026] In this example, the controller's unique identifier, or device ID, is retrieved from the controller firmware. This unique ID can be reverse-verified with the camera to prevent unauthorized access. The controller also retrieves all protocol version information supported by the controller. This information, represented as an ordered list of all registered or backward-compatible communication protocol structures, is exported through a unified interface as part of the frame structure parameters. The controller also determines the device type based on the controller's hardware classification, functional capabilities, or application characteristics. This identifier is used by the camera to quickly determine whether the device belongs to a compatible control device category. The controller formats and encapsulates the three parameters—the unique identifier, protocol version list, and device type—according to a pre-set device query frame format template. The encapsulation process follows the sequence of field segments in the frame structure, including the header, identity field, protocol field, type field, timestamp field, and checksum field. The header uses a fixed structure to help the camera identify the message start position. The timestamp synchronizes the time sequence to prevent message duplication or forgery. The checksum uses a CRC or other method to ensure data integrity. Once all fields are encapsulated and formatted, a complete device query frame is generated and buffered in the wireless communication module's transmit buffer. After the device query frame is constructed, the controller broadcasts it via the wireless communication module to a preset frequency band, which can be the 2.4GHz or 5GHz general-purpose band, or a specific industrial or short-range transmission band. This broadcast transmission utilizes a non-directional transmission mechanism to ensure that all panoramic cameras in the area that are capable of listening receive the query request. Simultaneously, within the same logical cycle as the device query frame is sent, the controller starts a response timeout timer, set between 200 and 500 milliseconds based on system requirements. During this timer's validity period, the controller's receiving module enters a listening state, continuously monitoring and awaiting device response frames from the panoramic cameras. If a data frame returned by the lens is received within the valid listening time window, the system performs frame header identification verification on the frame to check whether it matches the preset synchronization field, thereby confirming whether it is a valid response message; then it parses the timestamp field and compares it with the local system clock to verify whether the response frame is the corresponding frame sent in the current session to prevent outdated data or abnormal recurrence caused by channel caching; after the frame header and timestamp verification are passed, the system solves the check field and confirms whether the frame structure is damaged or lost during transmission. If all verification items pass, the device response frame is considered valid and enters the data extraction stage.During the extraction phase, the controller reads the lens device identifier (DID) from the response frame. This identifier uniquely identifies the lens, along with the protocol versions supported by the lens. This information is then cross-referenced with the protocol version list sent by the controller. The controller also retrieves the lens's hardware platform parameters, such as the controller model, module sequence, and computing capability flag. This information helps determine the lens's overall performance level and resource constraints. All extracted information is locally organized into a structured data format. To prevent illegal or unauthorized devices from accessing the system communication link, the controller compares the DID against a locally stored device whitelist, which contains the unique identification codes of authorized, registered, or long-term partner devices. A successful match indicates the device's legitimacy. A failed match terminates the pairing process and returns an exception. If authentication succeeds, a protocol version compatibility check is performed. The controller maps the protocol version returned by the lens to its own list of supported versions. Based on a pre-set compatibility strategy, the controller selects the highest-priority common protocol version as the access protocol. If multiple versions are available, all feasible paths are recorded. If there is no compatibility, the pairing process is terminated and an error report is generated. If both the identity comparison and protocol compatibility analysis pass, the controller integrates the extracted information structure to generate device authentication data. This data structure includes the lens's unique identification code, the selected compatible protocol version, the hardware platform characteristics, and the verification status identifier, and is marked as a valid device mapping object for the current control session.
[0027] In one example, a motion test sequence is sent to a panoramic lens based on device authentication data, and lens motion feature data fed back by the panoramic lens is received, including: Select the corresponding instruction format according to the protocol matching result in the device authentication data, and encode and package the horizontal angle test value, pitch angle test value, and zoom ratio test value according to the instruction format to generate a motion test sequence; Send each test instruction in the motion test sequence to the panoramic lens in sequence according to the preset instruction sending sequence, and start the position feedback monitoring process and execution time timer after each test instruction is sent; Receive feedback data returned by the panoramic camera through the position feedback monitoring process, and establish an association mapping between the received feedback data and the corresponding test instructions; The angle response data in the correlation map are subjected to difference calculation and time series analysis to extract lens motion feature data including maximum rotation speed parameters, maximum acceleration parameters and rotation range parameters.
[0028] 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 has defined the field structure, parameter bit width, byte alignment of the control instructions, and the encoding rules of each control component. On this basis, the controller sets standard test values in the horizontal direction, pitch direction, and zoom ratio direction according to the motion test requirements, and selects multiple groups of target parameters with horizontal angle test values within the range of ±5 degrees, pitch angle test values within the range of ±3 degrees, and zoom ratio test values within the range of 1.2 times to 1.5 times. They are encapsulated into a control instruction byte stream according to the selected instruction format to form a motion test sequence with complete semantic definition. Based on the system's pre-defined test scheduling strategy and transmission timing configuration, the controller sequentially sends test commands to the target lens. After each command is sent, two key processes are immediately initiated: a position feedback monitoring process, which monitors the motion feedback information returned by the lens in real time. This feedback information includes the actual angle change, zoom factor, current position code, and execution status code; and an execution timer, which records the elapsed time from the moment the test command is sent until the lens completes the motion feedback. After processing each test command, the controller automatically clears the timer and enters the next command scheduling process, ensuring that each set of motion actions is completed within an independent control window without interfering with each other. As the motion test sequence executes, the system continuously receives corresponding feedback data from the monitoring process. After verifying the frame header and 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 logical binding between the command and the feedback is achieved through the frame number, timestamp, and command identifier. The bound data pair is then stored in a cache list or structured dataset, forming a one-to-one mapping between the original command parameters and the feedback execution results. After completing data mapping, the system performs difference calculations and time series analysis on each pair of test command and feedback data. For angular responses, difference calculations are used to extract the angular change per unit time, thereby deriving the actual rotational speed. By performing time difference analysis on the speed change results under continuous commands, angular acceleration information is obtained, and from this information, the maximum rotation speed and maximum acceleration parameters of the lens in the current operating state are extracted. By statistically classifying the angular change amplitudes in all test responses, the maximum motion boundaries of the lens on the horizontal and pitch axes are identified, thereby determining the rotation range boundaries of the horizontal and pitch directions. Simultaneously, the zoom factor variation range is extracted from the feedback information of the zoom test sequence. By analyzing the limit values of the factor increment, the effective zoom range supported by the lens's current physical structure is calculated, thereby forming a complete motion characteristic parameter set that includes the maximum horizontal rotation speed, maximum pitch acceleration, and effective zoom factor.
[0029] In one example, calculating the control delay compensation time based on the lens motion feature data includes: Generate a data set of instruction-motion amount pairs for each axis based on the lens motion feature data; The command-motion amount paired data set 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 coefficient and offset of each axis, a linear mapping function from the control command to the actual motion quantity is constructed, and the accuracy parameters of the linear mapping function are verified through a goodness of fit test to generate a set of control command mapping functions; Based on the control instruction mapping function set, the instruction sending timestamp and motion start timestamp in the test process are correlated and analyzed, the transmission delay and execution delay of each axial instruction are calculated, and the weighted average of the transmission delay and execution delay is taken to obtain the control delay compensation time.
[0030] In this example, based on the motion feature data feedback from the lens's completed tests, a set of standardized input-output correspondences are established for the three axes of horizontal, pitch, and zoom. In each round of motion testing, the controller records the currently issued control command value (i.e., the desired rotation angle or zoom ratio) and the actual motion amount fed back from the lens end (including the angle response value and the zoom ratio 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. Based on the test command sequence for each axis, three-dimensional command-response pairing data sets are compiled. Each data set covers multiple sample points, and the number of samples at least meets the minimum data amount threshold required for fitting. The samples are evenly distributed and cover the controllable range of each axis. The command-motion pairing dataset for each axis is input into the fitting module. The least squares method is used as the basic algorithm for the linear fitting strategy. 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 the regression process, the system solves for the proportional coefficient and offset that best fit the sample distribution characteristics. The proportional coefficient measures the degree to which changes in the input command affect changes in the actual motion, while the offset reflects the structural response offset or static system error of the system under zero command input. Three sets of proportional coefficients and offsets are obtained by performing independent linear fits for the horizontal, pitch, and zoom directions. Based on the proportional coefficients and offsets, a linear mapping function from the control command to the 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 possesses sufficient accuracy and generalization capability, a goodness-of-fit validation operation is performed after function construction. The validity of the fitted function is evaluated through methods such as residual distribution analysis, mean squared error calculation, or regression fit correlation coefficient. If the goodness-of-fit of the function meets the system's minimum accuracy threshold, it is deemed valid and included in the control command mapping function set. Otherwise, regression recalculation or resample collection is triggered to improve model quality. Based on this linear mapping function set, the system retraces time information logs from previous tests. For each test interaction, the timestamp of the control command issuance and the actual response start timestamp of the lens movement are extracted. After matching these two time points, the total time delay from the controller issuing the command to the lens recognizing and initiating movement is calculated. This time delay is broken down into transmission delay and execution delay. The former includes the physical time and parsing time it takes for the command to be transmitted from the controller to the lens via the wireless channel, while the latter includes the response preparation time for the lens to activate the motor or zoom mechanism after receiving the command. Based on the control command mapping function, the system restores the actual feedback amount to the corresponding target command amount, thereby calculating the actual time difference between the command issuance and response between the controller and the lens, and performing statistical analysis on the transmission delay and execution delay in each axis to obtain the typical delay characteristics of that axis.The above delay parameters are weighted averaged, and different weights are set according to factors such as the importance of each axis in the control task, response frequency or accuracy requirements. The delay parameters of all channels are integrated into a unified control delay compensation time through the weighted average strategy.
[0031] In one example, the command-motion amount paired data set is input into a least squares fitting algorithm for linear regression calculation to obtain the proportional coefficient and offset of each axis, including: Separating the command-motion amount paired data to generate a horizontal axis data sequence, a pitch axis data sequence, and a zoom axis data sequence; Based on the horizontal axis data sequence, the pitch axis data sequence and the zoom axis data sequence, a coefficient matrix and a target vector of linear regression are constructed respectively; Input the coefficient matrix and target vector into the matrix transposition and matrix multiplication operation modules in the least squares fitting algorithm to perform least squares calculations to obtain the linear regression parameter vectors of each axis; The horizontal axis scale coefficient and offset, the pitch axis scale coefficient and offset, and the zoom axis scale coefficient and offset are extracted from the linear regression parameter vector respectively to generate scale coefficient and offset data for each axis.
[0032] In this example, the system uses paired data between control commands and actual responses as the basis. Each record in this paired data set contains the raw control command value issued by the controller and the actual motion response value returned by the lens. Each record is also labeled with the control axis to which the command belongs. Therefore, the system separates all data through label filtering and structural classification, splitting the raw paired data into three independent subsets based on the control axis: pan, tilt, and zoom axis data sequences. Each subset consists of two-dimensional paired samples consisting 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 each axis, thus meeting the sample requirements for regression fitting. The system performs structured matrix construction on the paired samples for the pan, tilt, and zoom axes, respectively. Each data sequence is decomposed into a coefficient matrix for linear regression and a target vector. The coefficient matrix consists of the input control command value, with a constant term of 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 value and is extracted separately as the fitting target. On each axis, the system constructs an input matrix with control commands as variables and pairs them with the corresponding actual motion response vectors, forming 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 uses matrix transposition and matrix multiplication as basic operations to perform calculations. The intermediate result matrix is obtained by transposing the coefficient matrix and multiplying it with its own matrix. This intermediate result matrix and the correlation matrix of the target vector are then used together in the inverse or pseudo-inverse operation steps to calculate the parameter vector required for the linear regression model. This parameter vector includes two key parameters for mapping the linear relationship between the control command and the actual motion response on each axis, namely the proportional coefficient and the offset. The proportional coefficient is used to characterize the response gradient of the input change on the output, while the offset is used to correct the system static error or mechanical zero offset, thereby 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 main coefficients and constant terms. It then summarizes and organizes the scale coefficients and offsets for the horizontal, pitch, and zoom axes, generating scale coefficient and offset data for each axis. Ultimately, this creates a control mapping dataset consisting of three independent sets of linear regression model parameters. After generating this parameter data, the system performs a numerical rationality check and model fitting accuracy verification. If the parameter value is 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.
[0033] In one example, the PTZ controller monitors the wireless signal strength indicator between the PTZ controller and the panoramic lens in real time, and inputs the wireless signal strength indicator 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 sets between it and the panoramic lens through the wireless communication module; Calculate wireless signal strength indicators based on signal monitoring data sets; 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; The signal environment adaptability test is performed based on the handshake interval time parameter to obtain the handshake frame transmission time interval.
[0034] In this example, a continuously running wireless communication channel monitoring module is deployed in the gimbal controller. This module is attached to the physical layer transceiver structure of the underlying wireless chip of the controller and continuously performs signal capture, data sampling, and link quality detection functions in a non-interrupted manner during normal system operation. Under this mechanism, the controller actively detects the status of the wireless link between the controller and the panoramic lens at a fixed period. The detection period is set between 50 milliseconds and 100 milliseconds to ensure that the system obtains sufficiently dense link status samples without causing communication congestion. Each detection process includes reading the received signal strength, collecting the communication response time, monitoring the frame error rate, and calibrating the environmental background noise, thereby forming a signal monitoring data set with a clear time sequence structure. This data set records the physical status of the communication link with the lens at the current moment. The collected signal monitoring data set is segmented and parsed, focusing on extracting information such as received strength data representing signal power, baseline noise values for environmental interference backgrounds, and information such as the number of retransmissions and frame error rates during communication. Through statistical analysis and filtering calculation methods, the system extracts a stable signal strength index from multiple time segments. This index represents the quality of the link between the current lens and the controller, expressed in decibel milliwatts. The closer the value is to zero, the stronger the signal strength, while the closer it is to the negative maximum, the weaker the signal. Short-term fluctuations in the signal strength index are used to identify unstable factors such as moving obstacles, electromagnetic interference, or channel congestion in the link environment. After obtaining the current valid signal strength index, the system calls the control delay compensation time parameter calculated in the previous stage based on lens motion testing. This time parameter represents the typical delay between the issuance of a command from the controller and the start of lens execution, reflecting the performance level of the current control link in terms of real-time performance. The system feeds both the signal strength indicator and the control delay compensation time as input variables into the dynamic interval adjustment algorithm module, which implements multi-factor-aware interval calculation logic. Its core strategy is to shorten the handshake period to speed up the pairing process when the signal is strong and the delay is short, and to extend the handshake period to enhance data stability and fault tolerance when the signal is weak and the delay is large. In actual implementation, the algorithm dynamically adjusts the range of handshake interval values by establishing a nonlinear mapping relationship between the input indicator and the interval output, generating a handshake interval parameter that is adaptive to the current environment. To prevent the dynamic adjustment algorithm from causing drastic changes in the handshake frequency due to short-term fluctuations, a signal environment adaptability verification mechanism is introduced. This mechanism verifies the availability of the generated handshake interval parameter based on signal strength trends, 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 judgment conditions to determine whether the interval value has the characteristics of high communication success rate, small delay jitter and low false trigger risk in the current environment; if the verification result shows that the parameter has sufficient environmental adaptability, the system will confirm it as the final handshake frame transmission time interval and write it into the pairing task scheduler; otherwise, the system will re-collect data and trigger the adjustment algorithm to calculate again until a stable interval value that meets the judgment conditions is obtained.
[0035] In one example, the wireless signal strength indicator and the control delay compensation time are input into a dynamic interval adjustment algorithm to generate a handshake interval time parameter, including: Extract interval calculation basic parameters from wireless signal strength indicators; The signal strength ratio in the interval calculation basic parameter is reverse normalized to obtain a signal attenuation factor, and the signal attenuation factor is input into the power function operation module in the dynamic interval adjustment algorithm for exponential adjustment to generate a signal strength adjustment coefficient; The signal strength adjustment coefficient is multiplied by the basic handshake interval time constant to obtain an initial handshake interval value, and the control delay compensation time is added as a correction amount to the initial handshake interval value to generate a handshake interval time parameter.
[0036] In this example, the current wireless signal strength index is extracted from the data structure of completed channel sampling. This index is a dynamic statistical value obtained by continuously monitoring the camera signal transmission through the wireless communication module in the previous stage. Its original form is the power level of the received signal, expressed in decibel milliwatts on a negative logarithmic scale, such as -45dBm or -70dBm. Values closer to zero indicate stronger signals; conversely, lower values indicate greater signal attenuation and poorer communication quality. This index is then converted into a basic parameter for interval calculations that can be used for standardized calculations. A set of normalization rules is used to convert it into a signal strength ratio with a unified dimension. This ratio is calculated based on the relative relationship between a predefined maximum signal strength limit and the current actual signal strength. The maximum signal strength limit is determined by the receiving capability limit of the device's wireless module. For example, if the system specifies -30dBm as the strongest available signal, the ratio of the current sampled value to this limit can be considered the signal strength level. After normalization, the ratio is inverted, converting its meaning by subtracting the ratio from 1. This transforms strong signals into smaller values and weak signals into larger values, allowing the parameter to more intuitively reflect declining signal quality. The result of this inverse normalization is defined as the signal attenuation factor, which represents the current level of communication link degradation. The signal attenuation factor is then fed into the exponential function module within the dynamic interval adjustment algorithm. Within this module, the system configures a preset exponential adjustment coefficient based on the device's communication strategy. Using the attenuation factor as the base and a system-defined exponential sensitivity parameter as the exponent, an exponential transformation is performed to enhance the nonlinear response of signal degradation to the handshake interval adjustment result. This process establishes a rapid linkage between signal degradation and handshake time extension, significantly lengthening the handshake interval in weak signal conditions while keeping it as short as possible in strong signal conditions to improve pairing efficiency and reduce channel interference. The output of the power function is defined as the signal strength adjustment factor (SSI). This factor dynamically weights the system's handshake frequency based on the current link quality, representing the device's ability to adaptively adjust pairing behavior based on external communication conditions. This SSI is multiplied by the base handshake interval constant to generate the initial handshake interval value. The base handshake interval constant is a standard time unit set during system initialization, for example, 50 milliseconds, representing the default frequency for periodic handshake scheduling under ideal signal conditions. The result of multiplying this base constant by the SSI represents the ideal handshake cycle length, determined by the link state, under current signal quality conditions. A larger SSI indicates a lower handshake frequency to improve communication stability; a smaller SSI indicates good communication quality, allowing the system to initiate handshake requests more frequently to enhance pairing speed and responsiveness. The control delay compensation time is added to the initial handshake interval value as a correction.This 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 activation time. Its value reflects the system's cumulative time domain delay during the communication process. If this value is large, even with good signal quality, the system needs to appropriately extend the handshake cycle to avoid command accumulation and response misalignment. If this value is small, a high frequency of handshakes is maintained 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 value to ultimately generate the handshake interval parameter.
[0037] In one example, a pairing handshake process is performed based on a 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, including: Initiate a cyclic handshake process with the panoramic camera based on the handshake frame transmission time interval and generate handshake process monitoring data; Based on the handshake process monitoring data, the handshake frame sending and response receiving operations are performed in sequence 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, parameter learning accuracy data and signal stability data, the state transition condition judgment is performed to generate the state transition matrix data. The pairing convergence is verified based on the state transition matrix data to generate the pairing process state transition identifier; A compatibility mapping relationship between the controller protocol version and the lens protocol version is established according to the pairing process state transition identifier, and wireless connection control parameters are generated.
[0038] In this example, based on the handshake frame transmission time interval parameter, a timer-driven handshake task loop mechanism is started. The controller scheduler uses the set handshake interval as the timer trigger period to periodically broadcast handshake request frames to the panoramic lens and monitor in real time whether a valid lens response frame is received within the corresponding waiting window. During the entire process, the start time, sending content, response time, response validity, number of exceptions, and status code information of each round of handshake operation will be recorded by the system and summarized in the handshake process monitoring data structure. The data structure is arranged in chronological order and gradually accumulated to form a complete pairing process log. While the cyclic handshake task continues to run, the system performs interactive statistical processing based on the transmission and reception of each handshake frame. Following the scheduling period defined by the handshake frame transmission interval, it analyzes the communication success and failure of each frame, identifying abnormal behaviors such as response timeouts, frame corruption, or protocol conflicts. It then labels and categorizes handshake rounds based on the communication results. This process extracts information such as the number of handshake successes and failures, as well as the length of consecutive failure segments, from the handshake process monitoring data. The system then calculates the handshake success rate for the current pairing process through ratio calculation. This success rate reflects the communication stability of the wireless link, the responsiveness of the lens, and the overall interactive reliability of the system. Furthermore, 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 accumulated real-time fitting error from least-squares regression, the system generates learning accuracy data for the current parameter learning phase. This data is used to measure the controller's convergence speed and model fitting accuracy for the lens' dynamic characteristics. Lower accuracy data indicates a more stable and reliable control model. Signal stability data recorded during the current communication cycle is retrieved. This data reflects channel state characteristics such as the current RSSI fluctuation amplitude, short-term average SNR trend, and the number of noise mutations. State transition conditions are determined based on handshake success rate data, parameter learning accuracy data, and signal stability data. This module internally constructs a state set model, including the initial state, discovery state, parameter acquisition state, mapping establishment state, and connection completion state. Each state transition is triggered by specific threshold conditions. For example, the transition from the discovery state to the parameter acquisition state requires a handshake success rate of at least 0.8, the transition from the parameter acquisition state to the mapping establishment state requires a parameter learning accuracy of less than 0.05, and the transition from the mapping establishment state to the connection completion state requires a signal stability index better than 0.1. The results of each state transition condition determination are quantized into state transition matrix data. This matrix is indexed by state number and contains transition probabilities as elements. It represents the accessibility and stability of the current pairing process at each stage.After the state transition matrix is constructed, pairing convergence verification is performed based on this matrix structure. This involves evaluating the connectivity of the state paths, the loop structure, and the stable absorption probability of the final state to determine whether the current pairing process is stable and evolving toward a completed state. If the verification results indicate that the system is in an oscillation zone or that convergence is interrupted on some paths, the system aborts the current pairing task and returns an error signal. If the verification passes, the system generates a pairing process state transition identifier, which records the current state of the pairing process, the reachable 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 state trajectory analysis results recorded in the identifier determine the protocol version connection logic between the controller and lens. An intersection operation is performed on the version support list extracted during the authentication phase. The protocol version with the highest level of support on both sides is selected according to the compatibility matrix rules. A protocol mapping function is then used to map high-level controller commands to low-level command formats recognizable by the lens, thereby establishing 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.
[0039] In this embodiment, the gimbal controller performs pairing convergence verification based on the state transfer matrix data and generates a pairing process state transfer identifier, including: the gimbal controller extracts the parameter learning error values of each pairing stage based on the state transfer matrix data, including the horizontal axis mapping error, the pitch axis mapping error and the zoom axis mapping error, and calculates the ratio of the current handshake round number to the initial handshake round number, obtains the theoretical learning accuracy value through the negative exponential power function operation, and generates parameter learning convergence evaluation data containing actual error and theoretical accuracy; the gimbal controller constructs a Lyapunov candidate function based on the parameter learning convergence evaluation data, and converts each axis into a The sum of squares of the mapping errors is used as the function input variable, and the convergence judgment threshold and stability coefficient are set. The stability of the current pairing state is judged by comparing the function value with the preset convergence threshold, and Lyapunov stability analysis data containing the function value and stability judgment result is generated; the gimbal controller calculates the time derivative of the function in the current state based on the Lyapunov stability analysis data, and determines the convergence trend of the pairing process by derivative sign judgment and numerical value analysis. When the derivative is negative and the absolute value is greater than the preset convergence rate threshold, it is confirmed that the system is converging positively, and the continuous convergence round count and convergence rate change trend are recorded to generate. The pairing process convergence trend monitoring data; The PTZ controller establishes a multi-dimensional convergence verification mechanism based on the pairing process convergence trend monitoring data, and monitors the gradient of the handshake success rate, the rate of change of parameter learning accuracy and the amplitude of signal stability fluctuation at the same time. The overall convergence confidence of the pairing process is calculated through a weighted comprehensive evaluation algorithm. When the confidence exceeds the preset reliability threshold, the pairing convergence is confirmed to be completed, and a pairing convergence verification result including the convergence state and confidence is generated; The PTZ controller performs abnormal state detection and processing based on the pairing convergence verification result. When oscillation, divergence or stagnation is detected in the pairing process, the state correction mechanism is activated. The state intervention is performed by adjusting the handshake interval parameters, resetting the learning accuracy counter or switching the protocol version, and the exception type, handling measures and correction effect are recorded to generate state correction execution data containing exception handling records; the gimbal controller encodes the final state identification based on the state correction execution data and the pairing convergence verification result, and encapsulates the current pairing stage identification, convergence status code, confidence value and exception handling mark in binary according to the preset encoding rules, and adds timestamps and verification information to ensure the integrity and traceability of the identification, and generates a pairing process state transfer identification containing complete pairing state information and convergence guarantee.
[0040] In one example, a compatibility mapping relationship between the controller protocol version and the lens protocol version is established according to the pairing process state transition identifier, and wireless connection control parameters are generated, including: Extracting a protocol version data set including a controller protocol version and a lens protocol version from a pairing process state transition identifier; Based on the protocol version data set, a protocol version compatibility mapping matrix is constructed with the controller protocol version as the row index and the lens protocol version as the column index; Perform version selection and downgrade processing based on the protocol version compatibility mapping matrix to generate protocol adaptation configuration data; Generate wireless connection control parameters including connection protocol, transmission strategy and power consumption control based on protocol adaptation configuration data.
[0041] In this example, a structured parsing of the core fields contained in the state transition identifier is performed. During the parsing process, the controller and lens protocol version information recorded in the pairing task is extracted. This version data comes from the protocol information description segment uploaded during the initial device authentication phase and represents a subset of all protocol versions supported by the controller and lens, respectively. The system formats the version number, functional level, protocol capability, and version number sequence as key-value pairs or structures, forming a set of protocol version data that clearly identifies the protocol support ranges of the controller and lens. Each element in this set contains the device identifier, protocol version number, and protocol level description. The protocol version data set is input into the protocol version mapping matrix generation module. Following a two-dimensional mapping rule with the controller protocol version as the row index and the lens protocol version as the column index, a protocol version compatibility mapping matrix is constructed. Each element in this matrix represents the interoperability between a specific controller version and a specific lens version. This interoperability is categorized into four levels based on system design: full compatibility, limited functional compatibility, basic compatibility, and incompatibility. These levels are encoded with numerical identifiers (0, 1, 2, 3), representing the mapping strength and degree of functional retention. During the matrix generation process, the system traverses the set of protocol versions supported by the controller, expanding each version as a row item on the horizontal axis of the matrix. It then traverses the set of protocol versions supported by the lens, arranging them in columns to form an m×n matrix space. Internal compatibility calculation logic then performs a capability matching test on each version pair. This test determines the degree of capability matching for each protocol version in dimensions such as control capability, motion instruction set, status response format, encryption support, and data packet structure, and then fills in the corresponding matrix positions. Once the matrix is populated, a compatibility mapping matrix is formed that reflects the current protocol capability adaptation status between devices. The system enters the protocol version selection and downgrade processing stage. During this stage, the compatibility mapping matrix is analyzed, and the element with the highest numerical level in the matrix is preferentially searched, namely the fully compatible item. This item indicates that the controller and lens can achieve full functional docking 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 the protocol number sequence or function set extension. If the fully compatible item does not exist, the function-limited compatible item is searched. If the function-limited compatible item exists, the system needs to activate the protocol conversion module at the same time to downgrade some high-level commands issued by the controller and convert them into basic-level commands that can be recognized by the lens to ensure basic control capabilities. If only basic compatible items exist, it means that the two protocols have minimum connection capabilities. 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 round of pairing and returns a failure status.After version selection is complete, the system packages the corresponding controller version number, lens version number, compatibility level, downgrade flag, and command conversion rules into protocol adaptation configuration data, which 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 phase. During this phase, the system confirms the connection protocol version number that should be used for the current control task as the logical main protocol for the entire communication process. Then, based on the protocol adaptation level, the system selects a matching transmission strategy. If full compatibility is achieved, a high-throughput, low-latency strategy is enabled, using short intervals, high power, and low-redundancy encoding for command transmission. If functionally limited compatibility is achieved, a medium transmission strategy is adopted, enabling a retransmission confirmation mechanism and an intermediate cache scheduling mechanism to ensure reliability. If basic compatibility is achieved, an energy-saving transmission strategy is activated, using a low rate, redundant error correction code, and a confirmation fallback mechanism to ensure that the command can still complete the task under the lowest control channel. The system sets power consumption control parameters based on protocol levels and device capabilities. For example, it enables peak power control mode at high compatibility levels and low power maintenance mode at low compatibility levels. The system also dynamically adjusts signal transmission power, transmission intervals, and module sleep rhythms during each control cycle to achieve an optimal balance between functionality preservation and energy consumption control. The resulting wireless connection control parameters include the connection protocol number, compatibility level identifier, protocol mapping function pointer, transmission strategy configuration parameters, power consumption control settings, and a dynamic protocol switching flag.
[0042] In this embodiment, the pan-tilt controller generates wireless connection control parameters including connection protocol, transmission strategy and power consumption control based on protocol adaptation configuration data, including: the pan-tilt controller prioritizes and processes control instructions to be transmitted based on protocol adaptation configuration data, marks emergency stop instructions, anti-collision instructions and real-time tracking instructions as emergency levels through instruction type recognition algorithms, marks parameter configuration instructions, status query instructions and conventional motion instructions as conventional levels, and allocates different transmission resource weight coefficients to instructions of each level, generating instruction classification management data including instruction priority identification and resource allocation weight; the pan-tilt controller establishes differentiated power adjustment strategies based on instruction classification management data, and divides basic The transmission power is multiplied by the emergency coefficient and the regular coefficient to calculate the high-power transmission parameters of the emergency-level instructions and the standard power transmission parameters of the regular-level instructions. At the same time, the power gain factor is dynamically adjusted according to the current signal strength index, and the power upper and lower limit boundary protection mechanisms are set to generate power control configuration data containing hierarchical power parameters and dynamic adjustment coefficients; the pan-tilt controller performs intelligent retransmission interval calculation based on the power control configuration data, and determines the retransmission time interval of each level of instructions through the inverse proportional operation of the instruction priority weight and the basic retransmission interval. The emergency-level instructions adopt a short-interval high-frequency retransmission strategy, and the regular-level instructions adopt a long-interval energy-saving retransmission strategy, and based on the historical retransmission success rate The data dynamically optimizes the interval parameters and generates retransmission timing control data including hierarchical retransmission interval and success rate feedback; the PTZ controller establishes a retransmission count and timeout management mechanism based on the retransmission timing control data, sets the maximum retransmission count and emergency timeout threshold for emergency level instructions, sets the standard retransmission count and regular timeout threshold for regular level instructions, and gradually extends the retransmission interval when continuous retransmission fails through the exponential backoff algorithm, while recording the retransmission counting information and failure cause analysis, and generates transmission reliability management data including retransmission control parameters and statistical analysis; the PTZ controller performs dynamic transmission strategy optimization based on the transmission reliability management data, and through the multi-objective optimization of retransmission success rate, power consumption and delay performance The standard optimization algorithm adjusts the transmission parameters. When the channel quality deterioration is detected, the transmission rate is automatically reduced and the error correction coding strength is increased. When the battery power is detected to be low, the energy-saving transmission mode is activated to reduce power consumption, and adaptive transmission optimization data including transmission rate, coding parameters and energy-saving strategy is generated. The pan-tilt controller integrates the connection protocol version information, hierarchical retransmission strategy parameters, power control configuration and transmission optimization parameters based on the adaptive transmission optimization data, ensures the integrity and consistency of the control parameters through data structured encapsulation and parameter validity verification, and adds parameter change timestamps and digital signatures for security protection, generating wireless connection control parameters including complete transmission control strategy and security mechanism.
[0043] This embodiment provides a panoramic lens, including: The verification module is used for the PTZ controller to send a device query frame to the panoramic camera and receive the device authentication data returned by the panoramic camera; A testing module, configured to send a motion test sequence to the panoramic lens based on the device authentication data, and receive lens motion feature data fed back by the panoramic lens; A calculation module, used for calculating and controlling the delay compensation time according to the lens motion characteristic data; An adjustment module is used for the pan / tilt controller to monitor the wireless signal strength index between the pan / tilt 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.
[0044] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to the above method embodiment, which will not be repeated here.
[0045] This invention uses a standardized device query and response frame mechanism to automatically identify the pan / tilt controller and panoramic lens. This eliminates the need for users to manually select devices or enter pairing codes, significantly simplifying the pairing process. Furthermore, through device whitelist matching and protocol version compatibility checks, pairing security and reliability are enhanced. A small-amplitude test command sequence is used 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 the manufacturer's static parameter tables, adapts to the performance impacts of factors such as device aging and load variations, and ensures 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 device brands. Delay compensation parameters are calculated based on timestamp analysis, effectively addressing time synchronization issues in wireless control systems and improving real-time control accuracy. The handshake frame transmission interval is dynamically adjusted based on 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. This achieves an optimal balance between pairing speed and transmission reliability, adapting to the transmission requirements of diverse signal environments. A complete pairing state transition model is established and Lyapunov stability analysis is employed to ensure reliable convergence of the pairing process, avoiding the oscillation and divergence issues that can occur in traditional systems. This provides quantitative assessment of pairing progress and fault diagnosis capabilities, enhancing system robustness. A compatibility mapping matrix and version downgrade strategy address compatibility issues between legacy controllers and newer lenses, enabling seamless connectivity between devices from different manufacturers. A differentiated retransmission mechanism optimizes overall power consumption while ensuring real-time performance of key commands, achieving a balance between control accuracy and energy efficiency.
[0046] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.
[0047] 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 structure or equivalent process transformation made by using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in 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; Sending a motion test sequence to the panoramic lens based on the device identity authentication data, and receiving lens motion feature data fed back by the panoramic lens; Calculating and controlling delay compensation time according to the lens motion characteristic data; The pan / tilt controller monitors the wireless signal strength index between the pan / tilt controller 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; A 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, wherein: 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 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 a preset frequency band via the wireless communication module, and starts a response timeout timer to monitor the device response frame returned by the panoramic lens; After receiving the device response frame, the PTZ controller verifies the validity of the frame header identifier and the verification timestamp, and extracts the lens device identifier, protocol version information, and hardware platform parameters after the validity verification passes; The PTZ controller matches and compares the lens device identifier with a local device whitelist, and performs a compatibility check on the protocol version information with a list of protocol versions supported by the controller to generate device identity authentication data.
3. The method for pairing panoramic lenses according to claim 1, wherein: The sending of a motion test sequence to the panoramic lens based on the device identity authentication data and receiving lens motion feature data fed back by the panoramic lens includes: Selecting a corresponding instruction format according to the protocol matching result in the device identity authentication data, and encoding and encapsulating the horizontal angle test value, the pitch angle test value, and the zoom factor test value according to the instruction format to generate a motion test sequence; Sending each test instruction in the motion test sequence to the panoramic camera in sequence according to a preset instruction sending sequence, and starting a position feedback monitoring process and an execution time timer after each test instruction is sent; Receive feedback data returned by the panoramic lens through the position feedback monitoring process, and establish an association mapping between the received feedback data and the corresponding test instructions; Difference calculation and time series analysis are performed on the angle response data in the association map to extract lens motion feature data including maximum rotation speed parameters, maximum acceleration parameters, and rotation range parameters.
4. The method for pairing panoramic lenses according to claim 1, wherein: The calculating and controlling the delay compensation time according to the lens motion characteristic data includes: Generate a command-motion amount pairing data set for each axis based on the lens motion feature data; Input the command-motion amount paired data set into the least squares fitting algorithm to perform linear regression calculation to obtain the proportional coefficient and offset of each axis; Constructing a linear mapping function from a control instruction to an actual motion amount based on the proportional coefficient and the offset of each axis, verifying the accuracy parameter of the linear mapping function through a goodness of fit test, and generating a control instruction mapping function set; Based on the control instruction mapping function set, the instruction sending timestamp and the movement start timestamp in the test process are correlated and analyzed, the transmission delay and execution delay of each axial instruction are calculated, and a weighted average is taken based on the transmission delay and the execution delay to obtain the control delay compensation time.
5. The method for pairing panoramic lenses according to claim 4, wherein: The instruction-motion amount paired data set is input into the least squares fitting algorithm for linear regression calculation to obtain the proportional coefficient and offset of each axis, including: performing data separation on the instruction-motion amount paired data to generate a horizontal axis data sequence, a pitch axis data sequence, and a zoom axis data sequence; Constructing a linear regression coefficient matrix and a target vector based on the horizontal axis data sequence, the pitch axis data sequence and the zoom axis data sequence respectively; Inputting the coefficient matrix and the target vector into the matrix transposition and matrix multiplication operation modules in the least squares fitting algorithm to perform least squares calculations to obtain the linear regression parameter vectors of each axis; The horizontal axis scale coefficient and offset, the pitch axis scale coefficient and offset, and the zoom axis scale coefficient and offset are extracted from the linear regression parameter vector respectively to generate scale coefficient and offset data for each axis.
6. The method for pairing panoramic lenses according to claim 1, wherein: The pan / tilt controller monitors the wireless signal strength index between the pan / tilt controller 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, including: The PTZ controller periodically collects signal monitoring data sets between it and the panoramic lens through the wireless communication module; Calculating a wireless signal strength index based on the signal monitoring data set; Inputting the wireless signal strength indicator and the control delay compensation time into a dynamic interval adjustment algorithm to generate a handshake interval time parameter; A signal environment adaptability test is performed based on the handshake interval time parameter to obtain a handshake frame transmission time interval.
7. The method for pairing panoramic lenses according to claim 6, wherein: The step of inputting the wireless signal strength indicator and the control delay compensation time into a dynamic interval adjustment algorithm to generate a handshake interval time parameter includes: Extracting interval calculation basic parameters from the wireless signal strength indicator; Reverse normalizing the signal strength ratio in the interval calculation basic parameter to obtain a signal attenuation factor, and inputting the signal attenuation factor into a power function operation module in the dynamic interval adjustment algorithm for exponential adjustment to generate a signal strength adjustment coefficient; An initial handshake interval value is obtained by multiplying the signal strength adjustment coefficient with a basic handshake interval time constant, and the control delay compensation time is added to the initial handshake interval value as a correction amount to generate a handshake interval time parameter.
8. The method for pairing panoramic lenses according to claim 1, wherein: 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, including: Initiate a cyclic handshake process with the panoramic camera based on the handshake frame transmission time interval, and generate handshake process monitoring data; Based on the handshake process monitoring data, the handshake frame sending and response receiving operations are performed in sequence according to the handshake frame transmission time interval to generate handshake success rate data and parameter learning accuracy data; Performing state transition condition judgment based on the handshake success rate data, the parameter learning accuracy data, and the signal stability data to generate state transition matrix data, performing pairing convergence verification based on the state transition matrix data, and generating a pairing process state transition identifier; A compatibility mapping relationship between the controller protocol version and the lens protocol version is established according to the pairing process state transition identifier, and wireless connection control parameters are generated.
9. The method for pairing panoramic lenses according to claim 8, wherein: The step of establishing a compatibility mapping relationship between the controller protocol version and the lens protocol version according to the pairing process state transition identifier and generating wireless connection control parameters includes: Extracting a protocol version data set including a controller protocol version and a lens protocol version from the pairing process state transition identifier; Constructing a protocol version compatibility mapping matrix based on the protocol version data set with the controller protocol version as the row index and the lens protocol version as the column index; Perform version selection and downgrade processing based on the protocol version compatibility mapping matrix to generate protocol adaptation configuration data; Wireless connection control parameters including connection protocol, transmission strategy and power consumption control are generated based on the protocol adaptation configuration data.
10. A panoramic lens, characterized in that: Steps for implementing the pairing method of the panoramic lens according to any one of claims 1 to 9, the panoramic lens comprising: The verification module is used for the PTZ controller to send a device query frame to the panoramic camera and receive device identity verification data returned by the panoramic camera; A testing module, configured to send a motion test sequence to the panoramic lens based on the device identity verification data, and receive lens motion feature data fed back by the panoramic lens; a calculation module, configured to calculate a control delay compensation time according to the lens motion characteristic data; An adjustment module is configured to monitor the wireless signal strength index between the pan / tilt controller and the panoramic lens in real time, and input 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; A 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
Delay detection method, device and system, mobile platform and storage medium
CN114556879A
Pan-tilt motor control method
CN116610156A
Method for measuring response time delay of pan-tilt camera of video monitoring system
CN118646857A
Cited By
Holder control method and device and electronic equipment
CN121050471A