Device control method, system, electronic device and computer storage medium
By setting the starting signal of the control signal in the signal frame along the bit position corresponding to the clock signal and inputting the control signal and data signal alternately, the problem of low equipment control efficiency in the prior art is solved, and efficient and flexible equipment control is achieved.
Patent Information
- Application Number
- CN202310566999.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-18
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2043-05-18
AI Technical Summary
In the prior art, the audio interface protocol can only transmit data signals or control signals at the same time, resulting in the need to send different control instructions when controlling different controlled devices, resulting in low device control efficiency.
By setting the starting signal of the control signal in the signal frame along the bit position corresponding to the clock signal, using some signals in the control signal to form control instructions, the remaining part of the signals form control information, alternately input the control signal and data signal, and control instead of the registers in the controlled device.
The equipment control efficiency is improved, the control signal transmission volume is ensured, and the signal frame adaptability to various communication protocols is increased, and flexible control of different controlled devices is achieved.
Smart Images

Figure CN116582608B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal transmission technology, and in particular to a device control method, system, electronic device and computer storage medium. Background Art
[0002] Audio interface protocols define the transmission format of audio data. Device manufacturers produce audio interfaces for various audio devices according to these standards. The audio interface's transceiver module receives and transmits audio data between the controlling device (i.e., master) and the controlled device (i.e., slave), implementing the protocol's requirements. This facilitates the transmission of digital audio signals between devices. However, since common audio interfaces (such as IIS and IIC) can only transmit data signals or control signals, controlling both devices simultaneously presents a challenge.
[0003] At present, in order to solve the above problems, an interface bus that can transmit data signals and control signals at the same time has been proposed. A small part of each frame of the signal is used to transmit the control signal, and the rest of the signal is used to transmit the data signal. The control signal transmits the control instruction to the controlled device, and the control instruction calls the control information through the register in the controlled device, thereby controlling the controlled device.
[0004] However, in the method of controlling the controlled devices by calling registers, different control instructions need to be sent respectively when controlling different controlled devices because the control information stored in the registers of different controlled devices is different, resulting in low device control efficiency. Summary of the Invention
[0005] In view of this, the present application provides a device control method, system, electronic device and computer storage medium to solve the technical problem of low device control efficiency in traditional solutions.
[0006] The first aspect of the present application provides a device control method, which is applied to a control device, and the method includes: determining the starting signal edge of a signal frame and the bit position corresponding to a clock signal, wherein the starting signal edge of the control signal in the signal frame is opposite to the starting signal edge of the data signal in the signal frame, the control signal in at least one bit corresponding to the clock signal constitutes a control instruction, and the remaining control signals constitute control information, the control instruction is used to indicate the type of the control signal in the signal frame, and the control information is used to indicate the content of the control signal in the signal frame.
[0007] Optionally, when the control instruction indicates that the type of the control signal is a monitoring signal, a feedback signal sent by the controlled device is received, and the feedback signal is parsed according to the clock signal.
[0008] Optionally, the control signal and the data signal may correspond to the same number of bits of the clock signal.
[0009] Optionally, the method may further include: encapsulating control signals and data signals of multiple controlled devices into the signal frame as multiple signal transmission channels respectively, wherein the clock signal instructs each controlled device to parse the control signal or data signal of the corresponding signal transmission channel.
[0010] Optionally, each signal transmission channel corresponds to the same number of bits of the clock signal.
[0011] Optionally, each controlled device corresponds to a signal transmission channel.
[0012] Optionally, there is a preset number of bits of the clock signal between a start signal edge of the control signal of the at least one controlled device and a start signal edge of the signal frame, and the preset number of bits indicates a control signal transmission mode of the signal frame.
[0013] The second aspect of the present application provides a device control method, which is applied to a controlled device, and the method includes: receiving a signal frame and a clock signal sent by a control device; determining the starting signal edge of the signal frame according to the bit position of the clock signal; parsing the signal frame according to the starting signal edge to obtain a control signal and a data signal, wherein the starting signal edge of the control signal in the signal frame is opposite to the starting signal edge of the data signal in the signal frame, the control signal in at least one bit corresponding to the clock signal constitutes a control instruction, and the remaining control signals constitute control information, the control instruction is used to indicate the type of the control signal in the signal frame, and the control information is used to indicate the content of the control signal in the signal frame.
[0014] Optionally, the control signal and the data signal have the same number of clock signal bits.
[0015] Optionally, parsing the signal frame according to the start signal edge to obtain the control signal and the data signal includes: parsing the signal frame according to the start signal edge and the clock signal to obtain the control signal and the data signal; when the control instruction indicates that the type of the control signal is a monitoring signal, feeding back a feedback signal corresponding to the control signal and the data signal in the next frame of the signal frame.
[0016] The third aspect of the present application provides a device control system, comprising: a control device and a controlled device; the control device comprises a first audio interface, the first audio interface is used to determine the starting signal edge of the signal frame and the bit position corresponding to the clock signal, wherein the starting signal edge of the control signal in the signal frame is opposite to the starting signal edge of the data signal in the signal frame, the control signal in at least one bit corresponding to the clock signal constitutes a control instruction, and the remaining control signals constitute control information, the control instruction is used to indicate the type of the control signal in the signal frame, and the control information is used to indicate the content of the control signal in the signal frame, and according to the bit position , sending the signal frame and the clock signal to at least one controlled device through the audio interface, the clock signal instructing the at least one controlled device to parse the signal frame according to the start signal edge; the controlled device includes a second audio interface, the second audio interface is used to receive the signal frame and the clock signal sent by the control device through the audio interface, determine the start signal edge of the signal frame according to the bit position of the clock signal, and parse the signal frame according to the start signal edge to obtain a control signal and a data signal, wherein the start signal edge of the control signal in the signal frame is opposite to the start signal edge of the data signal in the signal frame.
[0017] According to the fourth aspect of the embodiments of the present application, an electronic device is provided, including: a processor, a communication interface, a memory and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the device control method described in the first aspect and / or second aspect of the embodiments.
[0018] According to a fifth aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the device control method as described in the first aspect and / or the second aspect of the embodiment is implemented.
[0019] The device control method provided in this application utilizes a portion of the control signal to form a control instruction, with the remaining control signal transmitting control information to the controlled device. This method can replace registers in the controlled device, eliminating the need to send different instructions when performing the same control operation on different controlled devices. This improves device control efficiency. By alternately inputting control signals and data signals within a signal frame, the amount of control signal transmitted can be guaranteed, enabling timely transmission of the control signal. Furthermore, because the bit position corresponding to the start signal edge of the signal frame can be determined by a clock signal, the signal frame can be flexibly configured, increasing its adaptability to various communication protocols. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0021] Figure 1 This is a device control method according to an embodiment of the present application;
[0022] Figure 2 This is a device control timing diagram of an embodiment of the present application;
[0023] Figure 3 is a device control timing diagram of another embodiment of the present application;
[0024] Figure 4 This is a device control timing diagram of another embodiment of the present application;
[0025] Figure 5 This is a device control method according to another embodiment of the present application;
[0026] Figure 6 is a schematic diagram of a device control system according to an embodiment of the present application;
[0027] Figure 7 This is a schematic diagram of device control system communication according to an embodiment of the present application;
[0028] Figure 8 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of the embodiments of the present application.
[0030] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0031] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0032] The acquisition, processing, and transmission of digital audio data are crucial components of multimedia technology. Numerous digital audio systems, such as digital audio cassettes and digital sound processors, have entered the consumer market. For equipment and manufacturers, standardized information transmission structures can improve system adaptability.
[0033] Audio interface protocols define the transmission format of audio data. Device manufacturers produce audio interfaces for various audio devices according to these standards. The audio interface transceiver module receives and transmits audio data according to the protocol, enabling the transmission of digital audio signals between devices. Different audio signal processing methods and formats are required to meet different needs, resulting in different digital audio interfaces. Digital audio interfaces can be categorized as control interfaces or data interfaces based on the type of signal being transmitted. Control devices transmit audio data streams to controlled devices via data interfaces (such as I2S interfaces) while controlling devices configure controlled devices and monitor system status via control interfaces (such as IIC and SPI interfaces).
[0034] In order to transmit data signals and control signals at the same time, the interface bus SoundWire (MIPI's interface protocol for transmitting audio signals) is currently proposed. The data signal and control signal are transmitted simultaneously by using a smaller part of each frame of the signal to transmit the control signal and the remaining part to transmit the data signal.
[0035] Specifically, the interface bus Soundwire uses 48 bits in each signal frame to transmit control signals, and the remaining bits are used to transmit data signals. For signal frames, the shortest signal frame is 48 bits*2 in size, but the transmission efficiency of using the shortest signal frame for signal transmission is too low, and larger signal frames are usually used for data transmission, such as 256*16. In this case, the transmission of data signals far exceeds that of control signals. At the same time, the size of 48 bits is too small for transmitting control signals, and the control signals transmitted in each signal frame are too few, resulting in a corresponding decrease in the control efficiency of the controlled device. Therefore, this solution proposes a device control method and system to solve the above problems.
[0036] The following, in conjunction with the accompanying drawings, clearly and completely describes the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application. In the absence of conflict, the following embodiments and their technical features can be combined with each other.
[0037] Device control method
[0038] Figure 1 This is a device control method according to an embodiment of the present application. Figure 1 As shown, the device control method applied to the control device includes the following steps:
[0039] Step 101: Determine the bit position of the start signal edge of the signal frame corresponding to the clock signal.
[0040] To control a controlled device, the starting signal edge of the signal frame, such as the rising or falling edge, and the bit position corresponding to the clock signal are first determined. A rising edge is the moment when the signal level changes from a low level (digital "0") to a high level (digital "1"), and a falling edge is the moment when the signal level changes from a high level (digital "1") to a low level (digital "0"). Clock signals include a frame clock signal (WCK) and a bit clock signal (BCK). The rising or falling edge of the frame clock signal can be used as a reference position for the bit position. The bit position can be the reference position or a position that is separated from the reference position by at least one bit clock signal cycle.
[0041] In addition, the starting signal edge of the control signal in the signal frame is opposite to the starting signal edge of the data signal in the signal frame. The control signal in at least one bit corresponding to the clock signal constitutes a control instruction, and the remaining control signals constitute control information. The control instruction is used to indicate the type of the control signal in the signal frame, and the control information is used to indicate the content of the control signal in the signal frame.
[0042] For example, the first three bits of the control signal corresponding to the clock signal can be set to form a control instruction. The control instruction can indicate the type of the control signal in the signal frame, such as a reset instruction, a start instruction, a mute instruction, etc. The remaining control signals describe the control operation that the control device needs to perform on the controlled device. For example, when the control instruction indicates that the type of the control signal in the signal frame is a monitoring instruction, the remaining control signals are used to indicate the specific content that the controlled device needs to monitor.
[0043] At the same time, the control signal and the data signal can be input alternately. For example, the control signal can be input first, then the data signal, and then the control signal, and this input method can be repeated so that the control signal and the data signal are alternately input in the signal frame.
[0044] The device control timing diagram can be as follows Figure 2 As shown, in Figure 2 In the example, the signal frame uses the falling edge of the frame clock signal as the reference position of the corresponding bit position, and the position at an interval of three bit clock signal cycles is used as the bit position. In the signal frame, the first three control signals and data signals constitute the control instructions. After receiving the signal frame, the controlled device parses it and feeds back the signal to the controlling device.
[0045] Step 102: Send a signal frame and a clock signal to at least one controlled device according to the bit position.
[0046] After determining the bit position, the control device sends a signal frame and a clock signal to at least one controlled device. Since the control signal and the data signal are input alternately, when the control signal corresponds to the rising edge of the bit clock in the clock signal, the data signal corresponds to the falling edge of the bit clock in the clock signal, and vice versa. Therefore, the clock signal can instruct at least one controlled device to parse the signal frame according to the start signal edge.
[0047] In an embodiment of the present application, by configuring a portion of the control signal to form a control instruction, and using the remaining control signal to transmit the control information to the controlled device, the register in the controlled device can be replaced. When performing the same control operation on different controlled devices, there is no need to send different instructions, thereby improving the control efficiency of the device. By alternately inputting the control signal and the data signal in the signal frame, the signal quantity of the transmitted control signal can be guaranteed, thereby enabling the timely transmission of the control signal. In addition, since the bit position corresponding to the starting signal edge of the signal frame can be determined by the clock signal, the signal frame can be flexibly configured, increasing the adaptability of the signal frame to various communication protocols.
[0048] In a possible implementation, when the control instruction indicates that the type of the control signal is a monitoring signal, a feedback signal sent by the controlled device is received, and the feedback signal is parsed according to the clock signal.
[0049] When the control instruction indicates that the control signal type is a monitoring signal, the controlled device will feedback a signal to the control device after parsing the signal frame. The control device can then parse the feedback signal based on the clock signal. For example, the control device can parse the control signal from the controlled device feedback signal based on the rising edge of the clock signal in the clock signal, and parse the data signal from the controlled device feedback signal based on the falling edge of the clock signal in the clock signal.
[0050] It should be noted that the control device can also parse the control signal in the feedback signal of the controlled device according to the falling edge of the bit clock signal, and parse the data signal in the feedback signal of the controlled device according to the rising edge of the bit clock signal in the clock signal, which is not limited here.
[0051] In the embodiment of the present application, during the monitoring process, the control device analyzes the feedback signal through the clock signal and can monitor the status of the controlled device in real time.
[0052] In one possible implementation, the control signal and the data signal may correspond to the same number of bits of the clock signal.
[0053] For example, each control signal and data signal may be set to correspond to a 48-bit clock signal.
[0054] In the embodiment of the present application, by setting the control signal and the data signal to have the same number of bits corresponding to the clock signal, the transmission frequency of the control signal can be made the same as the transmission frequency of the data signal, thereby ensuring the transmission rate of the control signal.
[0055] In a possible implementation, control signals and data signals of multiple controlled devices may be respectively encapsulated into signal frames as multiple signal transmission channels.
[0056] The clock signal instructs each controlled device to interpret the control signal or data signal of the corresponding signal transmission channel.
[0057] For example, if the control device needs to monitor the controlled devices, the control device can send signal frames and clock signals to n controlled devices, where n is a positive integer greater than 2, such as Figure 3 As shown, the control device can distribute control signals and data signals to multiple channels, send signal frames to the controlled device through the data line in the audio interface, and send clock signals through the frame clock line and bit clock line in the audio interface. After receiving the signal frame and clock signal, the controlled device parses the signal frame and feeds back the signal to the control device.
[0058] It should be noted that the feedback signal of the controlled device also includes a data signal and a control signal. The control signal and data signal in the feedback signal of the controlled device are interrupt signals or status signals that feed back the control signal sent by the control device.
[0059] The control signal can be a binary signal, composed of signals of various bits. For example, the control signal can be a binary signal such as 001, 1001, 10101, and different control signals can be configured as universal control instructions, such as reset instructions, start instructions, mute instructions, and other control instructions, which can control different types of controlled devices. At the same time, vacant bits can be flexibly set in the control signal. The vacant bits have no effect on the content of the control instructions, but can change the length of the control signal. Because the control signal is a binary signal, the control signal can be adapted to a variety of different controlled devices. In addition, vacant bits can be set to flexibly adjust the length of the control signal, further improving the adaptability of the control signal.
[0060] For another example, if the control device only needs to control the controlled device, the control device can also send signal frames and clock signals to n controlled devices, where n is a positive integer greater than 2. Figure 3 The difference between the timing diagram shown is that no feedback signal from the controlled device is required, so only one data line is needed. The specific timing diagram is as follows Figure 4 shown.
[0061] In an embodiment of the present application, the control signals and data signals of multiple controlled devices are respectively used as multiple signal transmission channels and encapsulated into signal frames, so that the control device can control multiple controlled devices at the same time, and within one frame, the control device sends control information to the controlled devices through different channels to perform synchronous control of the controlled devices.
[0062] In a possible implementation, each signal transmission channel may correspond to the same number of bits of the clock signal.
[0063] The signal transmission channels used to send signal frames and clock signals to each controlled device may correspond to the same number of bits of the clock signal. For example, the signal transmission channels may all correspond to 576 bits of the clock signal.
[0064] In the embodiment of the present application, by setting each signal transmission channel to correspond to the same number of bits of the clock signal, it is possible to avoid excessive restrictions on the number of signal frame bits due to different channel lengths.
[0065] Existing audio control interfaces typically involve the controller selecting the device address (e.g., IIC, soundwire) or port (e.g., SPI) of the controlled device to match the controlled device, and then performing read and write operations on the controlled device's registers. The signal frame transmission rate is relatively slow.
[0066] In a possible implementation, each controlled device may correspond to a signal transmission channel.
[0067] By setting each controlled device to correspond to a signal transmission channel, the device address of the controlled device can be bound to the signal transmission channel corresponding to the controlled device and matched with the controlled device. When transmitting signal frames to the controlled device, they can be transmitted directly.
[0068] In the embodiment of the present application, by setting each controlled device to correspond to a signal transmission channel, the need to select the device address of the controlled device and perform a matching process each time a signal is transmitted to the controlled device is avoided, thereby improving the transmission rate of the signal frame.
[0069] In one possible implementation, there may be a preset number of bits of the clock signal between the start signal edge of the control signal of at least one controlled device and the start signal edge of the signal frame, and the preset number of bits may indicate a control signal transmission mode of the signal frame.
[0070] Since the requirements of various communication protocols are different, in order to achieve compatibility, it is necessary to set a preset number of bits with a clock signal between the start signal edge of the control signal and the start signal edge of the signal frame. For example, the IIC protocol requires a preset number of bits of a bit clock cycle. Compatibility is only achieved if a bit of a bit clock cycle is set between the start signal edge of the control signal and the start signal edge of the signal frame.
[0071] In the embodiment of the present application, by setting a preset number of bits of a clock signal between the start signal edge of the control signal and the start signal edge of the signal frame, the transmitted control signal can be adapted to various communication protocols.
[0072] Figure 5 This is another embodiment of the device control method of the present application, such as Figure 5 As shown, the device control method for the controlled device includes the following steps:
[0073] Step 401: Receive a signal frame and a clock signal sent by a control device.
[0074] The controlled device receives a signal frame and a clock signal sent by the controlling device. The starting signal edge of the control signal in the signal frame is opposite to the starting signal edge of the data signal in the signal frame. The control signal in at least one bit corresponding to the clock signal constitutes a control instruction, and the remaining control signals constitute control information. The control instruction is used to indicate the type of the control signal in the signal frame, and the control information is used to indicate the content of the control signal in the signal frame.
[0075] The control signal and the data signal can be input alternately. For example, the control signal can be input first, then the data signal, and then the control signal, and this input method can be repeated so that the control signal and the data signal are alternated in the signal frame.
[0076] Step 402: Determine the starting signal edge of the signal frame according to the bit position of the clock signal.
[0077] The clock signal includes a frame clock signal and a bit clock signal. The controlled device determines the starting signal edge reference position of the signal frame according to the frame clock, and determines the starting signal edge of the signal frame according to the bit clock signal and the reference position.
[0078] Step 403: parse the signal frame according to the start signal edge to obtain the control signal and the data signal.
[0079] The starting edge of the control signal in a signal frame is opposite to the starting edge of the data signal in the signal frame, and the control signal and data signal are input alternately. Therefore, when the control signal corresponds to the rising edge of the bit clock in the clock signal, the data signal corresponds to the falling edge of the bit clock in the clock signal. The controlled device parses the signal frame to obtain the control signal and data signal. The control signal and data signal constitute the control instruction, which can include monitoring instructions or control operation instructions. When the control instruction is a monitoring instruction, the controlled device needs to feedback the signal to the controlling device.
[0080] In the embodiment of the present application, the controlled device can fully receive the control instructions from the control device by receiving signal frames in which the control signal and the data signal are alternately input, thereby improving the control efficiency of the control device.
[0081] In a possible implementation, the control signal and the data signal have the same number of clock signal bits.
[0082] It should be noted that, in order to further improve the accuracy of signal transmission, the control signal and data signal in each channel have the same number of clock signal bits.
[0083] In the embodiment of the present application, by setting the control signal and the data signal to have the same number of clock signal bits, it is possible to ensure that the signal is sent correctly and the controlled device switches to receiving in a timely manner after sending.
[0084] In one possible implementation, the process of parsing the signal frame according to the start signal edge to obtain the control signal and the data signal may also include: parsing the signal frame according to the start signal edge and the clock signal to obtain the control signal and the data signal; when the control instruction indicates that the type of the control signal is a monitoring signal, feeding back a feedback signal corresponding to the control signal and the data signal in the next frame of the signal frame.
[0085] The controlled device can parse the signal frame based on the start signal edge and the clock signal to obtain the control signal and the data signal. For example, the controlled device can parse the control signal in the signal frame based on the rising edge of the mid-clock signal in the clock signal, and parse the data signal in the signal frame based on the falling edge of the mid-clock signal in the clock signal. When the control instruction indicates that the control signal is of the monitoring signal type, the controlled device can feedback a feedback signal corresponding to the control signal and the data signal in the next frame after receiving the signal frame. The feedback signal can also include the control signal and the data signal. The control signal and the data signal in the feedback signal of the controlled device are interrupt signals or status signals that provide feedback on the control instruction composed of the control signal and the data signal sent by the control device.
[0086] In an embodiment of the present application, the controlled device parses the signal frame according to the start signal edge and the clock signal, so that the control device can realize real-time control of the controlled device. After receiving the signal frame, the controlled device parses the signal frame in the current frame of the received signal frame and feeds back the signal to the control device in the next frame, so that the control device can monitor the controlled device in a timely manner.
[0087] In a possible implementation manner, the controlled device may also report status information to the controlling device or report interruption information to the controlling device according to the control signal.
[0088] When the control signal indicates that the type of the control instruction is a monitoring instruction, the controlled device reports status information to the controlling device or reports interrupt information to the controlling device.
[0089] In the embodiment of the present application, the controlled device can notify the control device that further operations can be performed by reporting status information. The controlled device can notify the control device to monitor events and suspend the current operation state by reporting interrupt information.
[0090] Equipment control system
[0091] Figure 6 Schematic diagram of a device control system according to an embodiment of the present application. Figure 6 As shown, the device control system 500 includes: a control device 501 and a controlled device 502.
[0092] The control device 501 includes a first audio interface 503, which is used to determine the starting signal edge of the signal frame and the bit position corresponding to the clock signal, wherein the starting signal edge when the signal frame is a control signal is opposite to the starting signal edge when the signal frame is a data signal. The control signal in at least one bit corresponding to the clock signal constitutes a control instruction, and the remaining control signals constitute control information. The control instruction is used to indicate the type of the control signal in the signal frame, and the control information is used to indicate the content of the control signal in the signal frame. According to the bit position, the signal frame and the clock signal are sent to at least one controlled device 502, and the clock signal instructs at least one controlled device 502 to parse the signal frame according to the starting signal edge.
[0093] To perform operations such as controlling the controlled device 502, the starting signal edge of the signal frame, such as a rising edge or a falling edge, and the bit position corresponding to the clock signal are first determined. A rising edge is the moment when the signal level changes from a low level (digital "0") to a high level (digital "1"), and a falling edge is the moment when the signal level changes from a high level (digital "1") to a low level (digital "0"). The clock signal includes a frame clock signal and a bit clock signal. The rising edge or the falling edge of the frame clock signal can be used as a reference position for the bit position. The bit position can be the reference position or a position that is at least the number of bit clock signal cycles after the reference position.
[0094] In addition, the starting signal edge of the control signal in the signal frame is opposite to the starting signal edge of the data signal in the signal frame. The control signal in at least one bit corresponding to the clock signal constitutes a control instruction, and the remaining control signals constitute control information. The control instruction is used to indicate the type of the control signal in the signal frame, and the control information is used to indicate the content of the control signal in the signal frame.
[0095] For example, the first three bits of the control signal corresponding to the clock signal can be set to form a control instruction. The control instruction can indicate the type of the control signal in the signal frame, such as a reset instruction, a start instruction, a mute instruction, etc. The remaining control signals describe the control operation that the control device needs to perform on the controlled device. For example, when the control instruction indicates that the type of the control signal in the signal frame is a monitoring instruction, the remaining control signals are used to indicate the specific content that the controlled device needs to monitor.
[0096] At the same time, the control signal and the data signal can be input alternately. For example, the control signal can be input first, then the data signal, and then the control signal, and this input method can be repeated so that the control signal and the data signal are alternately input in the signal frame.
[0097] After determining the bit position, the control device 501 sends a signal frame and a clock signal to at least one controlled device 502 . The clock signal instructs the at least one controlled device 502 to parse the signal frame according to the start signal edge.
[0098] The controlled device 502 includes a second audio interface 504, which is used to receive the signal frame and clock signal sent by the control device 501, determine the starting signal edge of the signal frame according to the bit position of the clock signal, and parse the signal frame according to the starting signal edge to obtain a control signal and a data signal, wherein the starting signal edge when the signal frame is a control signal is opposite to the starting signal edge when the signal frame is a data signal.
[0099] The schematic diagram of the equipment control system communication is as follows Figure 7 As shown, the first audio interface 503 and the second audio interface 504 may include a clock line and a data line, wherein the clock line may include a frame clock line and a bit clock line, and the data line may include a control device data line and a controlled device data line. The control device data line is used to control the device 501 to transmit a signal to the controlled device 502. When the control instruction is a monitoring instruction, the controlled device 502 can feedback a signal to the control device 501 according to the controlled device data line.
[0100] In the embodiment of the present application, by configuring a portion of the control signal to form a control instruction, and using the remaining portion of the control signal to transmit the control information to the controlled device 502, the register in the controlled device 502 can be replaced. When performing the same control operation on different controlled devices 502, there is no need to send different instructions, thereby improving the control efficiency of the device. By alternately inputting the control signal and the data signal in the signal frame, the signal quantity of the transmitted control signal can be guaranteed, thereby enabling the timely transmission of the control signal. In addition, because the bit position corresponding to the starting signal edge of the signal frame can be determined by the clock signal, the signal frame can be flexibly configured, increasing the adaptability of the signal frame to various communication protocols.
[0101] It should be noted that the information interaction, execution process, etc. between the control device 501 and the controlled device 502 in the above-mentioned device control system are based on the same concept as the aforementioned device control method embodiment. The specific content can be found in the description of the aforementioned device control method embodiment and will not be repeated here.
[0102] electronic devices
[0103] In this embodiment, an electronic device 700 is provided, such as Figure 8As shown, the electronic device 700 may include: a processor 701, a communication interface 702, a memory 703, and a communication bus 704.
[0104] The processor 701 , the communication interface 702 , and the memory 703 communicate with each other via the communication bus 704 .
[0105] The communication interface 702 is used to communicate with other electronic devices or servers.
[0106] The processor 701 is configured to execute the program 705 , and specifically may execute the relevant steps in the aforementioned device control method embodiment.
[0107] Specifically, the program 705 may include program codes, which include computer operation instructions.
[0108] Processor 701 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.
[0109] The memory 703 is used to store the program 705. The memory 703 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0110] The program 705 may be specifically configured to enable the processor 701 to execute the device control method in the aforementioned embodiment.
[0111] The specific implementation of each step in program 705 can be found in the corresponding descriptions of the corresponding steps and units in the aforementioned device control method embodiment, and will not be repeated here. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the devices and modules described above can refer to the corresponding process descriptions in the aforementioned method embodiment, and will not be repeated here.
[0112] The electronic device of the embodiment of the present application, by setting part of the signal in the control signal to form a control instruction, and using the remaining part of the control signal to transmit the control information to the controlled device, can replace the register in the controlled device. When performing the same control operation on different controlled devices, there is no need to send different instructions, thereby improving the control efficiency of the device. By alternately inputting the control signal and the data signal in the signal frame, the signal quantity of the transmitted control signal can be guaranteed, and the control signal can be transmitted in a timely manner. In addition, because the bit position corresponding to the starting signal edge of the signal frame can be determined by the clock signal, the signal frame can be flexibly configured, increasing the adaptability of the signal frame to various communication protocols.
[0113] Computer storage media
[0114] In this embodiment, a computer-readable storage medium is provided, storing instructions for causing a machine to execute the device control method described herein. Specifically, a system or device equipped with a storage medium can be provided, storing software program code that implements the functions of any of the above-described embodiments, and causing a computer (or CPU or MPU) of the system or device to read and execute the program code stored in the storage medium.
[0115] In this case, the program code read from the storage medium itself can realize the function of any one of the above embodiments, so the program code and the storage medium storing the program code constitute part of this application.
[0116] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0117] Computer program product
[0118] In this embodiment, a computer program product is provided, including computer instructions, which instruct a computing device to perform any corresponding operation in the above-mentioned multiple method embodiments.
[0119] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0120] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or be implemented as software or computer code that can be stored in a recording medium (such as CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or be implemented as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and will be stored in a local recording medium, so that the method described here can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as ASIC or FPGA). It is understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (for example, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described here is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the method shown here. Although the present application has been shown and described with respect to one or more implementations, those skilled in the art will think of equivalent variations and modifications based on reading and understanding this specification and the accompanying drawings. The present application includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the components described above, the terms used to describe such components are intended to correspond to any component (unless otherwise indicated) that performs the specified function of the component (e.g., which is functionally equivalent), even if not structurally equivalent to the disclosed structure that performs the function in the exemplary implementations of this specification shown herein.
[0121] That is, the above description is merely an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structural or equivalent process transformations made using the contents of the description and drawings of this application, such as the mutual combination of technical features between the various embodiments, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
[0122] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "plurality" means two or more, unless otherwise specifically defined.
[0123] The present application provides the above description in order to enable any person skilled in the art to implement and use the present application. In the above description, various details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art will recognize that the present application can also be implemented when these specific details are not used. In other embodiments, well-known processes will not be elaborated in detail to avoid making the description of the present application obscure with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the present application.
[0124] It should be noted that, under the premise of no conflict, the various embodiments and / or technical features in each embodiment described in this application can be arbitrarily combined with each other, and the technical solution obtained after the combination should also fall within the scope of protection of this application.
[0125] It should be understood that the specific examples in the embodiments of the present application are only to help those skilled in the art to better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application. Those skilled in the art can make various improvements and modifications based on the above embodiments, and these improvements or modifications all fall within the scope of protection of the present application.
[0126] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A device control method, applied to control a device, characterized in that: include: Determining a bit position corresponding to a start signal edge of a signal frame and a clock signal, wherein a start signal edge of a control signal in the signal frame is opposite to a start signal edge of a data signal in the signal frame, the control signal in at least one bit corresponding to the clock signal constitutes a control instruction, and the remaining control signals constitute control information, the control instruction is used to indicate a type of the control signal in the signal frame, and the control information is used to indicate content of the control signal in the signal frame; The signal frame and the clock signal are sent to at least one controlled device according to the bit position, wherein the clock signal instructs the at least one controlled device to parse the signal frame according to the start signal edge.
2. The method according to claim 1, characterized in that The method further comprises: When the control instruction indicates that the type of the control signal is a monitoring signal, receiving a feedback signal sent by the controlled device; The feedback signal is analyzed according to the clock signal.
3. The method according to claim 1, characterized in that The control signal and the data signal correspond to the same number of bits of the clock signal.
4. The method according to claim 1, wherein The method further comprises: The control signals and data signals of the plurality of controlled devices are respectively encapsulated into the signal frame as a plurality of signal transmission channels, wherein the clock signal instructs each controlled device to parse the control signal or data signal of the corresponding signal transmission channel.
5. The method according to claim 4, characterized in that Each signal transmission channel corresponds to the same number of bits of the clock signal.
6. The method according to any one of claims 4-5, characterized in that: Each controlled device corresponds to a signal transmission channel.
7. The method according to claim 1, characterized in that There is a preset number of bits of the clock signal between a start signal edge of the control signal of the at least one controlled device and a start signal edge of the signal frame, and the preset number of bits indicates a control signal transmission mode of the signal frame.
8. A device control method, applied to a controlled device, characterized in that: include: Receive signal frames and clock signals sent by the control device; Determining a starting signal edge of the signal frame according to a bit position of the clock signal; The signal frame is parsed according to the start signal edge to obtain a control signal and a data signal, wherein the start signal edge of the control signal in the signal frame is opposite to the start signal edge of the data signal in the signal frame, the control signal in at least one bit corresponding to the clock signal constitutes a control instruction, and the remaining control signals constitute control information, the control instruction is used to indicate the type of the control signal in the signal frame, and the control information is used to indicate the content of the control signal in the signal frame.
9. The method according to claim 8, characterized in that The control signal and the data signal have the same number of clock signal bits.
10. The method according to claim 8, characterized in that The step of parsing the signal frame according to the start signal to obtain a control signal and a data signal includes: Parsing the signal frame according to the start signal edge and the clock signal to obtain the control signal and the data signal; When the control instruction indicates that the type of the control signal is a monitoring signal, a feedback signal corresponding to the control signal and the data signal is fed back in a next frame of the signal frame.
11. A device control system (500), characterized in that: include: A controlling device (501) and a controlled device (502); The control device (501) comprises a first audio interface (503), wherein the first audio interface (503) is used to determine the bit position corresponding to the start signal edge of the signal frame and the clock signal, wherein the start signal edge of the control signal in the signal frame is opposite to the start signal edge of the data signal in the signal frame, the control signal in at least one bit corresponding to the clock signal constitutes a control instruction, and the remaining control signals constitute control information, the control instruction is used to indicate the type of the control signal in the signal frame, and the control information is used to indicate the content of the control signal in the signal frame, and according to the bit position, the signal frame and the clock signal are sent to at least one controlled device (502), wherein the clock signal instructs the at least one controlled device (502) to parse the signal frame according to the start signal edge; The controlled device (502) includes a second audio interface (504), which is used to receive a signal frame and a clock signal sent by the control device (501), determine the starting signal edge of the signal frame according to the bit position of the clock signal, and parse the signal frame according to the starting signal edge to obtain a control signal and a data signal, wherein the starting signal edge of the control signal in the signal frame is opposite to the starting signal edge of the data signal in the signal frame.
12. An electronic device, characterized in that: include: Processor, communication interface, memory and communication bus, the processor, memory and communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the device control method according to any one of claims 1 to 10.
13. A computer storage medium, characterized in that A computer program is stored thereon, and when the program is executed by a processor, the device control method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Audio control method, audio control device and audio device
CN107357547A
I2C bus signal analysis method and system, terminal and storage medium
CN113849443A