Bus communication control method, device, equipment and storage medium

By transferring the master control permission to the target load unit in the multi-master and multi-slave communication method, direct broadcast polling is realized, solving the problem of cumbersome data forwarding steps on slave boards and improving data forwarding efficiency.

CN115622834BActive Publication Date: 2024-12-24HEFEI MIDEA REFRIGERATOR CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211237048.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-10
Publication Date
2024-12-24
Estimated Expiration
2042-10-10

AI Technical Summary

Technical Problem

In the multi-master and multi-slave communication method, when the slave board needs to forward data, the steps are cumbersome and inefficient.

Method used

When the main control board receives the data broadcast request of the target load unit, it determines whether it has master control permission, and transfers the master control permission to the target load unit when it has master control permission, so that it can directly conduct broadcast polling through the communication bus , avoid forwarding data through the main control board.

Benefits of technology

The data forwarding process is simplified, the data forwarding efficiency is improved, and the cumbersome problems in the prior art are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115622834B_ABST
    Figure CN115622834B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data communication technology, and in particular to a bus communication control method, device, equipment and storage medium. When the present invention receives a data broadcast request sent by a target load unit through a main control board, it detects whether the main control board has the master control authority. When the main control board has the master control authority, the master control authority is transferred to the target load unit that needs to broadcast data, so that the target load unit has the authority to broadcast data, and broadcasts and polls directly through the communication main line without forwarding data through the main control board, thereby avoiding the technical problem of cumbersome steps in the prior art when the slave board needs to forward data in a multi-master and multi-slave communication mode, and improving the efficiency of data forwarding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data communication technology, and in particular to a bus communication control method, device, equipment and storage medium. Background Art

[0002] With the popularity of smart homes, the communication mode between the internal components of various smart devices can be that the master controller controls all loads, or it can be a multi-master and multi-slave mode. In the traditional multi-master and multi-slave communication mode, when the slaves on the bus have a large number of data packets to send, data forwarding can only be achieved by forwarding the data through the host, which is cumbersome and inefficient.

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of the present invention is to provide a bus communication control method, device, equipment and storage medium, aiming to solve the technical problem of complicated steps in the prior art when the slave board needs to forward data in a multi-master and multi-slave communication mode.

[0005] To achieve the above object, the present invention provides a bus communication control method, which is applied to a main control board, wherein the main control board is connected to a plurality of load units via a communication bus.

[0006] The method comprises the following steps:

[0007] When receiving a data broadcast request sent by a target load unit through the communication bus, determining whether the master control authority exists; and

[0008] When the master control authority is possessed, the master control authority is transferred to the target load unit, so that after the target load unit receives the master control authority, the data to be sent is broadcast polled through the communication bus.

[0009] Optionally, after determining whether the user has the master control authority, the method further includes:

[0010] When the host load unit does not have the master control authority, a host load unit with the master control authority is determined; and the master control authority of the host load unit is reclaimed, and the master control authority is transferred to the target load unit.

[0011] Optionally, the reclaiming the master control authority of the host load unit includes:

[0012] Detecting whether the host load unit has an ongoing data transmission task; and

[0013] If so, the data transmission task is interrupted and the master control authority of the host load unit is reclaimed.

[0014] Optionally, after interrupting the data transmission task and reclaiming the master control authority of the host load unit, the method further includes:

[0015] After a preset time interval, the master control authority is transferred to the host load unit so that the host load unit can re-run the data transmission task.

[0016] Optionally, the transferring of the master control authority to the target load unit so that the target load unit broadcasts and polls the data to be sent through the communication bus after receiving the master control authority includes:

[0017] Determining the polling order of the main control board and each load unit; and

[0018] The polling sequence is sent to the target load unit, and the master control authority is transferred to the target load unit, so that after the target load unit receives the master control authority, a broadcast header is generated according to the polling sequence and the data to be sent, and the broadcast header is broadcast polled through the communication bus.

[0019] Optionally, determining the polling order of the main control board and each load unit includes:

[0020] Obtaining identification information of the main control board and each load unit;

[0021] Determining the broadcast priority of the main control board and each load unit according to the identification information; and

[0022] The polling order is determined according to the broadcast priority.

[0023] Optionally, when the master control authority is possessed, the master control authority is transferred to the target load unit, so that after the target load unit receives the master control authority, the target load unit broadcasts and polls the data to be sent through the communication bus, and further includes:

[0024] After the broadcast polling is completed, the master control authority of the target load unit is reclaimed.

[0025] In addition, to achieve the above object, the present invention also provides a bus communication control device, the bus communication control device comprising:

[0026] A judging module, configured to judge whether the module has the master control authority when receiving a data broadcast request sent by a target load unit through the communication bus;

[0027] The control module is used to transfer the master control authority to the target load unit when it has the master control authority, so that after the target load unit receives the master control authority, it broadcasts and polls the data to be sent through the communication bus.

[0028] In addition, to achieve the above-mentioned purpose, the present invention also proposes a bus communication control device, which includes: a memory, a processor, and a bus communication control program stored in the memory and executable on the processor, and the bus communication control program is configured to implement the steps of the bus communication control method described above.

[0029] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a bus communication control program is stored, and when the bus communication control program is executed by a processor, the steps of the bus communication control method described above are implemented.

[0030] The present invention discloses a bus communication control method, which is applied to a main control board, and the main control board is connected to multiple load units through a communication bus; the bus communication control method comprises: when receiving a data broadcast request sent by a target load unit through the communication bus, judging whether the main control authority is possessed; when possessing the master control authority, transferring the master control authority to the target load unit, so that after the target load unit receives the master control authority, the target load unit broadcasts the data to be sent through the communication bus for polling. Compared with the prior art, the present invention detects whether the main control board has the master control authority when receiving a data broadcast request sent by a target load unit through the main control board, and when the main control board has the master control authority, transfers the master control authority to the target load unit that needs to broadcast data, so that the target load unit has the authority to broadcast data, and directly broadcasts and polls through the communication main line, without forwarding data through the main control board, thereby avoiding the technical problem of complicated steps in the prior art when the slave board needs to forward data in a multi-master and multi-slave communication mode, and improving the efficiency of data forwarding. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a structural diagram of a bus communication control device in a hardware operating environment involved in an embodiment of the present invention;

[0032] Figure 2 It is a flowchart of the first embodiment of the bus communication control method of the present invention;

[0033] Figure 3 A block diagram of the bus communication system structure of an embodiment of the bus communication control method of the present invention;

[0034] Figure 4 A schematic diagram of broadcast polling control logic of an embodiment of a bus communication control method of the present invention;

[0035] Figure 5 It is a flowchart of a second embodiment of a bus communication control method of the present invention;

[0036] Figure 6 This is a structural block diagram of the first embodiment of the bus communication control device of the present invention.

[0037] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0038] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0039] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the structure of a bus communication control device in a hardware operating environment involved in an embodiment of the present invention.

[0040] like Figure 1 As shown, the bus communication control device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0041] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the bus communication control device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0042] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a bus communication control program.

[0043] exist Figure 1 In the bus communication control device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the bus communication control device of the present invention can be set in the bus communication control device, and the bus communication control device calls the bus communication control program stored in the memory 1005 through the processor 1001, and executes the bus communication control method provided by the embodiment of the present invention.

[0044] The embodiment of the present invention provides a bus communication control method, referring to Figure 2 , Figure 2 It is a flowchart diagram of a first embodiment of a bus communication control method of the present invention.

[0045] In this embodiment, the bus communication control method includes the following steps:

[0046] Step S10: when receiving a data broadcast request sent by a target load unit through the communication bus, determining whether the master control authority is available.

[0047] It should be noted that the executor of the method of this embodiment can be a main control board of an electronic device with data processing or data transmission. The electronic device can be a smart refrigerator or smart home appliance, etc., or other devices or systems that can achieve the same or similar functions. This embodiment does not impose specific restrictions on this. In this embodiment and the following embodiments, the main control board of a smart refrigerator will be used as an example for explanation.

[0048] It is understandable that in the traditional multi-master and multi-slave bus communication mode, reference Figure 3 Generally, a bus communication system is composed of a main control board, at least one load unit and a communication bus, and the main control board and each load unit are connected to the communication bus. Depending on the device where the bus communication system is located, each load unit is also different. Among them, the load unit includes: a slave control board and a load element. For example, the compressor load unit includes: a compressor and a compressor slave control board, and the display panel load unit includes: a display panel and a display panel slave control board. This embodiment does not make any specific restrictions on this.

