Data transmission method, cloud platform, computer equipment and storage medium

By detecting and switching the status of the gimbal communication party, signal lines are merged to solve signal line friction and interference problems, thereby improving the communication stability between gimbal components.

CN115664455BActive Publication Date: 2025-09-26ARASHI VISION INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211207441.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-09-26
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

Excessive number of signal lines between gimbal components causes friction and interference, affecting communication stability.

Method used

By detecting the status of the gimbal communication party and switching the sending and receiving status of the signal line when the switching conditions are met, the signal lines are merged to reduce the number, reduce friction and interference.

Benefits of technology

It improves the communication stability between the gimbal components, reduces the friction and interference of the signal lines, and ensures the orderly transmission of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115664455B_ABST
    Figure CN115664455B_ABST
Patent Text Reader

Abstract

The present application relates to a data transmission method, a pan / tilt head (PTZ), a computer device, a computer-readable storage medium, and a computer program product. The method includes detecting the states of a first communication party and a second communication party; if the first communication party is detected to be in a sending state and the second communication party is in a receiving state, controlling the first communication party to send a first data packet to the second communication party via a signal line; and if the first data packet satisfies a first switching condition, switching the first communication party to a receiving state so that the first communication party receives a second data packet in reply from the second communication party via the signal line. This method can improve the stability of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data transmission method, a pan / tilt station, a computer device, a storage medium, and a computer program product. Background Art

[0002] With the advancement of computer technology, pan / tilt (GPT) cameras are increasingly used to stabilize image acquisition equipment during image or video capture. The various components of a GPT camera communicate via signal cables. However, excessive signal cables can easily rub against the central axis of the GPT motor, causing the cables to wear out. Furthermore, significant signal interference can occur, leading to poor communication stability between the GPT camera components. Summary of the Invention

[0003] Based on this, it is necessary to provide a data transmission method, a pan-tilt head, a computer device, a computer-readable storage medium and a computer program product that can improve communication stability in response to the above technical problems.

[0004] In a first aspect, the present application provides a data transmission method. The method is applied to a pan / tilt platform, wherein the pan / tilt platform includes a first communication party and a second communication party connected via a signal line, and the method includes:

[0005] detecting the status of the first communication party and the second communication party;

[0006] If it is detected that the first communication party is in a sending state and the second communication party is in a receiving state, controlling the first communication party to send a first data packet to the second communication party through the signal line;

[0007] If the first data packet meets the first switching condition, the first communication party is switched to a receiving state, so that the first communication party receives the second data packet replied by the second communication party through the signal line.

[0008] In a second aspect, the present application further provides a gimbal. The gimbal comprises:

[0009] A detection module, configured to detect the status of the first communication party and the second communication party;

[0010] a control module configured to control the first communication party to send a first data packet to the second communication party via the signal line if it is detected that the first communication party is in a sending state and the second communication party is in a receiving state;

[0011] The switching module is used to switch the first communication party to a receiving state if the first communication party meets a first switching condition, so that the first communication party receives a second data packet replied by the second communication party through the signal line.

[0012] In one embodiment, the switching module is further configured to:

[0013] detecting whether the first data packet is a data packet for which a response is expected;

[0014] If the first data packet is a data packet for which a response is expected, it is determined that the first data packet meets a first switching condition, and the first communication party is switched to a receiving state.

[0015] In one embodiment, the pan / tilt platform further comprises:

[0016] The detection module is further configured to detect whether the first data packet is a heartbeat data packet if the first data packet is not a data packet for which a response is expected;

[0017] The switching module is further configured to, if the first data packet is a heartbeat data packet, determine that the first data packet satisfies a first switching condition, and switch the first communication party to a receiving state.

[0018] In one embodiment, the switching module is further configured to:

[0019] If the first data packet satisfies a first switching condition, generating a square wave signal;

[0020] If it is detected that the generated square wave signal meets the preset waveform, the first communication party is switched to a receiving state.

[0021] In one embodiment, the pan / tilt platform further comprises:

[0022] The detection module is further configured to detect the received first data packet when the second communication party receives the first data packet;

[0023] The switching module is further configured to switch the second communication party to a sending state if it is detected that the first data packet is a data packet for which a response is expected or a heartbeat data packet.

[0024] In one embodiment, the pan / tilt platform further comprises:

[0025] a timing module, configured to time the duration that the first communication party remains in the receiving state;

[0026] The switching module is further configured to switch the first communication party to a sending state if the duration reaches a first preset duration.

[0027] In one embodiment, the pan / tilt platform further comprises:

