Method, device and equipment for double-line IO port communication and storage medium

By adopting the dual-line IO port communication method in the equipment, the problem of insufficient anti-interference in communication in the equipment is solved, two-way communication is realized, resources and costs are saved, and the anti-interference in communication is improved.

CN119828515APending Publication Date: 2025-04-15QINDAO HAIER REFRIGERATOR CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311332455.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-13
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The communication between different circuit boards in existing equipment is insufficient in anti-interference, and the communication method requires the configuration of additional modules, which increases resources and costs.

Method used

The communication method of a dual-wire IO port is adopted, and the first transmitting IO port of the first communication device is connected to the second receiving IO port of the second communication device to realize two-way communication. The data frame includes the frame start bit and multiple bytes of data, and ensures the integrity of the frame through verification data.

Benefits of technology

Two-way communication between communication devices in the equipment is realized, saving resources and costs of adding additional communication modules, and the data processing capability is not high, which improves the anti-interference of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119828515A_ABST
    Figure CN119828515A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent equipment, and discloses a method, device and equipment for double-line IO port communication and a storage medium. The first sending IO port in the first communication device is in communication connection with the second receiving IO port of the second communication device, and the first receiving IO port in the first communication device is in communication connection with the second sending IO port of the second communication device. The method comprises the following steps: a first communication device sends a current data frame to a second communication device through a first sending IO port; the first communication device receives a current reply data frame through the first receiving IO port, and the current reply data frame is sent through the second sending IO port after the second communication device receives the current data frame through the second receiving IO port; wherein the data frame comprises a frame start bit and a plurality of byte data. Therefore, two-way communication between the communication devices can be realized without adding an additional communication module, and resources and cost are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart device technology, for example, to a method, apparatus, device and storage medium for dual-line IO port communication. Background Art

[0002] Refrigerators, air conditioners, washing machines and other equipment are now essential appliances for home life. With the development of intelligent technology, these devices have strong intelligence. They can not only communicate data within the home system, but also communicate data between different circuit boards in the equipment. For example, a variable frequency refrigerator includes: a display board, a main control board and a frequency conversion board. The main control board can communicate with the display board and the frequency conversion board respectively. Similarly, in a variable frequency air conditioner, the main control board also needs to communicate with the display board and the frequency conversion board. These circuit boards or devices that can communicate can be communication devices.

[0003] At present, the communication methods between different circuit boards in the equipment include: Pulse Width Modulation (PWM) and Universal Asynchronous Receiver / Transmitter (UART), but both methods require the configuration of corresponding PWM modules or UART modules in the circuit board or communication device, and the PWM communication method is a one-way communication, while the UART communication method requires the circuit board or communication device to have a stronger and faster digital processing capability and is easily interfered with. Refrigerators, air conditioners, washing machines and other equipment are all sources of interference, especially variable frequency control is a greater source of interference for communication, so the communication method between circuit boards or communication devices in the equipment needs to be improved.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0006] The disclosed embodiments provide a method, device, refrigerator and storage medium for two-wire IO port communication to solve the technical problem that the anti-interference performance of communication in the device needs to be improved. The first sending IO port in the first communication device is connected to the second receiving IO port of the second communication device, and the first receiving IO port in the first communication device is connected to the second sending IO port of the second communication device.

[0007] In some embodiments, the method comprises:

[0008] The first communication device sends the current data frame to the second communication device through the first sending IO port;

[0009] The first communication device receives the current reply data frame through the first receiving IO port, wherein the current reply data frame is sent through the second sending IO port after the second communication device receives the current data frame through the second receiving IO port;

[0010] The data frame includes: a frame start bit and multiple bytes of data.

[0011] In some embodiments, it also includes:

[0012] Before the first communication device sends the current data frame to the second communication device through the first sending IO port, the first communication device sends a wake-up signal to the second communication device through the first sending IO port;

[0013] Then, before the first communication device receives the current reply data frame through the first receiving IO port, it receives the wake-up signal sent by the second communication device through the first receiving IO port.

[0014] In some embodiments, the first byte data in the data frame is determined according to the data frame type, and the last byte data in the data frame is the first sending verification data, wherein the first sending verification data is obtained after performing a verification operation based on the first byte data to the second last byte data of the data frame;