[0049] In addition, the slave control board in this embodiment may include but is not limited to communication boards such as display control boards, microcrystalline boards, frequency conversion boards, WIFI boards, and expansion boards, and may also include other types of communication boards, which are not limited in this embodiment.

[0050] In a specific implementation, only the host communication node with master control authority in the bus communication system can actively send data to the outside, while other communication nodes can feedback response information by receiving data on the communication main line, and some load units can also receive signal inputs from the outside world, for example: interactive panels or touch displays, etc., can receive touch signal inputs from users. This embodiment does not impose specific restrictions on this.

[0051] Among them, in the bus communication system, the master control authority is generally on the main control board, which is used to respond to the requests or response signals of each load unit in a timely manner. Only after a load unit requests the transfer of the master control authority from the main control board and the load unit receives the master control authority can it actively send data to the communication main line to realize active data interaction.

[0052] In addition, in the above-mentioned bus communication system, the data interaction between the main control board and each load unit is carried out through broadcast polling to realize communication between each node.

[0053] It should be noted that the target load unit refers to the load unit with data forwarding requirements in the smart refrigerator in this embodiment. The load unit is formed by integrating a single load with the corresponding slave control board, such as a refrigeration fan unit, a wind direction unit, a display panel unit, and a motor unit, etc. This embodiment does not impose specific restrictions on this.

[0054] It should be understood that a data broadcast request refers to a request message generated by a target load unit based on needs such as data packet update, software upgrade or data sharing. However, since the target load unit does not have master control authority, it is unable to directly send the data to be broadcast to each load unit through the communication bus, thus generating an instruction requesting data broadcast.

[0055] For example: Reference Figure 3 , Figure 3 When load unit 1 needs to share data with other loads, at this time, since the master control authority is not on the load unit, it is necessary to send a data broadcast request to the main board under normal conditions to send the data to be broadcast to the main control board. After the main control board receives the data to be broadcast, it uploads the data to be broadcast to the communication main line for broadcasting. At this time, load unit 1 first receives the data to be shared, and load unit 1 will feedback a received response instruction. At this time, the main control board will upload the data to be shared to the communication main line for broadcasting again. At this time, load unit 1 will no longer feedback a response instruction, and load unit 2 will feedback a received response instruction based on the received data. The data broadcast task will not be completed until all load units on the communication bus have fed back response instructions.

[0056] It can be understood that in this embodiment, the master control authority can be on the main control board or on each load unit, and the master control authority can be transferred, but in the normal data communication process, the master control authority is generally on the main control board, and the transfer of the master control authority needs to be implemented through the main control board. The master control authority cannot be transferred directly from one load unit to another load unit.

[0057] Step S20: When the master control authority is possessed, the master control authority is transferred to the target load unit, so that after the target load unit receives the master control authority, the data to be sent is broadcast polled via the communication bus.

[0058] It should be noted that if the main control board receives the authority transfer instruction of the target load unit and transfers the main control authority of the main control board to the target load unit, the target load unit will broadcast poll the data to be sent through the communication bus, where the specific implementation of the broadcast polling is as follows: broadcast in sequence according to a predetermined polling order so that each main control board or load unit can feedback a response signal.

[0059] Further, the transferring of the master control authority to the target load unit so that the target load unit broadcasts and polls the data to be sent through the communication bus after receiving the master control authority includes:

[0060] Determining the polling order of the main control board and each load unit;

[0061] The polling sequence is sent to the target load unit, and the master control authority is transferred to the target load unit, so that after the target load unit receives the master control authority, a broadcast header is generated according to the polling sequence and the data to be sent, and the broadcast header is broadcast polled through the communication bus.

[0062] It should be noted that broadcast polling requires data communication to be performed for each communication node in the bus communication system so that each communication node can feedback response information, for example: Figure 3 , now load unit 1 is the communication host and has the master control authority. At this time, if load unit 1 needs to share data through the communication bus, it will upload the data to be sent to the communication main line, so that the main control board-load unit 1-load unit 2...load unit n will feedback the response information in sequence. Among them, each time a feedback message is received, load unit 1 needs to re-upload the data to be sent to the communication main line. Its control logic reference Figure 4 .

[0063] In addition, during the polling process, if the corresponding feedback signal is received in the order described above within a certain time interval, it can be directly skipped, the data to be sent can be resent, and the next feedback response signal can be received again. Among them, a 200ms timed polling method can be adopted, and the timeout time range can be within 100ms, which is not limited in this embodiment.

