Attitude processing method, first master control, second master control, medium and program product

Through the synergy between the first master and the second master, the division of labor and decoupling of the attitude processing task is achieved, and the problem of tight resources of a single master chip is solved, which improves the real-timeness of attitude processing and the scalability of the system.

CN120378745APending Publication Date: 2025-07-25SHENZHEN EMEET TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510417859.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the existing attitude processing methods, data acquisition, attitude recognition and business logic processing tasks are concentrated on a single master chip, resulting in tight resource allocation and poor real-time performance, especially in high load or complex services, which affects the system response speed and user experience.

Method used

The first master control is used to generate attitude mode information and send it to the second master control. Through the synergy between the first master control and the second master control, the division of labor and decoupling of the attitude processing task is realized. The first master control completes data acquisition and attitude recognition, and the second master control processes response operations and business logic.

Benefits of technology

It improves the processing speed and response speed of attitude processing, improves the real-timeness of attitude processing, and can enter low-power mode when the service is simple, enhancing the scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378745A_ABST
    Figure CN120378745A_ABST
Patent Text Reader

Abstract

The invention discloses an attitude processing method, a first master controller, a second master controller, a medium and a program product, and relates to the technical field of attitude recognition, the attitude processing method is applied to the first master controller, and the method comprises the following steps: generating attitude mode information according to attitude data of home terminal equipment collected by an attitude sensor; and sending the attitude mode information to the second master controller, so that the second master controller determines the current attitude of the home terminal device according to the attitude mode information, and triggers a response operation corresponding to the current attitude. Through the cooperative effect between the first master control and the second master control, division and decoupling of the attitude processing task are realized, and the real-time performance of attitude processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of attitude recognition, and particularly to an attitude processing method, a first master controller, a second master controller, a medium, and a program product. Background Art

[0002] In the current precision pan-tilt camera system, its stable operation highly depends on the coordinated cooperation of complex motors and various sensors. The attitude sensor can capture key information such as the angle change, acceleration, and angular velocity of the device in real time, providing accurate data support for the attitude control of the device; while the pan-tilt realizes the stable control of devices such as cameras through the cooperation of complex motors and sensors, further improving the intelligence level of electronic devices.

[0003] However, the common attitude processing method at present is to complete tasks such as data acquisition, attitude recognition, and service logic processing on a single master control chip, which leads to tight resource allocation and poor real-time performance of the system. Especially in the case of high load or complex service processing logic, the resource competition of a single master control chip will be further intensified, resulting in an increase in the response delay to attitude changes, often exceeding 50 ms, thus affecting the response speed and user experience of the system. Summary of the Invention

[0004] The main purpose of this application is to provide an attitude processing method, a first master controller, a second master controller, a medium, and a program product, aiming to improve the real-time performance of attitude processing.

[0005] To achieve the above object, an embodiment of this application proposes an attitude processing method, which is applied to a first master controller, and the method includes:

[0006] Generate attitude mode information according to the attitude data of the local device collected by the attitude sensor;

[0007] Send the attitude mode information to a second master controller, so that the second master controller determines the current attitude of the local device according to the attitude mode information and triggers a response operation corresponding to the current attitude.

[0008] In one embodiment, the step of generating attitude mode information according to the attitude data of the local device collected by the attitude sensor includes:

[0009] Determine the attitude angle according to the attitude data;

[0010] Generate the attitude mode information according to the attitude angle.

[0011] In one embodiment, the attitude data includes acceleration and angular velocity, and the step of determining the attitude angle according to the attitude data includes:

[0012] Using a complementary filtering algorithm, the acceleration and the angular velocity are fused to obtain the attitude angle.

[0013] In one embodiment, before the step of generating attitude mode information according to the attitude angle, the method further includes:

[0014] In the case where the change of the attitude angle is irregular, the attitude angle is smoothed until the attitude angle remains stable or changes regularly.

[0015] In addition, to achieve the above object, an embodiment of the present application further provides an attitude processing method, which is applied to a second master controller. The method includes:

[0016] Receiving the attitude mode information sent by the first master controller, where the attitude mode information is generated by the first master controller according to the attitude data of the local device collected by the attitude sensor;

[0017] Determining the current attitude of the local device according to the attitude mode information;

[0018] Triggering a response operation corresponding to the current attitude.

[0019] In one embodiment, the step of triggering a response operation corresponding to the current attitude includes:

[0020] Generating a response instruction associated with the current attitude and sending the response instruction to the host computer so that the host computer executes a response operation corresponding to the response instruction; or,

[0021] Determining an operation instruction associated with the current attitude and controlling the local device according to the operation instruction.

[0022] In addition, to achieve the above object, an embodiment of the present application further provides an attitude processing device, which is applied to a first master controller. The device includes:

[0023] An attitude mode information generation module, configured to generate attitude mode information according to the attitude data of the local device collected by the attitude sensor;

[0024] An attitude mode information sending module, configured to send the attitude mode information to a second master controller so that the second master controller determines the current attitude of the local device according to the attitude mode information and triggers a response operation corresponding to the current attitude.

[0025] In addition, to achieve the above object, an embodiment of the present application further provides an attitude processing device, which is applied to a second master controller. The device includes:

[0026] An information receiving module, configured to receive the attitude mode information sent by the first main controller, where the attitude mode information is generated by the first main controller according to the attitude data of the local device collected by an attitude sensor;

[0027] An attitude determination module, configured to determine the current attitude of the local device according to the attitude mode information;

[0028] An operation execution module, configured to trigger a response operation corresponding to the current attitude.

[0029] In addition, to achieve the above object, an embodiment of the present application further provides a first main controller, where the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the attitude processing method as described above.

[0030] In addition, to achieve the above object, an embodiment of the present application further provides a second main controller, where the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the attitude processing method as described above.

[0031] In addition, to achieve the above object, an embodiment of the present application further provides a storage medium, where the storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the attitude processing method as described above are implemented.

[0032] In addition, to achieve the above object, an embodiment of the present application further provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the attitude processing method as described above are implemented.

[0033] One or more technical solutions proposed in the embodiments of the present application have at least the following technical effects: Through the first main controller, attitude mode information is generated according to the attitude data of the local device collected by the attitude sensor to complete data collection and attitude recognition in the attitude processing process; furthermore, the attitude mode information is sent to the second main controller, and the second main controller determines the current attitude of the local device according to the attitude mode information, thereby triggering a response operation corresponding to the current attitude to complete the processing of the service logic. Through the collaborative effect between the first main controller and the second main controller in the embodiments of the present application, the division of labor and decoupling of the attitude processing task are realized, effectively avoiding resource competition in multiple operation processes, thereby improving the processing speed and response speed of attitude processing, that is, improving the real-time performance of attitude processing. Description of the Drawings

[0034] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.

[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0036] Figure 1 It is a schematic flowchart provided for the first embodiment of the attitude processing method of this application;

[0037] Figure 2 It is an interaction schematic diagram based on the private stream protocol provided for the first embodiment of this application;

[0038] Figure 3 It is an overall framework diagram for attitude processing under a multi-master architecture provided for the third embodiment of this application;

[0039] Figure 4 It is an overall implementation flowchart of the attitude processing method provided for the third embodiment of this application;

[0040] Figure 5 It is a schematic diagram of the module structure of the attitude processing device for the first embodiment of this application;

[0041] Figure 6 It is a schematic diagram of the module structure of another attitude processing device for an embodiment of this application;

[0042] Figure 7 It is a schematic diagram of the device structure of the hardware operating environment of the first master involved in the attitude processing method in an embodiment of this application;

[0043] Figure 8 It is a schematic diagram of the device structure of the hardware operating environment of the second master involved in the attitude processing method in an embodiment of this application.

[0044] The realization of the purpose, functional features, and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments

[0045] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.

[0046] To better understand the technical solutions of this application, the following will be described in detail in combination with the accompanying drawings of the specification and the specific implementation manners.

[0047] Since the common current attitude processing method is to complete tasks such as data acquisition, attitude recognition, and service logic processing on a single main control chip, this leads to tight resource allocation and poor real-time performance of the system. Moreover, continuously running complex service logic makes it impossible for this single main control chip to enter the low-power mode, resulting in high power consumption. In addition, in the single main control architecture, once new functions need to be added, such as implementing multi-task parallel processing, the entire system often needs to be reconstructed, resulting in a significant increase in development costs and poor scalability of the system.

[0048] The embodiment of the present application provides a solution. Through the first main control, according to the attitude data of the local device collected by the attitude sensor, attitude mode information is generated to complete data acquisition and attitude recognition in the attitude processing process. Furthermore, the attitude mode information is sent to the second main control, and the second main control determines the current attitude of the local device according to the attitude mode information, thereby triggering the response operation corresponding to the current attitude to complete the processing of the service logic. Through the collaborative effect between the first main control and the second main control in the embodiment of the present application, the division of labor and decoupling of the attitude processing tasks are realized, effectively avoiding resource competition in multiple operation processes, thereby improving the processing speed and response speed of attitude processing, that is, improving the real-time performance of attitude processing. Moreover, the hierarchical processing of attitude recognition and service logic simplifies the processing logic of each main control, and the low-power mode can be effectively enabled when the service is simple. At the same time, in the case of separately processing service logic by the second main control, even if new services are added, there is no need to reconstruct the entire system, thereby enhancing the scalability of the system.

[0049] It should be noted that the execution subject of this embodiment can be the first main control, and the first main control can be a computing service device with data processing, network communication, and program running functions.

[0050] Based on this, the embodiment of the present application provides an attitude processing method, referring to Figure 1 , Figure 1 which is the flowchart of the first embodiment of the attitude processing method of the present application.

[0051] In this embodiment, the attitude processing method includes steps S10 to S20:

[0052] Step S10, generate attitude mode information according to the attitude data of the local device collected by the attitude sensor;

[0053] In an embodiment, the attitude data of the local device is collected by an attitude sensor associated with the local device. When the first main control obtains the attitude data of the local device, the attitude mode information of the local device is generated according to the attitude data.