[0015] The first byte data in the reply data frame is determined based on the first byte data in the data frame, and the last byte data in the reply data frame is the second send verification data, wherein the second send verification data is obtained after a verification operation is performed based on the first byte data to the second to last byte data of the reply data frame.

[0016] In some embodiments, the second communication device sending the current reply data frame includes:

[0017] The second communication device determines the data byte according to the frame start bit in the received current data frame, and performs a check operation on the received first byte data to the second to last byte data to obtain first received check data;

[0018] When the first received verification data matches the first sent verification data, the second communication device determines that the current data frame verification is successful, and sends the current reply data frame through the second sending IO port.

[0019] In some embodiments, after the first communication device receives the current reply data frame through the first receiving IO port, the method further includes:

[0020] The first communication device determines the data byte according to the frame start bit in the received current reply data frame, and performs a check operation on the received first byte data to the second to last byte data to obtain second received check data;

[0021] When the second received verification data matches the second sent verification data, the first communication device determines that the current reply data frame verification succeeds.

[0022] In some embodiments, it also includes:

[0023] When the first time duration in which the verification success reply data frame is not received reaches the first set time duration, the first communication device performs communication abnormality alarm processing.

[0024] In some embodiments, it also includes:

[0025] When the second time period during which the current reply data frame is not received reaches the second set time period, if the number of times the current data frame is sent is less than the set number, the first communication device resends the current data frame.

[0026] In some embodiments, the device for two-wire IO port communication includes a processor and a memory storing program instructions, and the processor is configured to execute the above-mentioned method for two-wire IO port communication when executing the program instructions.

[0027] In some embodiments, the device comprises:

[0028] The first communication device is configured to send a current data frame to the second communication device through a first sending IO port, and receive a current reply data frame through a first receiving IO port, wherein the data frame includes: a frame start bit and a plurality of bytes of data;

[0029] The second communication device is configured to send a current reply data frame to the first communication device through a second sending IO port after receiving the current data frame through the second receiving IO port.

[0030] In some embodiments, the storage medium stores program instructions, and when the program instructions are run, the method for two-wire IO port communication is executed.

[0031] The method, device and refrigerator for dual-line IO port communication provided by the embodiments of the present disclosure can achieve the following technical effects:

[0032] The first communication device and the second communication device are connected via a two-wire IO, so that the first communication device sends a data frame to the second communication device via the first sending IO port, and the second communication device can send a reply data frame to the first communication device via the second sending IO port only after receiving the data frame via the second receiving IO. In this way, two-way communication between the communication devices is achieved, and no additional communication module is required to be added to the equipment or communication device, thus saving resources and costs. In addition, the data processing capability of the communication device is not required to be high, and the communication method of the two-wire IO port connection also improves the anti-interference ability of the communication.

[0033] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:

[0035] Figure 1 This is a circuit diagram of a main control board and a frequency conversion board IO connection provided by an embodiment of the present disclosure;

[0036] Figure 2 It is a flow chart of a dual-line IO port communication method provided by an embodiment of the present disclosure;

[0037] Figure 3 is a schematic diagram of a signal physical layer definition provided by an embodiment of the present disclosure;

[0038] Figure 4 is a schematic diagram of a physical layer structure of a frame of data provided by an embodiment of the present disclosure;

[0039] Figure 5 It is a flow chart of a dual-line IO port communication method provided by an embodiment of the present disclosure;

[0040] Figure 6 It is a structural schematic diagram of a dual-line IO port communication device provided by an embodiment of the present disclosure;

[0041] Figure 7 It is a structural schematic diagram of a dual-line IO port communication device provided by an embodiment of the present disclosure;

[0042] Figure 8 It is a structural schematic diagram of a dual-line IO port communication device provided by an embodiment of the present disclosure;

[0043] Fig. 9 It is a schematic diagram of a device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0044] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.

[0045] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0046] Unless otherwise stated, the term "plurality" means two or more.

[0047] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.

