Control method, device, equipment and storage medium of slave load switch

By querying and controlling the load switch status of the slave device in turn, the problem of low control efficiency in the existing technology is solved, and timely response and efficiency improvement to the load switch status of multiple slave devices is achieved, ensuring equipment safety and power consumption efficiency.

CN118642416BActive Publication Date: 2024-11-01DELIXI GROUP INSTRUMENT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411110497.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-11-01
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

In the prior art, controlling the load switch state of multiple power meters is low efficiency, resulting in the inability to respond in time when the power of the power of the power is overloaded, affecting the safety and efficiency of the equipment.

Method used

The master device receives the request signal sent by the slave device, queries the load switch status of all or part of the slave device in turn, and controls changes in time according to the query results, thereby improving control efficiency.

Benefits of technology

It realizes timely response and change the state when the load switch status of multiple slave equipment needs to be changed, improves control efficiency, avoids equipment overheating and safety hazards, and ensures the normal operation of the electrical equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118642416B_ABST
    Figure CN118642416B_ABST
Patent Text Reader

Abstract

The present application provides a control method, device, equipment and storage medium for a load switch of a slave device. In the present application, a master device is connected to a plurality of slave devices, and any one of the plurality of slave devices sends a first request signal to the master device. The first request signal is used to inform the master device that the state of the first load switch in the first slave device needs to be changed. In response to the first request signal, the master device sequentially queries whether the state of the load switches in all or part of the slave devices needs to be changed, thereby controlling the change of the state of the corresponding load switch according to the first query result. In the present application, the first request signal sent by any slave device triggers the operation of the master device to sequentially query all or part of the slave devices. In this way, when the state of the load switches of a large number of slave devices needs to be changed, the master device can timely control the change of the state of the load switch of each slave device according to the first request signal sent by any slave device, thereby improving the control efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic information, and in particular to a control method, device, equipment and storage medium for a load switch of a slave device. Background Art

[0002] In a multi-user energy meter system, a master energy meter is connected to multiple slave energy meters, each of which contains a load switch. The power grid is connected to the corresponding power-consuming equipment through the load switches in the multiple slave energy meters. When the load switch is in the open state, the power grid can transmit power to the power-consuming equipment through the load switch so that the power-consuming equipment can work normally. When the load switch is in the closed state, the power grid does not transmit power to the power-consuming equipment.

[0003] In actual use, the master power meter needs to control the states of the load switches in the multiple slave power meters based on the power consumption of the power devices connected to the multiple slave power meters, so as to meet the needs of users. However, the existing methods for controlling the load switches have low control efficiency. Summary of the invention

[0004] The present application provides a control method, apparatus, device and storage medium for a load switch of a slave device, wherein a first request signal sent by a first slave device triggers a master device to sequentially query the operations of all or part of the slave devices, so that the master device can timely control and change the state of the load switch of each slave device according to the first request signal sent by any slave device, thereby improving control efficiency.

[0005] In a first aspect, the present application provides a control method for a load switch of a slave device, which is applied to a master device, and the master device is respectively connected to multiple slave devices, the method comprising: receiving a first request signal sent by a first slave device; wherein the first slave device is any one of the multiple slave devices, and the first request signal is used to inform the master device that the state of a first load switch in the first slave device needs to be changed; the state of the first load switch is a closed state or a disconnected state; the first request signal is sent by the first slave device when the state of the first load switch is a closed state and the power of the electrical equipment connected to the first load switch is greater than a first preset threshold, or the first request signal is sent by the first slave device after the first load switch is disconnected for a first preset time; in response to the first request signal, querying in turn whether the state of the load switches in all or part of the slave devices needs to be changed, and obtaining a first query result; the first query result indicates a set of slave devices whose state of the load switches needs to be changed; the set of slave devices includes the first slave device; for each slave device in the set of slave devices indicated by the first query result, sending a first instruction to the slave device to control the slave device to change the state of the load switch in the slave device.

[0006] In some embodiments, the first instruction includes a first control instruction and a second control instruction, and the sending of the first instruction to the slave device to control the slave device to change the state of the load switch in the slave device includes: sending the first control instruction to the slave device to control the slave device to change the state of the load switch in the slave device to a disconnected state; wherein, before sending the first control instruction, the load switch in the slave device is in a closed state, and the power of the electrical equipment connected to the load switch of the slave device is greater than the first preset threshold; sending the second control instruction to the slave device to control the slave device to change the state of the load switch in the slave device to a closed state; wherein, before sending the second control instruction, the load switch in the slave device maintains the disconnected state for a time period greater than the first preset time period.

[0007] In some embodiments, the master device supplies power to the load switches in the multiple slave devices respectively, and the querying in sequence whether the states of the load switches in all or part of the slave devices need to be changed includes: querying in sequence whether the states of the load switches in all or part of the slave devices need to be changed at a preset time interval; wherein the preset time interval is greater than a first duration; the master device is connected to an external power supply, and the master device stores the electric energy transmitted by the external power supply, and the first duration is the duration of the master device storing the electric energy until the output voltage of the master device is greater than a first voltage. The first voltage is the voltage required for the slave device to change the state of the load switch in the slave device.