[0028] The loop module is used to return to the step of detecting the status of the first communication party and the second communication party and loop until the first communication party and the second communication party end communication.

[0029] In one embodiment, the first communication party is a handle or a main control board of the gimbal, and the second communication party is one of the handle or the main control board.

[0030] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:

[0031] detecting the status of the first communication party and the second communication party;

[0032] If it is detected that the first communication party is in a sending state and the second communication party is in a receiving state, controlling the first communication party to send a first data packet to the second communication party through the signal line;

[0033] If the first data packet meets the first switching condition, the first communication party is switched to a receiving state, so that the first communication party receives the second data packet replied by the second communication party through the signal line.

[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0035] detecting the status of the first communication party and the second communication party;

[0036] If it is detected that the first communication party is in a sending state and the second communication party is in a receiving state, controlling the first communication party to send a first data packet to the second communication party through the signal line;

[0037] If the first data packet meets the first switching condition, the first communication party is switched to a receiving state, so that the first communication party receives the second data packet replied by the second communication party through the signal line.

[0038] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:

[0039] detecting the status of the first communication party and the second communication party;

[0040] If it is detected that the first communication party is in a sending state and the second communication party is in a receiving state, controlling the first communication party to send a first data packet to the second communication party through the signal line;

[0041] If the first data packet meets the first switching condition, the first communication party is switched to a receiving state, so that the first communication party receives the second data packet replied by the second communication party through the signal line.

[0042] The above-mentioned data transmission method, pan / tilt head, computer device, storage medium, and computer program product detect the status of a first communication party and a second communication party. If the first communication party is detected to be in a sending state and the second communication party is in a receiving state, the first communication party is controlled to send a first data packet to the second communication party via a signal line. If the first data packet satisfies a first switching condition, the first communication party is switched to a receiving state, so that the first communication party receives a second data packet in reply from the second communication party via the signal line. This allows the multiple signal lines between the first and second communication parties to be merged, and by switching the states of the first and second communication parties, the first and second communication parties communicate via the merged signal lines. This reduces the number of signal lines between the first and second communication parties, reduces friction between the signal lines, and reduces interference between the signals, thereby improving the stability of communication between the first and second communication parties. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A diagram showing an application environment of a data transmission method in one embodiment;

[0044] Figure 2 1 is a flow chart of a data transmission method according to an embodiment;

[0045] Figure 3a A schematic diagram of merging the RXD signal line and the TXD signal line for data transmission in one embodiment;

[0046] Figure 3b A schematic diagram of another embodiment of combining the RXD signal line and the TXD signal line for data transmission;

[0047] Figure 4 is a schematic diagram of a square wave signal in one embodiment;

[0048] Figure 5a A schematic diagram of merging the RXD signal line, the TXD signal line, and the key signal line for data transmission in one embodiment;

[0049] Figure 5bA schematic diagram of an embodiment of combining the TXD signal line of a first communication party with the key signal line, and combining the RXD signal line of a second communication party with the key signal line for data transmission;

[0050] Figure 6 Schematic diagram of various components in a gimbal according to one embodiment;

[0051] Figure 7 A schematic diagram of the connections between components in a gimbal in one embodiment;

[0052] Figure 8a A schematic diagram of a process flow of data transmission by a first communication party in one embodiment;

[0053] Figure 8b A schematic diagram of a process flow for data transmission by a second communication party in one embodiment;

[0054] Figure 9a A schematic diagram of various moments of a data transmission process in one embodiment;

[0055] Figure 9b is a schematic diagram of various moments of a data transmission process in another embodiment;

[0056] Figure 10 is a timing diagram of a data transmission method in one embodiment;

[0057] Figure 11 is a structural block diagram of a pan / tilt platform in one embodiment;

[0058] Figure 12 is a structural block diagram of a pan / tilt platform in another embodiment;

[0059] Figure 13 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0061] The data transmission method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown, the gimbal 10 includes a first communication partner 102 and a second communication partner 104 connected via a signal line. The gimbal 10 detects the status of the first and second communication partners 102, 104. If the first communication partner 102 is in the sending state and the second communication partner 104 is in the receiving state, the gimbal 100 controls the first communication partner 102 to send a first data packet to the second communication partner 104 via the signal line. If the first data packet meets a first switching condition, the first communication partner 102 is switched to the receiving state, allowing the first communication partner 102 to receive a second data packet from the second communication partner 104 via the signal line. The gimbal 10 is a supporting device that can hold a mobile phone, camera, or camcorder, and includes components such as a handle, a gimbal controller, and a motor. The first communication partner 102 is a component of the gimbal, which can be a handle or a gimbal controller. The second communication partner 104 is another component of the gimbal that communicates with the first communication partner, which can be a handle or a gimbal controller. The handle and the gimbal controller can communicate via a signal line.