[0048] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0049] Devices, circuit boards, circuit modules, etc. with communication functions can be communication devices, so that data communication can be carried out between two communication devices in a device, or between two devices, by wired connection. In the disclosed embodiment, a two-wire IO port communication method is adopted between the two communication devices, that is, the first sending IO port in the first communication device is connected to the second receiving IO port of the second communication device, and the first receiving IO port in the first communication device is connected to the second sending IO port of the second communication device. In this way, the first communication device sends a data frame to the second communication device through the first sending IO port, and the second communication device can send a reply data frame to the first communication device through the second sending IO port only after receiving the data frame through the second receiving IO, thereby realizing two-way communication between communication devices, and no additional communication module is needed in the device or communication device, saving resources and costs, and the data processing capability of the communication device is not required to be high, and the two-wire IO connection communication method also improves the anti-interference ability of the communication.

[0050] Generally, a corresponding communication device is configured in a device, such as a communication board in a computer, so that a device can communicate with another device through the transceiver IO interface in the communication device. Circuit boards in a device can also communicate through their own communication devices, for example, the main control board and the inverter board in an air conditioner or refrigerator can also communicate through their own IO ports.

[0051] Figure 1 1 is a circuit diagram of a main control board and a frequency conversion board IO connected in an embodiment of the present disclosure. Figure 1 As shown, the sending interface (TX) of the main control board in the refrigerator is connected to the receiving interface (RX) of the frequency conversion board in the refrigerator through a voltage stabilizing circuit, an optical coupling isolation and the like, and the sending interface (TX) of the frequency conversion board is also connected to the receiving interface (RX) of the main control board in the refrigerator through a voltage stabilizing circuit, an optical coupling isolation and the like. Of course, in the present disclosure, the communication connection of the two-wire IO port between the communication devices is not limited to this, so they are not listed one by one. Regardless of the specific method of the communication connection, the first sending IO port in the first communication device is communicatively connected to the second receiving IO port of the second communication device, and the first receiving IO port in the first communication device is communicatively connected to the second sending IO port of the second communication device.

[0052] After the communication devices have completed the communication connection of the two-wire IO ports, data communication can be carried out. Figure 2 FIG. 1 is a flow chart of a dual-wire IO port communication method provided by an embodiment of the present disclosure. Figure 2 As shown, the process of two-wire IO port communication includes:

[0053] Step 201: The first communication device sends a current data frame to the second communication device through the first sending IO port.

[0054] In the embodiment of the present disclosure, the data frame includes: a frame start bit and a plurality of bytes of data. The frame start bit may be composed of high level and low level of different durations, for example: Figure 3 As shown in (a), the physical layer definition of the frame start bit can be 2ms high level and 10ms low level, which is the frame start bit of a normal data frame. Figure 3 As shown in (b), the physical layer definition of the frame start bit can be 2ms high level and 20ms low level, which is the frame start bit of the beep frame. In this way, the starting position of data transmission between communication devices can be determined by the frame start bit.

[0055] The data frame may include multiple bytes of data, for example: 3, 4, 7, 8, 12 bytes, etc. Among them, the first byte of data may be the frame header data, and the following bytes are the data that need to be used between the communication devices. Or, in some embodiments, the first byte of data may be the frame header data, the last byte of data is the check data, and the data in between are the data that need to be used between the communication devices. That is, the first byte of data in the data frame is determined according to the data frame type, and the last byte of data in the data frame is the first sent check data, wherein the first sent check data is obtained after a check operation is performed based on the first byte of data to the second to last byte of data in the data frame.

[0056] Table 1 is a frame format of multiple bytes of data in a data frame provided by an embodiment of the present disclosure.

[0057]

[0058] Table 1

[0059] As shown in Table 1, the data frame includes 7 bytes of data, each of which can be 8 bits. The first byte of data can be a frame header, which can be determined according to the data frame type. If the first communication device sends a version frame, the corresponding first byte of data can be 0XA5, and if the first communication device sends a control frame, the corresponding first byte of data can be 0XAA. The last bit, i.e., the last byte of data, is the checksum, i.e., the first sent check data. There are many ways to perform check operations based on the first byte of data to the second to last byte of data in the data frame, such as: CRC8 operation method.