[0054] Optionally, an attitude sensor refers to a device that can sense and measure the attitude of an object in space (such as angles, directions, etc.). Common ones include accelerometers, gyroscopes, magnetometers, etc. Attitude data refers to the information about the physical quantities or states of the measured object collected by the sensor. Attitude mode information refers to the abstract or patterned description of the current attitude of the measured object or device obtained after analyzing the attitude data, including the type of attitude change (such as rotation, translation, etc.), the amplitude and speed of the change, etc.

[0055] Optionally, the attitude sensor can be placed inside the local device. The first main controller can also be placed inside the local device or inside other electronic devices. This embodiment does not make specific limitations on this.

[0056] Optionally, before collecting the data of the attitude sensor, the local device can be placed on a horizontal tabletop for zero calibration, and the calculated calibration parameters (offset data) can be compensated into the attitude data collected during the subsequent application process to eliminate the initial deviation of the attitude sensor.

[0057] Optionally, the attitude angle of the device can be determined based on the collected attitude data; and then, based on the attitude angle, attitude mode information can be generated.

[0058] Optionally, based on the collected attitude data of the local device and the mapping relationship between the preset attitude data and the current attitude, the current attitude of the local device is determined; and then, based on the current attitude, the corresponding attitude mode information is generated.

[0059] Exemplarily, in a pan-tilt camera system, the first main controller built into the camera collects in real time the attitude data measured by the attitude sensor (such as pitch angle, roll angle, yaw angle); and then, through the first main controller, the collected data is processed and analyzed to determine the current attitude of the camera. For example, when the camera rotates or is inverted, the current attitude can be directly used as the attitude mode information, or the corresponding encoding of the current attitude can be used as the attitude mode information. This embodiment does not make specific limitations on this.

[0060] Step S20: Send the attitude mode information to the second main controller so that the second main controller determines the current attitude of the local device based on the attitude mode information and triggers the response operation corresponding to the current attitude.

[0061] Optionally, the current attitude is the result parsed based on the attitude mode information, representing the actual state or attitude of the object or device at a certain moment. The response operation refers to the operation executed by the second main controller according to the current attitude or state of the device according to the preset logic or rules to adapt to the attitude change or complete a specific task.

[0062] Exemplarily, the first master controller generates the attitude mode information of the local device in real time and sends it to the second master controller. Further, after receiving the attitude mode information, the second master controller parses it to determine the current attitude of the local device, and based on this attitude, performs corresponding response operations. For example, in a pan-tilt camera system, the second master controller parses the current attitude of the camera as a 180-degree flip according to the received attitude mode information, generates an operation instruction for screen flipping based on this, and sends this instruction to the host computer (such as a smart phone), and the host computer executes this operation instruction.

[0063] Exemplarily, data is transmitted between the first master controller and the second master controller through a preset serial communication interface. Therefore, the first master controller sends the attitude mode information to the second master controller in the form of serial port data, ensuring that the attitude mode information is sent and received bit by bit in sequence.

[0064] Exemplarily, the first master controller sends the attitude mode information to the second master controller according to a preset master controller communication protocol. This master controller communication protocol defines how data is encoded, transmitted, and decoded, ensuring that the attitude mode information can be correctly transmitted and parsed. For example, the master controller communication protocol can be set to use encrypted transmission and checksum mechanisms. Before sending, the first master controller processes the attitude mode information through an encryption algorithm to generate an encrypted data packet, and adds a checksum (such as cyclic redundancy check, message digest algorithm, etc.) to the data packet. At the receiving end, the second master controller decrypts the data packet using the corresponding decryption algorithm and detects the correctness of the checksum, thereby rejecting data with incorrect checksums or decryption failures, reducing the risk of the attitude mode information being tampered with, and ensuring the integrity of data transmission.

[0065] In a feasible implementation manner, step S20 includes:

[0066] Step S21, the first master controller sends the attitude mode information and the target device identifier to the second master controller based on a preset private stream protocol, so that the second master controller determines the target device identifier based on the private stream protocol. In the case where the target device identifier is not the identifier of the local device, the instruction information is sent to a preset next master controller. In the case where the target device identifier is the identifier of the local device, the second master controller determines the attitude mode information based on the private stream protocol, and based on the attitude mode information, determines the current attitude of the local device, and triggers the response operation corresponding to the current attitude.

[0067] Optionally, the next master controller can be other master controller devices or a host computer, and this implementation manner does not make specific limitations on this.

[0068] In a feasible embodiment, the encoding and decoding methods of data are defined in the private stream protocol, and fixed positions are pre-divided for encapsulating the target device identifier, so that the device can separately decode the target device identifier in the data transmitted based on the private stream protocol after receiving it.

[0069] Exemplarily, based on the preset private stream protocol, the first master control encapsulates the target device identifier and the attitude mode information into instruction information and sends it to the second master control; after receiving the instruction information, the second master control parses the instruction information based on the above private stream protocol, determines the target device identifier contained therein, and determines whether the target device identifier is the local device identifier of this end; furthermore, when the target device identifier is not the local device identifier of this end, the second master control sends the instruction information to the preset next master control; when the target device identifier is the local device identifier of this end, based on the above private stream protocol, the second master control parses the instruction information, determines the attitude mode information contained therein, and determines the current attitude of the local device according to the attitude mode information, and triggers the response operation corresponding to the current attitude.

