Data communication method and device, electronic equipment, storage medium and program product
By using two data queues in the DDCCI communication protocol for two-way communication between the master device and the target device, the problem of frequent switching of read and write control rights and interaction timeouts in the prior art is solved, and more efficient and accurate communication is achieved.
Patent Information
- Application Number
- CN202411629774.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-11
AI Technical Summary
In the existing DDCCI communication protocol, the host device and the display device interact information through a single FIFO queue, resulting in frequent switching of read and write control rights, reducing efficiency, and requiring interaction time. If the reply timeout, it may lead to information interaction errors.
By using two different data queues, bidirectional communication between the master and the target device is achieved by the slave device. The slave device receives the data information sent by the master device and writes it to the first data queue. The target device obtains the data information from the first data queue and replys to the reply information, and writes it to the second data queue. The master device uses the slave device to get the data information from the second data queue. Get response information in the data queue.
The frequency of switching data queue read and write control rights during communication is reduced, interactive conflicts are reduced, communication efficiency is improved, communication errors caused by interaction timeout are reduced, and interaction effectiveness is improved.
Smart Images

Figure CN119415471A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a data communication method, device, electronic device, storage medium and program product. Background Art
[0002] The Display Data Channel-Command Interface (DDCCI) is a communication protocol for bidirectional communication between a host device and a display device. In the related art, the DDCCI communication between the host device and the display device mainly uses a single First In First Out (FIFO). By switching the read and write control rights of the FIFO, information interaction between the host device and the display device is achieved. However, frequent switching of the FIFO read and write control rights reduces efficiency, and the DDCCI communication protocol has requirements for each interaction time. If the reply to the host device times out, information interaction errors may occur, reducing communication accuracy. Summary of the invention
[0003] The present disclosure provides a data communication method, device, electronic device, storage medium and program product.
[0004] In a first aspect, the present disclosure provides a data communication method, the data communication method comprising:
[0005] Receiving data information sent by the master device and writing the data information into the first data queue, wherein the data information is used to indicate an operation command of the target device;
[0006] When the read signal of the master device is obtained, the response information is read from the second data queue and the response information is returned to the master device, wherein the response information is the target device's reply to the data information after obtaining the data information from the first data queue and written into the second data queue.
[0007] In a second aspect, the present disclosure provides a data communication device, the data communication device comprising:
[0008] A first processing module, used for receiving data information sent by the master device and writing the data information into a first data queue, wherein the data information is used for indicating an operation command of a target device;
[0009] The second processing module is used to read response information from the second data queue and return the response information to the master device when obtaining the read signal of the master device, wherein the response information is the reply of the target device to the data information after obtaining the data information from the first data queue and written into the second data queue.
[0010] In a third aspect, the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can execute the above-mentioned data communication method.
[0011] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned data communication method when executed by a processor.
[0012] In a fifth aspect, the present disclosure provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying a computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned data communication method.
[0013] In the data communication method provided by the embodiment of the present disclosure, the master device and the slave device communicate through the I2C of HDMI, and the master device, the slave device and the target device adopt the DDCCI communication protocol, the slave device receives the data information sent by the master device, and writes the data information into the first data queue, and the data information is used to indicate the operation command of the target device; then, when the slave device obtains the read signal of the master device, it reads the response information from the second data queue and returns the response information to the master device, wherein the response information is the target device after obtaining the data information from the first data queue, and replies to the data information and writes it into the second data queue. In this way, two-way communication between the master device and the target device is realized through two different data queues, and the information reading and writing processes of the master device and the target device are relatively independent, which reduces the frequency of switching the read and write control rights of the data queue during the communication process, thereby reducing the operation delay, saving time consumption, and improving the communication efficiency, and also reducing the situation of communication errors caused by interaction timeout, thereby improving the interaction effectiveness.
[0014] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings, in which:
[0016] Figure 1 A flow chart of a data communication method provided by an embodiment of the present disclosure;
[0017] Figure 2 A schematic diagram of a data communication architecture in an embodiment of the present disclosure;
[0018] Figure 3 A block diagram of a data communication device provided in an embodiment of the present disclosure;
[0019] Figure 4 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0021] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0022] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0023] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.
[0024] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.
[0025] In the technical solution disclosed in this disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution complies with relevant national laws and regulations (for example, the "Information Security Technology Personal Information Security Specification", etc.). For example: corresponding prescribed measures are taken for personal information access control; prescribed restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; when using personal information, clear identity orientation is eliminated to avoid precise positioning of specific individuals.
[0026] To facilitate understanding of the embodiments of the present disclosure, several concepts are briefly described below:
[0027] Display Data Channel-Command Interface (DDCCI): DDCCI is a set of communication protocols added on the basis of DDC. It not only supports the display device to report information to the host, but also allows the host to send commands to the display device to adjust the display device settings, such as adjusting the brightness and contrast of the display device. Through the DDCCI communication protocol, users can use the software interface to control the display device settings instead of having to use the physical buttons on the display device. It can be used in scenarios such as remote management and adjustment of the settings of multiple display devices.
[0028] High Definition Multimedia Interface (HDMI): is a fully digital video and sound transmission interface that can send uncompressed audio and video signals.
[0029] Inter-Integrated Circuit (I2C): is a bidirectional two-wire synchronous serial bus, mainly used for short-distance communication, usually between chips on the same circuit board. The I2C bus usually consists of two lines: a serial data line (SDA) and a serial clock line (SCL), through which devices can communicate, one of which is the master device, responsible for initiating communication and generating clock signals, and the other is the slave device, which is mainly used to respond to requests from the master device.
[0030] First In First Out (FIFO): refers to a data processing method whose main principle is that the data that enters the queue first is processed or removed first.
[0031] In the related art, the DDCCI communication between the host device and the display device mainly uses a single FIFO queue, that is, the information sent by the host device and the display device are all written into the same FIFO queue, so that the information interaction between the host device and the display device is achieved by switching the read and write control rights of the FIFO. However, the read and write control rights of the FIFO are switched frequently, which reduces the efficiency, and the DDCCI communication protocol has requirements for each interaction time. If the response timeout occurs, it may cause information interaction errors.
[0032] In the disclosed embodiment, based on the DDCCI communication protocol, the master device and the slave device communicate through the I2C of HDMI, and the slave device communicates with the target device, and a data communication method is provided, wherein the slave device writes the data information sent by the master device into a first data queue, the target device obtains the data information from the first data queue, and writes the replied response information into a second data queue, and the master device can obtain the response information from the second data queue through the slave device. In this way, two-way communication between the master device and the target device is achieved through two different data queues, and the information reading and writing processes of the master device and the target device are relatively independent, which reduces the frequency of switching the reading and writing control rights of the data queues during the communication process, reduces the operation delay, improves the communication efficiency, and thus can also improve the communication accuracy.
[0033] It should be noted that the embodiments of the present disclosure are mainly aimed at the two-way communication scenario between the master device and the target device, for example, the master device is a host, the target device is a display device, the master device and the display device communicate through the slave device, that is, the master device controls the target device through the slave device, the slave device is a slave device connected to I2C, and the slave device is mainly used to parse and respond to commands from the master device, for example, parse the master device as a write signal or a read signal, and then perform corresponding write operations or read operations on the data queue. Among them, the target device and the slave device can be two different devices, or the slave device can be a functional module in the target device, and there is no limitation on this.
[0034] Take the slave device as the execution subject as an example. Figure 1 A flow chart of a data communication method provided by an embodiment of the present disclosure. Figure 1 , the method comprising:
[0035] Step S101: receiving data information sent by a master device, and writing the data information into a first data queue, where the data information is used to indicate an operation command of a target device.
[0036] In the disclosed embodiment, the slave device communicates with the master device via I2C of HDMI, and the data communication between the master device and the target device adopts the DDCCI communication protocol. Each slave device has a unique address information on the I2C. When the master device and the slave device communicate, the master device sends the address information of the slave device and sends a read signal or a write signal to inform the slave device whether to receive or send information. The slave device monitors the I2C bus. When the master device sends the address information, all slave devices connected to the I2C bus will compare the received address information with their own address information. If the address information accessed by the master device monitored through I2C matches the address information of the slave device, the slave device determines to communicate with the master device and prepares for subsequent data interaction. The slave device will perform corresponding data write operations or read operations according to the read signal or write signal of the master device. After the data interaction is completed, the slave device returns to a waiting state until it is addressed by the master device next time, that is, waits for receiving the next master device's access to the slave device's address information.
[0037] Among them, in the case where the master device sends a write signal, the data information sent by the master device is used to indicate the operation command of the target device, for example, the control operation of the target device or other interactive information, etc., which is not limited in the embodiments of the present disclosure. For example, before sending the data information, the master device can first send a write signal through the I2C bus to inform the slave device that it wants to send information, or the master device can package the address information of the slave device and the write signal together and send them to the slave device. When the slave device receives and matches its own address information, it returns a response signal. The master device can continue to send data information and write it to the first data queue. For example, the first data queue is the first FIFO queue. Specifically, the slave device can parse the read signal or write signal of the master device according to the read and write flags on the I2C bus. When the slave device obtains the write signal of the master device, it switches the write control right for the first data queue and writes the data information into the first data queue.
[0038] Step S102: when a read signal from the master device is obtained, response information is read from the second data queue and returned to the master device, wherein the response information is a reply to the data information obtained by the target device from the first data queue and written into the second data queue.
[0039] In the disclosed embodiment, after writing the data information into the first data queue, the target device can obtain read control over the first data queue, read the first data queue and obtain the data information, and then the target device can perform corresponding processing based on the data information, and write the reply response information into the second data queue. For example, the second data queue can be a second FIFO queue. The master device sends a read signal and can complete a data communication by reading the response information in the second data queue from the slave device.
[0040] Among them, in the embodiment of the present disclosure, the master device can determine that a read signal is sent when a preset waiting time is reached after the data information is written into the first data queue; or, when it is determined that the level state of I2C is a target level state, a read signal is sent, and the target level state is used to indicate that the slave device has written the response information into the second data queue.
[0041] For example, the DDCCI communication protocol may specify the waiting time or the interaction time between the master and slave devices. After the master device sends the data information, it waits for a certain period of time before reading from the second data queue. For another example, after the target device replies with the response information, the SDA line of I2C can be pulled from a high level to a low level. At this time, the master device detects that the SDA line is at a low level, indicating that the target device has written the response information and can read from the second data queue.
[0042] Furthermore, in the embodiment of the present disclosure, based on the DDCCI communication protocol, there are requirements for the interaction time between the master device and the slave device. In the event that the slave device responds with a timeout, in order to further improve the communication quality and accuracy, it is also possible to retain the response information written in the second data queue when the response information is returned to the master device for more than a preset period of time, and wait for the next read signal of the master device to the second data queue.
[0043] That is to say, when the reply from the device times out, it means that the master device has failed to obtain the response information. After the target device generates the response information, it will be written into the second data queue. At this time, the response information will not be directly discarded in the embodiment of the present disclosure, and the master device can usually wait for a certain period of time before initiating a second read. Therefore, in the case of a reply timeout, the response information in the second data queue can still be retained and wait to be sent again when the master-slave device retries next time. This can ensure that communication will not always be erroneous and can also improve communication efficiency.
[0044] In the embodiment of the present disclosure, the slave device can also monitor the read and write operations of the master and slave devices on the I2C in real time to determine whether a communication conflict occurs. Specifically, a possible implementation method is provided, which monitors the write signal or read signal sent by the master device on the I2C; determines the first operating state of the master device based on the write signal or the read signal; when it is determined that the first operating state has a communication conflict with the second operating state of the slave device, generates an error message and sends the error message to the master device.
[0045] For example, the slave device is preparing to reply to the read signal sent by the master device last time. At this time, if it is determined through monitoring that the current first operating state of the master device is a write operation, and a normal communication process is that after the data information of the master device is written into the first data queue, the target device reads from the first data queue, and the target device processes the data information and writes the response information into the second data queue, the master device initiates a read operation, the slave device reads the response information from the second data queue, and replies the response information to the master device. That is, when the slave device reads the second data queue or replies to the master device, the master device should normally initiate a read operation to read the response information in the second data queue. However, if the master device sends other data information again at this time, and the last communication process has not been completed, a communication conflict will occur. The slave device can generate an error message to send to the master device, and can respond that the master device cannot reply to or does not support the other data information sent again in time. In this way, the accuracy of communication can be improved.
[0046] It should be noted that in the embodiment of the present disclosure, the data communication method on the slave device side corresponds to the data communication method on the master device side in the above embodiment, and will not be described in detail here.
[0047] In the disclosed embodiment, the data information sent by the master device is written into the first data queue, and the response information replied by the target device is written into the second data queue. Communication between the master device and the target device is achieved through two different data queues, which reduces the frequency of switching the read and write control rights of the data queues during the communication process, reduces interaction conflicts, and improves communication efficiency.
[0048] The data communication method in the embodiment of the present disclosure is described below using a specific application scenario. Figure 2 , which is a schematic diagram of a data communication architecture in an embodiment of the present disclosure.
[0049] like Figure 2 As shown, the data communication architecture in the disclosed embodiment includes a master device, a slave device, and a microcontroller unit (MCU), wherein the master device and the slave device communicate via the I2C of HDMI, the I2C bus generally includes an SDA line and an SCL line, the slave device is a slave device connected to the I2C (also called an I2C SLAVE), and the MCU is the central processing unit of the display device. In addition, the data communication between the master device, the slave device, and the target device adopts the DDCCI communication protocol. It should be noted that the DDCCI command transmitted in the DDCCI communication protocol can be called a virtual control panel (Virtual Control Panel, VCP) code, which can be used to indicate the specific operation to be performed.
[0050] The DDCCI communication protocol follows the I2C protocol, and the HDMI protocol defines relevant methods for information interaction between the transmitter and the receiver. These interaction methods can be implemented through the display data channel (DDC) of the HDMI interface. At the same time, the DDC channel also follows the I2C communication protocol. Therefore, in the embodiment of the present disclosure, the DDCCI communication between the host device and the target device can be implemented by reusing the DDC channel of HDMI, which can simplify hardware design, reduce costs, and improve compatibility.
[0051] like Figure 2 As shown, for example, the target device is a display device, the master device sends a read / write message including a DDCCI slave address (Slave Address) through I2C, the slave device monitors the data on I2C and parses it, and if the parsed DDCCI Slave Address matches its own address information, it continues to receive subsequent data.
[0052] When the write signal of the master device is parsed, the received data information is written into the first data queue. For example, the data information can be used to control the brightness, contrast and other parameters of the display device. Then, the MCU of the display device can read the data information from the first data queue and make corresponding adjustments to the display device according to the data information. After the adjustment, a response information can be returned. For example, the response information is that the adjustment has been completed, and the response information is written into the second data queue.
[0053] When parsing the read signal of the master device, the slave device reads the response information from the second data queue and returns it to the master device.
[0054] In this way, in the embodiment of the present disclosure, communication between the master device and the target device is achieved through two different data queues. The read and write commands from the device to the master device can be implemented by converting the read and write control rights of the two data queues, without the need to frequently switch to one data queue, thereby improving efficiency, saving time, and enhancing the effectiveness of data communication.
[0055] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.
[0056] In addition, the present disclosure also provides a data communication device, an electronic device, a computer-readable storage medium, and a computer program product, all of which can be used to implement any data communication method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to in the corresponding records of the method part and will not be repeated here.
[0057] Figure 3 A block diagram of a data communication device provided in an embodiment of the present disclosure.
[0058] Reference Figure 3 , an embodiment of the present disclosure provides a data communication device, the data communication device comprising:
[0059] A first processing module 31 is used to receive data information sent by the master device and write the data information into a first data queue, wherein the data information is used to indicate an operation command of a target device;
[0060] The second processing module 32 is used to read response information from the second data queue and return the response information to the master device when obtaining the read signal of the master device, wherein the response information is the target device's reply to the data information after obtaining the data information from the first data queue and written into the second data queue.
[0061] In a possible embodiment, the data communication method is executed by a slave device that communicates with the master device via I2C of HDMI, and the data communication between the master device and the target device adopts a DDCCI communication protocol.
[0062] In a possible embodiment, before receiving the data information sent by the master device, the first processing module 31 is further configured to: match the address information accessed by the master device monitored through I2C with the address information of the slave device.
[0063] In a possible embodiment, when writing the data information into the first data queue, the first processing module 31 is used to: when obtaining a write signal from the master device, switch the write control right for the first data queue and write the data information into the first data queue.
[0064] In a possible embodiment, the second processing module 32 is further used for:
[0065] When the time for returning the response information to the master device exceeds a preset time, the response information written in the second data queue is retained, and the next read signal of the master device to the second data queue is waited.
[0066] In a possible embodiment, the third processing module 33 is further included to:
[0067] Monitoring a write signal or a read signal sent by the master device on the I2C;
[0068] determining a first operating state of the master device according to the write signal or the read signal;
[0069] When it is determined that there is a communication conflict between the first operating state and the second operating state of the slave device, error information is generated and sent to the master device.
[0070] Each module in the above data communication device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0071] Figure 4 A block diagram of an electronic device provided in an embodiment of the present disclosure.
[0072] Reference Figure 4An embodiment of the present disclosure provides an electronic device, which includes: at least one processor 401; at least one memory 402, and one or more I / O interfaces 403, connected between the processor 401 and the memory 402; wherein the memory 402 stores one or more computer programs that can be executed by the at least one processor 401, and the one or more computer programs are executed by the at least one processor 401 so that the at least one processor 401 can execute the above-mentioned data communication method.
[0073] Each module in the above electronic device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0074] The present disclosure also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned data communication method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0075] The embodiment of the present disclosure also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned data communication method.
[0076] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).
[0077] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.
[0078] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0079] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0080] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.
[0081] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0082] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0083] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0084] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0085] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A data communication method, characterized in that: include: Receiving data information sent by the master device and writing the data information into the first data queue, wherein the data information is used to indicate an operation command of the target device; When the read signal of the master device is obtained, the response information is read from the second data queue and the response information is returned to the master device, wherein the response information is the target device's reply to the data information after obtaining the data information from the first data queue and written into the second data queue.
2. The method according to claim 1, characterized in that The data communication method is performed by a slave device that communicates with the master device via an integrated circuit bus I2C of a high-definition multimedia interface HDMI, and the data communication between the master device and the target device adopts a data display channel-command interface DDCCI communication protocol.
3. The method according to claim 2, characterized in that Before receiving the data information sent by the master device, the method further includes: The address information accessed by the master device monitored through I2C matches the address information of the slave device.
4. The method according to claim 2, characterized in that: The step of writing the data information into the first data queue comprises: When a write signal from the master device is obtained, the write control right for the first data queue is switched, and the data information is written into the first data queue.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the time for returning the response information to the master device exceeds a preset time, the response information written in the second data queue is retained, and the next read signal of the master device to the second data queue is waited.
6. The method according to claim 2, characterized in that The method further comprises: Monitoring a write signal or a read signal sent by the master device on the I2C; determining a first operating state of the master device according to the write signal or the read signal; When it is determined that there is a communication conflict between the first operating state and the second operating state of the slave device, error information is generated and sent to the master device.
7. A data communication device, characterized in that: include: A first processing module, used for receiving data information sent by the master device and writing the data information into a first data queue, wherein the data information is used for indicating an operation command of a target device; The second processing module is used to read response information from the second data queue and return the response information to the master device when obtaining the read signal of the master device, wherein the response information is the reply of the target device to the data information after obtaining the data information from the first data queue and written into the second data queue.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the data communication method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the data communication method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer-readable code or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the data communication method as described in any one of claims 1 to 6.