[0060] In some embodiments, the dual-wire IO port communication method can adopt a master-slave communication method, that is, the first communication device can be used as the master communication device, and the second communication device can be used as the slave communication method. In this way, the first communication device needs to wake up the second communication device. Therefore, before the first communication device sends the current data frame to the second communication device through the first sending IO port, it also needs to send a wake-up signal to the second communication device through the first sending IO port. Similarly, the wake-up signal can be composed of high and low levels of different durations, for example: Figure 3 As shown in (c), the physical layer definition of the wake-up signal may be 2ms low level and 2ms high level. Of course, the present disclosure is not limited thereto, and the same physical layer definition may be maintained between the communication devices.

[0061] In some embodiments, the first communication device may continuously send multiple data frames. Of course, for safety reasons, an idle frame may be inserted between two data frames. Figure 4As shown, the physical layer structure of sending data may include: a wake-up signal, a data frame (a frame start bit and multiple bytes of data), an idle frame, a wake-up signal, a data frame (a frame start bit and multiple bytes of data), an idle frame, ... wherein the current moment corresponds to the current data frame, that is, the first communication device sends the current data frame to the second communication device through the first sending IO port.

[0062] Step 202: The first communication device receives the current reply data frame through the first receiving IO port, wherein the current reply data frame is sent through the second sending IO port after the second communication device receives the current data frame through the second receiving IO port.

[0063] After the second communication device receives the current data frame through the second receiving IO port, it will generate a current reply data frame corresponding to the data frame, wherein the reply data frame also includes: a frame start bit and multiple bytes of data. Among them, the physical layer definition of the frame start bit of the reply data frame is consistent with the corresponding data frame, and the number of bytes of the data in the reply data frame can be the same as or different from the number of bytes in the data frame. However, the first byte data in the reply data frame is determined based on the first byte data in the data frame. For example: if the first byte data in the data frame is 0XA5, then the first byte data in the reply data frame is also 0XA5.

[0064] If the last byte data of the data frame is not the check data, then the last byte data of the reply data frame may not be the check data. In some embodiments, the last byte data in the data frame is the first sending check data, then the last byte data in the reply data frame is also the second sending check data, that is, the first byte data in the reply data frame is determined according to the first byte data in the data frame, and the last byte data in the reply data frame is the second sending check data, wherein the second sending check data is obtained after a check operation is performed based on the first byte data to the second to last byte data of the reply data frame.

[0065] In some embodiments, the last byte data of the current data frame is the verification data, then the second communication device needs to verify the received current data frame and determine that the current data frame verification is successful before the corresponding application can be performed and the corresponding reply data frame can be generated for sending, that is, the second communication device determines the data byte according to the frame start bit in the received current data frame, and performs a verification operation on the received first byte data to the second to last byte data to obtain the first received verification data; when the first received verification data matches the first sent verification data, the second communication device determines that the current data frame verification is successful, and sends the current reply data frame through the second sending IO port. Similarly, the current reply data frame also includes verification data, that is, the last byte data in the reply data frame is the second sent verification data, wherein the second sent verification data is obtained after a verification operation is performed based on the first byte data to the second to last byte data of the reply data frame.

[0066] Of course, when the first received verification data does not match the first sent verification data, the second communication device determines that the current data frame verification is unsuccessful and needs to discard the current data frame, and cannot generate a reply data frame for sending.

[0067] In some embodiments, before the first communication device sends the current data frame to the second communication device through the first sending IO port, the first communication device sends a wake-up signal to the second communication device through the first sending IO port. Then, before the second communication device sends the current reply data frame to the first communication device through the second sending IO port, the second communication device also sends a wake-up signal to the first communication device through the second sending IO port. That is, before the first communication device receives the current reply data frame through the first receiving IO port, the first communication device receives the wake-up signal sent by the second communication device through the first receiving IO port.

[0068] Since the last byte data of the reply data frame may also be the verification data, that is, it may be the second sent verification data, therefore, in some embodiments, after the first communication device receives the current reply data frame through the first receiving IO port, it also includes: the first communication device determines the data byte according to the frame start bit in the received current reply data frame, and performs a verification operation on the received first byte data to the second to last byte data to obtain the second received verification data; when the second received verification data matches the second sent verification data, the first communication device determines that the current reply data frame verification is successful.