[0062] In one embodiment, Figure 2 As shown, a data transmission method is provided, which is applied to Figure 1 The following steps are used as an example to illustrate the gimbal configuration:

[0063] S202: Detect the status of the first communication party and the second communication party.

[0064] Among them, the first communication party and the second communication party are both components in the gimbal, which can be a handle or a gimbal main control board. The handle can be, for example, a Bluetooth handle, and the gimbal main control can be, for example, a Yaw axis (rotation axis of yaw angle) main control, a Pitch axis (rotation axis of pitch angle) main control, or a Roll axis (rotation axis of roll angle) main control. For example, the first communication party is a handle, and the second communication party is a Yaw axis main control. For another example, the first communication party is a Pitch axis main control, and the second communication party is a Roll axis main control. The first communication party includes a controller, and the state of the first communication party is controlled by the controller. The signal line is a line used to transmit information, which can be a coaxial signal line, an optical fiber signal line, etc.

[0065] In one embodiment, Figure 3aAs shown, the first communication party is the initiator of communication. Both the first and second communication parties include a controller and an electronic switch. The controller in the first communication party controls the electronic switch to switch the first communication party's state; the controller in the second communication party controls the electronic switch to switch the second communication party's state. The electronic switch is a hardware chip that selects the data signal transmitted on the signal line. For example, when the electronic switch in the first communication party selects to send a data signal, the first communication party is in the transmitting state; when the electronic switch in the first communication party selects to receive a data signal, the first communication party is in the receiving state. The gimbal detects the states of the first and second communication parties.

[0066] In one embodiment, Figure 3b As shown, the RXD (Receive External Data) signal line and the TXD (Transmit External Data) signal line are short-circuited within the controller of the first communication partner. The controller of the first communication partner switches between the RXD and TXD signal lines via software. When the first communication partner switches on the TXD signal line, the first communication partner is in the transmitting state. When the second communication partner switches on the RXD signal line, the second communication partner is in the receiving state. The gimbal monitor detects the status of the first and second communication partners. The RXD signal line is used to receive incoming data, and the TXD signal line is used to transmit data.

[0067] S204: If it is detected that the first communication party is in a sending state and the second communication party is in a receiving state, the first communication party is controlled to send a first data packet to the second communication party through a signal line.

[0068] The receiving state is a state in which data packets can be received. The sending state is a state in which data packets can be sent. The first data packet is a data packet carrying information, which can be a data packet carrying valid data information or a heartbeat data packet. If the first communication party is detected to be in the sending state and the second communication party is in the receiving state, the first communication party is controlled to send the first data packet to the second communication party via the signal line.

[0069] S206 , if the first data packet satisfies the first switching condition, the first communication party is switched to a receiving state, so that the first communication party receives the second data packet replied by the second communication party through the signal line.

[0070] The first switching condition is a condition for determining whether to switch the first communication party to a receiving state. For example, the first switching condition may be that the first data packet is a data packet for which a response is expected. Another example is that the first switching condition may be that the first data packet is a heartbeat data packet. The second data packet is a data packet that the second communication party replies to the first communication party based on the received first data packet. For example, the second data packet may be a data packet that responds to the first data packet, or may be a heartbeat data packet.

[0071] In one embodiment, S206 specifically includes: if the first data packet satisfies the first switching condition, switching the first communication party to a receiving state via an electronic switch, so that the first communication party receives the second data packet replied by the second communication party via the signal line. Alternatively, the controller may switch the first communication party to a receiving state via software.

[0072] In the above embodiment, the states of the first and second communication parties are detected. If the first communication party is detected to be in the sending state and the second communication party is in the receiving state, the first communication party is controlled to send a first data packet to the second communication party via a signal line. If the first data packet satisfies a first switching condition, the first communication party is switched to the receiving state, so that the first communication party receives a second data packet in reply from the second communication party via the signal line. This allows the multiple signal lines between the first and second communication parties to be merged, and by switching the states of the first and second communication parties, the first and second communication parties communicate via the merged signal lines. This reduces the number of signal lines between the first and second communication parties, reduces friction between the signal lines, and reduces interference between the signals, thereby improving the stability of communication between the first and second communication parties.

[0073] In one embodiment, S206 specifically includes: detecting whether the first data packet is a data packet for which a response is expected; if the first data packet is a data packet for which a response is expected, determining that the first data packet meets a first switching condition, and switching the first communication party to a receiving state.