[0064] In a specific implementation, the broadcast header may be composed of an interval field, a synchronization field, and an identifier field. The interval field is the beginning of a header and may be composed of a period of low level. For example, the interval field may be composed of 20 bits of low level. Because a data byte sent by the serial port is composed of a start bit (1 bit) + a data bit (8 bits) + a stop bit (1 bit or 2 bits), 20 low levels will not appear in normal communication valid data. By detecting the interval field, it can be effectively ensured that the valid data of the previous frame has been sent. The synchronization field is used to synchronize the communication rate of the slave control board with the master control board. The synchronization field may be composed of one or more bytes of data agreed in advance, that is, the synchronization field is not limited to a single byte representation, and may also be multiple bytes, such as 0x55, etc. This embodiment does not limit this. The identifier field is used to determine the type of home appliance, identification information, and instruction type that the sending master control board wants to communicate with. If the master control board needs to communicate with itself, the target address may be the identification information of the master control board. If the master control board needs to communicate with the slave control board, the target address may be the identification information of the corresponding slave control board. This embodiment does not limit this.

[0065] Further, in order to obtain the order of broadcast polling, determining the polling order of the main control board and each load unit includes:

[0066] Obtaining identification information of the main control board and each load unit;

[0067] Determine the broadcast priority of the main control board and each load unit according to the identification information;

[0068] The polling order is determined according to the broadcast priority.

[0069] It is understandable that the identification information may be information such as the load type, load model, and identity ID of a load unit, and the identification information may be used to determine the installation location or broadcasting order of each load unit on the electronic device.

[0070] In this embodiment, the broadcast priority may be in the order of main control board - load unit 1 - load unit 2 . . . load unit n, and this embodiment does not impose any specific limitation on this.

[0071] In addition, if the master control authority is not on the main control board but on a certain load unit, the host load unit with the master control authority can be determined at this time, and the master control authority it possesses can be revoked, and the master control authority can be transferred to the target load unit requested by the data broadcast, so as to facilitate subsequent data broadcast tasks.

[0072] In a specific implementation, because the master control authority is on the host load unit, it means that the host load unit may have an ongoing data transmission task at this time. In order to ensure the feasibility of authority transfer, the data transmission task can be interrupted and the master control authority of the host load unit can be reclaimed. In this embodiment, the priority of ordinary data transmission tasks is lower than the operation tasks corresponding to data broadcasting.

[0073] In addition, if the target load unit completes the data broadcast task, the main control board can take back the master control authority and transfer the master control authority back to the host load unit that has not completed the data transmission task. If there are multiple host load units, the transfer order can be determined according to the priority of each task or each load unit. This embodiment does not impose specific restrictions on this.

[0074] The present embodiment discloses a bus communication control method, which is applied to a main control board, and the main control board is connected to multiple load units through a communication bus; the bus communication control method includes: when receiving a data broadcast request sent by a target load unit through the communication bus, judging whether it has master control authority; when it has the master control authority, transferring the master control authority to the target load unit, so that after the target load unit receives the master control authority, it broadcasts and polls the data to be sent through the communication bus. In this embodiment, when the main control board receives a data broadcast request sent by a target load unit, it detects whether the main control board has master control authority. When the main control board has master control authority, it transfers the master control authority to the target load unit that needs to broadcast data, so that the target load unit has the authority to broadcast data, and directly broadcasts and polls through the communication main line without forwarding data through the main control board, thereby avoiding the technical problem of complicated steps when the slave board needs to forward data in the multi-master and multi-slave communication mode of the prior art, and improving the efficiency of data forwarding.

[0075] refer to Figure 5 , Figure 5 It is a flowchart diagram of a second embodiment of a bus communication control method of the present invention.

[0076] Based on the first embodiment, in this embodiment, after step S20, the following steps are further performed:

[0077] Step S30: After the broadcast polling is completed, the master control authority of the target load unit is reclaimed.

[0078] It should be noted that after the broadcast polling task of the target load unit is completed, in order to facilitate the subsequent control of the operating status of the refrigerator or interaction with the user, the master control authority of the target load unit can be reclaimed to quickly respond to user needs.