[0069] Likewise, if the second received verification data does not match the second sent verification data, the first communication device may determine that the verification of the current reply data frame is unsuccessful.

[0070] In some embodiments, if the first time duration for which the verification success reply data frame is not received reaches the first set time duration, the first communication device performs communication abnormality alarm processing. The first set time duration may be 30s, 50s, 80s, etc. Thus, if the verification success reply data frame is not received within 30s or 50s, etc., the first communication device may perform communication abnormality alarm processing, specifically, sound warning, light flashing warning, etc.

[0071] Of course, if the first communication device receives a reply data frame corresponding to a subsequent data frame during the process of continuously sending data frames, and the verification is successful, the communication abnormality alarm can be released.

[0072] In order to reduce the probability of packet loss and missed protection during the communication process, in some embodiments, if the second time period during which the current reply data frame is not received reaches the second set time period, the first communication device resends the current data frame. To further take efficiency into consideration, if the second time period during which the current reply data frame is not received reaches the second set time period, and the number of times the current data frame is sent is less than the set number, the first communication device resends the current data frame.

[0073] Generally, the second set time length can be less than the first set time length, and can be 30ms, 50ms, 60ms, etc., and the set number of times can be 3 times, 5 times, etc. For example: after the first communication device sends the current data frame, if the corresponding current reply data frame is not received within 50ms, the next data frame will not be sent, but the current data frame will continue to be resent. If the total number of times the current data frame is sent reaches 3 times, even if the corresponding current reply data frame is still not received, the current data frame will not be sent anymore, and the next data frame will continue to be sent.

[0074] It can be seen that in the embodiment of the present disclosure, the first communication device sends a data frame to the second communication device through the first sending IO port, and the second communication device can send a reply data frame to the first communication device through the second sending IO port only after receiving the data frame through the second receiving IO. Thus, two-way communication between the communication devices is achieved, and there is no need to add additional communication modules to the equipment or communication device, saving resources and costs. In addition, the master-slave two-wire IO connection communication method does not require high processing capabilities of the communication device, and also improves the anti-interference ability of the communication.

[0075] The operation flow is collected into a specific embodiment below to illustrate the dual-line IO port communication process provided by the embodiment of the present invention.

[0076] In one embodiment of the present disclosure, the first communication device may be a main control board in a refrigerator, and the second communication device may be a frequency conversion board in the refrigerator. The connection circuit of the two-wire IO port between the main control board and the frequency conversion board may be as follows: Figure 1In addition, the physical layer structure of the frame data between the main control board and the frequency conversion board can also be as shown in Figure 4 As shown, the physical layer definition of the corresponding saved signal can be as follows Figure 3 As shown, the physical layer definition of data can be as follows Figure 3 (d) and Figure 3 As shown in (e), 2ms high and 6ms low represent data "1", and 2ms high and 2ms low represent data "0".

[0077] Figure 5 Schematic diagram of signaling interaction for a dual-wire IO port communication method provided by an embodiment of the present disclosure. Figure 1 , Figure 3 , Figure 4 as well as Figure 5 , the dual-line IO port communication process includes:

[0078] Step 501: The main control board generates a current data frame according to application requirements.

[0079] The data frame includes a frame start bit and 7 bytes of data. The contents of the 7 bytes of data may be shown in Table 2.

[0080]

[0081] Table 2

[0082] As shown in Table 2, the data frame includes the first sending verification data.

[0083] Step 502: The main control board sends the wake-up signal, the current data frame and the idle signal as a complete in-frame data through the corresponding TX interface.

[0084] Among them, the main control board can be Figure 4 As shown, frame data is sent.

[0085] Step 503: After receiving the current data frame through the corresponding RX interface, the frequency converter board determines the data byte according to the frame start bit in the received current data frame, and performs a check operation on the received first byte data to the second to last byte data to obtain the first received check data.

[0086] Step 504: The frequency conversion board determines whether the first received verification data matches the first sent verification data in the current data frame. If so, execute step 505; otherwise, execute step 512.