[0074] Among them, the data packet expected to be responded is a data packet that requires the second communication party to respond. For example, if the first data packet is a data packet requesting the second communication party to reply data, then the first data packet is a data packet expected to be responded. For another example, if the first data packet is a data packet requesting the second communication party to reply with confirmation information, then the first data packet is a data packet expected to be responded. If the first data packet is a data packet expected to be responded, then the second communication party will immediately reply to the first data packet upon receiving the first data packet. Therefore, when it is determined that the first data packet is a data packet expected to be responded, it is determined that the first data packet meets the first switching condition, and the first communication party is switched to the receiving state to receive the second data packet that the second communication party replies to the first data packet, thereby ensuring that the second data packet is received in a timely manner and ensuring the orderly transmission of data.

[0075] In one embodiment, if the first data packet is not a data packet for which a response is expected, it is detected whether the first data packet is a heartbeat data packet; if the first data packet is a heartbeat data packet, it is determined that the first data packet meets the first switching condition, and the first communication party is switched to a receiving state.

[0076] Among them, the heartbeat data packet is used to confirm the online status between communicating parties. The heartbeat data packet includes a custom command word and is sent at a certain time interval. The communicating party receiving the heartbeat data packet can confirm that the sender is online through the heartbeat data packet.

[0077] If the first data packet is a heartbeat data packet, the second communication party will return a heartbeat data packet to the first communication party upon receiving the first data packet, so that the first communication party can confirm that the second communication party is online. Therefore, when the first data packet is determined to be a heartbeat data packet, it is determined that the first data packet meets the first switching condition, and the first communication party is switched to a receiving state to receive the heartbeat data packet of the second communication party in response to the first data packet. This ensures that the second data packet is received in a timely manner, ensuring the orderly transmission of data.

[0078] Specifically, if the first data packet is not a data packet for which a response is expected, the first communication party determines whether the time for sending the heartbeat data packet has arrived. If the time for sending the heartbeat data packet has arrived, the first communication party sends the heartbeat data packet to the second communication party via the signal line. When the sending of the heartbeat data packet is completed, the first communication party switches from the sending state to the receiving state. The first communication party sends the heartbeat data packet to the second communication party according to a preset heartbeat data packet sending frequency. The sending frequency of the heartbeat data packet can be determined according to the data sending frequency of the pan-tilt master. For example, the sending frequency of the heartbeat data packet is proportional to the data sending frequency of the pan-tilt master. For example, the sending frequency of the heartbeat data packet is greater than the data sending frequency of the pan-tilt master.

[0079] When the time for sending the heartbeat data packet arrives, the first communication party sends a heartbeat data packet to the second communication party to maintain the communication connection with the second communication party through the heartbeat mechanism, avoid communication interruption with the second communication party, and ensure the stability of data transmission.

[0080] In the above embodiment, if the first data packet is a data packet for which a response is expected or a heartbeat data packet, the first communication party is switched to a receiving state upon completion of the first data packet transmission. This allows for timely switching of the first communication party's state, ensuring orderly data transmission. Furthermore, the first and second communication parties can transmit data via a combined signal line, reducing the number of signal lines between the first and second communication parties, minimizing friction between signal lines and interference between signals, thereby improving the stability of communication between the first and second communication parties.

[0081] In one embodiment, when the second communication party receives the first data packet, it detects the received first data packet; if it is detected that the first data packet is a data packet for which a response is expected or a heartbeat data packet, the second communication party is switched to a sending state.

[0082] When the second communication party receives the first data packet, it parses the first data packet and detects the data parsed from the first data packet. If the detection determines that the first data packet is a data packet for which a response is expected or a heartbeat data packet, the second communication party is switched to a sending state so that the second communication party can promptly reply to the first communication party. If the first data packet is a data packet for which a response is expected, the second communication party replies with a response data packet to the first communication party. If the first data packet is a heartbeat data packet, the second communication party replies with a heartbeat data packet to the first communication party.

[0083] In the above embodiment, when the second communication party receives the first data packet, it detects the received first data packet; if it detects that the first data packet is a data packet for which a response is expected or a heartbeat data packet, it switches the second communication party to a sending state. Thus, even when multiple signal lines are combined, communication can be performed over the combined single signal line, ensuring orderly data transmission.

[0084] In one embodiment, S206 specifically includes: if the first data packet meets the first switching condition, generating a square wave signal; if it is detected that the generated square wave signal meets a preset waveform, switching the first communication party to a receiving state.