[0070] Exemplarily, a cyclic redundancy check mechanism is built into the private stream protocol, so that the master control device or the host computer can perform integrity verification on the received instructions or data, thereby ensuring the stability of the device during operation.

[0071] Exemplarily, please refer to Figure 2 , Figure 2 There is provided an interaction schematic diagram based on the private stream protocol. Master control 1, master control 2, and other master controls are located inside the same device. After master control 1 receives the target device identifier and the attitude mode information sent by other master controls based on the preset private stream protocol, it parses the target device identifier contained therein and determines whether the target device identifier matches the local device identifier of master control 1; in the case where the target device identifier does not match the local device identifier, master control 1 sends the received target device identifier and the attitude mode information to the preset next master control, i.e., master control 2, for parsing and processing; in the case where the target device identifier matches the local device identifier, master control 1 parses the attitude mode information, and performs the subsequent steps of determining the current attitude of the local device associated with the attitude sensor according to the attitude mode information and triggering the response operation corresponding to the current attitude. Furthermore, if the response operation corresponding to the current attitude needs to be executed by the host computer, master control 1 further forwards a response instruction containing the host computer identifier (target device identifier) to the host computer for processing by the host computer. Similarly, the host computer can also generate operation information carrying a specific master control identifier (target device identifier) in response to a trigger operation by the user on the interaction interface, and send it to the corresponding device for parsing and processing by the master control inside the device.

[0072] It can be understood that by identifying the target device identifier of the instruction information based on the private stream protocol, it is determined whether the current instruction information is transmitted to itself, avoiding the master control receiving the parsing of the entire data packet and then forwarding it to another master control or the upper computer, thereby reducing the transmission and parsing of error information, improving the transmission efficiency of attitude information, and further improving the response speed and real-time performance of attitude processing.

[0073] This embodiment provides an attitude processing method. By the first master control, the data of the attitude sensor is collected and analyzed in real time to understand the current attitude of the object or device, that is, the data collection and attitude recognition are completed by the first master control; furthermore, the generated attitude mode information is sent to the second master control by the first master control, and the second master control performs operation response and business logic processing. Therefore, through the collaborative effect between the first master control and the second master control in the embodiments of the present application, business decoupling and grading are achieved, the attitude processing speed and response speed are improved, and further the real-time performance of attitude processing is improved.

[0074] Based on the above first embodiment, a second embodiment of the attitude processing method of the present application is proposed. In this embodiment, the content that is the same as or similar to the above-mentioned embodiment one can be referred to the above introduction and will not be elaborated hereinafter. On this basis, step S10 may include steps S11 to S12:

[0075] Step S11, determining the attitude angle according to the attitude data;

[0076] Optionally, the attitude angle refers to a set of angles describing the direction and attitude of an object in space, usually including pitch angle, yaw angle, and roll angle. These angles are used to determine the rotation state of the object or device relative to a certain reference coordinate system.

[0077] Optionally, according to the accelerometer data, the tilt angles (pitch angle and roll angle) of the object can be calculated; according to the gyroscope data, the rotation angle (yaw angle) of the object around the yaw axis can be calculated.

[0078] Exemplarily, based on the relationship between the collected accelerometer data and the direction of the gravitational acceleration and the sensor coordinate system, using the principle of force decomposition, the pitch angle and roll angle of the object or device are calculated through the arctangent function (atan2); and the yaw angle of the measured object or device is determined by integrating the angular velocity data of the collected gyroscope.

[0079] Optionally, considering that there are cumulative errors in gyroscopes, etc., and angle drift will occur after long-term integration. In order to obtain more accurate attitude data, this embodiment can also adopt data fusion technologies (such as complementary filtering, Kalman filtering, etc.), combine the data of accelerometers, gyroscopes, magnetometers, etc., complement each other's advantages, eliminate their respective defects, and thus obtain stable and accurate attitude angles.

[0080] In a feasible implementation, the attitude data includes acceleration and angular velocity, and step S11 includes:

[0081] Step S111, using a complementary filtering algorithm, fuse the acceleration and angular velocity to obtain the attitude angle.

[0082] Optionally, the complementary filtering algorithm is a filtering method that reduces the attitude solution error by combining the measurement data of the accelerometer and gyroscope (acceleration and angular velocity), making full use of the accurate attitude information provided by the accelerometer at rest and the fast response of the gyroscope to attitude changes during dynamic motion to achieve the best attitude solution effect.

[0083] Exemplarily, the following formula is used for fusion calculation: Attitude angle = α * (Attitude angle obtained by integrating angular velocity) + (1 - α) * (Attitude angle calculated based on acceleration). Where α is the complementary filtering coefficient, which is used to control the weights of the accelerometer and gyroscope data during the fusion process, and can be set manually by the user or automatically adjusted by the first main controller according to the device motion state.

[0084] In this implementation, through the complementary filtering algorithm, the advantages of acceleration and angular velocity are combined, reducing the influence of the fluctuation of single attitude data on the calculation of the attitude angle, improving the calculation accuracy of the attitude angle, and thus more accurately determining the device attitude during the motion process.

[0085] In a feasible implementation, before step S12, it further includes:

[0086] Step S112, in the case where the change of the attitude angle is irregular, perform smoothing processing on the attitude angle until the attitude angle remains stable or changes regularly.

[0087] Optionally, smoothing processing refers to filtering or averaging the original data to reduce the noise and fluctuation in the data, making the data change more smoothly, reducing sudden changes and jitters. Common smoothing processing methods include average filtering, low-pass filtering, etc.

[0088] Exemplarily, the steps of smoothing processing may include: performing denoising processing on the preliminarily calculated attitude angle obtained above to remove obvious outliers therein; and then, based on the weighted moving average algorithm, performing smoothing processing on the denoised attitude angle. For example, determine the attitude angle data within a preset time window closest to the current time point, and assign weights to each data point within the time window; and then calculate the weighted average value of all data points within the time window according to the weighted average formula as the smoothed attitude angle at the current time point.

[0089] In this embodiment, the attitude angle is smoothed to ensure the stability of the attitude angle data and effectively reduce the influence of jitter on the device attitude recognition.

[0090] Step S12: Generate attitude mode information according to the attitude angle.

[0091] Exemplarily, the first main controller can perform attitude recognition based on the attitude angle to determine the current attitude of the device; then, according to the mapping relationship between the preset device attitude and the attitude code, the corresponding attitude code is sent to the second main controller as the attitude mode information. Sending in the form of encoding can further reduce the communication time between the first main controller and the second main controller, thereby reducing the response delay for attitude changes.

[0092] Exemplarily, the first main controller can also combine deep learning technology to recognize the attitude angle to generate attitude mode information. For example, through the trained deep learning model, features (such as the change trend and change amplitude of the attitude angle) are extracted from the above-calculated attitude angle data; according to the extracted features, the current attitude of the device is determined, and the attitude mode information is generated.

[0093] In this embodiment, the first main controller accurately calculates the attitude angle and then generates the attitude mode information according to the attitude angle, which can more accurately determine the attitude change of the device, facilitating the subsequent second main controller to accurately respond to the attitude change.

[0094] Based on the first and / or second embodiments of the present application, a third embodiment of the attitude processing method of the present application is proposed. In this embodiment, the attitude processing method is applied to the second main controller. For the same or similar content as in the above-mentioned first and second embodiments, reference can be made to the above introduction and will not be repeated hereinafter. The attitude processing method further includes steps A10 to A30:

[0095] Step A10: Receive the attitude mode information sent by the first main controller, where the attitude mode information is generated by the first main controller according to the attitude data of the local device collected by the attitude sensor;

[0096] In a feasible embodiment, step A10 includes:

[0097] Step A11: The second main controller receives the attitude mode information and the target device identifier sent by the first main controller, where the attitude mode information is generated by the first main controller according to the attitude data of the local device collected by the attitude sensor; based on the preset private stream protocol, determine the target device identifier; in the case where the target device identifier is not the local device identifier, send the attitude mode information and the target device identifier to the preset next main controller; in the case where the target device identifier is the local device identifier, determine the attitude mode information based on the private stream protocol.

[0098] Step A20: Determine the current posture of the local device according to the posture mode information.

[0099] Optionally, the second main controller and the first main controller can be placed in the same device and connected through a serial communication interface. This embodiment does not limit this.

[0100] In a feasible embodiment, the first main controller processes the posture data of the local device collected by the posture sensor to generate posture mode information. For example, the first main controller can determine the posture mode information of the local device according to the mapping relationship between the preset posture data and the current posture; furthermore, the first main controller sends the posture mode information to the second main controller; and after receiving the posture mode information sent by the first main controller, the second main controller parses it, extracts the key information therein, and determines the current posture of the local device.

[0101] Exemplarily, in a pan-tilt camera system, the second main controller can also use the posture mode information and the captured image for mutual verification to determine the current posture of the local device. For example, the second main controller analyzes features such as the horizon and building vertical lines in the image through image recognition technology, and compares the received posture mode information with the results obtained from the image analysis: if the posture mode information is "the camera tilts 15 degrees to the left", and the image analysis also shows that the horizon is on the right side of the picture, and the two data are consistent, then it is confirmed that the current posture of the camera is tilting 15 degrees to the left; if there is a deviation in the data, the calibration mechanism is automatically triggered to adjust the pan-tilt posture or send an instruction to correct the posture data to the first main controller until the two pieces of information match, so as to ensure the accurate posture of the pan-tilt camera system. It can be understood that in this embodiment, by the second main controller processing the image information, the operation burden of the first main controller is reduced, and its resource competition is reduced, that is, in this embodiment, by decoupling the data acquisition and operation tasks of the first main controller from the image processing tasks of the second main controller, the real-time performance of data acquisition and operation through the first main controller is improved, thereby improving the real-time performance of posture processing.

[0102] Step A30: Trigger the response operation corresponding to the current posture.

[0103] Optionally, the second main controller determines the response operation to be executed according to the current posture of the local device and the preset response strategy; furthermore, according to the response operation, a specific control instruction is generated and sent to the corresponding execution module.