[0008] In some embodiments, the step of sequentially querying whether the status of the load switches in all or part of the slave devices needs to be changed to obtain a first query result, and sending a first instruction to each slave device in the slave device set indicated by the first query result, includes: querying whether the status of the load switch in the first slave device among all or part of the slave devices needs to be changed to obtain the query result of the first slave device; if the query result of the first slave device indicates that the status of the load switch in the first slave device needs to be changed, sending a first instruction to the first slave device to control the change of the status of the load switch of the first slave device, and returning to execute the operation of querying whether the status of the load switch in the second slave device among the part of the slave devices or all the slave devices needs to be changed, and executing the corresponding process based on the query result of the second slave device until the query reaches the part. The query result of the last slave device among the partial slave devices or all the slave devices is obtained; if the state of the load switch in the slave device does not need to be changed, for the second slave device among the partial slave devices or all the slave devices, return to execute the query whether the state of the load switch in the second slave device among the partial slave devices or all the slave devices needs to be changed, and perform the operation of the corresponding process based on the query result of the second slave device, until the last slave device among the partial slave devices or all the slave devices is queried and the query result of the last slave device is obtained; based on the query result of the last slave device, the current query control process is ended; or, based on the query result of the last slave device, the first instruction is sent to the last slave device to control the change of the state of the load switch of the first slave device, and the current query control process is ended.

[0009] In some embodiments, for each slave device among the multiple slave devices, when the load switch of the slave device is in the off state and the power of the electrical equipment connected to the load switch of the slave device is greater than the first preset threshold, and when the load switch in the slave device is disconnected for the first preset time, the value of the first register in the slave device changes from 0 to 1; the value of the first register changes from 0 to 1, indicating that the state of the load switch in the slave device needs to be changed; the third slave device is any slave device among all the slave devices or some of the slave devices, and queries whether the state of the load switch in the third slave device needs to be changed, including: sending a first instruction to the third slave device, the first instruction is used to request the third slave device to report the value of the first register to the master device; receiving the value of the first register sent by the third slave device, and determining whether the state of the load switch of the third slave device needs to be changed based on the value of the first register.

[0010] In some embodiments, the method also includes: in the process of sequentially querying whether the status of the load switches in all the slave devices or some of the slave devices needs to be changed, if a second request signal sent by a second slave device is detected, determining whether the second slave device is the slave device to be queried among all the slave devices and some of the slave devices; if the second slave device is not the slave device to be queried, after ending the current query control process, returning to execute sequentially querying whether the status of the load switches in all the slave devices or some of the slave devices needs to be changed to obtain a first query result, and for each slave device in the slave device set, sending a first instruction to the slave device to control the slave device to change the status of the load switch in the slave device.

[0011] In the second aspect, the present application provides a control method for a load switch of a slave device, the method is applied to a first slave device, the first slave device is connected to a master device, the master device is respectively connected to multiple slave devices, the first slave device is any one of the multiple slave devices, the method includes: when the state of a first load switch in the first slave device is a closed state and the power of an electrical device connected to the first load switch is greater than a first preset threshold, or when the first load switch is disconnected for a first preset time, sending a first request signal; wherein the first request signal is used to inform the master device that the state of the first load switch in the first slave device needs to be changed; the state of the first load switch is a closed state Or disconnected state; and, the first request signal is used to request the master device to query in sequence whether the state of the load switches in all or part of the slave devices needs to be changed, and for each slave device in the slave device set indicated by the first query result obtained by the query, send a first instruction to the slave device to control the slave device to change the state of the load switch in the slave device; the first query result indicates the slave device set whose state of the load switch needs to be changed, and the slave device set includes the first slave device; receive the first instruction sent by the master device based on the first request signal, wherein the first instruction is used to control the change of the state of the first load switch; in response to the first instruction, change the state of the first load switch.

[0012] In a third aspect, the present application provides a control device for a load switch of a slave device, comprising a module for executing the method described in the first aspect or a module for executing the method described in the second aspect.

[0013] In a fourth aspect, the present application provides a chip comprising an interface circuit and a logic circuit, wherein the interface circuit is used to receive signals from other chips outside the chip and transmit them to the logic circuit, or to send signals from the logic circuit to other chips outside the chip, and the logic circuit is used to implement the method described in the first aspect or the second aspect.

[0014] In a fifth aspect, the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect or the second aspect.

[0015] In a sixth aspect, the present application provides a main device, comprising a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and wherein the processor implements the method described in the first aspect when executing the program.

[0016] In a seventh aspect, the present application provides a slave device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and wherein the processor implements the method described in the second aspect when executing the program.

[0017] In an eighth aspect, the present application provides a communication system, comprising the master device described in the first aspect and the slave device described in the second aspect.

[0018] In the present application, any one of the multiple slave devices sends a first request signal to the master device. The first request signal is used to inform the master device that the state of the first load switch in the first slave device needs to be changed. In response to the first request signal, the master device sequentially queries whether the states of the load switches in all or part of the slave devices need to be changed, thereby controlling the change of the states of the corresponding load switches according to the first query result. In the present application, the first request signal triggers the master device to sequentially query the operations of all or part of the slave devices. In this way, when the states of the load switches of a large number of slave devices need to be changed, the master device can promptly control the change of the state of the load switch of each slave device according to the first request signal sent by any slave device, thereby improving the control efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of a communication network provided in an embodiment of the present application;