[0087] Step 505: The frequency conversion board performs an application according to the current data frame and generates a corresponding current reply data frame.

[0088] In this embodiment, the reply data frame may include a frame start bit and 12 bytes of data. Wherein, when the first byte of the current data frame is 0XAA, that is, when the current data frame is a control frame, the corresponding reply data frame is also a reply control frame, and the specific content may be shown in Table 3.

[0089]

[0090] Table 3

[0091] When the first byte data of the current data frame is 0XA5, that is, when the current data frame is a version frame, the corresponding reply data frame is also a reply version frame, and the specific content is as shown in Table 4.

[0092]

[0093]

[0094] Table 4

[0095] As shown in Table 3 and Table 4, the reply data frame also includes the second sending verification data.

[0096] Step 506: The frequency conversion board sends the wake-up signal, the current reply data frame and the idle signal as a complete frame data through the corresponding TX interface.

[0097] Among them, the frequency conversion board can be Figure 4 As shown, frame data is sent.

[0098] Step 507: After the main control board receives the current reply data frame through the corresponding RX interface, it determines the data byte according to the frame start bit in the received current reply data frame, and performs a verification operation on the received first byte data to the second to last byte data to obtain the second received verification data.

[0099] Step 508: The main control board determines whether the second received verification data matches the second sent verification data in the current reply data frame. If yes, execute step 509; otherwise, execute step 510.

[0100] Step 509: The main control board performs corresponding processing according to the current reply data frame, and cancels the alarm if there is a communication abnormality alarm. Return to step 501.

[0101] Step 510: The main control board determines whether the first time duration of the reply data frame that has not been successfully received reaches 50s. If yes, execute step 510; otherwise, return to step 501.

[0102] Step 511: The main control board issues a communication abnormality alarm and returns to step 501.

[0103] Step 512: The frequency conversion board discards the current data frame.

[0104] Step 513: The main control board determines whether the second time duration for which the reply data frame is not received reaches 50 ms. If yes, execute step 514; otherwise, return to step 513.

[0105] Step 514: The main control board determines whether the number of times the current data frame has been sent reaches 3 times. If yes, return to step 501; otherwise, return to step 502.

[0106] It can be seen that in this embodiment, the main control board and the frequency conversion board in the refrigerator adopt dual-line IO port master-slave communication. In this way, neither the main control board nor the frequency conversion board needs to add additional communication modules, saving resources and costs. In addition, the data processing capabilities of the main control board and the frequency conversion board are not required to be high, and the dual-line IO connection communication method also improves the anti-interference ability of the communication.

[0107] According to the above process for two-wire IO port communication, a device for two-wire IO port communication can be constructed.

[0108] Figure 6 Schematic diagram of a dual-line IO port communication device provided by an embodiment of the present disclosure. It can be applied to a first communication device, such as Figure 6 As shown, the dual-line IO port communication device 600 includes: a first sending module 610 and a second receiving module 620 .

[0109] The first sending module 610 is configured to send the current data frame to the second communication device through the first sending IO port.

[0110] The first receiving module 620 is configured to receive the current reply data frame through the first receiving IO port, wherein the current reply data frame is sent through the second sending IO port after the second communication device receives the current data frame through the second receiving IO port. The data frame includes: a frame start bit and multiple bytes of data.

[0111] In some embodiments, the first sending module 610 is further configured to send a wake-up signal to the second communication device through the first sending IO port before sending the current data frame to the second communication device through the first sending IO port.

[0112] The first receiving module 620 is further configured to receive a wake-up signal sent by the second communication device through the first receiving IO port before receiving the current reply data frame through the first receiving IO port.

[0113] Of course, the first byte data in the data frame is determined according to the data frame type, and the last byte data in the data frame is the first sending verification data, wherein the first sending verification data is obtained after a verification operation is performed based on the first byte data to the second to last byte data of the data frame; the first byte data in the reply data frame is determined according to the first byte data in the data frame, and the last byte data in the reply data frame is the second sending verification data, wherein the second sending verification data is obtained after a verification operation is performed based on the first byte data to the second to last byte data of the reply data frame.

[0114] In some embodiments, it also includes:

[0115] The first verification module is configured as a first communication device to determine the data byte according to the frame start bit in the current reply data frame received, and perform a verification operation on the first byte data to the second to last byte data received to obtain the second received verification data, and determine that the current reply data frame verification is successful when the second received verification data matches the second sent verification data.

[0116] In some embodiments, it also includes:

[0117] The alarm module is configured to, when a first time duration without receiving a reply data frame that has been successfully verified reaches a first set time duration, the first communication device performs communication abnormality alarm processing.

[0118] In some embodiments, it also includes:

[0119] The retransmission calling module is configured to call the first sending module 610 if the second time duration during which the current reply data frame is not received reaches the second set time duration and the number of times the current data frame is sent is less than the set number of times.

[0120] Figure 7 Schematic diagram of a dual-line IO port communication device provided by an embodiment of the present disclosure. It can be applied to a second communication device, such as Figure 7 As shown, the dual-line IO port communication device 700 includes: a second receiving module 710 and a second sending module 720 .

[0121] The second receiving module 710 is configured to receive the current data frame sent by the first communication device through the second receiving IO port.

[0122] The second sending module 720 is configured to send the current reply data frame to the first communication device through the second sending IO port, wherein the data frame includes: a frame start bit and a plurality of bytes of data.

[0123] In some embodiments, the second receiving module 710 is further configured to receive a wake-up signal before receiving the current data frame sent by the first communication device through the second receiving IO port.

[0124] The second sending module 720 is further configured to send a corresponding wake-up signal before sending the current reply data frame through the second sending IO port.

[0125] In some embodiments, it also includes:

[0126] The second verification module is configured to determine the data byte according to the frame start bit in the current data frame received, and perform a verification operation on the first byte data to the second to last byte data received to obtain the first received verification data; when the first received verification data matches the first sent verification data, it is determined that the current data frame verification is successful.

[0127] It can be seen that in this embodiment, the device used for two-wire IO port communication does not need to add an additional communication module to achieve two-way communication between communication devices, saving resources and costs. In addition, the data processing capability of the communication device is not required to be high, and the communication method of two-wire IO port connection also improves the anti-interference ability of the communication.

[0128] Combination Figure 8 , the embodiment of the present disclosure provides a device 800 for dual-line IO port communication, comprising:

[0129] The processor 1000 and the memory 1001 may also include a communication interface 1002 and a bus 1003. The processor 1000, the communication interface 1002, and the memory 1001 may communicate with each other through the bus 1003. The communication interface 1002 may be used for information transmission. The processor 1000 may call the logic instructions in the memory 1001 to execute the method for two-wire IO port communication of the above embodiment.

[0130] In addition, the logic instructions in the above-mentioned memory 1001 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0131] The memory 1001 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 1000 executes the functional application and data processing by running the program instructions / modules stored in the memory 1001, that is, the method for dual-wire IO port communication in the above method embodiment is implemented.

[0132] The memory 1001 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 1001 may include a high-speed random access memory and may also include a non-volatile memory.

[0133] An embodiment of the present disclosure provides a dual-wire IO port communication device, including: a processor and a memory storing program instructions, wherein the processor is configured to execute a dual-wire IO port communication method when executing the program instructions.

[0134] Combination Fig. 9 , an embodiment of the present disclosure provides a device 900 including: a first communication device 910 and a second communication device 920 .

[0135] The first communication device 910 is configured to send a current data frame to the second communication device 920 through a first sending IO port, and receive a current reply data frame through a first receiving IO port, wherein the data frame includes a frame start bit and a plurality of bytes of data.

[0136] The second communication device 920 is configured to send a current reply data frame to the first communication device 910 through a second sending IO port after receiving the current data frame through the second receiving IO port.

[0137] The dual-line IO port communication device 600 (800) is installed in the first communication device 910 of the device 900, and the dual-line IO port communication device 700 (800) is installed in the second communication device 920 of the device 900. The installation relationship described here is not limited to placement inside the product, but also includes installation connections with other components of the product, including but not limited to physical connection, electrical connection or signal transmission connection, etc. It can be understood by those skilled in the art that the dual-line IO port communication device can be adapted to feasible devices respectively, thereby realizing other feasible embodiments.

