Bus communication control method, device, equipment and storage medium
By detecting the target response requirements in a multi-master and multi-slave communication system and controlling the transfer of master permissions, the problem of response delay caused by master permissions is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202211236828.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-10
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-10-10
AI Technical Summary
In the multi-master and multi-slave communication method, the handover of master control permissions may lead to the inability to respond quickly to other loads in a timely manner, affecting the user experience.
When a master permission transfer request sent by the load unit is detected, it is determined whether there is a target response requirement from other load units, and when there is a master permission and no target response requirement, the master permission is transferred to the target load unit.
It avoids response delays caused by the handover of master control permissions, improves the system's ability to respond quickly, and thus improves the user experience.
Smart Images

Figure CN115685776B_ABST
Abstract
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 method between the internal components of various smart devices can be that the main controller controls all the loads, or it can be a multi-master and multi-slave method. In the traditional multi-master and multi-slave communication method, if the load of a device communicates as a host, the host communication authority is directly transferred, and there may be a situation where other requests cannot be responded to in time, especially some requests that require quick response, which greatly affects the user experience.
[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 in the prior art that in a multi-master and multi-slave communication mode, the transfer of master control authority will lead to the inability to respond to the rapid response requirements of other loads in a timely manner.
[0005] To achieve the above object, the present invention provides a bus communication control method, which is applied to a main control board, the main control board is connected to at least one load unit via a communication bus, and the method comprises the following steps:
[0006] When detecting a master control authority transfer request sent by the first load unit, determining whether there is a target response requirement from the second load unit;
[0007] Determine whether you have master control authority; and
[0008] When the master control authority is possessed and there is no target response requirement, the master control authority is transferred to the target load unit corresponding to the master control authority transfer request.
[0009] Optionally, after determining whether the user has the master control authority, the method further includes:
[0010] When the host does not have the master control authority and there is a target response requirement, determining a host load unit with the master control authority; and
[0011] The master control authority of the host load unit is revoked.
[0012] Optionally, the reclaiming the master control authority of the host load unit includes:
[0013] Detecting whether the host load unit has an ongoing data transmission task; and
[0014] If so, the data transmission task is interrupted and the master control authority of the host load unit is reclaimed.
[0015] Optionally, after detecting whether the host load unit has an ongoing data transmission task, the method further includes:
[0016] If not, the target load unit is controlled to release the master control authority and the master control authority is reclaimed.
[0017] Optionally, after determining whether the user has the master control authority, the method further includes:
[0018] When the master control authority is possessed and a target response requirement exists, locking the master control authority; and
[0019] After a preset time interval, return to the step of determining whether there is a target response requirement from the second load unit.
[0020] Optionally, locking the master control authority includes:
[0021] Determine the load unit to be operated and the corresponding operation task according to the target response requirement and the preset load unit priority; and
[0022] When the load unit to be run has not completed the running task, the master control authority is locked.
[0023] Optionally, when detecting the master authority transfer request sent by the first load unit, before determining whether there is a target response requirement from the second load unit, the method further includes:
[0024] Obtaining identification information of each load unit;
[0025] Generate a broadcast header according to the identification information and a preset broadcast communication instruction; and
[0026] Broadcasting and polling the header information through the communication bus to verify whether there is a fault on the communication bus;
[0027] Further, when the master authority transfer request sent by the first load unit is detected, determining whether there is a target response requirement from the second load unit includes:
[0028] When there is no fault and a master control authority transfer request sent by the first load unit is detected, it is determined whether there is a target response requirement from the second load unit.
[0029] In addition, to achieve the above object, the present invention also provides a bus communication control device, the bus communication control device comprising:
[0030] A detection module, configured to determine whether there is a target response requirement from a second load unit when detecting a master control authority transfer request sent by the first load unit;
[0031] A judgment module is used to judge whether the user has the master control authority;
[0032] The transfer module is used to transfer the master control authority to the target load unit corresponding to the master control authority transfer request when the master control authority is possessed and there is no target response requirement.
[0033] 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.
[0034] 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.
[0035] 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 at least one load unit through a communication bus; the bus communication control method comprises: when a master control authority transfer request sent by a first load unit is detected, judging whether there is a target response requirement from a second load unit; judging whether there is master control authority; and when there is the master control authority and there is no target response requirement, transferring the master control authority to the target load unit corresponding to the master control authority transfer request. Compared with the prior art, the present invention detects whether there is a target response requirement from another load unit before receiving the master control authority transfer request from the first load unit and transferring the master control authority to the first load unit, and when the main control board has the master control authority and there is no target response requirement, transfers the master control authority to the target load unit corresponding to the master control authority transfer request, thereby avoiding the technical problem in the prior art that the transfer of master control authority in a multi-master and multi-slave communication mode will lead to the inability to respond to the rapid response requirements of other loads in a timely manner, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] 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;
[0037] Figure 2 It is a flowchart of the first embodiment of the bus communication control method of the present invention;
[0038] Figure 3 A block diagram of the bus communication system structure of an embodiment of the bus communication control method of the present invention;
[0039] Figure 4 It is a flowchart of a second embodiment of a bus communication control method of the present invention;
[0040] Figure 5 A schematic diagram of broadcast polling control logic of an embodiment of a bus communication control method of the present invention;
[0041] Figure 6 This is a structural block diagram of the first embodiment of the bus communication control device of the present invention.
[0042] 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
[0043] 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.
[0044] 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.
[0045] 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.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] In this embodiment, the bus communication control method includes the following steps:
[0051] Step S10: when detecting the master authority transfer request sent by the first load unit, determining whether there is a target response requirement from the second load unit.
[0052] 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.
[0053] 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.
[0054] In the bus communication system, only the host communication node with master control authority 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.
[0055] 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.
[0056] 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.
[0057] It is worth noting that the first load unit can be any energy-consuming load unit in the above-mentioned smart refrigerator, wherein, in the smart refrigerator proposed in this embodiment, a single load is integrated with the corresponding slave control board to form a load unit, for example: a refrigeration fan unit, a wind direction unit, a display panel unit, and a motor unit, etc., and the master control authority transfer request can be a request instruction generated by the load unit due to data packet updates, software upgrades, or data sharing needs, and this embodiment does not impose specific restrictions on this.
[0058] 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.
[0059] For example: Reference Figure 3 , Figure 3 Load 1 in the example needs to share data with other loads. At this time, since the master control authority is on the main control board, under normal conditions, a data sharing request needs to be sent to the main board to send the data to be shared to the main control board. After the main control board receives the data to be shared, it uploads the data to be shared to the communication main line for broadcasting. At this time, load 1 receives the data to be shared first, and load 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 1 will no longer feedback a response instruction, and load 2 will feedback a received response instruction based on the received data. The data sharing task will not be completed until all load units on the communication bus have fed back response instructions.
[0060] It should be noted that the target response requirement refers to a requirement that requires the main control board to respond quickly. For example, the user increases the refrigeration temperature of the refrigerator through the display panel or buttons. At this time, the refrigeration fan or electric fan does not need to run immediately, but the main control board needs to immediately adjust the LED display content displayed on the display panel to facilitate the user to determine whether the temperature adjustment is successful. Adjusting the display content of the display panel requires the main control board to respond quickly. If the main control board does not have the main control authority at this time, it will cause the display of the display panel to be wrong, thereby reducing the user experience.
[0061] Step S20: Determine whether the user has the master control authority.
[0062] It should be noted 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. However, 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.
[0063] Step S30: When the master control authority is present and there is no target response requirement, the master control authority is transferred to the target load unit corresponding to the master control authority transfer request if the main control board receives the authority transfer instruction of the first load unit.
[0064] During the specific implementation process, if the main control board receives the authority transfer instruction from the first load unit and other loads do not require a quick response, it will transfer the master control authority to the first load unit on the premise that it itself has the master control authority, so that the first load unit can perform the corresponding data processing task.
[0065] Furthermore, after step S20, the method further includes:
[0066] When the master control authority is possessed and there is a target response requirement, locking the master control authority;
[0067] After a preset time interval, return to the step of determining whether there is a target response requirement from the second load unit.
[0068] It can be understood that if the main control board receives the authority transfer instruction of the first load unit, and it itself does not have the master control authority, but there is a quick response requirement for other loads, it means that the main control board needs to respond quickly to the request of the load unit. In order not to affect the user experience, at this time, the main control board needs to lock the master control authority to avoid the transfer of authority, which will lead to user control errors.
[0069] In a specific implementation, since the rapid response requirements of the refrigerator load unit often correspond to multiple operation processes, for example, when the user needs to lower the temperature of the refrigerator freezer, the first thing that needs to be responded to quickly is to update the temperature display value on the display panel. Secondly, it is also necessary to control the speed of the refrigeration fan corresponding to the freezer and the operating frequency of the compressor, etc. Therefore, in order to meet the user's control needs, an interval time can be set so that after the rapid response requirement is completed, it returns to the step of determining whether there is a target response requirement from the second load unit, so as to re-perform the authority transfer operation.
[0070] Furthermore, the locking of the master control authority includes:
[0071] Determine the load unit to be operated and the corresponding operation task according to the target response requirement and the preset load unit priority;
[0072] When the load unit to be run has not completed the running task, the master control authority is locked.
[0073] It should be noted that since there may be multiple load units controlled by a target response demand, in the actual control process, it may not be necessary to perform permission control on each load unit that needs to be run. For example, when the user needs to lower the temperature of the freezer compartment of the refrigerator, it is first necessary to control the numerical display of the display panel, and secondly, control the speed of the refrigeration fan corresponding to the freezer compartment and the operating frequency of the compressor, etc. However, the refrigeration fan and compressor do not require real-time and rapid control by the main control board. Therefore, the only load unit to be run is the display panel. When the display panel has not completed the task of updating the numerical value, the main control board's master control authority needs to be locked to avoid display errors.
[0074] Furthermore, after step S20, the method further includes:
[0075] When the host does not have the master control authority and there is a target response requirement, determining a host load unit with the master control authority;
[0076] The master control authority of the host load unit is revoked.
[0077] It is worth noting that when the main control board does not have master control authority, but there is a target response requirement and a request for master control authority transfer, the master control authority is on the slave control board in a certain load unit. In order to enable the load with the required master control authority to complete the corresponding task, the master control authority of the current host load unit can be used to facilitate the subsequent transfer of the master control authority to the first load unit to complete the authority transfer, wherein the transfer of master control authority must be implemented through the main control board.
[0078] In actual operation, since the master control authority is on a certain load unit, the load unit may have a data transmission task in progress. In order to ensure the feasibility of the authority transfer, the data transmission task can be interrupted and the master control authority of the host load unit can be recovered. In this embodiment, the priority of ordinary data transmission tasks is lower than the operation tasks corresponding to the master control authority transfer.
[0079] In a specific implementation, if after the first load unit completes its task requirements and the main control board takes back the master control authority, the master control authority can be transferred back to the host load unit whose data transmission task has not been completed. 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.
[0080] 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 at least one load unit through a communication bus; the bus communication control method includes: when a master control authority transfer request sent by a first load unit is detected, judging whether there is a target response requirement from a second load unit; judging whether there is master control authority; and when there is master control authority and there is no target response requirement, transferring the master control authority to the target load unit corresponding to the master control authority transfer request. The present embodiment detects whether there is a target response requirement from another load unit before receiving the master control authority transfer request from the first load unit and transferring the master control authority to the first load unit, and when the main control board has the master control authority and there is no target response requirement, transfers the master control authority to the target load unit corresponding to the master control authority transfer request, thereby avoiding the technical problem in the prior art that in a multi-master and multi-slave communication mode, the transfer of master control authority will lead to the inability to respond to the rapid response requirements of other loads in a timely manner, thereby improving the user experience.
[0081] refer to Figure 4 , Figure 4 It is a flowchart diagram of a second embodiment of a bus communication control method of the present invention.
[0082] Based on the first embodiment, in this embodiment, after step S20, the following steps are further performed:
[0083] Step S01: Obtain identification information of each load unit.
[0084] It should be noted that the identification information may be information such as the load type, load model, and identity ID of a load unit.
[0085] Furthermore, the identification information can be used to determine the installation position or broadcasting order of each load unit on the electronic device.
[0086] Step S02: Generate a broadcast header according to the identification information and a preset broadcast communication instruction.
[0087] It can be understood that the broadcast header is used for data transmission in the communication main line, wherein the broadcast header can be composed of an interval field, a synchronization field and an identifier field. The interval field, as the beginning of a header, can be composed of a period of low level. For example, the interval field can 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) + data bit (8 bits) + 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 main control board from the control board. The synchronization field can 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 can 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 main control board wants to communicate with. If the main control board needs to communicate with itself, the target address can be the identification information of the main control board. If the main control board needs to communicate with the slave control board, the target address can be the identification information of the corresponding slave control board. This embodiment does not limit this.
[0088] Step S03: broadcast and poll the header information via the communication bus to verify whether there is a fault on the communication bus.
[0089] 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 5 .
[0090] 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.
[0091] In a specific implementation, the fault detection process can send a fault detection instruction in accordance with a preset broadcast order to respectively receive the fault detection information fed back by each load unit, and then the main control board makes an operation fault judgment based on each fault detection information, wherein the broadcast order can 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 restrictions on this.
[0092] This embodiment generates broadcast information for broadcasting through the identification information of each load unit and the preset broadcast communication instructions, and verifies whether there is a communication failure in the entire bus communication system based on the broadcast response information fed back by each load unit, so as to avoid abnormalities in subsequent authority transfer and affect the operation of the equipment.
[0093] 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.
[0094] 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.
[0095] 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.
[0096] like Figure 6 As shown, the bus communication control device proposed in the embodiment of the present invention includes:
[0097] The detection module 10 is used to determine whether there is a target response requirement from the second load unit when detecting a master control authority transfer request sent by the first load unit.
[0098] 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.
[0099] In the bus communication system, only the host communication node with master control authority 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.
[0100] 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.
[0101] 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.
[0102] It is worth noting that the first load unit can be any energy-consuming load unit in the above-mentioned smart refrigerator, wherein, in the smart refrigerator proposed in this embodiment, a single load is integrated with the corresponding slave control board to form a load unit, for example: a refrigeration fan unit, a wind direction unit, a display panel unit, and a motor unit, etc., and the master control authority transfer request can be a request instruction generated by the load unit due to data packet updates, software upgrades, or data sharing needs, and this embodiment does not impose specific restrictions on this.
[0103] For example: Reference Figure 3 , Figure 3 Load 1 in the example needs to share data with other loads. At this time, since the master control authority is on the main control board, under normal conditions, a data sharing request needs to be sent to the main board to send the data to be shared to the main control board. After the main control board receives the data to be shared, it uploads the data to be shared to the communication main line for broadcasting. At this time, load 1 receives the data to be shared first, and load 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 1 will no longer feedback a response instruction, and load 2 will feedback a received response instruction based on the received data. The data sharing task will not be completed until all load units on the communication bus have fed back response instructions.
[0104] It should be noted that the target response requirement refers to a requirement that requires the main control board to respond quickly. For example, the user increases the refrigeration temperature of the refrigerator through the display panel or buttons. At this time, the refrigeration fan or electric fan does not need to run immediately, but the main control board needs to immediately adjust the LED display content displayed on the display panel to facilitate the user to determine whether the temperature adjustment is successful. Adjusting the display content of the display panel requires the main control board to respond quickly. If the main control board does not have the main control authority at this time, it will cause the display of the display panel to be wrong, thereby reducing the user experience.
[0105] The judging module 20 is used to judge whether the user has the master control authority.
[0106] It should be noted 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. However, 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.
[0107] The transfer module 30 is used to transfer the master control authority to the target load unit corresponding to the master control authority transfer request when the master control authority is possessed and there is no target response requirement.
[0108] During the specific implementation process, if the main control board receives the authority transfer instruction from the first load unit and other loads do not require a quick response, it will transfer the master control authority to the first load unit on the premise that it itself has the master control authority, so that the first load unit can perform the corresponding data processing task.
[0109] Furthermore, the transfer module 30 is also used for:
[0110] When the master control authority is possessed and a target response requirement exists, locking the master control authority; and
[0111] After a preset time interval, return to the step of determining whether there is a target response requirement from the second load unit.
[0112] It can be understood that if the main control board receives the authority transfer instruction of the first load unit, and it itself does not have the master control authority, but there is a quick response requirement for other loads, it means that the main control board needs to respond quickly to the request of the load unit. In order not to affect the user experience, at this time, the main control board needs to lock the master control authority to avoid the transfer of authority, which will lead to user control errors.
[0113] In a specific implementation, since the rapid response requirements of the refrigerator load unit often correspond to multiple operation processes, for example, when the user needs to lower the temperature of the refrigerator freezer, the first thing that needs to be responded to quickly is to update the temperature display value on the display panel. Secondly, it is also necessary to control the speed of the refrigeration fan corresponding to the freezer and the operating frequency of the compressor, etc. Therefore, in order to meet the user's control needs, an interval time can be set so that after the rapid response requirement is completed, it returns to the step of determining whether there is a target response requirement from the second load unit, so as to re-perform the authority transfer operation.
[0114] Furthermore, the locking of the master control authority includes:
[0115] Determine the load unit to be operated and the corresponding operation task according to the target response requirement and the preset load unit priority; and
[0116] When the load unit to be run has not completed the running task, the master control authority is locked.
[0117] It should be noted that since there may be multiple load units controlled by a target response demand, in the actual control process, it may not be necessary to perform permission control on each load unit that needs to be run. For example, when the user needs to lower the temperature of the freezer compartment of the refrigerator, it is first necessary to control the numerical display of the display panel, and secondly, control the speed of the refrigeration fan corresponding to the freezer compartment and the operating frequency of the compressor, etc. However, the refrigeration fan and compressor do not require real-time and rapid control by the main control board. Therefore, the only load unit to be run is the display panel. When the display panel has not completed the task of updating the numerical value, the main control board's master control authority needs to be locked to avoid display errors.
[0118] Furthermore, the transfer module 30 is also used for:
[0119] When the host does not have the master control authority and there is a target response requirement, determining a host load unit with the master control authority;
[0120] The master control authority of the host load unit is revoked.
[0121] It is worth noting that when the main control board does not have master control authority, but there is a target response requirement and a request for master control authority transfer, the master control authority is on the slave control board in a certain load unit. In order to enable the load with the required master control authority to complete the corresponding task, the master control authority of the current host load unit can be used to facilitate the subsequent transfer of the master control authority to the first load unit to complete the authority transfer, wherein the transfer of master control authority must be implemented through the main control board.
[0122] In actual operation, since the master control authority is on a certain load unit, the load unit may have a data transmission task in progress. In order to ensure the feasibility of the authority transfer, the data transmission task can be interrupted and the master control authority of the host load unit can be recovered. In this embodiment, the priority of ordinary data transmission tasks is lower than the operation tasks corresponding to the master control authority transfer.
[0123] In a specific implementation, if after the first load unit completes its task requirements and the main control board takes back the master control authority, the master control authority can be transferred back to the host load unit whose data transmission task has not been completed. 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.
[0124] 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 at least one load unit through a communication bus; the bus communication control method includes: when a master control authority transfer request sent by a first load unit is detected, judging whether there is a target response requirement from a second load unit; judging whether there is master control authority; and when there is master control authority and there is no target response requirement, transferring the master control authority to the target load unit corresponding to the master control authority transfer request. The present embodiment detects whether there is a target response requirement from another load unit before receiving the master control authority transfer request from the first load unit and transferring the master control authority to the first load unit, and when the main control board has the master control authority and there is no target response requirement, transfers the master control authority to the target load unit corresponding to the master control authority transfer request, thereby avoiding the technical problem in the prior art that in a multi-master and multi-slave communication mode, the transfer of master control authority will lead to the inability to respond to the rapid response requirements of other loads in a timely manner, thereby improving the user experience.
[0125] 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.
[0126] 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.
[0127] 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.
[0128] 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.
[0129] 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.
[0130] 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.
[0131] 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, the main control board is connected to at least one load unit via a communication bus, and the load unit includes a slave control board and a load element; The bus communication control method comprises: When a master control authority transfer request sent by the first load unit to the main control board is detected, it is determined whether there is a target response requirement from the second load unit, wherein the target response requirement refers to a requirement that the main control board needs to respond quickly; Determine whether the main control board has the master control authority, and the master control authority is used to respond to the request or response signal of each load unit in a timely manner; as well as When the master control authority is possessed and the target response requirement does not exist, the master control authority is transferred to the target load unit corresponding to the master control authority transfer request.
2. The bus communication control method according to claim 1, characterized in that: After determining whether the master control authority is possessed, the method further includes: When the host does not have the master control authority and there is a target response requirement, determining a host load unit with the master control authority; and The master control authority of the host load unit is revoked.
3. The bus communication control method according to claim 2, 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.
4. The bus communication control method according to claim 3, characterized in that: After detecting whether the host load unit has an ongoing data transmission task, the method further includes: If not, the target load unit is controlled to release the master control authority and the master control authority is reclaimed.
5. The bus communication control method according to claim 1, characterized in that: After determining whether the master control authority is possessed, the method further includes: When the master control authority is possessed and a target response requirement exists, locking the master control authority; and After a preset time interval, return to the step of determining whether there is a target response requirement from the second load unit.
6. The bus communication control method according to claim 5, characterized in that: The locking of the master control authority comprises: Determine the load unit to be operated and the corresponding operation task according to the target response requirement and the preset load unit priority; and When the load unit to be run has not completed the running task, the master control authority is locked.
7. The bus communication control method according to any one of claims 1 to 6, characterized in that: The method further comprises: before determining whether there is a target response requirement from the second load unit when the master control authority transfer request sent by the first load unit is detected: Obtaining identification information of each load unit; Generate a broadcast header according to the identification information and a preset broadcast communication instruction; and Broadcasting and polling the header information through the communication bus to verify whether the communication bus has a fault; Further, when the master authority transfer request sent by the first load unit is detected, determining whether there is a target response requirement from the second load unit includes: When there is no fault and a master control authority transfer request sent by the first load unit is detected, it is determined whether there is a target response requirement from the second load unit.
8. A bus communication control device, characterized in that: The bus communication control device comprises: A detection module, configured to determine whether there is a target response requirement from the second load unit when detecting a master control authority transfer request sent by the first load unit to the main control board, wherein the target response requirement refers to a requirement that the main control board needs to respond quickly; A judgment module, used to judge whether the main control board has the master control authority, and the master control authority is used to respond to the request or response signal of each load unit in time; A transfer module is used to transfer the master control authority to the target load unit corresponding to the master control authority transfer request when the master control authority is possessed and the target response requirement does not exist.
9. 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 7.
10. 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 7 is implemented.
Citation Information
Patent Citations
Multiple access method for improving data transmission reliability and stability
CN107040284A
Bus arbitration apparatus, bus arbitration method, and computer-readable storage medium
US20140013019A1
Notification device and notification method
WO2022029907A1
Cited By
Bus communication control method and apparatus, and device and storage medium
EP4593331A1
Bus communication control method and apparatus, and device and storage medium
WO2024078204A1