[0020] Figure 2 A schematic diagram of the implementation flow of a control method for a slave device load switch provided in an embodiment of the present application;

[0021] Figure 3 A schematic diagram of the implementation flow of a control method for a slave device load switch provided in an embodiment of the present application;

[0022] Figure 4 A schematic diagram of a processing flow after a master device receives a second request signal provided in an embodiment of the present application;

[0023] Figure 5 A schematic diagram of the structure of a load switch control device for a slave device provided in an embodiment of the present application;

[0024] Figure 6 A schematic diagram of the structure of a load switch control device for a slave device provided in an embodiment of the present application;

[0025] Figure 7 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] Figure 1 A communication network diagram provided in an embodiment of the present application. Figure 1 As shown, the communication network 10 includes a master device 101 and multiple slave devices 102, and the master device 101 is connected to the multiple slave devices 102 through a communication bus 103. The master device 101 and the multiple slave devices 102 perform data and command interaction through the communication bus 103 to manage and monitor the multiple slave devices 102.

[0027] The present application does not limit the device types of the master device 101 and the slave device 102. The device types of the master device 101 and the slave device 102 can be the same, for example, the device types of the master device 101 and the slave device 102 can be electric energy meters. The device types of the master device 101 and the slave device 102 can also be different, for example, the master device is a gateway device and the slave device is an electric energy meter.

[0028] Of course, the master device 101 and the slave device 102 are electric energy meters, which is only an example of the types of the master device 101 and the slave device 102 in this application. In actual use, the master device 101 and the slave device 102 can be other types of devices, and this application does not limit them here. The main application takes the master device 101 and the slave device 102 as electric energy meters for example.

[0029] Each slave device 102 is connected to one or more corresponding electrical devices to form a slave circuit, wherein different slave devices 102 are connected to different electrical devices, and the power grid transmits electrical energy to the electrical devices connected to the slave devices 102 through the slave devices 102 so that the electrical devices can work normally.

[0030] Specifically, for each slave device 102, the slave device 102 includes a load switch, which is connected to the power device and the power grid respectively. When the load switch is in a closed state, the power grid can transmit power to the power device through the load switch, and the power device can work normally. When the load switch is in an open state, the power grid cannot transmit power to the power device.

[0031] Exemplarily, the load switch may be a relay.

[0032] It should be noted that in actual use, the state of the load switch needs to be changed according to the power consumption of the power equipment. For example, when the load switch is in the closed state, the power grid transmits electric energy to the power equipment. When the power of the power equipment is greater than the first preset threshold, the power is large, and the power line or the power equipment will overheat. The power equipment may be burned due to overload and there are safety hazards. Therefore, in this case, the load switch needs to be disconnected to prevent the power equipment and lines from burning.

[0033] When the load switch is disconnected for more than the first preset time, the heating of the electrical equipment or the electrical line is relieved to a certain extent. At this time, the load switch needs to be turned off to allow the electrical equipment to work normally.

[0034] In the related art, the master device can control the change of the state of the load switch in the slave device. For example, the master device periodically queries the state bit in the slave device according to a certain time period, and then determines whether the state of the load switch needs to be changed based on the state bit in the slave device. If the state of the load switch needs to be changed, the master device controls the slave device to change the state of its own load switch.

[0035] However, the master device queries the slave device status bit regularly according to a certain time period. When one or more slave device status bits need to be changed, it is necessary to wait for the time period, which increases the waiting time and makes the control efficiency low.

[0036] Based on this, the embodiment of the present application provides a control method for a load switch of a slave device, the method is applied to Figure 1 In the master device, when receiving a request to change the load switch from any slave device, the master device sequentially queries whether the status of the load switches in all or part of the slave devices needs to be changed, and controls the change of the status of the corresponding load switches based on the query result. In this way, when the status of the load switches of a large number of slave devices needs to be changed, it is not necessary to wait for the query cycle to arrive, and the status of the load switches of all or part of the slave devices can be queried in advance, and the corresponding load switches can be controlled to be changed based on the query result, thereby improving the control efficiency.

[0037] Figure 2 The following is a schematic diagram of the implementation flow of the control method of the slave load switch provided in the embodiment of the present application. Figure 2 As shown, the method includes:

[0038] S201. Receive a first request signal sent by a first slave device.

[0039] The first slave device is any slave device among the multiple slave devices.

[0040] The first request signal is used to request the master device to change the state of the first load switch in the first slave device.

[0041] The first request signal is sent by the first slave device when the first load switch is in the off state and the power of the electrical device connected to the first load switch is greater than a first preset threshold.

[0042] It can be understood that the state of the first load switch is the closed state, and the power grid can transmit electric energy to the electric device through the first load switch. When the power of the electric device is greater than the first preset threshold, the electric device is prone to overheating and damage. Therefore, it is necessary to disconnect the first load switch to protect the electric device. In this case, the first request signal is used to inform the master device that the first load switch needs to be controlled to disconnect.

[0043] Alternatively, the first request signal is sent by the first slave device after the first load switch is disconnected for a first preset time period.

[0044] It can be understood that if the overheating problem of the electrical equipment is alleviated after a preset time after the first load switch is disconnected, in this case, the first load switch needs to be closed in time so that the electrical equipment can draw power from the power grid to work normally. Therefore, in this case, the first request signal is used to inform the master device that the first load switch needs to be controlled to be closed.