[0085] Among them, the square wave signal is a signal composed of high and low levels. For example, Figure 4 As shown, a square wave signal is a signal consisting of a high level 1 and a low level 0. For example, if the generated square wave signal is detected as a high level waveform, the first communication party is switched to a receiving state. Alternatively, the first communication party can be set to switch to a receiving state if the generated square wave signal is detected as a low level waveform.

[0086] In one embodiment, when two or more signal lines are combined into one, the PTZ selects the state of the first and second communication parties based on the combination of high and low levels in the square wave signal. For example, when four signal lines (assuming signal line 1, signal line 2, signal line 3, and signal line 4) are combined into one, assuming that 1 represents a high level and 0 represents a low level, the high and low level combinations can include 11, 10, 01, and 00. For example, the first communication party can switch to the state of selecting signal line 1 when detecting "11"; switch to the state of selecting signal line 2 when detecting "10"; switch to the state of selecting signal line 3 when detecting "01"; and switch to the state of selecting signal line 4 when detecting "00". For example, in the time period 0-t1, the first communicating party detects that the square wave signal is "00" and switches to the state of selecting to send the RXD signal data packet; in the time period t1-t2, the square wave signal is detected to be "01", and switches to the state of selecting to send the key signal data packet; in the time period t2-t3, the square wave signal is detected to be "10", and switches to the receiving state.

[0087] In one embodiment, Figure 5a As shown, the electronic switches in the first communication party and the second communication party are used to switch the TXD, RXD and key signal lines. When the electronic switch in the first communication party is switched to select the TXD signal line and the electronic switch in the second communication party is switched to select the RXD signal line, that is, when the first communication party is in the sending state and the second communication party is in the receiving state, the first communication party can send data packets to the second communication party through the signal line, and the second communication party receives data packets through the signal line. When the electronic switch in the first communication party is switched to select the RXD signal line and the electronic switch in the second communication party is switched to select the TXD signal line, that is, when the first communication party is in the receiving state and the second communication party is in the sending state, the first communication party can receive data packets sent by the second communication party through the signal line. When the electronic switches of the first communication party and the second communication party are switched to the key signal line, key signals can be transmitted between the first communication party and the second communication party.

[0088] In one embodiment, Figure 5b As shown, the electronic switch in the first communication partner is used to select between the TXD signal line and the key signal line. The electronic switch in the second communication partner is used to select between the RXD signal line and the key signal line. When the electronic switch in the first communication partner selects the TXD signal line and the electronic switch in the second communication partner selects the RXD signal line, the first communication partner can send data packets to the second communication partner via the signal line, and the second communication partner can receive data packets via the signal line. When both the electronic switches in the first communication partner and the second communication partner select the key signal line, the first communication partner can send data packets containing key signals to the second communication partner via the signal line, or receive data packets containing key signals from the second communication partner.

[0089] In one embodiment, after S206 , the process further includes: timing the duration that the first communication party remains in the receiving state; if the duration reaches a first preset duration, switching the first communication party to the sending state.

[0090] The first preset duration is used to determine whether the length of time the first communication party has been in the receiving state has timed out. To prevent the first communication party from being unable to send data due to being in the receiving state for an extended period, the receiving state of the first communication party is switched back to the sending state when the length of time the first communication party has been in the receiving state reaches the first preset duration. Because larger data packets received by the first communication party require longer reception time, the first preset duration can be set based on the size of the data packets received by the first communication party. For example, the first preset duration can be proportional to the size of the data packets received by the first communication party.

[0091] In one embodiment, after the pan / tilt platform switches the first communication party to the sending state, it returns to execute the step of detecting the states of the first communication party and the second communication party and loops until the first communication party and the second communication party terminate communication.

[0092] In the above embodiment, the duration that the first communication party remains in the receiving state is timed; if the duration reaches a first preset duration, the first communication party is switched to the sending state. This prevents the first communication party from being unable to send data due to being in the receiving state for a long time, thereby ensuring orderly data transmission.

[0093] In one embodiment, the gimbal measures the time that the second communication party is in the sending state; when the measured time reaches a second preset time, the second communication party is switched from the sending state back to the receiving state; when the measured time has not yet reached the second preset time, if it is detected that all the data packets to be sent have been sent, the second communication party is switched from the sending state back to the receiving state.

[0094] The second preset duration is used to determine whether the second communication party has been in the sending state for a timeout. To prevent the second communication party from being unable to receive data due to being in the sending state for a long time, when the second communication party has been in the sending state for a period of time that reaches the second preset duration, the sending state of the second communication party is switched back to the receiving state. Since the larger the data packet sent by the second communication party, the longer the sending time required, the second preset duration can be set according to the size of the data packet sent by the second communication party. For example, the second preset duration is proportional to the size of the data packet sent by the second communication party. If the timing duration has not yet reached the second preset duration, but all the data packets to be sent have been sent, the sending state of the second communication party is switched back to the receiving state, so that the second communication party can switch back to the receiving state in time and wait to receive the data packet sent by the first communication party.