[0104] Exemplarily, in a pan-tilt camera system, the second main controller determines that the current posture of the camera is tilting 45 degrees to the upper right according to the received posture mode information; furthermore, according to the preset response strategy, a parameter adjustment instruction for adjusting the shooting angle of the camera is generated and sent to the parameter adjustment module, and the parameter adjustment module completes the actual parameter adjustment operation.

[0105] In a feasible implementation manner, step A30 includes:

[0106] Step A31, generating a response instruction associated with the current posture and sending the response instruction to the host computer so that the host computer performs a response operation corresponding to the response instruction; or,

[0107] In a feasible embodiment, after determining the current posture of the local device, the second main controller generates a response instruction associated with the current posture and sends the response instruction to the host computer; when the host computer receives the response instruction sent by the second main controller, it performs the corresponding response operation.

[0108] Optionally, the host computer refers to a computer system in an automated control system that is used to monitor and control the lower computer (usually an embedded system or a PLC, etc.), and is responsible for the overall monitoring and user interaction of the entire control system, such as real-time display of the device operation status, sending control instructions, etc.

[0109] Exemplarily, the second main controller and the host computer are connected by a USB cable, and the two communicate and transfer data through a USB interface.

[0110] Exemplarily, in a pan-tilt camera system, the second main controller determines that the current posture of the device is "flipped 90 degrees", and generates a response instruction of "landscape / portrait screen switching" according to this posture, and then sends the response instruction to the host computer; after receiving the response instruction, the host computer performs the corresponding response operation, that is, performs landscape / portrait screen switching on the interaction interface of the host computer itself.

[0111] Step A32, determining an operation instruction associated with the current posture and controlling the local device according to the operation instruction.

[0112] Exemplarily, in a pan-tilt camera system, the second main controller can adjust the shooting angle and focal length according to whether the camera is performing horizontal rotation, vertical tilt, etc. (posture mode information) to ensure the stability and clarity of the picture. For example, when the attitude sensor detects that the camera is performing rapid horizontal rotation, the attitude mode information generated by the first main controller based on the collected attitude data may include content such as "rapid horizontal rotation, speed of 60 degrees per second", etc.; the first main controller sends this attitude mode information to the second main controller; after receiving it, the second main controller determines that the current posture is "rapid horizontal rotation", and according to the preset response strategy, performs corresponding operations, such as adjusting the focal length of the camera to keep the shooting object in the center of the picture, and at the same time increasing the image refresh rate to reduce motion blur, ensuring the clarity and stability of the shooting picture.

[0113] Optionally, the second master controller can generate the above operation instruction and response instruction simultaneously. On the one hand, it generates an operation instruction to adjust the local device to adapt to the attitude change. On the other hand, it generates a response instruction containing the display device adjustment parameters and sends it to the host computer, so that the host computer executes the response instruction and displays the corresponding device adjustment parameters on its interactive interface to remind the user that the current device parameters have changed.

[0114] Exemplarily, please refer to Figure 3 , Figure 3 which provides an overall framework diagram for attitude processing in a multi-master controller architecture. Figure 3 It includes three modules, namely Master Controller 1, Master Controller 2, and the host computer. Master Controller 1 collects data from its built-in attitude sensor, performs attitude angle calculation based on the collected data, and then performs attitude recognition according to the calculated attitude angle to generate attitude mode information. Master Controller 1 sends the attitude mode information to Master Controller 2 in the form of serial port data. After receiving this information, Master Controller 2 performs attitude processing to determine the current attitude of the device, and according to the current attitude of the device, executes corresponding response operations. For example, Master Controller 2 can generate a response message according to the current attitude and send the response message to the host computer through a USB cable, and then the host computer processes it. Or, Master Controller 2 can also generate a corresponding operation instruction according to the current attitude and control the local device to execute the operation instruction.

[0115] In this embodiment, the second master controller focuses on the response tasks for different attitudes, can more efficiently utilize system resources, reduce resource competition problems, and improve the response speed of attitude processing, thereby improving the real-time performance of attitude processing.

[0116] Optionally, the attitude processing method is applied to an attitude processing device, and the attitude processing device includes: a first master controller and a second master controller. The method includes:

[0117] The first master controller generates attitude mode information according to the attitude data of the local device collected by the attitude sensor.

[0118] The first master controller sends the attitude mode information to the second master controller.

[0119] In the case where the second master controller receives the attitude mode information sent by the first master controller, it determines the current attitude of the local device according to the attitude mode information.

[0120] The second master controller triggers the response operation corresponding to the current attitude.

[0121] Optionally, after the step of generating the attitude mode information, it further includes:

[0122] The first master controller sends the attitude mode information and the target device identifier to the second master controller based on a preset private stream protocol.

[0123] The second master controller determines the target device identifier based on a preset private stream protocol;

[0124] When the target device identifier is not the local device identifier, the second master controller sends the attitude mode information and the target device identifier to a preset next master controller;

[0125] When the target device identifier is the local device identifier, the second master controller determines the attitude mode information based on the private stream protocol, and executes the step of determining the current attitude of the local device according to the attitude mode information.

[0126] Optionally, the step in which the first master controller generates attitude mode information according to the attitude data of the local device collected by the attitude sensor includes:

[0127] The first master controller determines the attitude angle according to the attitude data;

[0128] The first master controller generates attitude mode information according to the attitude angle.