[0045] S202. In response to the first request signal, query in sequence whether the states of the load switches in all or part of the slave devices need to be changed, and obtain a first query result.

[0046] That is, when the master device receives the first request signal, it immediately responds to the first request signal, queries in turn whether the states of the load switches in all or part of the slave devices need to be changed, and obtains a first query result.

[0047] During actual use, the master device may perform real-time signal detection on the communication bus, and respond to the first request signal when the first request signal is detected.

[0048] In a possible implementation, the power consumption (e.g., power) of the power-consuming devices connected to at least one of the multiple slave devices or all of the slave devices is roughly the same. If the power of the power-consuming device corresponding to one of the slave devices is greater than the first preset threshold, the other slave devices may also have a higher power in a shorter period of time. In this case, the master device actively and timely queries each slave device and performs corresponding operations based on the query results. In this way, the state of the load switch of the slave device can be controlled and changed in time before other slave devices request the master device to change the state of the load switch, thereby improving the control efficiency.

[0049] In some embodiments, the master device pre-orders and codes the multiple slave devices, and the coding sequence starts from 1 and ends at N. N is the number of slave devices. The order of the multiple slave devices is slave device 1, slave device 2...slave device N. N is greater than 2.

[0050] Some of the slave devices may include the first slave device and all slave devices sequenced after the first slave device. For example, the first slave device is slave device 5, and the part of the slave devices includes: slave device 5, slave device 6, ... slave device N.

[0051] All slave devices and some slave devices are queried in sequence, and the query may be performed in sequence according to the order of the multiple slave devices as above.

[0052] The first query result indicates a set of slave devices whose states of the load switch need to be changed, and the set of slave devices includes the first slave device.

[0053] Exemplarily, the first slave device is slave device 5, and the first query result indicates that the states of the load switches of slave device 5, slave device 7, and slave device 8 need to be changed. Specifically, the first query result indicates that the state of the load switch of slave device 5 needs to be changed from closed to disconnected, and the states of the load switches of slave device 7 and slave device 8 both need to be changed from disconnected to closed.

[0054] S203 . Send a first instruction to each slave device in the slave device set indicated by the first query result.

[0055] The first instruction is used to control the slave device to change the state of the load switch in the slave device.

[0056] The first instruction includes a first control instruction and a second control instruction. For each slave device, if the query result of the slave device indicates that the load switch in the slave device needs to be changed from the closed state to the disconnected state, the master device sends the first instruction to the slave device, and the first instruction is used to control the slave device to change the state of the load switch in the slave device to the disconnected state. Before sending the first control instruction, the load switch in the slave device is in the closed state, and the power of the electrical device connected to the load switch of the slave device is greater than the first preset threshold.

[0057] If the query result of the slave device indicates that the load switch in the slave device needs to be changed from an open state to a closed state, the master device sends a second control instruction to the slave device. The second control instruction is used to control the slave device to change the state of the load switch in the slave device to a closed state, wherein before sending the second control instruction, the load switch in the slave device maintains the state for a time period greater than a first preset time period. The first preset time period can be set according to actual needs.

[0058] In the embodiment of the present application, after the master device receives the request signal sent by any slave device, it sequentially performs a query operation on all or part of the slave devices to determine whether the state of the load switch needs to be changed, thereby timely controlling the change of the state of the corresponding load switch based on the first query result obtained. In this way, the control of changing the state of the load switch is more timely and the control efficiency is higher.

[0059] Next, through Figure 3 The embodiment exemplarily illustrates how to query all or part of the slave devices in sequence to change the state of the load switch of the slave device indicated by the slave device set based on the obtained first query result.

[0060] Figure 3 A schematic diagram of the implementation flow of the control method of the slave device load switch provided in the embodiment of the present application; Figure 3 As shown, all slave devices or part of the slave devices are queried in sequence to change the state of the corresponding slave device load switch, as shown in S301 to S304 below:

[0061] S301. Receive a first request signal sent by a first slave device.

[0062] As shown above, the first request signal is used to instruct the master device to sequentially query whether the states of the load switches in some or all slave devices need to be changed.

[0063] S302: Determine or update the current slave device.

[0064] In the first round of the cycle, the master device determines the first slave device as the currently queried slave device.

[0065] In the second and subsequent cycles, the master device updates the current slave device according to the slave device in the previous round, and updates the next slave device of the slave device queried in the previous round as the current slave device.

[0066] S303, query whether the state of the load switch of the current slave device needs to be changed, and obtain a first query result. If the first query result indicates that the state of the load switch of the current slave device needs to be changed, execute S304; if the first query result indicates that the state of the load switch of the current slave device does not need to be changed, execute S305.

[0067] The first query result includes the query result of the first slave device, the query result of the second slave device, the query result of the third slave device, and the query result of the last slave device among all or part of the slave devices.

[0068] The query result of the current slave device is: the status of the current slave device needs to be changed, and the status of the current slave device does not need to be changed.

[0069] For each slave device, the slave device includes a first register, and the first register is used to identify the state change of the load switch in the slave device.

[0070] When the slave device is powered on, the value of the first register is initialized to 0. When the load switch of the slave device is in the off state and the power of the electrical device connected to the load switch of the slave device is greater than a first preset threshold, the value of the first register becomes 1.