[0095] In the above embodiment, if the second communication party has been in the sending state for a second predetermined time period, or even if the timed time period has not yet reached the second predetermined time period but it is detected that all pending data packets have been sent, the second communication party is switched from the sending state back to the receiving state. This allows the second communication party to switch back to the receiving state in a timely manner, ensuring orderly data transmission.

[0096] In one embodiment, Figure 6 As shown, the gimbal includes a Bluetooth handle, a Yaw axis, a Pitch axis, and a Roll axis, which are used to hold the mobile terminal. The Yaw axis, Pitch axis, and Roll axis include a Yaw axis PCB (Printed Circuit Board), a Pitch axis PCB, and a Roll axis PCB, respectively. Figure 7 As shown, the Bluetooth controller is connected to the Yaw axis PCB board, the Yaw axis PCB board is connected to the Pitch axis PCB board, and the Pitch axis PCB board is connected to the Roll axis PCB board via connecting wires. Specifically, the connecting wires include power wires, ground wires, or signal wires. The controller of the Bluetooth controller, the controller of the Yaw axis, the controller of the Pitch axis, and the controller of the Roll axis are respectively connected to their respective electronic switches via multiple signal wires. The connecting wires between the electronic switches include power wires, ground wires, and signal wires. The electronic switch is used to select the multiple signal lines between the controller and the electronic switch, and transmit the data packets in the selected signal lines through the signal lines. For example, when the electronic switch of the Bluetooth controller selects the TXD signal line, the Bluetooth controller is in the sending state, and sends the data packets of the TXD signal to the Yaw axis PCB board through the signal line; when the electronic switch of the Bluetooth controller selects the RXD signal line, the Bluetooth controller is in the receiving state, and receives the data packets from the Yaw axis PCB board through the signal line.

[0097] In one embodiment, the first communication party acts as a communication initiator to transmit data with the second communication party. Figure 8a The figure shows a flow chart of data transmission of the first communication party, as shown in FIG. Figure 8bThe figure shows a flow chart of data transmission by the second party. At the start of data transmission, the electronic switch on the first party selects TXD, putting the first party in the transmitting state, and the electronic switch on the second party selects RXD, putting the second party in the receiving state. The first party sends a first data packet to the second party via a signal line and determines whether the first data packet requires an immediate response from the second party. If the first data packet requires an immediate response from the second party, the first party switches from the transmitting state to the receiving state upon completion of the first data packet transmission, awaiting a second data packet from the second party in response to the first data packet. If the first data packet does not require an immediate response from the second party, the first party determines whether the time to send a heartbeat data packet has arrived after sending the first data packet. If the time to send a heartbeat data packet has arrived, the first party sends a heartbeat data packet to the second party upon completion of the first data packet transmission and switches from the transmitting state to the receiving state upon completion of the heartbeat data packet transmission. The first party measures the time spent in the receiving state. When the receiving state timeout expires, the first party switches back from the receiving state to the transmitting state and enters the next data transmission cycle.

[0098] In one embodiment, Figure 9a As shown, times T1 and T2 are the times when the first communication party sends a heartbeat data packet. After sending the heartbeat data packet, the first communication party switches from the sending state to the receiving state and remains in the receiving state during the T1-T3 time period. Time T3 is the time when the first communication party's receiving state times out. When time T3 arrives, the first communication party switches from the receiving state to the sending state and can send data during the T3-T2 time period. After sending the heartbeat data packet at time T2, the first communication party switches from the sending state to the receiving state. Time T5 is the time when the first communication party's receiving state times out. During the T2-T5 time period, the first communication party remains in the receiving state and can receive data packets sent by the second communication party. The second communication party receives the heartbeat data packet sent by the first communication party at time T4 and switches from the receiving state to the sending state at time T4. After time T4, the second communication party sends three data packets to the first communication party in succession. At time T6, the sending state timeout is reached and the second communication party switches from the sending state to the receiving state.

[0099] In one embodiment, Figure 9bAs shown, the first communication partner is in the sending state before time T1, which is when the first communication partner sends data packet 1. After sending data packet 1, the first communication partner switches from the sending state to the receiving state, awaiting a reply data packet from the second communication partner. The second communication partner receives data packet 1 at time T2 and parses it. If the parsing determines that data packet 1 requires an immediate reply, the second communication partner switches from the receiving state to the sending state and sends data packet 2 to the first communication partner. The second communication partner can switch to the receiving state immediately after sending data packet 2, or it can switch to the receiving state when the sending state timeout expires, that is, at time T3. If the second communication partner switches to the receiving state at time T3, it can send data packets to the first communication partner until time T3 expires. Time T4 is the receiving state timeout for the first communication partner. At time T4, the first communication partner switches from the receiving state back to the sending state.