[0079] In addition, after the master control authority is reclaimed, the main control board can also perform fault detection on the entire bus communication network for the communication host. The specific implementation method can be to send a fault detection instruction in the broadcast sequence mentioned above to receive the fault detection information fed back by each load unit respectively, and then the main control board makes an operation fault judgment based on each fault detection information.

[0080] In this embodiment, after the target load unit completes the broadcast polling, the master control authority of the target load unit is reclaimed, thereby directly sharing data through the target load unit, reducing the steps when the load unit needs to broadcast data and improving the efficiency of data sharing.

[0081] In addition, an embodiment of the present invention further provides a storage medium, on which a bus communication control program is stored. When the bus communication control program is executed by a processor, the steps of the bus communication control method described above are implemented.

[0082] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.

[0083] Reference Figure 6 , Figure 6 This is a structural block diagram of the first embodiment of the bus communication control device of the present invention.

[0084] like Figure 6 As shown, the bus communication control device proposed in the embodiment of the present invention includes:

[0085] The judgment module 10 is used to judge whether the master control authority exists when receiving a data broadcast request sent by a target load unit through the communication bus.

[0086] It is understandable that in the traditional multi-master and multi-slave bus communication mode, reference Figure 3 Generally, a bus communication system is composed of a main control board, at least one load unit and a communication bus, and the main control board and each load unit are connected to the communication bus. Depending on the device where the bus communication system is located, each load unit is also different. Among them, the load unit includes: a slave control board and a load element. For example, the compressor load unit includes: a compressor and a compressor slave control board, and the display panel load unit includes: a display panel and a display panel slave control board. This embodiment does not make any specific restrictions on this.

[0087] In addition, the slave control board in this embodiment may include but is not limited to communication boards such as display control boards, microcrystalline boards, frequency conversion boards, WIFI boards, and expansion boards, and may also include other types of communication boards, which are not limited in this embodiment.

[0088] In a specific implementation, only the host communication node with master control authority in the bus communication system can actively send data to the outside, while other communication nodes can feedback response information by receiving data on the communication main line, and some load units can also receive signal inputs from the outside world, for example: interactive panels or touch displays, etc., can receive touch signal inputs from users. This embodiment does not impose specific restrictions on this.

[0089] Among them, in the bus communication system, the master control authority is generally on the main control board, which is used to respond to the requests or response signals of each load unit in a timely manner. Only after a load unit requests the transfer of the master control authority from the main control board and the load unit receives the master control authority can it actively send data to the communication main line to realize active data interaction.

[0090] In addition, in the above-mentioned bus communication system, the data interaction between the main control board and each load unit is carried out through broadcast polling to realize communication between each node.

[0091] It should be noted that the target load unit refers to the load unit with data forwarding requirements in the smart refrigerator in this embodiment. The load unit is formed by integrating a single load with the corresponding slave control board, such as a refrigeration fan unit, a wind direction unit, a display panel unit, and a motor unit, etc. This embodiment does not impose specific restrictions on this.

[0092] It should be understood that a data broadcast request refers to a request message generated by a target load unit based on needs such as data packet update, software upgrade or data sharing. However, since the target load unit does not have master control authority, it is unable to directly send the data to be broadcast to each load unit through the communication bus, thus generating an instruction requesting data broadcast.

[0093] For example: Reference Figure 3 , Figure 3When load unit 1 needs to share data with other loads, at this time, since the master control authority is not on the load unit, it is necessary to send a data broadcast request to the main board under normal conditions to send the data to be broadcast to the main control board. After the main control board receives the data to be broadcast, it uploads the data to be broadcast to the communication main line for broadcasting. At this time, load unit 1 first receives the data to be shared, and load unit 1 will feedback a received response instruction. At this time, the main control board will upload the data to be shared to the communication main line for broadcasting again. At this time, load unit 1 will no longer feedback a response instruction, and load unit 2 will feedback a received response instruction based on the received data. The data broadcast task will not be completed until all load units on the communication bus have fed back response instructions.

[0094] It can be understood that in this embodiment, the master control authority can be on the main control board or on each load unit, and the master control authority can be transferred, but in the normal data communication process, the master control authority is generally on the main control board, and the transfer of the master control authority needs to be implemented through the main control board. The master control authority cannot be transferred directly from one load unit to another load unit.

[0095] The control module 20 is used to transfer the master control authority to the target load unit when it has the master control authority, so that after the target load unit receives the master control authority, it broadcasts and polls the data to be sent through the communication bus.