[0071] After the load switch in the slave device is disconnected, the value of the first register becomes 0; when the load switch of the slave device remains disconnected for a first preset time period, the value of the first register changes from 0 to 1.

[0072] The value of the first register changes from 0 to 1, indicating that the state of the load switch in the slave device needs to be changed. If the value of the first register is 0, it indicates that the state of the load switch does not need to be changed.

[0073] S304: Send a first instruction to the current slave device.

[0074] The first instruction is used to control the first slave device to change the state of the load switch in the current slave device.

[0075] Correspondingly, the current slave device receives the first instruction and changes the state of its own load switch based on the first instruction. Specifically, if the state of the current slave device load switch is in the closed state, the load switch in the current slave device is changed to the disconnected state. If the state of the current slave device load switch is in the disconnected state, the state of the current slave device load switch is changed to the closed state.

[0076] After changing the state of the load switch, the slave device sets the first register to 0.

[0077] S305: Determine whether the traversal of all or part of the slave devices is completed.

[0078] If so, end this query control process.

[0079] Otherwise, the process returns to S302 and determines the next slave device of the slave device queried in this round as the current slave device.

[0080] In the query control process of this embodiment, starting from the first slave device, the status of the slave device load switch is queried first. When the load status switch needs to be changed, the status of the load switch is controlled to change first, and then the next slave device is queried. In this way, when the status of multiple load switches needs to be changed, the status of multiple load switches is changed in sequence instead of changing at the same time.

[0081] In some embodiments, the master device is further connected to the multiple slave devices via a power supply circuit, and the master device uses the power supply circuit to open or close the load switch in the slave device, wherein the voltage required to open the load switch is greater than or equal to the voltage required to close the load switch.

[0082] In some embodiments, the slave device further includes a metering processing unit and an MCU data processing unit, both of which are used to process and transmit the data measured by the slave device. The master device may also supply power to the metering processing unit and the MCU data processing unit.

[0083] If multiple load switches are turned on or off at the same time, the power supply capacity of the main device is limited and may not be able to provide sufficient voltage. This may cause the load switch to fail to open or close, the power supply system to be abnormal and cause a reset or restart, etc., affecting the user's power consumption. In this embodiment, the load switches are turned on or off in sequence, and the main device only needs to provide the voltage required to open or close one load switch each time, reducing the power supply pressure of the main device, so that the main device with a smaller power supply can be used, thereby saving the cost of the main device.

[0084] Specifically, the master device is connected to an external power supply, and the master device stores the electric energy transmitted by the external power supply. When the load switch of a slave device is opened or closed, the voltage of the master device is pulled down by the slave device. After a period of power storage, the voltage of the master device will return to the voltage before being pulled down, thereby supporting the next slave device to change the state of its own load switch.

[0085] In some embodiments, when the master device queries the state of the load switch of the slave device, it queries in sequence at a preset time interval whether the state of the load switch in all or part of the slave devices needs to be changed; wherein the first time duration is the time duration during which the voltage stored in the master device to the master device is greater than the first voltage. The first voltage is the voltage required for the slave device to change the state of the load switch in the slave device.

[0086] Specifically, Figure 3 As shown, in S303, it is determined that all or part of the slave devices have not been traversed, and after a preset time interval, the load switch state of the next slave device is queried, and the subsequent query control process is performed.

[0087] If the master device detects a second request signal sent by a second slave device during the process of querying all or part of the slave devices in sequence, the second request signal does not disrupt the query control process of the current master device, and the master device still executes the query operation in the query order. In this way, there is no need to design complex control software, and only sequential query control is required, which reduces software design costs.

[0088] Based on this, an embodiment of the present application provides a control method for a slave device load switch, which is used to illustrate the specific execution process of the master device when the master device receives a second request signal sent by a second slave device during the process of sequentially querying all or part of the slave devices.

[0089] The second request signal can be Figure 3 The second request signal is received before or after any step in any cycle. Exemplarily, the second request signal is received before S303 in any cycle, then between S302 and S303 in the cycle, such as Figure 4 As shown, it also includes S302a to S302c; S302a to S302c are used to illustrate the processing flow of the master device after receiving the second request signal.

[0090] Figure 4 A schematic diagram of a processing flow after a master device receives a second request signal provided in an embodiment of the present application. Figure 4 As shown, including:

[0091] S302a, determine whether the second slave device is the slave device to be queried among all or part of the slave devices. If yes, execute S302b; otherwise, execute S302c.

[0092] It is understandable that Figure 3 As shown, the slave device before the current slave device has completed the query process, so the slave device to be queried is Figure 3 The slave device after the current slave device in the .

[0093] S302b, executing S303 of this round of cycle and Figure 3 The subsequent process in the embodiment ends the query control process after the traversal of the slave device is completed.

[0094] That is, the master device does not perform any operation on the second request signal. When querying the second slave device in sequence, the state of the load switch of the second slave device can be changed based on the query result.

[0095] S302c, execute S303 and subsequent processes of this cycle, return to execute S202 after all or part of the slave devices are traversed, query in turn whether the status of the load switches in all or part of the slave devices needs to be changed, and obtain the first query result and other subsequent processes.

[0096] In this way, the master device does not need to design a complex software program to process the request signals received during the sequential query process, but only needs to query sequentially according to the pre-set query order, thus saving software design costs.