[0129] Optionally, the attitude data includes acceleration and angular velocity, and the step in which the first master controller determines the attitude angle according to the attitude data includes:

[0130] The first master controller uses a complementary filtering algorithm to fuse the acceleration and the angular velocity to obtain the attitude angle.

[0131] Optionally, before the step in which the first master controller generates attitude mode information according to the attitude angle, it further includes:

[0132] When the change of the attitude angle is irregular, the first master controller performs smoothing processing on the attitude angle until the attitude angle remains stable or changes regularly.

[0133] Optionally, the step in which the second master controller triggers the response operation corresponding to the current attitude includes:

[0134] The second master controller generates a response instruction associated with the current attitude, and sends the response instruction to the host computer so that the host computer executes the response operation corresponding to the response instruction; or,

[0135] The second master controller determines the operation instruction associated with the current attitude, and controls the local device according to the operation instruction.

[0136] Exemplarily, to help understand the implementation process of the attitude processing method obtained by combining the above Embodiment 1, please refer to Figure 4 , Figure 4 A general implementation flowchart of an attitude processing method is provided. Specifically:

[0137] Step A101, data acquisition: The first master controller acquires the attitude data of the attitude sensor;

[0138] Step A102, attitude angle calculation: Through the first main controller, determine the attitude angle of the device according to the collected attitude data;

[0139] Step A103, anti-shake processing: Through the first main controller, when the change of the attitude angle is irregular, smooth the attitude angle until the attitude angle remains stable or changes regularly;

[0140] Step A104, attitude recognition: Through the first main controller, generate attitude mode information according to the attitude angle after anti-shake processing;

[0141] Step A105, attitude mode synchronization: The first main controller sends the attitude mode information generated based on the above steps to the second main controller;

[0142] Step A106, attitude processing: After receiving the attitude mode information sent by the first main controller, the second main controller determines the current attitude of the device according to this information, and performs corresponding response operations according to this current attitude.

[0143] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the attitude processing method of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.

[0144] The embodiment of the present application also provides an attitude processing device. Please refer to Figure 5 , The attitude processing device is applied to the first main controller, and the device includes:

[0145] An attitude mode information generation module 10, configured to generate attitude mode information according to the attitude data of the local device collected by the attitude sensor;

[0146] An attitude mode information sending module 20, configured to send the attitude mode information to the second main controller, so that the second main controller determines the current attitude of the local device according to the attitude mode information and triggers a response operation corresponding to the current attitude.

[0147] The attitude processing device provided by the embodiment of the present application adopts the attitude processing method in the above embodiment, and can solve the technical problem of how to improve the real-time performance of attitude processing. Compared with the prior art, the beneficial effects of the attitude processing device provided by the present application are the same as those of the attitude processing method provided by the above embodiment, and other technical features in the attitude processing device are the same as the features disclosed in the method of the above embodiment, and will not be elaborated here.

[0148] The embodiment of the present application also provides an attitude processing device. Please refer to Figure 6 , The attitude processing device is applied to the second main controller, and the device includes:

[0149] An information receiving module 30, configured to receive the attitude mode information sent by the first main controller, where the attitude mode information is generated by the first main controller according to the attitude data of the local device collected by the attitude sensor;

[0150] An attitude determination module 40, configured to determine the current attitude of the local device according to the attitude mode information;

[0151] An operation execution module 50, configured to trigger a response operation corresponding to the current attitude.

[0152] The attitude processing device provided in the embodiment of the present application adopts the attitude processing method in the above embodiment, and can solve the technical problem of how to improve the real-time performance of attitude processing. Compared with the prior art, the beneficial effects of the attitude processing device provided in the present application are the same as those of the attitude processing method provided in the above embodiment, and other technical features in the attitude processing device are the same as those disclosed in the method of the above embodiment, and will not be elaborated here.

[0153] The embodiment of the present application provides a first main controller, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the attitude processing method in the first embodiment above.

[0154] Next, refer to Figure 7 , which shows a schematic structural diagram of a first main controller suitable for implementing the embodiment of the present application. The first main controller in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The first main controller shown is only an example and should not impose any limitation on the functions and usage scope of the embodiment of the present application.

[0155] As Figure 7As shown, the first main controller may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in the read-only memory 1002 or a program loaded from the storage device 1003 into the random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the first main controller are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output interface 1006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the first main controller to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a first main controller having various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be implemented or had alternatively.

[0156] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.

[0157] The first main controller provided in the embodiments of the present application adopts the attitude processing method in the above embodiments, and can solve the technical problem of how to improve the real-time performance of attitude processing. Compared with the prior art, the beneficial effects of the first main controller provided in the present application are the same as those of the attitude processing method provided in the above embodiments, and other technical features in the first main controller are the same as those disclosed in the method of the previous embodiment, and will not be elaborated herein.

[0158] It should be understood that the various parts disclosed in the present application may be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in a suitable manner in any one or more embodiments or examples.

[0159] As described above, this is only the specific implementation manner of the present application. However, the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all of them should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims described above.

[0160] An embodiment of the present application provides a second main control. The second main control includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the attitude processing method in the first embodiment above.