[0096] It should be noted that if the main control board receives the authority transfer instruction of the target load unit and transfers the main control authority of the main control board to the target load unit, the target load unit will broadcast poll the data to be sent through the communication bus, where the specific implementation of the broadcast polling is as follows: broadcast in sequence according to a predetermined polling order so that each main control board or load unit can feedback a response signal.

[0097] Further, the transferring of the master control authority to the target load unit so that the target load unit broadcasts and polls the data to be sent through the communication bus after receiving the master control authority includes:

[0098] Determining the polling order of the main control board and each load unit;

[0099] The polling sequence is sent to the target load unit, and the master control authority is transferred to the target load unit, so that after the target load unit receives the master control authority, a broadcast header is generated according to the polling sequence and the data to be sent, and the broadcast header is broadcast polled through the communication bus.

[0100] It should be noted that broadcast polling requires data communication to be performed for each communication node in the bus communication system so that each communication node can feedback response information, for example: Figure 3 , now load unit 1 is the communication host and has the master control authority. At this time, if load unit 1 needs to share data through the communication bus, it will upload the data to be sent to the communication main line, so that the main control board-load unit 1-load unit 2...load unit n will feedback the response information in sequence. Among them, each time a feedback message is received, load unit 1 needs to re-upload the data to be sent to the communication main line. Its control logic reference Figure 4 .

[0101] In addition, during the polling process, if the corresponding feedback signal is received in the order described above within a certain time interval, it can be directly skipped, the data to be sent can be resent, and the next feedback response signal can be received again. Among them, a 200ms timed polling method can be adopted, and the timeout time range can be within 100ms, which is not limited in this embodiment.

[0102] In a specific implementation, the broadcast header may be composed of an interval field, a synchronization field, and an identifier field. The interval field is the beginning of a header and may be composed of a period of low level. For example, the interval field may be composed of 20 bits of low level. Because a data byte sent by the serial port is composed of a start bit (1 bit) + a data bit (8 bits) + a stop bit (1 bit or 2 bits), 20 low levels will not appear in normal communication valid data. By detecting the interval field, it can be effectively ensured that the valid data of the previous frame has been sent. The synchronization field is used to synchronize the communication rate of the slave control board with the master control board. The synchronization field may be composed of one or more bytes of data agreed in advance, that is, the synchronization field is not limited to a single byte representation, and may also be multiple bytes, such as 0x55, etc. This embodiment does not limit this. The identifier field is used to determine the type of home appliance, identification information, and instruction type that the sending master control board wants to communicate with. If the master control board needs to communicate with itself, the target address may be the identification information of the master control board. If the master control board needs to communicate with the slave control board, the target address may be the identification information of the corresponding slave control board. This embodiment does not limit this.

[0103] Further, in order to obtain the order of broadcast polling, determining the polling order of the main control board and each load unit includes:

[0104] Obtaining identification information of the main control board and each load unit;

[0105] Determine the broadcast priority of the main control board and each load unit according to the identification information;

[0106] The polling order is determined according to the broadcast priority.

[0107] It is understandable that the identification information may be information such as the load type, load model, and identity ID of a load unit, and the identification information may be used to determine the installation location or broadcasting order of each load unit on the electronic device.

[0108] In this embodiment, the broadcast priority may be in the order of main control board - load unit 1 - load unit 2 . . . load unit n, and this embodiment does not impose any specific limitation on this.

[0109] In addition, if the master control authority is not on the main control board but on a certain load unit, the host load unit with the master control authority can be determined at this time, and the master control authority it possesses can be revoked, and the master control authority can be transferred to the target load unit requested by the data broadcast, so as to facilitate subsequent data broadcast tasks.

[0110] In a specific implementation, because the master control authority is on the host load unit, it means that the host load unit may have an ongoing data transmission task at this time. In order to ensure the feasibility of authority transfer, the data transmission task can be interrupted and the master control authority of the host load unit can be reclaimed. In this embodiment, the priority of ordinary data transmission tasks is lower than the operation tasks corresponding to data broadcasting.

[0111] In addition, if the target load unit completes the data broadcast task, the main control board can take back the master control authority and transfer the master control authority back to the host load unit that has not completed the data transmission task. If there are multiple host load units, the transfer order can be determined according to the priority of each task or each load unit. This embodiment does not impose specific restrictions on this.