[0097] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.; or, steps in different embodiments may be combined into a new technical solution.

[0098] Based on the foregoing embodiments, the embodiments of the present application provide a slave device load switch control device, which includes the modules included and the units included in the modules, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0099] Figure 5 A schematic diagram of the structure of a load switch control device for a slave device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the slave load switch control device 50 includes a first receiving module 51, a query module 52 and a first sending module 53, wherein:

[0100] The first receiving module 51 is used to receive a first request signal sent by a first slave device; wherein, the first slave device is any one of the multiple slave devices, and the first request signal is used to inform the master device that the state of the first load switch in the first slave device needs to be changed; the state of the first load switch is a closed state or a disconnected state; the first request signal is sent by the first slave device when the state of the first load switch is a closed state and the power of the electrical equipment connected to the first load switch is greater than a first preset threshold, or, the first request signal is sent by the first slave device after the first load switch is disconnected for a first preset time.

[0101] The query module 52 is used to respond to the first request signal and query in sequence whether the status of the load switches in all or part of the slave devices needs to be changed to obtain a first query result; the first query result indicates a set of slave devices whose load switch status needs to be changed; the set of slave devices includes the first slave device.

[0102] The first sending module 53 is used to send a first instruction to each slave device in the slave device set indicated by the first query result, so as to control the slave device to change the state of the load switch in the slave device.

[0103] In some embodiments, the first instruction includes a first control instruction and a second control instruction, and the first sending module 53 is used to send the first control instruction to the slave device to control the slave device to change the state of the load switch in the slave device to a disconnected state; wherein, before sending the first control instruction, the load switch in the slave device is in a closed state, and the power of the electrical equipment connected to the load switch of the slave device is greater than the first preset threshold; and send the second control instruction to the slave device to control the slave device to change the state of the load switch in the slave device to a closed state; wherein, before sending the second control instruction, the load switch in the slave device maintains the disconnected state for a time period greater than the first preset time period.

[0104] In some embodiments, the master device supplies power to the load switches in the multiple slave devices respectively, and the query module 20 is used to query in sequence whether the states of the load switches in all or part of the slave devices need to be changed according to a preset time interval; wherein the preset time interval is greater than a first duration; the master device is connected to an external power supply, and the master device stores the electric energy transmitted by the external power supply, and the first duration is the duration of the master device storing the electric energy until the output voltage of the master device is greater than the first voltage. The first voltage is the voltage required for the slave device to change the state of the load switch in the slave device.

[0105] In some embodiments, the query module 52 is used to query whether the state of the load switch in the first slave device among all or part of the slave devices needs to be changed, and obtain the query result of the first slave device; the first sending module 53 is used to send a first instruction to the first slave device to control the change of the state of the load switch of the first slave device if the query result of the first slave device indicates that the state of the load switch in the first slave device needs to be changed, and instruct the query module 52 to query whether the state of the load switch in the second slave device among the part of the slave devices or all the slave devices needs to be changed, and perform operations of the corresponding process based on the query result of the second slave device, until the last slave device among the part of the slave devices or all the slave devices is queried, and the query result of the last slave device is obtained. if the state of the load switch in the slave device does not need to be changed, for the second slave device in the part of the slave devices or all the slave devices, return to execute the query whether the state of the load switch in the second slave device in the part of the slave devices or all the slave devices needs to be changed, and perform the operation of the corresponding process based on the query result of the second slave device, until the last slave device in the part of the slave devices or all the slave devices is queried to obtain the query result of the last slave device; the first sending module 53 is used to end the current query control process based on the query result of the last slave device; or, based on the query result of the last slave device, send the first instruction to the last slave device to control the change of the state of the load switch of the first slave device to end the current query control process.

[0106] In some embodiments, for each of the multiple slave devices, when the load switch of the slave device is in the off state and the power of the electrical device connected to the load switch of the slave device is greater than the first preset threshold, and when the load switch in the slave device is disconnected for the first preset time, the value of the first register in the slave device changes from 0 to 1; the value of the first register changes from 0 to 1 indicating that the state of the load switch in the slave device needs to be changed. The query module 52 is used to send a first instruction to the third slave device, the first instruction is used to request the third slave device to report the value of the first register to the master device; receive the value of the first register sent by the third slave device, and determine whether the state of the load switch of the third slave device needs to be changed based on the value of the first register.

[0107] In some embodiments, the control device 50 for the load switch of the slave device also includes a judgment module, which is used to, in the process of sequentially querying whether the status of the load switches in all the slave devices or some of the slave devices needs to be changed, if a second request signal sent by the second slave device is detected; determine whether the second slave device is the slave device to be queried among all the slave devices and the part of the slave devices; a query module 52, which is used to, if the second slave device is not the slave device to be queried, return to execute sequential querying whether the status of the load switches in all the slave devices or some of the slave devices needs to be changed to obtain a first query result after ending the current query control process, and for each slave device in the slave device set, send a first instruction to the slave device to control the slave device to change the status of the load switch in the slave device.

[0108] Based on the above embodiments, the present application provides a load switch control device for a slave device. Figure 6 A schematic diagram of the structure of a load switch control device for a slave device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the slave load switch control device 60 includes a second sending module 61, a second receiving module 62 and a processing module 63; wherein,