[0100] In one embodiment, multiple signal lines between a first communication party and a second communication party are combined into one. When the first communication party is in a sending state, data packets from each signal line can be sent in time slots before the sending state timeout expires. This can reduce the number of signal lines and improve data transmission stability.

[0101] In the above embodiment, multiple signal lines between a first communication party and a second communication party are combined into a single signal line, and data transmission between the first and second communication parties is achieved through a time-division multiplexing mechanism. This reduces the number of signal lines between the first and second communication parties, reduces friction between the signal lines and interference between the signals, and thus improves the stability of communication between the first and second communication parties. Furthermore, orderly data transmission is achieved by controlling the states of the first and second communication parties.

[0102] In one embodiment, the data transmission method is applied to a pan-tilt platform, which includes a first communication party and a second communication party connected by a signal line, such as Figure 10 As shown, the data transmission method includes the following steps:

[0103] S1002: When the first communication party is in a sending state and the second communication party is in a receiving state, the first communication party sends a first data packet to the second communication party through a signal line.

[0104] S1004: The first communication party determines whether the first data packet is a data packet for which a response is expected.

[0105] S1006: If the first data packet is a data packet for which a response is expected, after the first data packet is sent, the sending state of the first communication party is switched to the receiving state.

[0106] S1008: The second communication party receives the first data packet through the signal line.

[0107] S1010: The second communication party parses the first data packet to determine whether the first data packet is a data packet for which a response is expected.

[0108] S1012: If the first data packet is a data packet for which a response is expected, the second communication party switches the receiving state of the second communication party to the sending state.

[0109] S1014: The second communication party sends a second data packet to the first communication party via the signal line.

[0110] S1016: When the sending state timeout period is reached, the second communication party switches from the sending state back to the receiving state.

[0111] S1018, when the receiving state timeout period is reached, the first communication party switches from the receiving state back to the sending state.

[0112] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0113] Based on the same inventive concept, the present application also provides a pan-tilt platform for implementing the aforementioned data transmission method. The solution provided by this pan-tilt platform is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more pan-tilt platform embodiments provided below can be found in the aforementioned limitations of the data transmission method and will not be further elaborated here.

[0114] In one embodiment, Figure 11 As shown, a pan-tilt platform is provided, including: a detection module 1102, a control module 1104, and a switching module 1106, wherein:

[0115] A detection module 1102 is configured to detect the status of the first communication party and the second communication party;

[0116] The control module 1104 is configured to control the first communication party to send a first data packet to the second communication party via a signal line if it is detected that the first communication party is in a sending state and the second communication party is in a receiving state;

[0117] The switching module 1106 is configured to switch the first communication party to a receiving state if the first communication party meets a first switching condition, so that the first communication party receives a second data packet replied by the second communication party through the signal line.

[0118] In the above embodiment, the states of the first and second communication parties are detected. If the first communication party is detected to be in the sending state and the second communication party is in the receiving state, the first communication party is controlled to send a first data packet to the second communication party via a signal line. If the first data packet satisfies a first switching condition, the first communication party is switched to the receiving state, so that the first communication party receives a second data packet in reply from the second communication party via the signal line. This allows the multiple signal lines between the first and second communication parties to be merged, and by switching the states of the first and second communication parties, the first and second communication parties communicate via the merged signal lines. This reduces the number of signal lines between the first and second communication parties, reduces friction between the signal lines, and reduces interference between the signals, thereby improving the stability of communication between the first and second communication parties.

[0119] In one embodiment, the switching module 1106 is further configured to:

[0120] detecting whether the first data packet is a data packet for which a response is expected;

[0121] If the first data packet is a data packet for which a response is expected, it is determined that the first data packet meets a first switching condition, and the first communication party is switched to a receiving state.

[0122] In one embodiment, the pan / tilt platform further comprises:

[0123] The detection module 1102 is further configured to detect whether the first data packet is a heartbeat data packet if the first data packet is not a data packet for which a response is expected;

[0124] The switching module 1106 is further configured to, if the first data packet is a heartbeat data packet, determine that the first data packet satisfies a first switching condition, and switch the first communication party to a receiving state.

[0125] In one embodiment, the switching module 1106 is further configured to:

[0126] If the first data packet satisfies the first switching condition, generating a square wave signal;

[0127] If it is detected that the generated square wave signal meets the preset waveform, the first communication party is switched to a receiving state.

[0128] In one embodiment, the pan / tilt platform further comprises:

[0129] The detection module 1102 is further configured to detect the received first data packet when the second communication party receives the first data packet;

[0130] The switching module 1106 is further configured to switch the second communication party to a sending state if it is detected that the first data packet is a data packet for which a response is expected or a heartbeat data packet.

[0131] In one embodiment, Figure 12 As shown, the gimbal also includes:

[0132] a timing module 1108, configured to time the duration that the first communication party remains in the receiving state;

[0133] The switching module 1106 is further configured to switch the first communication party to a sending state if the duration reaches a first preset duration.

[0134] In one embodiment, the pan / tilt platform further comprises:

[0135] The loop module 1110 is configured to return to the step of detecting the status of the first communication party and the second communication party and loop until the first communication party and the second communication party terminate communication.

[0136] In one embodiment, the first communication party is a handle or a main control board of the gimbal, and the second communication party is a handle or a main control board.

[0137] Each module in the above-mentioned gimbal can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0138] In one embodiment, a computer device is provided. The computer device may be a pan-tilt platform, and its internal structure diagram may be as follows: Figure 13As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data transmission method is implemented.

[0139] Those skilled in the art will understand that Figure 13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0141] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0142] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0143] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0144] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0145] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A data transmission method, characterized in that: The method is applied to a pan / tilt platform, the pan / tilt platform including a first communication party and a second communication party connected via a signal line, the method comprising: detecting the status of the first communication party and the second communication party; If it is detected that the first communication party is in a sending state and the second communication party is in a receiving state, controlling the first communication party to send a first data packet to the second communication party through the signal line; If the first data packet meets the first switching condition, a square wave signal is generated; if it is detected that the generated square wave signal meets the preset waveform, the first communication party is switched to a receiving state, so that the first communication party receives the second data packet replied by the second communication party through the signal line; the state of the signal line indicated by the square wave signal is related to the type of the signal line before the merger, and multiple signal lines before the merger are merged into the signal line.

2. The method according to claim 1, characterized in that The method further comprises: detecting whether the first data packet is a data packet for which a response is expected; If the first data packet is a data packet for which a response is expected, it is determined that the first data packet meets a first switching condition.

3. The method according to claim 2, characterized in that The method further comprises: If the first data packet is not a data packet for which a response is expected, detecting whether the first data packet is a heartbeat data packet; If the first data packet is a heartbeat data packet, it is determined that the first data packet meets a first switching condition.

4. The method according to claim 1, wherein The method further comprises: When the second communication party receives the first data packet, detecting the received first data packet; If it is detected that the first data packet is a data packet for which a response is expected or a heartbeat data packet, the second communication party is switched to a sending state.

5. The method according to claim 1, wherein After switching the first communication party to a receiving state, the method further includes: timing the duration that the first communication party remains in the receiving state; If the duration reaches a first preset duration, the first communication party is switched to a sending state.

6. The method according to claim 5, characterized in that After switching the first communication party to a sending state, the method further includes: Return to the step of detecting the status of the first communication party and the second communication party and loop until the first communication party and the second communication party end communication.

7. The method according to claim 1, characterized in that The first communication party is one of the handle or the main control board of the gimbal, and the second communication party is one of the handle or the main control board.

8. The method according to claim 1, characterized in that The controller of the first communication party short-circuits the RXD signal line and the TXD signal line; when the first communication party turns on the TXD signal line, the first communication party is in the sending state; when the second communication party turns on the RXD signal line, the second communication party is in the receiving state; The RXD signal line is used to receive incoming data, and the TXD signal line is used to send data.

9. A pan / tilt head, characterized in that: The pan / tilt platform comprises: A detection module, configured to detect the status of the first communication party and the second communication party; a control module configured to control the first communication party to send a first data packet to the second communication party via a signal line if it is detected that the first communication party is in a sending state and the second communication party is in a receiving state; A switching module is configured to generate a square wave signal if the first communication party satisfies a first switching condition; if it is detected that the generated square wave signal satisfies a preset waveform, switch the first communication party to a receiving state, so that the first communication party receives a second data packet replied by the second communication party through the signal line; the state of the signal line indicated by the square wave signal is related to the type of transmission of the signal line before merging, and multiple signal lines before merging are merged into the signal line.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

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

Citation Information

Patent Citations

  • Single-line communication method and device, electronic equipment and readable storage medium

    CN112579509A