[0112] The present embodiment discloses a bus communication control method, which is applied to a main control board, and the main control board is connected to multiple load units through a communication bus; the bus communication control method includes: when receiving a data broadcast request sent by a target load unit through the communication bus, judging whether it has master control authority; when it has the master control authority, transferring the master control authority to the target load unit, so that after the target load unit receives the master control authority, it broadcasts and polls the data to be sent through the communication bus. In this embodiment, when the main control board receives a data broadcast request sent by a target load unit, it detects whether the main control board has master control authority. When the main control board has master control authority, it transfers the master control authority to the target load unit that needs to broadcast data, so that the target load unit has the authority to broadcast data, and directly broadcasts and polls through the communication main line without forwarding data through the main control board, thereby avoiding the technical problem of complicated steps when the slave board needs to forward data in the multi-master and multi-slave communication mode of the prior art, and improving the efficiency of data forwarding.

[0113] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0114] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0115] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the bus communication control method provided in any embodiment of the present invention, and will not be repeated here.

[0116] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0117] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0119] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A bus communication control method, characterized in that: The bus communication control method is applied to a main control board, and the main control board is connected to a plurality of load units via a communication bus; The bus communication control method comprises: When receiving a data broadcast request sent by a target load unit through the communication bus, determining whether the master control authority is available, wherein the data broadcast request refers to request information generated by the target load unit based on a data packet update, software upgrade, or data sharing requirement; and When the master control authority is possessed, the master control authority is transferred to the target load unit, so that after the target load unit receives the master control authority, the data to be sent is broadcast polled through the communication bus; After determining whether the master control authority is possessed, the method further includes: When the host does not have the master control authority, determining a host load unit with the master control authority; and The master control authority of the host load unit is reclaimed, and the master control authority is transferred to the target load unit.

2. The bus communication control method according to claim 1, characterized in that: The reclaiming the master control authority of the host load unit includes: Detecting whether the host load unit has an ongoing data transmission task; and If so, the data transmission task is interrupted and the master control authority of the host load unit is reclaimed.

3. The bus communication control method according to claim 2, characterized in that: After interrupting the data transmission task and reclaiming the master control authority of the host load unit, the method further includes: After a preset time interval, the master control authority is transferred to the host load unit so that the host load unit can re-run the data transmission task.

4. The bus communication control method according to claim 1, characterized in that: The transferring of the master control authority to the target load unit so that the target load unit broadcasts and polls the data to be sent through the communication bus after receiving the master control authority includes: Determining the polling order of the main control board and each load unit; and The polling sequence is sent to the target load unit, and the master control authority is transferred to the target load unit, so that after the target load unit receives the master control authority, a broadcast header is generated according to the polling sequence and the data to be sent, and the broadcast header is broadcast polled through the communication bus.

5. The bus communication control method according to claim 4, characterized in that: Determining the polling order of the main control board and each load unit includes: Obtaining identification information of the main control board and each load unit; Determining the broadcast priority of the main control board and each load unit according to the identification information; and The polling order is determined according to the broadcast priority.

6. The bus communication control method according to any one of claims 1 to 5, characterized in that: When the master control authority is possessed, the master control authority is transferred to the target load unit, so that after the target load unit receives the master control authority, the data to be sent is broadcasted and polled through the communication bus, and the method further includes: After the broadcast polling is completed, the master control authority of the target load unit is reclaimed.

7. A bus communication control device, characterized in that: The bus communication control device comprises: A judgment module, used to judge whether it has the master control authority when receiving a data broadcast request sent by the target load unit through the communication bus, wherein the data broadcast request refers to request information generated by the target load unit based on data packet update, software upgrade or data sharing requirements; A control module, configured to transfer the master control authority to the target load unit when the control module has the master control authority, so that after the target load unit receives the master control authority, the target load unit broadcasts and polls the data to be sent through the communication bus; The control module is further used to determine a host load unit with master control authority when the control module does not have master control authority; and to revoke the master control authority of the host load unit and transfer the master control authority to the target load unit.

8. A bus communication control device, characterized in that: The bus communication control device comprises: a memory, a processor, and a bus communication control program stored in the memory and executable on the processor, wherein the bus communication control program is configured to implement the bus communication control method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a bus communication control program, and when the bus communication control program is executed by the processor, the bus communication control method according to any one of claims 1 to 6 is implemented.