[0109] The second sending module 61 is used to send a first request signal when the state of the first load switch in the first slave device is closed and the power of the electrical equipment connected to the first load switch is greater than a first preset threshold, or when the first load switch is disconnected for a first preset time; wherein the first request signal is used to inform the master device that the state of the first load switch in the first slave device needs to be changed; the state of the first load switch is closed or disconnected; and the first request signal is used to request the master device to query in turn whether the state of the load switches in all or part of the slave devices needs to be changed, and for each slave device in the slave device set indicated by the first query result obtained by the query, send a first instruction to the slave device to control the slave device to change the state of the load switch in the slave device; the first query result indicates the slave device set whose load switch state needs to be changed, and the slave device set includes the first slave device.

[0110] The second receiving module 62 is used to receive a first instruction sent by the master device based on the first request signal, wherein the first instruction is used to control the change of the state of the first load switch.

[0111] The processing module 63 is configured to change the state of the first load switch in response to the first instruction.

[0112] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0113] It should be noted that in the embodiments of this application Figure 5 and Figure 6 The division of modules in the slave load switch control device shown is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. It may also be implemented in the form of a combination of software and hardware.

[0114] It should be noted that in the embodiments of the present application, if the above-mentioned slave device load switch control method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly reflected in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0115] An embodiment of the present application provides an electronic device, which may be a master device or a first slave device in the present application. Figure 7 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application, such as Figure 7 As shown, the electronic device 70 includes a memory 701 and a processor 702, wherein the memory 701 stores a computer program that can be run on the processor 702, and when the processor 702 executes the program, the steps in the slave device load switch control method provided in the above embodiment are implemented.

[0116] It should be noted that the memory 701 is configured to store instructions and applications executable by the processor 702, and can also cache data to be processed or already processed by the processor 702 and various modules in the electronic device 70 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory 701 (Random Access Memory, RAM).

[0117] An embodiment of the present application provides a computer program product containing instructions, which, when executed on a computer, enables the computer to execute the steps of the slave device load switch control method provided in the above method embodiment.

[0118] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0119] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.

[0120] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.

[0121] 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 device 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 device. 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 device including the element.

[0122] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.

[0123] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple system units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0124] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0125] A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, read-only memories (ROM), magnetic disks or optical disks.

[0126] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0127] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0128] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0129] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0130] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A control method for a load switch of a slave device, It is characterized in that The method is applied to a master device, the master device is connected to a plurality of slave devices respectively, and the method comprises: Receive a first request signal sent by a first slave device; wherein the first slave device is any one of the multiple slave devices, and the first request signal is used to inform the master device that the state of a first load switch in the first slave device needs to be changed; the state of the first load switch is a closed state or a disconnected state; the first request signal is sent by the first slave device when the state of the first load switch is a closed state and the power of the electrical equipment connected to the first load switch is greater than a first preset threshold, or the first request signal is sent by the first slave device after the first load switch is disconnected for a first preset time; In response to the first request signal, query in sequence whether the states of the load switches in all or part of the slave devices need to be changed, and obtain a first query result; the first query result indicates a set of slave devices whose states of the load switches need to be changed; the set of slave devices includes the first slave device; For each slave device in the slave device set indicated by the first query result, sending a first instruction to the slave device to control the slave device to change the state of the load switch in the slave device; The step of sequentially querying whether the states of the load switches in all or part of the slave devices need to be changed to obtain a first query result, and sending a first instruction to each slave device in the slave device set indicated by the first query result, comprises: Query whether the state of the load switch in the first slave device among all or part of the slave devices needs to be changed, and obtain the query result of the first slave device; If the query result of the first slave device indicates that the state of the load switch in the first slave device needs to be changed, send a first instruction to the first slave device to control the change of the state of the load switch of the first slave device, and return to execute the operation of querying whether the state of the load switch in the second slave device of the part of the slave devices or the whole slave devices needs to be changed, and executing the corresponding process based on the query result of the second slave device, until the last slave device of the part of the slave devices or the whole slave devices is queried and the query result of the last slave device is obtained; If the query result of the first slave device indicates that the state of the load switch in the first slave device does not need to be changed, for the second slave device in all the slave devices or the part of the slave devices, returning to execute query whether the state of the load switch in the second slave device in all the slave devices or the part of the slave devices needs to be changed, and executing the operation of the corresponding process based on the query result of the second slave device, until the last slave device in all the slave devices or the part of the slave devices is queried and the query result of the last slave device is obtained; Based on the query result of the last slave device, ending the current query control process; Alternatively, based on the query result of the last slave device, the first instruction is sent to the last slave device to control the change of the state of the load switch of the last slave device, thereby ending the current query control process.

2. The method according to claim 1, It is characterized in that The first instruction includes a first control instruction and a second control instruction, The sending of a first instruction to the slave device to control the slave device to change the state of a load switch in the slave device includes: Sending a first control instruction to the slave device to control the slave device to change the state of the load switch in the slave device to a disconnected state; wherein, before sending the first control instruction, the load switch in the slave device is in a closed state, and the power of the electrical device connected to the load switch of the slave device is greater than the first preset threshold; A second control instruction is sent to the slave device to control the slave device to change the state of the load switch in the slave device to a closed state; wherein, before sending the second control instruction, the load switch in the slave device maintains the disconnected state for a time period greater than the first preset time period.