[0138] An embodiment of the present disclosure provides a storage medium storing program instructions, wherein the program instructions, when executed, execute the above-mentioned method for dual-wire IO port communication.

[0139] An embodiment of the present disclosure provides a computer program product, which includes a computer program stored on a storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above-mentioned method for dual-wire IO port communication.

[0140] The above-mentioned storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0141] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0142] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, individual components and functions are optional, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. The scope of the embodiments of the present disclosure includes the entire scope of the claims, and all available equivalents of the claims. When used in this application, although the terms "first", "second", etc. may be used in this application to describe each element, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, without changing the meaning of the description, the first element can be called the second element, and similarly, the second element can be called the first element, as long as all occurrences of the "first element" are renamed consistently and all occurrences of the "second element" are renamed consistently. The first element and the second element are both elements, but may not be the same element. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms "a", "an" and "the" are intended to include the plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0143] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0144] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

[0145] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for dual-wire IO port communication, characterized in that: A first transmitting IO port in a first communication device is communicatively connected to a second receiving IO port in a second communication device, and a first receiving IO port in the first communication device is communicatively connected to a second transmitting IO port in the second communication device, the method comprising: The first communication device sends the current data frame to the second communication device through the first sending IO port; The first communication device receives the current reply data frame through the first receiving IO port, wherein the current reply data frame is sent through the second sending IO port after the second communication device receives the current data frame through the second receiving IO port; The data frame includes: a frame start bit and multiple bytes of data.

2. The method according to claim 1, characterized in that Also includes: Before the first communication device sends the current data frame to the second communication device through the first sending IO port, the first communication device sends a wake-up signal to the second communication device through the first sending IO port; Then, before the first communication device receives the current reply data frame through the first receiving IO port, it receives the wake-up signal sent by the second communication device through the first receiving IO port.

3. The method according to claim 1, characterized in that The first byte data in the data frame is determined according to the data frame type, and the last byte data in the data frame is the first sending verification data, wherein the first sending verification data is obtained after a verification operation is performed based on the first byte data to the second last byte data of the data frame; The first byte data in the reply data frame is determined based on the first byte data in the data frame, and the last byte data in the reply data frame is the second send verification data, wherein the second send verification data is obtained after a verification operation is performed based on the first byte data to the second to last byte data of the reply data frame.

4. The method according to claim 3, characterized in that: The second communication device sending the current reply data frame includes: The second communication device determines the data byte according to the frame start bit in the received current data frame, and performs a check operation on the received first byte data to the second to last byte data to obtain first received check data; When the first received verification data matches the first sent verification data, the second communication device determines that the current data frame verification is successful, and sends the current reply data frame through the second sending IO port.

5. The method according to claim 3, characterized in that: After the first communication device receives the current reply data frame through the first receiving IO port, the method further includes: The first communication device determines the data byte according to the frame start bit in the received current reply data frame, and performs a check operation on the received first byte data to the second to last byte data to obtain second received check data; When the second received verification data matches the second sent verification data, the first communication device determines that the current reply data frame verification succeeds.

6. The method according to claim 5, characterized in that Also includes: When the first time duration in which the verification success reply data frame is not received reaches the first set time duration, the first communication device performs communication abnormality alarm processing.

7. The method according to any one of claims 1 to 6, characterized in that: Also includes: When the second time period during which the current reply data frame is not received reaches the second set time period, if the number of times the current data frame is sent is less than the set number, the first communication device resends the current data frame.

8. A device for dual-line IO port communication, the device comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the method for two-wire IO port communication according to any one of claims 1 to 7 when executing the program instructions.

9. A device, characterized in that: include: The first communication device is configured to send a current data frame to the second communication device through a first sending IO port, and receive a current reply data frame through a first receiving IO port, wherein the data frame includes: a frame start bit and a plurality of bytes of data; The second communication device is configured to send a current reply data frame to the first communication device through a second sending IO port after receiving the current data frame through the second receiving IO port.

10. A storage medium storing program instructions, characterized in that: When the program instructions are executed, the method for two-wire IO port communication as described in any one of claims 1 to 7 is executed.