[0161] The following refers to Figure 8 , which shows a schematic structural diagram of a second main control suitable for implementing the embodiment of the present application. The second main control in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The second main control shown is only an example and should not impose any limitation on the functions and usage scope of the embodiment of the present application.

[0162] As Figure 8As shown, the second main controller may include a processing device 2001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in the read-only memory 2002 or a program loaded from the storage device 2003 into the random access memory 2004. In the random access memory 2004, various programs and data required for the operation of the second main controller are also stored. The processing device 2001, the read-only memory 2002, and the random access memory 2004 are connected to each other through a bus 2005. The input / output interface 2006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 2006: an input device 2007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 2008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 2003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 2009. The communication device 2009 may allow the second main controller to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a second main controller having various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be implemented or had alternatively.

[0163] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 2003, or installed from the read-only memory 2002. When the computer program is executed by the processing device 2001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.

[0164] The second main controller provided in the embodiments of the present application adopts the attitude processing method in the above embodiments, and can solve the technical problem of how to improve the real-time performance of attitude processing. Compared with the prior art, the beneficial effects of the second main controller provided in the present application are the same as those of the attitude processing method provided in the above embodiments, and other technical features in the second main controller are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.

[0165] It should be understood that each part disclosed in the present application may be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in a suitable manner in any one or more embodiments or examples.

[0166] As described above, it is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims described above.

[0167] An embodiment of the present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the attitude processing method in the above embodiment.

[0168] The computer-readable storage medium provided by the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0169] The above computer-readable storage medium may be included in the first main control and / or the second main control; or it may exist separately and not be assembled into the first main control and / or the second main control.

[0170] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by the first main control, the first main control is caused to: generate attitude mode information according to the attitude data of the local device collected by the attitude sensor; send the attitude mode information to the second main control so that the second main control determines the current attitude of the local device according to the attitude mode information and triggers the response operation corresponding to the current attitude.

[0171] The above computer-readable storage medium stores one or more programs, which, when executed by a second main controller, cause the second main controller to: receive attitude mode information sent by a first main controller, where the attitude mode information is generated by the first main controller based on attitude data of the local device collected by an attitude sensor; determine the current attitude of the local device according to the attitude mode information; and trigger a response operation corresponding to the current attitude.

[0172] Computer program code for performing the operations of this application may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partially on the user's computer, execute as a stand-alone software package, execute partially on the user's computer and partially on a remote computer, or execute entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0173] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0174] The modules described in the embodiments of this application may be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.

[0175] The readable storage medium provided by the embodiment of the present application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned attitude processing method, and can solve the technical problem of how to improve the real-time performance of attitude processing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the attitude processing method provided by the above embodiment, and will not be elaborated here.

[0176] The embodiment of the present application further provides a computer program product, including a computer program, and the steps of the above-mentioned attitude processing method are implemented when the computer program is executed by a processor.

[0177] The computer program product provided by the embodiment of the present application can solve the technical problem of how to improve the real-time performance of attitude processing. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the attitude processing method provided by the above embodiment, and will not be elaborated here.

[0178] The above are only some embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structural transformation made by using the content of the specification and drawings of the present application under the technical concept of the present application, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.

Claims

1. A gesture processing method, characterized in that, The described attitude processing method is applied to the first main controller, and the method includes: Generating attitude mode information based on the attitude data of the local device collected by the attitude sensor; Sending the attitude mode information to the second main controller, so that the second main controller determines the current attitude of the local device according to the attitude mode information and triggers the response operation corresponding to the current attitude.

2. The attitude processing method according to claim 1, characterized in that The step of generating attitude mode information based on the attitude data of the local device collected by the attitude sensor includes: Determining the attitude angle according to the attitude data; Generating the attitude mode information according to the attitude angle.

3. The attitude processing method according to claim 2, characterized in that The attitude data includes acceleration and angular velocity, and the step of determining the attitude angle according to the attitude data includes: Using a complementary filtering algorithm to fuse the acceleration and the angular velocity to obtain the attitude angle.

4. The attitude processing method according to claim 2, characterized in that Before the step of generating attitude mode information according to the attitude angle, it further includes: In the case where the change of the attitude angle is irregular, smoothing the attitude angle until the attitude angle remains stable or changes regularly.

5. A posture processing method, characterized in that, The described attitude processing method is applied to the second main controller, and the method includes: Receiving the attitude mode information sent by the first main controller, where the attitude mode information is generated by the first main controller based on the attitude data of the local device collected by the attitude sensor; Determining the current attitude of the local device according to the attitude mode information; Triggering the response operation corresponding to the current attitude.

6. The attitude processing method according to claim 5, wherein The step of triggering the response operation corresponding to the current attitude includes: Generating a response instruction associated with the current attitude and sending the response instruction to the host computer, so that the host computer executes the response operation corresponding to the response instruction; or, Determining the operation instruction associated with the current attitude and controlling the local device according to the operation instruction.

7. A first master controller, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the attitude processing method according to any one of claims 1 to 4.

8. A second master controller, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the attitude processing method according to claim 5 or 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the attitude processing method according to any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program. When the computer program is executed by a processor, it implements the steps of the attitude processing method according to any one of claims 1 to 6.