3. The method according to claim 1, It is characterized in that The master device supplies power to the load switches in the plurality of slave devices respectively, and the querying in sequence whether the states of the load switches in all or part of the slave devices need to be changed comprises: According to the preset time interval, check in turn whether the status of the load switches in all or part of the slave devices needs to be changed; wherein the preset time interval is greater than a first duration; the master device is connected to an external power supply, and the master device stores the electric energy transmitted by the external power supply, and the first duration is the duration during which the master device stores the electric energy until the output voltage of the master device is greater than the first voltage; the first voltage is the voltage required for the slave device to change the status of the load switch in the slave device.

4. The method according to claim 3, It is characterized in that For each slave device among the multiple slave devices, when the load switch of the slave device is in the off state and the power of the electric device connected to the load switch of the slave device is greater than the first preset threshold, and when the load switch in the slave device is disconnected for the first preset time, the value of the first register in the slave device changes from 0 to 1; the value of the first register changes from 0 to 1 indicating that the state of the load switch in the slave device needs to be changed; The third slave device is any slave device among all the slave devices or some of the slave devices, and querying whether the state of the load switch in the third slave device needs to be changed includes: Sending a first instruction to the third slave device, where the first instruction is used to request the third slave device to report the value of the first register to the master device; The value of the first register sent by the third slave device is received, and based on the value of the first register, it is determined whether the state of the load switch of the third slave device needs to be changed.

5. The method according to claim 1, It is characterized in that The method further comprises: In the process of sequentially querying whether the states of the load switches in all the slave devices or the part of the slave devices need to be changed, if a second request signal sent by a second slave device is detected, determining whether the second slave device is a slave device to be queried among all the slave devices and the part of the slave devices; If the second slave device is not the slave device to be queried, after ending the current query control process, the process returns to execute the operation of sequentially querying whether the states of the load switches in all or part of the slave devices need to be changed to obtain the first query result, and for each slave device in the slave device set, sending a first instruction to the slave device to control the slave device to change the state of the load switch in the slave device.

6. A control method for a load switch of a slave device, It is characterized in that The method is applied to a first slave device, the first slave device is connected to a master device, the master device is respectively connected to a plurality of slave devices, the first slave device is any one of the plurality of slave devices, and the method includes: When the state of the first load switch in the first slave device is closed and the power of the electrical equipment connected to the first load switch is greater than a first preset threshold, or when the first load switch is disconnected for a first preset time, a first request signal is sent; wherein the first request signal is used to inform the master device that the state of the first load switch in the first slave device needs to be changed; the state of the first load switch is closed or disconnected; and the first request signal is used to request the master device to query in sequence whether the state of the load switches in all or part of the slave devices needs to be changed, and for each slave device in the slave device set indicated by the first query result obtained by the query, send a first instruction to the slave device to control the slave device to change the state of the load switch in the slave device; the first query result indicates the slave device set whose load switch state needs to be changed, and the slave device set includes the first slave device; Among them, the first request signal is specifically used to request the master device to perform the following operations: query whether the state of the load switch in the first slave device among all or part of the slave devices needs to be changed, and obtain the query result of the first slave device; if the query result of the first slave device indicates that the state of the load switch in the first slave device needs to be changed, send a first instruction to the first slave device to control the change of the state of the load switch of the first slave device, and return to execute the operation of querying whether the state of the load switch in the second slave device among the part of the slave devices or all the slave devices needs to be changed, and execute the corresponding process based on the query result of the second slave device, until the last slave device among the part of the slave devices or all the slave devices is queried and the query result of the last slave device is obtained ... The query result of the first slave device indicates that the state of the load switch in the first slave device does not need to be changed. For the second slave device in all the slave devices or part of the slave devices, the query is returned to execute whether the state of the load switch in the second slave device in all the slave devices or part of the slave devices needs to be changed, and the operation of the corresponding process is executed based on the query result of the second slave device until the last slave device in all the slave devices or part of the slave devices is queried and the query result of the last slave device is obtained; based on the query result of the last slave device, the current query control process is ended; or, based on the query result of the last slave device, the first instruction is sent to the last slave device to control the change of the state of the load switch of the last slave device, and the current query control process is ended; receiving a first instruction sent by the master device based on a first request signal, wherein the first instruction is used to control a change in a state of the first load switch; In response to the first instruction, a state of the first load switch is changed.

7. A control device for a load switch of a slave device, It is characterized in that include: A module for executing the method according to any one of claims 1 to 5, or a module for executing the method according to claim 6.

8. An electronic device, It is characterized in that include: Memory and processor; The memory is configured to store computer program instructions; The processor is configured to execute the computer program instructions so that the electronic device implements the method according to any one of claims 1 to 5, or implements the method according to claim 6.

9. A computer-readable storage medium, It is characterized in that include: Computer program instructions; The electronic device runs the computer program instructions so that the electronic device implements the method according to any one of claims 1 to 5, or implements the method according to claim 6.

Citation Information

Patent Citations

  • Smart switch, host registration method thereof and smart control network

    CN104298176A

  • Transaction processing method and system, electronic equipment and readable storage medium

    CN116184885A

  • Switch switching method and related device

    EP4123397A1

  • Redundancy method of transciver master control unit in pcs

    KR1019990042503A