Control method of controlled device and energy storage valve controller
By receiving and managing target commands sent by the client, the devices in the energy storage valve control system are controlled according to priority and control information, which solves the problems of low control efficiency and conflict, and achieves more efficient and safer device management.
Patent Information
- Application Number
- CN202410868145.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-30
- Publication Date
- 2025-12-30
AI Technical Summary
The control efficiency of devices in energy storage valve control systems is low, and there are control command conflicts and safety issues.
By receiving target instructions sent by the client, the system controls the target controlled device according to priority and control information. Multiple instructions are managed using timestamp queues and priority queues to ensure that high-priority instructions are executed first and reduce control conflicts.
It improves the control efficiency and safety of devices in energy storage valve control systems, reduces device damage, and enhances control determinism and consistency.
Smart Images

Figure CN121232633A_ABST
Abstract
Description
Technical Field
[0001] This application relates to, but is not limited to, energy storage valve control technology, and particularly to a control method for a controlled device and an energy storage valve controller. Background Technology
[0002] Energy storage valve control systems are used to store and release energy to support the power of large power grids, such as changing the direction and magnitude of power flow. They function similarly to valves and are also called energy storage valves. By controlling the on / off state of the energy storage valve and the components within the energy storage valve control system, power output and energy storage can be controlled. However, in related technologies, the control of the on / off state of the components in the energy storage valve control system is performed by operators, resulting in low control efficiency of the components within the system. Summary of the Invention
[0003] In view of the above problems, this application provides a control method for controlled devices and an energy storage valve controller, which can solve the problem of low control efficiency of devices in energy storage valve control systems.
[0004] In a first aspect, this application provides a control method for a controlled device, applied to an energy storage valve controller. The method includes: receiving a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices controllable by the energy storage valve controller; if the first priority is not the highest priority and a second target instruction is received from a second client within a first time period, controlling the target controlled device according to the second control information for the target controlled device included in the second target instruction; if the first priority is not the highest priority and no target instruction for the target controlled device is received from any other client besides the first client within the first time period, controlling the target controlled device according to the first control information; wherein the second target instruction further includes a second priority, the second priority being higher than the first priority; and the first control information is different from the second control information.
[0005] In the technical solution of this application embodiment, the target controlled device is controlled according to the first control information in the first target instruction sent by the first client, or according to the second control information in the second target instruction sent by the second client. This enables the first client or the second client to remotely control the target controlled device without the need for operator intervention, thus improving the control efficiency of the device in the energy storage valve control system. Furthermore, since the first priority is not the highest priority, and the target controlled device is controlled according to the second control information when the second target instruction sent by the second client is received within the first time period, the first target instruction and the second target instruction are received within the first time period. When the control of the first target instruction and the second target instruction for the target controlled device conflicts, the target controlled device can be controlled according to the second control information corresponding to the higher priority. This reduces the situation where the first target instruction and the second target instruction are executed simultaneously, leading to confusion and conflict in instruction execution. This improves the certainty and consistency of the control of the target controlled device, and reduces the situation where different controls are applied to the target controlled device within a short period of time, thereby reducing damage to the target controlled device and improving the safety of the control of the target controlled device.
[0006] In some embodiments, the method further includes: when the first priority is the highest priority, controlling the target controlled device according to the first control information; when the first priority is not the highest priority, and a third target instruction sent by a third client is received within the first duration, controlling the target controlled device according to the first control information; wherein the third target instruction includes a third priority and third control information for the target controlled device, the third priority is lower than the first priority, and the third control information is different from the first control information. In the technical solution of this application embodiment, since the target controlled device is controlled according to the first control information when the first priority is the highest priority, there is no need to wait for other control instructions for the target controlled device, thus enabling rapid control of the target controlled device and further improving the control efficiency of the target controlled device. Since the first priority is not the highest priority, and a third target instruction sent by a third client is received within the first time period, the target controlled device is controlled according to the first control information. Thus, the first target instruction and the third target instruction are received within the first time period. When the control of the first target instruction and the third target instruction for the target controlled device conflicts, the target controlled device can be controlled according to the first control information corresponding to the higher priority, avoiding different controls on the target controlled device in a short period of time, thereby reducing damage to the target controlled device and improving the control security of the target controlled device.
[0007] In some embodiments, the method further includes: when controlling the target controlled device according to the first control information, sending a first indication message to the first client to indicate successful control; and when controlling the target controlled device according to the second control information, sending a first indication message to the second client to indicate successful control, and sending a second indication message to the first client to indicate control failure. In the technical solution of this application embodiment, sending a first indication message to the client that successfully controls the device and sending a second indication message to the client that failed to control the device enables the client to output a corresponding message indicating successful or failed control, avoiding situations where the operator of the client that failed to control the device is unaware of the control failure. Therefore, this application embodiment can improve the reliability of controlling the target controlled device.
[0008] In some embodiments, controlling the target controlled device according to the first control information includes: when the first target instruction is a first control instruction, controlling the target controlled device according to the first control information; or, when the first target instruction is a first preset instruction, sending the status information of the target controlled device to the first client, marking the target controlled device as occupied, sending third indication information indicating that the target controlled device is occupied to at least one client communicating with the energy storage valve controller, and, within a second time period from the time the target controlled device is marked as controlled, receiving a second control instruction sent by the first client, controlling the target controlled device according to the first control information; the step according to the first control information... The second target instruction includes second control information for the target controlled device, which controls the target controlled device. This includes: if the second target instruction is a third control instruction, controlling the target controlled device according to the second control information; or, if the second target instruction is a second preset instruction, sending the status information of the target controlled device to the second client to mark the target controlled device as occupied, sending third indication information indicating that the target controlled device is occupied to at least one client communicating with the energy storage valve controller, and controlling the target controlled device according to the second control information if a fourth control instruction is received from the second client within a second time period from the time the target controlled device is marked as being controlled. In the technical solution of this application embodiment, when the target instruction is a preset instruction, the status information of the target controlled device is sent to the corresponding client, so that the operator of the corresponding client can determine whether the target controlled device needs to be controlled accordingly based on the status information, thereby improving the rationality of the energy storage valve control. In addition, since a third indication that the target controlled device is occupied is sent to at least one client communicating with the energy storage valve controller, the target controlled device cannot be selected again by any of the at least one client, thereby reducing the target controlled device from being controlled differently in a short period of time and improving the safety of the target controlled device control.
[0009] In some embodiments, the method further includes: if no second control command is received from the first client within the second time period, or if no fourth control command is received from the second client within the second time period, sending a fourth indication that the target controlled device has been released to at least one client communicating with the energy storage valve controller. In the technical solution of this application embodiment, if no fourth control command is received from the second client within the second time period, sending a fourth indication that the target controlled device has been released to at least one client communicating with the energy storage valve controller allows the target controlled device to be selected again by any one of the at least one clients for control, reducing the situation where the target controlled device cannot be controlled by other clients after it is occupied, and improving the utilization rate of the target controlled device.
[0010] In some embodiments, after controlling the target controlled device, the method further includes: marking the target controlled device as controlled; sending a fifth indication message indicating that the target controlled device is controlled to at least one client communicating with the energy storage valve controller; and, after a third time interval from the time the target controlled device is marked as controlled, sending a fourth indication message indicating that the target controlled device is released to at least one client communicating with the energy storage valve controller. In the technical solution of this application embodiment, after the target controlled device is controlled, it cannot be controlled again until after the third time interval. This reduces the possibility of the target controlled device being controlled differently within a short period, improving the safety of target controlled device control. Furthermore, the state information of the target controlled device will not be changed within the third time interval, thus reducing the possibility that after the first client successfully controls the target controlled device, it will be quickly controlled by other clients, leading to a decrease in the reliability of target controlled device control.
[0011] In some embodiments, after receiving the first target instruction sent by the first client, the method further includes: storing the first target instruction in a timestamp queue when the first priority is not the highest priority; the time corresponding to the timestamp of at least one target instruction stored in the timestamp queue is less than or equal to the current time, and the priority of the at least one target instruction is not the highest priority; if the second target instruction sent by the second client is received within the first time, the first target instruction is found in the timestamp queue, it is determined that the second priority of the second target instruction is higher than the first priority of the first target instruction, the first target instruction is deleted from the timestamp queue, and the second target instruction is stored in the timestamp queue; if the target controlled device is controlled according to the second control information, the second target instruction is deleted from the timestamp queue. In the technical solution of this application embodiment, since the time corresponding to the timestamp of at least one target instruction stored in the timestamp queue is less than or equal to the current time, the duration between the timestamp and the current time is less than or equal to a first duration, so that each time a target instruction is received, it can be determined from the timestamp queue whether there is an instruction that conflicts with the control of the target controlled device in the received target instruction, thereby improving the efficiency of determining whether there is an instruction that conflicts with the control of the target controlled device in the received target instruction, and thus improving the control speed of the target controlled device.
[0012] In some embodiments, after receiving the first target instruction sent by the first client, the method further includes: storing the first target instruction in a priority queue corresponding to the first priority; the target instructions in the priority queue are executed in descending order of priority; when the first priority is not the highest priority and a second target instruction sent by the second client is received within a first duration, controlling the target controlled device according to the second control information for the target controlled device included in the second target instruction includes: when the first priority is not the highest priority and a second target instruction sent by the second client is received within a first duration, storing the second target instruction in a priority queue corresponding to the second priority, and deleting the first target instruction from the priority queue corresponding to the first priority; controlling the target controlled device according to the second control information included in the second target instruction in the priority queue corresponding to the second priority; after controlling the target controlled device according to the second control information for the target controlled device included in the second target instruction, the method further includes: deleting the second target instruction from the priority queue corresponding to the second priority. In the technical solution of this application embodiment, by setting priority queues corresponding to each priority, the target instructions can be executed sequentially according to the target instructions in the priority queue, so that the target instructions corresponding to high priority can be executed first, thereby improving the control speed of the target instructions corresponding to high priority.
[0013] Secondly, this application provides an energy storage valve controller, the energy storage valve controller comprising: a communication unit, configured to receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device; a control unit, configured to control the target controlled device according to the second control information for the target controlled device included in the second target instruction when the first priority is not the highest priority and a second target instruction is received from a second client within a first time period; and to control the target controlled device according to the first control information when the first priority is not the highest priority and no target instruction for the target controlled device is received from any other client besides the first client within the first time period; wherein the second target instruction further includes a second priority, the second priority being higher than the first priority; and the first control information is different from the second control information.
[0014] Thirdly, this application provides an energy storage valve controller, the energy storage valve controller comprising: a processor and a memory; the memory storing a computer program, the processor being used to execute the computer program to implement the method described in any of the above.
[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the specification, serve to illustrate the technical solutions of this disclosure.
[0017] Figure 1 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 1 ;
[0018] Figure 2 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 2 ;
[0019] Figure 3 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 3 ;
[0020] Figure 4 This is a flowchart illustrating a method executed by an energy storage valve controller in some embodiments of this application when the first target instruction is a first preset instruction;
[0021] Figure 5 This is a flowchart illustrating a method executed by an energy storage valve controller in some embodiments of this application when the second target instruction is a second preset instruction.
[0022] Figure 6 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 4 ;
[0023] Figure 7 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 5 ;
[0024] Figure 8 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 6 ;
[0025] Figure 9 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 7 ;
[0026] Figure 10 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 8 ;
[0027] Figure 11 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 9 ;
[0028] Figure 12 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 10 ;
[0029] Figure 13 This is a schematic diagram of the architecture of a secure remote control mechanism in some embodiments of this application;
[0030] Figure 14 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 10 one;
[0031] Figure 15 This is a schematic diagram of the remote control mechanism of some embodiments of this application;
[0032] Figure 16 A schematic diagram illustrating the composition of an energy storage valve controller provided in some embodiments of this application;
[0033] Figure 17 This is a schematic diagram of the hardware entity of the energy storage valve controller provided in some embodiments of this application.
[0034] Explanation of reference numerals in the attached figures:
[0035] Energy storage valve controller 1600; communication unit 1601; control unit 1602; processor 1603; memory 1604. Detailed Implementation
[0036] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0038] It should be noted that in this application example, terms such as "first" and "second" are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0039] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0040] A distributed energy system includes multiple conductive lines equipped with energy storage valves. By controlling the opening and closing of the energy storage valves, current flows through the corresponding conductive lines, thereby controlling energy storage, stopping energy storage, power output, or stopping power output. The energy storage valve includes multiple controlled devices, and the energy storage valve controller can control these controlled devices. In this embodiment, the controlled devices can be controlled to open or close. For example, the controlled devices can be controlled switches or controlled valves. The opening or closing of the energy storage valve is achieved by controlling the opening or closing of multiple controlled devices. For example, an energy storage device for storing electrical energy can be connected to a load through an energy storage valve to supply power to the load, thus achieving power output from the energy storage device. As another example, an energy storage device for storing electrical energy can be connected to a power system through an energy storage valve to supply power to the energy storage device, thus achieving energy storage. As another example, multiple energy storage devices for storing electrical energy can be connected to multiple loads through multiple controlled devices, so that a specific energy storage device can supply power to a specific load by opening at least some of the energy storage valves in the multiple controlled devices. As another example, multiple energy storage devices for storing electrical energy can be connected to other multiple energy storage devices through multiple controlled devices, so that some energy storage devices can supply power to other energy storage devices. As another example, multiple energy storage devices for storing electrical energy can be connected to a power system through multiple controlled devices.
[0041] In some embodiments, a controlled device may include one or more sub-controlled devices to control the power output or the current by controlling the number of sub-controlled devices turned on.
[0042] However, in related technologies, the control of turning a controlled device on or off is performed by an operator, resulting in low control efficiency of the devices in the energy storage valve control system. In any embodiment of this application, turning on a controlled device may include turning on all sub-controlled devices within the controlled device, and / or, turning on some of the sub-controlled devices. In any embodiment of this application, turning off a controlled device may include turning off all sub-controlled devices within the controlled device, and / or, turning off some of the sub-controlled devices.
[0043] In some embodiments, a client can send a target command to the energy storage valve controller, which then controls the target controlled device based on the control information for that device within the target command. However, this embodiment does not consider scenarios where multiple clients simultaneously send target commands to the energy storage valve controller. For example, if multiple clients simultaneously send target commands to the energy storage valve controller, and these commands contain different control information, the energy storage valve controller may not know how to control the target controlled device. This results in a low success rate for controlling the target controlled device. Furthermore, if multiple clients simultaneously send target commands to the energy storage valve controller, and these commands contain different control information, the energy storage device may perform different controls on the target controlled device sequentially. This simultaneous execution of multiple target commands can lead to confusion and conflicts in command execution; additionally, performing different controls on the target controlled device within a short period can affect the safety of the energy storage valve controller.
[0044] Based on the above problems, this application proposes a control method for a controlled device. The method includes: receiving a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices controllable by the energy storage valve controller; if the first priority is not the highest priority and a second target instruction sent by a second client is received within a first time period, controlling the target controlled device according to the second control information for the target controlled device included in the second target instruction; if the first priority is not the highest priority and no second target instruction sent by the second client is received within the first time period, controlling the target controlled device according to the first control information; wherein the second target instruction also includes a second priority, the second priority being higher than the first priority; the first control information is different from the second control information.
[0045] In the technical solution of this application embodiment, the target controlled device is controlled according to the first control information in the first target instruction sent by the first client, or according to the second control information in the second target instruction sent by the second client. This enables the first client or the second client to remotely control the target controlled device without the need for operator intervention, thus improving the control efficiency of the device in the energy storage valve control system. Furthermore, since the first priority is not the highest priority, and the target controlled device is controlled according to the second control information when the second target instruction sent by the second client is received within the first time period, the first target instruction and the second target instruction are received within the first time period. When the control of the first target instruction and the second target instruction for the target controlled device conflicts, the target controlled device can be controlled according to the second control information corresponding to the higher priority. This reduces the situation where the first target instruction and the second target instruction are executed simultaneously, leading to confusion and conflict in instruction execution. This improves the certainty and consistency of the control of the target controlled device, and avoids situations where different controls are applied to the target controlled device within a short period, thereby reducing damage to the target controlled device and improving the safety of the control of the target controlled device.
[0046] Distributed energy systems include multiple energy storage valves, which may be distributed across different or the same geographical areas. For example, at least one energy storage valve may be included in one geographical area, and at least one energy storage valve may be included in another geographical area.
[0047] In any embodiment of this application, the first client, second client, or third client may include one of the following: a host computer, a server, a mobile phone, a tablet computer, a computer with wireless transceiver capabilities, a handheld computer, a desktop computer, a personal digital assistant, a portable media player, a smart speaker, a navigation device, a smartwatch, smart glasses, a smart necklace, or other wearable devices, a learning machine, a translation pen, a translation machine, a point-and-read machine, a pedometer, a digital TV, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, and a vehicle, in-vehicle equipment, in-vehicle module, wireless modem, handheld device, or customer terminal equipment in a vehicle networking system. Equipment (CPE), smart home appliances, etc. In any embodiment of this application, the first client, the second client, or the third client can be replaced by the first device, the second device, or the third device; or, the first client, the second client, or the third client can be replaced by the first terminal, the second terminal, or the third terminal.
[0048] In any embodiment of this application, any two of the first client, second client, and third client can be clients of the same type or different types. For example, the first client, second client, and third client are all host computers. Another example is that the first client is a host computer, and the second and third clients are both mobile phones.
[0049] In some embodiments, the energy storage valve controller may be included in the energy storage valve control system, that is, the energy storage valve controller may be a device used in the energy storage valve control system for controlling the controlled device.
[0050] Reference Figure 1 , Figure 1 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 1 This method is applied to an energy storage valve controller, and the method includes:
[0051] S101. Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0052] In some embodiments, the first priority may be obtained by the user selecting from multiple priorities displayed on the first client. In some scenarios, the first client may display multiple priorities, and the first client receives the operator's operation on the first priority among the multiple priorities, determining the priority of the first target instruction to be sent as the first priority.
[0053] In some embodiments, the first priority can be determined based on the operator's rank or position. In some scenarios, operators need to log in before they can control the controlled device through the first client. Login can be via account login, employee ID card login, identity login, fingerprint login, or facial recognition login, etc. The first client can determine the operator's rank or position based on the login information, and then determine the first priority based on the operator's rank or position. For example, a higher operator rank corresponds to a higher first priority. In some embodiments, the first client can store the correspondence between each of multiple priorities and the operator's rank or position. In this way, the first client can determine the first priority based on the operator's rank or position without requiring the operator to manually select a priority.
[0054] In some embodiments, the first priority can be determined based on the attribute information of the first client. For example, the priority corresponding to the host computer is higher than the priority corresponding to the computer. For example, the priority corresponding to the computer is higher than the priority corresponding to the mobile phone. For example, the priority corresponding to the first host computer is higher than the priority corresponding to the second host computer.
[0055] In some embodiments, multiple priorities may include high priority, medium priority, and low priority. In other embodiments, multiple priorities may include high priority, higher priority, medium priority, lower priority, and low priority. This application does not limit the manner or number of multiple priorities.
[0056] In some embodiments, the first control information for the target controlled device may include one of the following: indication information for closing the target controlled device, indication information for opening the target controlled device, current value flowing through the target controlled device, output power corresponding to the target controlled device, number of closed sub-controlled devices included in the target controlled device, etc.
[0057] In some embodiments, the first target instruction further includes at least one of the following: a timestamp of the first target instruction being sent, attribute information of the operator operating the first client, and identification information of the first client. In any embodiment of this application, the attribute information of the operator may include at least one of the following: the operator's identifier, the operator's name, the operator's job title or department, etc.
[0058] In some embodiments, the target controlled device may be one of a plurality of controlled devices that the energy storage valve controller can control. In other embodiments, the target controlled device may be at least two of a plurality of controlled devices that the energy storage valve controller can control.
[0059] In some scenarios, the first client can respond to the energy storage valve control program triggered by the operator and display the energy storage valve control interface. For example, the energy storage valve control interface may include at least one unlocked controlled device, or it may include at least one unlocked controlled device and at least one locked controlled device. The operator can select the target controlled device from the at least one unlocked controlled device. For example, the energy storage valve control interface may include a priority selection control or multiple priority controls. The operator can select the first priority by operating the priority selection control or multiple priority controls, or the operator can choose not to select a priority, in which case the first client defaults to the first priority. For example, the energy storage valve control interface may include a controlled device closing or opening option. The operator can select the controlled device to close or open, causing the first client to generate corresponding first control information. For example, the energy storage valve control interface may include a control information input box. The operator can input control information through the control information input box, causing the first client to generate corresponding first control information.
[0060] In any embodiment of this application, at least one of the first target instruction, second target instruction, third target instruction, second control instruction, and fourth control instruction may be an encrypted instruction. This allows the energy storage valve controller to decrypt the received instruction. In some embodiments, at least one of the first target instruction, second target instruction, third target instruction, second control instruction, and fourth control instruction may be an instruction to be verified. This allows the energy storage valve controller to verify the received instruction. In some embodiments, at least one of the first target instruction, second target instruction, third target instruction, second control instruction, and fourth control instruction may be transmitted using a retransmission mechanism.
[0061] After S101, the first priority confirmation can be performed. After S101, S102 or S103 can be performed.
[0062] S102. If the first priority is not the highest priority and a second target instruction is received from the second client within a first time period, the target controlled device is controlled according to the second control information for the target controlled device included in the second target instruction.
[0063] The second target instruction further includes a second priority, which is higher than the first priority; the first control information is different from the second control information.
[0064] S103. If the first priority is not the highest priority and no target instruction for the target controlled device is received from any other client besides the first client within the first time period, the target controlled device is controlled according to the first control information.
[0065] In some embodiments, the first duration includes: a first duration starting from the moment the first target instruction sent by the first client is received. In other embodiments, the first duration includes: a first duration starting from the moment the first priority is determined to be not the highest priority.
[0066] In some embodiments, the first duration can be a fixed value, for example, the range of the first duration can be from 0.1 seconds to 10 seconds. For example, the first duration can be 0.1 seconds, 0.5 seconds, 1 second, 5 seconds, or 10 seconds. For example, the first duration is 0.5 seconds.
[0067] In other embodiments, the first duration can be determined based on the minimum permissible on-off time of the target controlled device, and / or the on-voltage and maximum current of the target controlled device. For example, if the minimum permissible on-off time is short, the first duration is also short; conversely, if the minimum permissible on-off time is long, the first duration is also long. As another example, if the on-voltage and maximum current of the target controlled device are higher, the first duration is longer; if the on-voltage and maximum current of the target controlled device are lower, the first duration is shorter.
[0068] In some other embodiments, the first duration can be determined based on a first priority. For example, a higher first priority results in a shorter first duration, and a lower first priority results in a longer first duration. For instance, if the first priority is medium, the first duration can be 0.5 seconds, and if the first priority is low, the first duration can be 1 second. This allows high-priority target instructions to be executed more quickly.
[0069] In some embodiments, the method for determining the second priority may be similar to the method for determining the first priority, and this application embodiment will not elaborate on this.
[0070] In some embodiments, the second control information for the target controlled device may include one of the following: indication information for closing the target controlled device, indication information for opening the target controlled device, current value flowing through the target controlled device, output power corresponding to the target controlled device, number of closed sub-controlled devices included in the target controlled device, etc.
[0071] This application does not limit the specific content of the first control information and the second control information. Any different implementation of the first control information and the second control information should be within the protection scope of this application. For example, the first control information for the target controlled device includes an instruction to close the target controlled device, and the second control information for the target controlled device includes an instruction to open the target controlled device. For example, the first control information for the target controlled device includes an instruction to open the target controlled device, and the second control information for the target controlled device includes an instruction to close the target controlled device. For example, the first control information for the target controlled device includes a first number of closed sub-controlled devices included in the target controlled device, and the second control information for the target controlled device includes a second number of closed sub-controlled devices included in the target controlled device. For example, the first control information for the target controlled device includes a first output power corresponding to the target controlled device, and the second control information for the target controlled device includes an instruction to open the target controlled device.
[0072] In some embodiments, the second target instruction may further include at least one of the following: a timestamp of the second target instruction being sent, attribute information of the operator operating the second client, and identification information of the second client.
[0073] In some embodiments, the second client generates the second control information in a manner similar to that of the first client generating the first control information, which will not be elaborated upon in this application embodiment.
[0074] In some embodiments, the other clients besides the first client may be one or more clients. In some embodiments, the target instruction for the target controlled device may include one of the following: a target instruction for controlling the target controlled device (the instruction may be a control instruction), or a target instruction for occupying the target controlled device (the instruction may be a preset instruction).
[0075] In the technical solution of this application embodiment, the target controlled device is controlled according to the first control information in the first target instruction sent by the first client, or according to the second control information in the second target instruction sent by the second client. This enables the first client or the second client to remotely control the target controlled device without the need for operator intervention, thus improving the control efficiency of the device in the energy storage valve control system. Furthermore, since the first priority is not the highest priority, and the target controlled device is controlled according to the second control information when the second target instruction sent by the second client is received within the first time period, the first target instruction and the second target instruction are received within the first time period. When the control of the first target instruction and the second target instruction for the target controlled device conflicts, the target controlled device can be controlled according to the second control information corresponding to the higher priority. This reduces the situation where the first target instruction and the second target instruction are executed simultaneously, leading to confusion and conflict in instruction execution. This improves the certainty and consistency of the control of the target controlled device, and avoids situations where different controls are applied to the target controlled device within a short period, thereby reducing damage to the target controlled device and improving the safety of the control of the target controlled device.
[0076] In some embodiments, the method further includes: controlling the target controlled device according to the first control information when the first priority is the highest priority.
[0077] In some embodiments, the method further includes: when the first priority is not the highest priority and a third target instruction sent by a third client is received within the first duration, controlling the target controlled device according to the first control information; wherein the third target instruction includes a third priority and third control information for the target controlled device, the third priority is lower than the first priority, and the third control information is different from the first control information.
[0078] Reference Figure 2 , Figure 2 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 2 This method is applied to an energy storage valve controller, and the method includes:
[0079] S201. Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0080] S202. Determine whether the first priority is the highest priority.
[0081] If S202 is true, execute S203; if S202 is false, execute S204.
[0082] S203. When the first priority is the highest priority, the target controlled device is controlled according to the first control information.
[0083] S204. If the first priority is not the highest priority, determine whether other target instructions are received within the first time period.
[0084] If S204 is true, execute S205 or S206; if S204 is false, execute S207.
[0085] S205. If the first priority is not the highest priority and a second target instruction sent by the second client is received within the first time period, the target controlled device is controlled according to the second control information for the target controlled device included in the second target instruction.
[0086] S206. If the first priority is not the highest priority, and a third target instruction sent by a third client is received within a first time period, the target controlled device is controlled according to the first control information.
[0087] The third target instruction includes a third priority and third control information for the target controlled device. The third priority is lower than the first priority, and the third control information is different from the first control information.
[0088] S207. If the first priority is not the highest priority and no target instruction for the target controlled device is received from any other client besides the first client within the first time period, the target controlled device is controlled according to the first control information.
[0089] In some embodiments, the third control information may be the same as or different from the second control information, and the embodiments of this application do not limit this.
[0090] In some embodiments, the method for determining the third priority may be similar to the method for determining the first priority, and this application embodiment will not elaborate on this.
[0091] In some embodiments, the third control information for the target controlled device may include one of the following: indication information for closing the target controlled device, indication information for opening the target controlled device, current value flowing through the target controlled device, output power corresponding to the target controlled device, number of closed sub-controlled devices included in the target controlled device, etc.
[0092] This application does not limit the specific content of the first control information and the third control information. Any different implementation of the first control information and the third control information should be within the protection scope of this application. For example, the first control information for the target controlled device includes an instruction to close the target controlled device, and the third control information for the target controlled device includes an instruction to open the target controlled device. For example, the first control information for the target controlled device includes an instruction to open the target controlled device, and the third control information for the target controlled device includes an instruction to close the target controlled device. For example, the first control information for the target controlled device includes a first number of closed sub-controlled devices included in the target controlled device, and the third control information for the target controlled device includes a second number of closed sub-controlled devices included in the target controlled device. For example, the first control information for the target controlled device includes a first output power corresponding to the target controlled device, and the third control information for the target controlled device includes an instruction to open the target controlled device.
[0093] Thus, when the energy storage valve controller receives the first target instruction, it can first determine whether the first priority included in the first target instruction is the highest priority. If it is the highest priority, then the target controlled device is controlled according to the first control information, allowing for rapid control of the target controlled device. If it is not the highest priority, the target controlled device is not controlled initially, but waits for a first time period to see if there are other target instructions controlling the target controlled device. If not, the target controlled device is controlled according to the first control information. If there are, it is determined whether the priority included in the waited target instruction is higher than the first priority. If it is higher (e.g., a second target instruction is waited for), the target controlled device is controlled according to the control information included in the waited target instruction. If it is not higher (e.g., a third target instruction is waited for), the target controlled device is controlled according to the first control information. Therefore, in this embodiment, if the first priority is not the highest priority, control of the target controlled device will be executed after a first time period; if the first priority is the highest priority, control of the target controlled device will be executed immediately.
[0094] In some embodiments, the third target instruction may further include at least one of the following: a timestamp of the third target instruction being sent, attribute information of the operator operating the third client, and identification information of the third client.
[0095] In some embodiments, the way in which the third client generates the third control information may be similar to the way in which the first client generates the first control information, and this application embodiment will not elaborate on this.
[0096] In some embodiments, if multiple target instructions are received from multiple clients within a first time period, the highest priority among the multiple priorities included in each of the multiple target instructions is compared with a first priority. If the highest priority is higher than the first priority, the target controlled device is controlled according to the control information in the target instruction corresponding to the highest priority (e.g., a second target instruction). If the highest priority is lower than the first priority (e.g., a third target instruction has a third priority lower than the first priority), the target controlled device is controlled according to the first control information. In some embodiments, if there are multiple highest priorities, there are multiple target instructions corresponding to the highest priorities. One implementation is to randomly select a target instruction and control the target controlled device according to the control information in the randomly selected target instruction. Another implementation is to control the target controlled device according to the control information in the target instruction with the earliest sending or receiving timestamp.
[0097] In some embodiments, when the first priority is not the highest priority, the energy storage valve controller may start a timer with a timeout duration of a first duration. The energy storage valve controller may either not receive a target instruction for the target controlled device or receive one or more target instructions for the target controlled device within the timeout duration.
[0098] In the technical solution of this application embodiment, since the target controlled device is controlled according to the first control information when the first priority is the highest priority, there is no need to wait for other control instructions for the target controlled device, thus enabling rapid control of the target controlled device and further improving the control efficiency of the target controlled device. Since the first priority is not the highest priority, and a third target instruction sent by a third client is received within the first time period, the target controlled device is controlled according to the first control information. Thus, the first target instruction and the third target instruction are received within the first time period. When the control of the first target instruction and the third target instruction for the target controlled device conflicts, the target controlled device can be controlled according to the first control information corresponding to the higher priority, avoiding different controls on the target controlled device in a short period of time, thereby reducing damage to the target controlled device and improving the control security of the target controlled device.
[0099] In any embodiment of this application, the method further includes: controlling the target controlled device according to the first control information.
[0100] In any embodiment of this application, the method further includes: when controlling the target controlled device according to the second control information, sending a first indication message to the second client to indicate successful control, and sending a second indication message to the first client to indicate failed control.
[0101] Reference Figure 3 , Figure 3 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 3 This method is applied to energy storage valve controllers. Figure 3 Is Figure 1 The difference in the embodiments is that, Figure 3 The corresponding embodiments are compared to Figure 1 In one embodiment, S301 is added after S102, and S302 is added after S103. The method includes:
[0102] S101. Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0103] After S101, S102 or S103 can be executed.
[0104] S102. If the first priority is not the highest priority and a second target instruction is received from the second client within a first time period, the target controlled device is controlled according to the second control information for the target controlled device included in the second target instruction.
[0105] S301. Send a first indication message to the second client to indicate successful control, and send a second indication message to the first client to indicate failed control.
[0106] S103. If the first priority is not the highest priority and no target instruction for the target controlled device is received from any other client besides the first client within the first time period, the target controlled device is controlled according to the first control information.
[0107] S302. Send a first indication message to the first client to indicate successful control.
[0108] Understandably, Figure 2In a corresponding embodiment, after S203 or S207, the following actions may be performed: sending a first indication message to the first client to indicate successful control; after S206, the following actions may be performed: sending a first indication message to the first client to indicate successful control and sending a second indication message to the second client to indicate failed control; after S205, the following actions may be performed: sending a first indication message to the second client to indicate successful control and sending a second indication message to the first client to indicate failed control.
[0109] In some embodiments, the client receiving the first instruction information can display a corresponding message based on the first instruction information, so that the operator can confirm that the target controlled device has been successfully controlled.
[0110] In some embodiments, the client receiving the second instruction information may display a corresponding message based on the second instruction information, so that the operator can determine that the control of the target controlled device has failed.
[0111] In some embodiments, the second indication information may also indicate that the target controlled device is controlled by the attribute information of the first client or the operator corresponding to the first client.
[0112] In the technical solution of this application embodiment, a first indication message for indicating successful control is sent to the client that has successfully controlled the device, and a second indication message for indicating control failure is sent to the client that has failed to control the device. This enables the client to output the corresponding message of successful or failed control, avoiding the situation where the operator of the client that has failed to control the device is unaware of the control failure. Therefore, this application embodiment can improve the reliability of the control of the target controlled device.
[0113] In some embodiments, controlling the target controlled device according to the first control information includes: when the first target instruction is a first control instruction, controlling the target controlled device according to the first control information.
[0114] In some embodiments, controlling the target controlled device according to the first control information includes: when the first target instruction is a first preset instruction, sending the status information of the target controlled device to the first client, marking the target controlled device as occupied, sending third indication information that the target controlled device is occupied to at least one client communicating with the energy storage valve controller, and controlling the target controlled device according to the first control information if a second control instruction sent by the first client is received within a second time period from the time when the target controlled device is marked as controlled.
[0115] In some embodiments, controlling the target controlled device according to the second control information for the target controlled device included in the second target instruction includes: controlling the target controlled device according to the second control information when the second target instruction is a third control instruction.
[0116] In some embodiments, controlling the target controlled device according to the second control information for the target controlled device included in the second target instruction includes: when the second target instruction is a second preset instruction, sending the status information of the target controlled device to the second client, marking the target controlled device as occupied, sending third indication information that the target controlled device is occupied to at least one client communicating with the energy storage valve controller, and controlling the target controlled device according to the second control information if a fourth control instruction sent by the second client is received within a second time period from the time when the target controlled device is marked as controlled.
[0117] In some embodiments, the third indication information may also indicate that the target controlled device is occupied by the attribute information of the second client or the operator corresponding to the second client.
[0118] In some embodiments, the second duration can be a fixed value, for example, the range of the second duration can be from 0.1 seconds to 10 seconds. For example, the second duration can be 0.1 seconds, 0.5 seconds, 1 second, 5 seconds, or 10 seconds. Exemplarily, the second duration is 0.5 seconds. In some embodiments, the first duration can be the same as or different from the second duration.
[0119] In other embodiments, the second duration can be determined based on the first priority. For example, the higher the first priority, the longer the second duration, and the lower the first priority, the shorter the second duration. For instance, if the first priority is medium, the second duration can be 1 second, and if the first priority is low, the second duration can be 0.5 seconds.
[0120] In the technical solution of this application embodiment, when the target instruction is a preset instruction, the status information of the target controlled device is sent to the corresponding client, so that the operator of the corresponding client can determine whether the target controlled device needs to be controlled accordingly based on the status information, thereby improving the rationality of the controlled device control. In addition, since a third indication that the target controlled device is occupied is sent to at least one client communicating with the energy storage valve controller, the target controlled device cannot be selected again by any of the at least one client, thereby reducing the target controlled device from being controlled differently in a short period of time and improving the safety of the target controlled device control.
[0121] In some embodiments, the method further includes: if no second control command is received from the first client within the second time period, sending a fourth indication that the target controlled device has been released to at least one client communicating with the energy storage valve controller.
[0122] In some embodiments, the method further includes: if the fourth control command sent by the second client is not received within the second time period, sending a fourth indication message indicating that the target controlled device has been released to at least one client communicating with the energy storage valve controller.
[0123] In the technical solution of this application embodiment, if no fourth control command is received from the second client within the second time period, a fourth indication message indicating that the target controlled device has been released is sent to at least one client communicating with the energy storage valve controller. This allows the target controlled device to be selected again by any one of the at least one clients for control, reducing the situation where the target controlled device cannot be controlled by other clients after it is occupied, and improving the utilization rate of the target controlled device.
[0124] Reference Figure 4 , Figure 4 This is a flowchart illustrating a method executed by an energy storage valve controller according to some embodiments of this application when the first target instruction is a first preset instruction. The method is applied to an energy storage valve controller and includes:
[0125] S401. Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0126] S402. If the first target instruction is a first preset instruction, determine that the target controlled device is controlled according to the first control information.
[0127] To determine the method of controlling the target controlled device based on the first control information, please refer to [link to relevant documentation]. Figure 1 or Figure 2The steps in the corresponding embodiments are as follows: For example, if the first priority is not the highest priority, and no target instruction for the target controlled device is received from any client other than the first client within the first duration, it is determined that the target controlled device will be controlled according to the first control information. As another example, if the first priority is the highest priority, it is determined that the target controlled device will be controlled according to the first control information. As yet another example, if the first priority is not the highest priority, and a third target instruction is received from a third client within the first duration, it is determined that the target controlled device will be controlled according to the first control information.
[0128] S403. Send the status information of the target controlled device to the first client, mark the target controlled device as occupied, and send the third indication information that the target controlled device is occupied to at least one client communicating with the energy storage valve controller.
[0129] In some embodiments, the state information of the target controlled device may include: the target controlled device being in a closed state, the target controlled device being in an open state, the current value flowing through the target controlled device, the output power corresponding to the target controlled device, or the number of closed sub-controlled devices included in the target controlled device.
[0130] In some embodiments, after each client in at least one client receives the third instruction information, it can display the corresponding information so that the operator corresponding to each client cannot select the target controlled device, and thus cannot control the target controlled device.
[0131] After S403, S404 or S405 can be executed.
[0132] S404. If a second control command sent by the first client is received within a second time period from the time when the target controlled device is marked as being controlled, the target controlled device is controlled according to the first control information.
[0133] S405. If the second control command sent by the first client is not received within the second time period, a fourth indication message indicating that the target controlled device has been released is sent to at least one client communicating with the energy storage valve controller.
[0134] In some embodiments, after each client in at least one client receives the fourth instruction information, it can display the corresponding information so that the operator corresponding to one or more clients can select the target controlled device and thus control the target controlled device.
[0135] The following describes the usage scenario of the first preset command: The energy storage valve control interface of the first client can include selection controls and control controls. After the operator selects the target controlled device, selects the first control information, and selects the first priority (selection of the first priority is optional) on the energy storage valve control interface, the operator can trigger the selection control. The first client generates the first preset command and sends the first preset command to the energy storage valve controller. After the first client receives the status information of the target controlled device, it displays the status information of the target controlled device. After the first client receives the third indication information that the target controlled device is occupied, it sets the target controlled device to be inoperable. At this time, the operator cannot select the target controlled device.
[0136] In one scenario, if the operator sees that the status information of the target controlled device is different from the first control information, and determines that the target controlled device needs to be operated, the control control can be triggered again to cause the first client to generate a second control command. Upon receiving the second control command sent by the first client, the energy storage valve controller controls the target controlled device according to the first control information.
[0137] In another scenario, if the operator sees that the status information of the target controlled device is the same as the first control information, and determines that no operation is needed on the target controlled device, the operator also does not need to trigger the control controls. In this case, if the energy storage valve controller does not receive the second control command from the first client within the second time period, it sends a fourth indication that the target controlled device has been released to at least one client communicating with the energy storage valve controller. In some embodiments, after the first client receives the fourth indication, it sets the target controlled device to be operable; at this time, the operator can select the target controlled device.
[0138] Reference Figure 5 , Figure 5 This is a flowchart illustrating a method executed by an energy storage valve controller in some embodiments of this application when the second target instruction is a second preset instruction. The method is applied to an energy storage valve controller and includes:
[0139] S501, Receive a second target instruction sent by a second client; the second target instruction includes a second priority and second control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0140] S502. If the second target instruction is a second preset instruction, determine that the target controlled device shall be controlled according to the second control information.
[0141] To determine the method of controlling the target controlled device based on the second control information, please refer to [link / reference]. Figure 1 The steps in the corresponding embodiments are as follows. For example, if the first priority is not the highest priority, and a second target instruction sent by the second client is received within a first time period, the target controlled device is controlled according to the second control information for the target controlled device included in the second target instruction.
[0142] S503. Send the status information of the target controlled device to the second client, mark the target controlled device as occupied, and send the third indication information that the target controlled device is occupied to at least one client communicating with the energy storage valve controller.
[0143] After S503, S504 or S505 can be executed.
[0144] S504. If a fourth control command sent by the second client is received within a second time period from the time when the target controlled device is marked as being controlled, the target controlled device is controlled according to the second control information.
[0145] S505. If the fourth control command sent by the second client is not received within the second time period, a fourth indication message indicating that the target controlled device has been released is sent to at least one client communicating with the energy storage valve controller.
[0146] The following describes the usage scenario of the second preset command: The energy storage valve control interface of the second client can include selection controls and control controls. After the operator selects the target controlled device, selects the second control information, and selects the second priority (the selection of the second priority is optional) on the energy storage valve control interface, the operator can trigger the selection controls. The second client generates the second preset command and sends the second preset command to the energy storage valve controller. After the second client receives the status information of the target controlled device, it displays the status information of the target controlled device. After the second client receives the third indication information that the target controlled device is occupied, it sets the target controlled device to be inoperable. At this time, the operator cannot select the target controlled device.
[0147] In one scenario, if the operator sees that the status information of the target controlled device is different from the second control information, and determines that the target controlled device needs to be operated, the control control can be triggered again to cause the second client to generate a fourth control command. Upon receiving the fourth control command sent by the second client, the energy storage valve controller controls the target controlled device according to the second control information.
[0148] In another scenario, if the operator sees that the status information of the target controlled device is the same as the second control information, and determines that no operation is needed on the target controlled device, the operator also does not need to trigger the control controls. In this case, if the energy storage valve controller does not receive the fourth control command sent by the second client within the second time period, it sends a fourth indication that the target controlled device has been released to at least one client communicating with the energy storage valve controller. In some embodiments, after the second client receives the fourth indication information, it sets the target controlled device to be operable; at this time, the operator can select the target controlled device.
[0149] In any embodiment of this application, after controlling the target controlled device, the method further includes:
[0150] The target controlled device is marked as controlled, and a fifth indication message indicating that the target controlled device is controlled is sent to at least one client communicating with the energy storage valve controller.
[0151] Starting from the moment when the target controlled device is marked as being controlled, after a third time interval, a fourth indication message indicating that the target controlled device has been released is sent to at least one client communicating with the energy storage valve controller.
[0152] In some embodiments, when the target controlled device is controlled according to the first control information, the fifth indication information may further indicate that the target controlled device is controlled by the attribute information of the first client or the operator corresponding to the first client. In some embodiments, when the target controlled device is controlled according to the second control information, the fifth indication information may further indicate that the target controlled device is controlled by the attribute information of the second client or the operator corresponding to the second client.
[0153] In some embodiments, each of at least one client, upon receiving a fifth instruction message, sets the target controlled device to be inoperable.
[0154] In some embodiments, the third duration can be a fixed value, for example, the range of the third duration can be from 0.1 seconds to 1 hour. For example, the third duration can be 0.1 seconds, 0.5 seconds, 1 second, 5 seconds, 1 minute, 30 minutes, or 1 hour. Exemplarily, the third duration is 1 minute. In some embodiments, the first duration can be the same as or different from the third duration.
[0155] In other embodiments, the third duration can be determined based on the first priority. For example, the higher the first priority, the longer the third duration, and the lower the first priority, the shorter the third duration. For instance, if the first priority is medium, the third duration can be 30 minutes, and if the first priority is low, the third duration can be 10 minutes.
[0156] In the technical solution of this application embodiment, after the target controlled device is controlled, the target controlled device cannot be controlled again until the third time period. This reduces the possibility of the target controlled device being controlled differently in a short period of time, thereby improving the security of the target controlled device control. In addition, the state information of the target controlled device will not be changed within the third time period, thereby reducing the possibility of the target controlled device being quickly controlled by other clients after the first client successfully controls the target controlled device, which would reduce the reliability of the target controlled device control.
[0157] Reference Figure 6 , Figure 6 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 4 This method is applied to an energy storage valve controller, and the method includes:
[0158] S601, Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0159] S602. If the first priority is not the highest priority, store the first target instruction in the timestamp queue.
[0160] Wherein, the time corresponding to the timestamp of at least one target instruction stored in the timestamp queue is less than or equal to the first time interval between the timestamp and the current time, and the priority of the at least one target instruction is not the highest priority.
[0161] S603. If a second target instruction is received from the second client within the first time period, the first target instruction is retrieved from the timestamp queue.
[0162] S604. Determine that the second priority included in the second target instruction is higher than the first priority included in the first target instruction, delete the first target instruction from the timestamp queue, and store the second target instruction in the timestamp queue.
[0163] S605. Control the target controlled device according to the second control information for the target controlled device included in the second target instruction.
[0164] S606. Delete the second target instruction from the timestamp queue.
[0165] In the technical solution of this application embodiment, since the time corresponding to the timestamp of at least one target instruction stored in the timestamp queue is less than or equal to the current time, the duration between the timestamp and the current time is less than or equal to a first duration, so that each time a target instruction is received, it can be determined from the timestamp queue whether there is an instruction that conflicts with the control of the target controlled device in the received target instruction, thereby improving the efficiency of determining whether there is an instruction that conflicts with the control of the target controlled device in the received target instruction, and thus improving the control speed of the target controlled device.
[0166] Reference Figure 7 , Figure 7 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 5 This method is applied to an energy storage valve controller, and the method includes:
[0167] S701, Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0168] S702. If the first priority is not the highest priority, store the first target instruction in the timestamp queue.
[0169] Wherein, the time corresponding to the timestamp of at least one target instruction stored in the timestamp queue is less than or equal to the first time interval between the timestamp and the current time, and the priority of the at least one target instruction is not the highest priority.
[0170] S703. If no target instruction for the target controlled device is received from any other client besides the first client within the first time period, the target controlled device is controlled according to the first control information.
[0171] S704. Delete the first target instruction from the timestamp queue.
[0172] Reference Figure 8 , Figure 8 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 6 This method is applied to an energy storage valve controller, and the method includes:
[0173] S801, Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0174] S802. If the first priority is not the highest priority, store the first target instruction in the timestamp queue.
[0175] Wherein, the time corresponding to the timestamp of at least one target instruction stored in the timestamp queue is less than or equal to the first time interval between the timestamp and the current time, and the priority of the at least one target instruction is not the highest priority.
[0176] S803. If a third target instruction is received from a third client within the first time period, the third target instruction is discarded.
[0177] In some embodiments, S803 may include: if, within the first duration, a third target instruction is received from a third client, and the third target instruction includes a third priority that is the lowest priority, then the third target instruction is discarded.
[0178] In some embodiments, S803 may include: if a third target instruction is received from a third client within the first duration, the first target instruction is found in the timestamp queue, the third priority of the third target instruction is determined to be lower than the first priority of the first target instruction, and the third target instruction is discarded.
[0179] S804. Control the target controlled device according to the first control information.
[0180] S805. Delete the first target instruction from the timestamp queue.
[0181] Reference Figure 9 , Figure 9 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 7 This method is applied to an energy storage valve controller, and the method includes:
[0182] S901, Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0183] S902. Store the first target instruction in the priority queue corresponding to the first priority.
[0184] The target instructions in the priority queue are executed in descending order of priority.
[0185] S903. If the first priority is not the highest priority, and the second target instruction sent by the second client is received within the first time period, the second target instruction is stored in the priority queue corresponding to the second priority, and the first target instruction is deleted from the priority queue corresponding to the first priority.
[0186] S904. Control the target controlled device according to the second control information included in the second target instruction in the priority queue corresponding to the second priority.
[0187] S905. Delete the second target instruction from the priority queue corresponding to the second priority.
[0188] In the technical solution of this application embodiment, by setting priority queues corresponding to each priority, the target instructions can be executed sequentially according to the target instructions in the priority queue, so that the target instructions corresponding to high priority can be executed first, thereby improving the control speed of the target instructions corresponding to high priority.
[0189] Reference Figure 10 , Figure 10 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 8 This method is applied to an energy storage valve controller, and the method includes:
[0190] S1001, Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0191] S1002. Store the first target instruction in the priority queue corresponding to the first priority.
[0192] The target instructions in the priority queue are executed in descending order of priority.
[0193] S1003. If the first priority is not the highest priority and no target instruction for the target controlled device is received from any other client other than the first client within the first time period, the target controlled device is controlled according to the first control information included in the first target instruction in the priority queue corresponding to the first priority.
[0194] S1004. Delete the first target instruction from the priority queue corresponding to the first priority.
[0195] Reference Figure 11 , Figure 11 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 9 This method is applied to an energy storage valve controller, and the method includes:
[0196] S1101. Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0197] S1102. Store the first target instruction in the priority queue corresponding to the first priority.
[0198] The target instructions in the priority queue are executed in descending order of priority.
[0199] S1103. When the first priority is the highest priority, the target controlled device is controlled according to the first control information included in the first target instruction in the priority queue corresponding to the first priority.
[0200] S1104. Delete the first target instruction from the priority queue corresponding to the first priority.
[0201] Reference Figure 12 , Figure 12 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 10 This method is applied to an energy storage valve controller, and the method includes:
[0202] S1201, Receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for a target controlled device, the target controlled device being included among a plurality of controlled devices that the energy storage valve controller can control.
[0203] S1202. Store the first target instruction in the priority queue corresponding to the first priority.
[0204] The target instructions in the priority queue are executed in descending order of priority.
[0205] S1203. If the first priority is not the highest priority, and a third target instruction sent by a third client is received within the first time period, the third target instruction is discarded.
[0206] S1204. Control the target controlled device according to the first control information included in the first target instruction in the priority queue corresponding to the first priority.
[0207] S1205. Delete the first target instruction from the priority queue corresponding to the first priority.
[0208] In this application embodiment, remote operation is considered a key requirement in order to control the devices in the energy storage valve.
[0209] The operation of components in energy storage valves involves high energy and potential hazards, making safety paramount. Ensuring the safety of the system and personnel becomes especially important in remote operation. Traditional field operations may face risks such as high voltage, high temperature, and electromagnetic radiation, while remote control technology can reduce the need for direct personnel contact with hazardous environments, providing a safer operating environment. However, components in traditional energy storage valves may face the following safety challenges in remote control mechanisms:
[0210] When multiple clients send target commands simultaneously, if the system lacks an appropriate mechanism to handle concurrent requests, race conditions may occur. Race conditions can lead to data conflicts and disordered command execution order, resulting in system errors, data inconsistencies, or unpredictable behavior. Furthermore, the target commands sent simultaneously by multiple clients may conflict or interfere with each other, preventing the system from accurately executing the intended operation. For example, one client might send a command to open a valve, while another client simultaneously sends a command to close the valve. Such conflicting commands may cause the valve status to be undetermined or to switch frequently, thus affecting system stability and security.
[0211] Based on this, this application proposes a secure remote control mechanism that introduces an instruction queue and a priority processing mechanism. Received instructions are sorted according to priority and executed one by one. Higher-priority instructions should be executed first to ensure that important operations are processed promptly. The instruction queue helps manage instruction execution and avoid race conditions and instruction conflicts.
[0212] The generation of remote control commands (corresponding to the target commands mentioned above) is the starting point of the remote control mechanism. Remote control commands are typically generated by operators or the upper-level control system, including the type of control operation (such as open, close, adjust, etc.) and related parameters (such as valve position, flow rate, etc.). These commands are usually encoded in a specific format or protocol for parsing and processing during transmission.
[0213] The generated remote control commands need to be transmitted to the energy storage valve controller via a specific communication network or transmission medium. Common transmission methods include wired communication (such as Ethernet, serial communication, etc.) and wireless communication (such as wireless LAN, cellular network, etc.). During command transmission, it is necessary to ensure the security, integrity, and reliability of the data, which is typically achieved through encryption, verification, and retransmission mechanisms.
[0214] After receiving the transmitted remote control commands, the energy storage valve controller needs to perform reception and parsing. The receiving end typically includes receiving devices connected to a communication network, such as a network interface or a wireless receiver. The parsing stage converts the received command data into control commands that the system can recognize, including parsing the command type and extracting relevant parameters.
[0215] The energy storage valve controller transmits the parsed control commands to the corresponding execution units for actual control of the valve's state, position, or flow rate. The execution units may include motors, actuators, or regulators, which perform the corresponding operations according to the instructions. Simultaneously, the energy storage valve controller provides a feedback mechanism, returning the execution results or status information to the initiator of the remote control command or the upper-level control system to monitor and verify the operation results.
[0216] This application provides a safe remote control mechanism for an energy storage valve control system. In a multi-client remote control scenario, multiple operators may simultaneously monitor and control the energy storage valve control system. However, the commands and status information between different clients need to be synchronized to ensure system consistency and accuracy. The technical problem this application aims to solve involves designing a reliable synchronization mechanism to ensure real-time data sharing and updating among multiple clients, thereby avoiding conflicts and erroneous operations.
[0217] Multiple clients can select a priority before issuing remote control commands and associate it with the commands. Each client can only select one priority, thus determining the execution order and priority of the commands.
[0218] The energy storage valve controller can use a priority queue to manage remote control commands from clients. Each command issued by a client is added to the end of the corresponding queue according to its selected priority. This ensures that high-priority commands are executed first.
[0219] When multiple clients issue commands to operate the same remote control point (corresponding to the controlled device mentioned above), the system compares the timestamps of the commands. If the difference between the timestamps is less than 500 milliseconds (this time is configurable), the command from the higher-priority client will be executed, and the command from the lower-priority client will be considered a remote control failure. This mechanism ensures that the higher-priority client can reliably control the remote control point.
[0220] After a successful remote control operation, the client's priority is no longer mutually exclusive, allowing it to reselect a priority or re-initiate the remote control command. Clients that fail to remotely control the device or do not perform a remote control operation can also reselect a priority after a period of time, thus having the opportunity to re-participate in the remote control operation.
[0221] If a client fails to successfully execute a remote control operation within a certain time after selecting a priority, the system will remove the client's priority, allowing it to reselect a priority or re-initiate the command. For clients that successfully select a remote control point, the remote control point will be reserved for that client and will not be selected by other higher-priority clients, provided that the timeout period has not expired.
[0222] The embodiments of this application can achieve at least one of the following effects:
[0223] Efficient remote control command execution: Through client priority selection and priority queue management of the energy storage valve controller, the energy storage valve controller can efficiently execute remote control commands. High-priority commands are processed first, ensuring that important operations can be executed in a timely manner, improving the response speed and efficiency of remote control operations.
[0224] Remote control conflict resolution: Through timestamp comparison and command priority judgment mechanisms, the energy storage valve controller can resolve conflicts caused by multiple clients simultaneously operating the same remote control point. Low-priority commands will be considered remote control failures, thus avoiding confusion and conflicts caused by multiple commands being executed simultaneously, ensuring the accuracy and consistency of remote control operations.
[0225] Flexible priority adjustment: The energy storage valve controller allows the client to remove priority mutual exclusion and reselect priority or re-initiate remote control commands. This flexibility enables the client to adjust priorities at any time according to actual needs, thereby better adapting to different scenarios and operational requirements.
[0226] Timeout Handling and Resource Reservation: The energy storage valve controller times out clients that fail to execute remote control operations, removes their priority, and allows them to reselect a priority or re-initiate the command. Simultaneously, clients that successfully select a remote control point can retain that remote control point resource for a certain period, preventing it from being preempted by other higher-priority clients, thus improving the utilization efficiency of remote control point resources.
[0227] This application provides a security mechanism for the remote control function of an energy storage valve control system:
[0228] Multiple clients select a client priority before issuing remote control commands. Each client can only choose one priority and associate it with the remote control command. After a successful remote control operation, the priorities are no longer mutually exclusive, allowing the client to reselect a priority. Clients that fail to remotely control or do not perform a remote control operation can also reselect a priority after a period of time.
[0229] After the client issues a remote control command, the command enters the corresponding priority queue and is arranged according to the priority selected by the client. Each client command is added to the end of the corresponding queue according to its priority.
[0230] Each client obtains the current timestamp when issuing a remote control command and associates the timestamp with the command. The timestamp is used for subsequent conflict detection and resolution.
[0231] When multiple clients issue commands to operate the same remote control point, the conflict detection and resolution module compares the timestamps of the commands. If the difference between the timestamps is less than 500 milliseconds, the command from the higher-priority client will be executed, and the command from the lower-priority client will be considered a remote control failure. The lower-priority client will then be notified that the device is being controlled by the higher-priority client.
[0232] If a client fails to successfully execute a remote control operation within a certain period of time after selecting a priority, the system will remove the priority of that client, allowing it to reselect a priority or re-initiate the remote control command.
[0233] Once a client successfully selects a remote control point, that point will be reserved for that client and will not be selected by other high-priority clients, provided that the timeout period has not expired.
[0234] If different remote control points are being operated, there is no need to compare timestamps or determine command priorities. Commands from each client can be executed independently without interference.
[0235] Reference Figure 13 , Figure 13 This is a schematic diagram of the architecture of a secure remote control mechanism according to some embodiments of this application. At least one of client A, client B, and client C can select priorities to send target commands to the energy storage valve controller. The command processing module of the energy storage valve controller maintains a priority queue and a timestamp queue. The conflict detection module of the energy storage valve controller performs target command detection, remote control point determination, timestamp determination, and priority determination. The feedback module of the energy storage valve controller processes feedback commands to send corresponding indication information to the corresponding client.
[0236] Reference Figure 14 , Figure 14 This is a flowchart illustrating the control method of the controlled device in some embodiments of this application. Figure 10 1. The method includes:
[0237] S1401, Client A has extremely high priority.
[0238] S1402, Client B has higher priority.
[0239] S1403, Client C is selecting priority.
[0240] S1404, Client D has low priority.
[0241] S1405, Client C sends a control command to the energy storage valve controller for remote control point A.
[0242] S1406, Client B sends a control command to the energy storage valve controller for remote control point A.
[0243] S1407, The energy storage valve controller determines that the time difference between the timestamps of two control commands is less than or equal to the first duration.
[0244] In any embodiment of this application, unless otherwise specified, the timestamp may be a sending timestamp or a receiving timestamp.
[0245] S1408 The energy storage valve controller determines that the priority of client B is higher than that of client C, and controls remote control point A according to the control command sent by client B.
[0246] S1409. The energy storage valve controller sends a remote control success indication message to client B, a remote control failure indication message to client C, and an indication message that the remote control point A is being remotely controlled by a higher priority client.
[0247] S1410, Client D sends a control command to the energy storage valve controller for remote control point B.
[0248] S1411 The energy storage valve controller controls the remote control point B according to the control command sent by the client D.
[0249] S1412, The energy storage valve controller sends a remote control success indication message to the client D.
[0250] S1413. Client A sends a preset command for selected control point C to the energy storage valve controller.
[0251] S1414: The energy storage valve controller did not receive a control command from client A within the second time period.
[0252] S1415. The energy storage valve controller sends a preset timeout and an indication message to client A to unlock the selected control point C.
[0253] In some embodiments, when client A sends a preset command for control point C to the energy storage valve controller, control point C can be locked, preventing other clients besides client A from initiating control commands / preset commands for control point C. In some embodiments, when control point C is unlocked, any one or more clients communicating with the energy storage valve controller can initiate control commands / preset commands for control point C.
[0254] In another implementation scenario, suppose three clients (Client A, Client B, and Client C) operate the remote control function of an energy storage valve control system, and they select different priorities. Client A selects high priority, Client B selects medium priority, and Client C selects low priority. Clients A, B, and C simultaneously issue a remote control command to operate the same remote control point, and the commands enter the end of their respective priority queues. The conflict and detection module detects the commands and finds that the interval between commands A and B is less than 500ms; the interval between commands C and B is less than 500ms; and the interval between commands A and C is less than 500ms. Therefore, the execution order of the remote control commands is determined by the command priority. Since A's command has the highest priority, Client A's remote control command is executed, while B and C return a remote control failure to their respective clients, and the remote control point is executed by the client with the higher priority.
[0255] Reference Figure 15 , Figure 15 This is a schematic diagram illustrating the remote control mechanism of some embodiments of this application. Clients A, B, and C can send target commands to the energy storage valve controller. The energy storage valve controller can maintain a priority queue, with priorities decreasing sequentially from top to bottom (e.g., priority 1, priority 2, priority 3, etc., decreasing in priority). The energy storage valve controller can maintain a timestamp queue, with timestamps increasing sequentially from top to bottom (e.g., timestamp 1, timestamp 2, timestamp 3, etc., increasing in priority). The conflict and detection module of the energy storage valve controller can perform the following judgments: judgment of whether the remote control points are consistent (remote control point judgment), timeout judgment, timestamp judgment, and priority judgment. The feedback module of the energy storage valve controller sends feedback commands (e.g., sending feedback command 1, feedback command 2, feedback command 3, etc.). For example, if clients A and B simultaneously send control commands for remote control point A, and client A successfully remote controls while client B fails, then a remote control success indication is sent to client A, and a remote control failure indication is sent to client B.
[0256] Based on the foregoing embodiments, this application provides an energy storage valve controller. The device includes various units and modules included in each unit, which can be implemented by a processor in the energy storage valve controller; of course, it can also be implemented by specific logic circuits.
[0257] Reference Figure 16 , Figure 16 This is a schematic diagram of the composition structure of an energy storage valve controller provided in some embodiments of this application. The energy storage valve controller 1600 includes:
[0258] Communication unit 1601 is used to receive a first target instruction sent by a first client; the first target instruction includes a first priority and first control information for the target controlled device;
[0259] The control unit 1602 is configured to control the target controlled device according to the second control information for the target controlled device included in the second target instruction when the first priority is not the highest priority and a second target instruction is received from a second client within a first time period; and to control the target controlled device according to the first control information when the first priority is not the highest priority and no target instruction for the target controlled device is received from any client other than the first client within the first time period; wherein the second target instruction further includes a second priority, which is higher than the first priority; and the first control information is different from the second control information.
[0260] In some embodiments, the control unit 1602 is further configured to control the target controlled device according to the first control information when the first priority is the highest priority.
[0261] In some embodiments, the control unit 1602 is further configured to control the target controlled device according to the first control information when the first priority is not the highest priority and a third target instruction sent by a third client is received within the first duration; wherein the third target instruction includes a third priority and third control information for the target controlled device, the third priority is lower than the first priority, and the third control information is different from the first control information.
[0262] In some embodiments, the communication unit 1601 is further configured to send a first indication message to the first client to indicate successful control when the target controlled device is controlled according to the first control information.
[0263] In some embodiments, the communication unit 1601 is further configured to send a first indication message to the second client indicating successful control and a second indication message to the first client indicating control failure when controlling the target controlled device according to the second control information.
[0264] In some embodiments, the control unit 1602 is further configured to control the target controlled device according to the first control information when the first target instruction is a first control instruction.
[0265] In some embodiments, the communication unit 1601 is further configured to send the status information of the target controlled device to the first client when the first target instruction is a first preset instruction, send the third indication information that the target controlled device is occupied to at least one client communicating with the energy storage valve controller, and receive the second control instruction sent by the first client within a second duration from the time when the target controlled device is marked as being controlled;
[0266] The control unit 1602 is also used to mark the target controlled device as occupied and to control the target controlled device according to the first control information.
[0267] In some embodiments, the control unit 1602 is further configured to control the target controlled device according to the second control information when the second target instruction is a third control instruction.
[0268] In some embodiments, the communication unit 1601 is further configured to send the status information of the target controlled device to the second client when the second target instruction is a second preset instruction, send the third indication information that the target controlled device is occupied to at least one client communicating with the energy storage valve controller, and receive the fourth control instruction sent by the second client within a second duration from the time when the target controlled device is marked as being controlled.
[0269] The control unit 1602 is also used to mark that the target controlled device is occupied, and to control the target controlled device according to the second control information.
[0270] In some embodiments, the communication unit 1601 is further configured to send a fourth indication that the target controlled device has been released to at least one client communicating with the energy storage valve controller if the second control command sent by the first client is not received within the second time period.
[0271] In some embodiments, the communication unit 1601 is further configured to send a fourth indication message indicating that the target controlled device has been released to at least one client communicating with the energy storage valve controller if the fourth control command sent by the second client is not received within the second time period.
[0272] In some embodiments, the control unit 1602 is further configured to mark the target controlled device as being controlled;
[0273] The communication unit 1601 is further configured to send a fifth indication message indicating that the target controlled device is controlled to at least one client communicating with the energy storage valve controller; and, after a third time interval from the time when the target controlled device is marked as controlled, send a fourth indication message indicating that the target controlled device is released to at least one client communicating with the energy storage valve controller.
[0274] In some embodiments, the control unit 1602 is further configured to: store the first target instruction in a timestamp queue when the first priority is not the highest priority; the time corresponding to the timestamp of at least one target instruction stored in the timestamp queue is less than or equal to the current time and the duration between the timestamp and the current time is less than or equal to the first duration, and the priorities of the at least one target instruction are all not the highest priority; if the second target instruction sent by the second client is received within the first duration, find the first target instruction in the timestamp queue, determine that the second priority of the second target instruction is higher than the first priority of the first target instruction, delete the first target instruction in the timestamp queue, and store the second target instruction in the timestamp queue; and delete the second target instruction in the timestamp queue when the target controlled device is controlled according to the second control information.
[0275] In some embodiments, the control unit 1602 is further configured to: store the first target instruction in a priority queue corresponding to the first priority; wherein the target instructions in the priority queue are executed in descending order of priority; if the first priority is not the highest priority and the second target instruction sent by the second client is received within a first time period, store the second target instruction in a priority queue corresponding to the second priority and delete the first target instruction in the priority queue corresponding to the first priority; control the target controlled device according to the second control information included in the second target instruction in the priority queue corresponding to the second priority; and delete the second target instruction in the priority queue corresponding to the second priority.
[0276] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0277] It should be noted that, in the embodiments of this application, if the control method of the controlled device described above is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an energy storage valve controller to execute all or part of the methods described in the various embodiments of this application.
[0278] Reference Figure 17 , Figure 17 This is a schematic diagram of the hardware entity of an energy storage valve controller provided in some embodiments of this application. The energy storage valve controller 1600 includes a processor 1603 and a memory 1604; the memory 1604 stores a computer program, and the processor 1603 is used to execute the computer program to implement the method of any of the above embodiments.
[0279] In some embodiments, the energy storage valve controller 1600 may be the same as or different from the energy storage valve controller 1600.
[0280] The memory 1604 stores computer programs that can run on the processor. The memory 1604 is configured to store instructions and applications that can be executed by the processor 1603. It can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data, and video communication data) in the processor 1603 and the various modules in the energy storage valve controller 1600. It can be implemented by flash memory or random access memory (RAM).
[0281] The processor 1603 executes the program to implement the control method steps of any of the above-mentioned controlled devices. The processor 1603 typically controls the overall operation of the energy storage valve controller 1600.
[0282] It should be noted that the descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0283] The aforementioned energy storage valve controller or processor may include one or more of the following integrated components: a general-purpose processor, an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a central processing unit (CPU), a graphics processing unit (GPU), an embedded neural network processing unit (NPU), a controller, a microcontroller, a microprocessor, a programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. It is understood that the electronic device implementing the above-mentioned processor functions may also be other types, and this application embodiment does not specifically limit the specific implementation. The energy storage valve controller or processor may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0284] The memory or computer storage medium in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0285] It should be understood that the phrases "an embodiment," "an embodiment," "an embodiment of this application," "the foregoing embodiment," "some implementations," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, the phrases "an embodiment," "an embodiment," "an embodiment of this application," "the foregoing embodiment," "some implementations," or "some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; 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 embodiments of this application. The sequence numbers of the above-described embodiments of this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0286] Unless otherwise specified, any step in the embodiments of this application performed by the energy storage valve controller may be executed by the processor of the energy storage valve controller. Unless otherwise specified, the embodiments of this application do not limit the order in which the energy storage valve controller performs the following steps. Furthermore, the methods used to process data in different embodiments may be the same or different methods. It should also be noted that any step in the embodiments of this application can be executed independently by the energy storage valve controller; that is, when the energy storage valve controller performs any step in the above embodiments, it may not depend on the execution of other steps.
[0287] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0288] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0289] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0290] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0291] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0292] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0293] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0294] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the energy storage valve controller to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0295] In the embodiments of this application, descriptions of the same steps and contents in different embodiments can be referred to each other. In the embodiments of this application, the term "and" does not affect the order of steps. For example, if the energy storage valve controller executes A and executes B, it can mean that the energy storage valve controller executes A first and then B, or that the energy storage valve controller executes B first and then A, or that the energy storage valve controller executes A and B simultaneously.
[0296] The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0297] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0298] It should be noted that in the various embodiments involved in this application, all steps or some steps may be performed, as long as a complete technical solution can be formed.
[0299] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of controlling a controlled device, characterized by, The method is applied to a storage valve controller, and comprises the following steps: receiving a first target instruction sent by a first client; the first target instruction comprises a first priority and first control information for a target controlled device, and the target controlled device is included in a plurality of controlled devices capable of being controlled by the storage valve controller; in a case where the first priority is a non-highest priority and a second target instruction sent by a second client is received within a first time length, controlling the target controlled device according to second control information for the target controlled device included in the second target instruction; in a case where the first priority is a non-highest priority and no target instruction for the target controlled device sent by a client other than the first client is received within the first time length, controlling the target controlled device according to the first control information; wherein the second target instruction further comprises a second priority, and the second priority is higher than the first priority; and the first control information is different from the second control information.
2. The control method according to claim 1, characterized by, The method further comprises: in a case where the first priority is a highest priority, controlling the target controlled device according to the first control information; in a case where the first priority is a non-highest priority and a third target instruction sent by a third client is received within the first time length, controlling the target controlled device according to the first control information; wherein the third target instruction comprises a third priority and third control information for the target controlled device, the third priority is lower than the first priority, and the third control information is different from the first control information.
3. The control method according to claim 1, characterized by, The method further comprises: in a case where the target controlled device is controlled according to the first control information, sending first indication information indicating control success to the first client; in a case where the target controlled device is controlled according to the second control information, sending first indication information indicating control success to the second client and sending second indication information indicating control failure to the first client.
4. The control method according to claim 1, characterized by, The controlling of the target controlled device according to the first control information comprises: in a case where the first target instruction is a first control instruction, controlling the target controlled device according to the first control information, or in a case where the first target instruction is a first preset instruction, sending state information of the target controlled device to the first client, marking that the target controlled device is occupied, sending third indication information that the target controlled device is occupied to at least one client in communication with the storage valve controller, and in a case where a second control instruction sent by the first client is received within a second time length from a time point when the target controlled device is marked as being controlled, controlling the target controlled device according to the first control information; The controlling of the target controlled device according to the second control information for the target controlled device included in the second target instruction comprises: In a case where the second target instruction is a third control instruction, the target controlled device is controlled according to the second control information, or in a case where the second target instruction is a second preset instruction, state information of the target controlled device is sent to the second client, it is marked that the target controlled device is occupied, third indication information that the target controlled device is occupied is sent to at least one client in communication with the energy storage valve controller, and in a case where fourth control information sent by the second client is received within a second time length from a time when it is marked that the target controlled device is controlled, the target controlled device is controlled according to the second control information.
5. The control method according to claim 4, characterized by The method further comprises: In a case where the second control information sent by the first client is not received within the second time length, or in a case where the fourth control information sent by the second client is not received within the second time length, fourth indication information that the target controlled device is released is sent to at least one client in communication with the energy storage valve controller.
6. The control method according to any one of claims 1 to 5, characterized by, After the target controlled device is controlled, the method further comprises: It is marked that the target controlled device is controlled, and fifth indication information that the target controlled device is controlled is sent to at least one client in communication with the energy storage valve controller; After a third time length is interval from a time when it is marked that the target controlled device is controlled, fourth indication information that the target controlled device is released is sent to at least one client in communication with the energy storage valve controller.
7. The control method according to any one of claims 1 to 5, characterized by, After the first target instruction sent by the first client is received, the method further comprises: In a case where the first priority is a non-highest priority, the first target instruction is stored in a time stamp queue; a time length between a time corresponding to a time stamp of at least one target instruction stored in the time stamp queue and a current time is less than or equal to the first time length, and priorities included in the at least one target instruction are all non-highest priorities; In a case where the second target instruction sent by the second client is received within the first time length, the first target instruction is found from the time stamp queue, it is determined that the second priority included in the second target instruction is higher than the first priority included in the first target instruction, the first target instruction in the time stamp queue is deleted, and the second target instruction is stored in the time stamp queue; In a case where the target controlled device is controlled according to the second control information, the second target instruction in the time stamp queue is deleted.
8. The control method according to any one of claims 1 to 5, characterized by, After the first target instruction sent by the first client is received, the method further comprises: The first target instruction is stored in a priority queue corresponding to the first priority; target instructions in the priority queue are executed in order of priority from high to low; In a case where the first priority is a non-highest priority and the second target instruction sent by the second client is received within a first time length, the target controlled device is controlled according to second control information for the target controlled device included in the second target instruction. In a case where the first priority is a non-highest priority and the second target instruction sent by the second client is received within a first time length, the second target instruction is stored in the priority queue corresponding to the second priority, and the first target instruction in the priority queue corresponding to the first priority is deleted. The target controlled device is controlled according to the second control information included in the second target instruction in the priority queue corresponding to the second priority. After the target controlled device is controlled according to the second control information for the target controlled device included in the second target instruction, the method further comprises deleting the second target instruction in the priority queue corresponding to the second priority.
9. An energy storage valve controller characterized by, The energy storage valve controller comprises: a communication unit configured to receive a first target instruction sent by a first client, wherein the first target instruction comprises a first priority and first control information for a target controlled device, and the target controlled device is included in a plurality of controlled devices controllable by the energy storage valve controller; a control unit configured to, in a case where the first priority is a non-highest priority and a second target instruction sent by a second client is received within a first time length, control the target controlled device according to second control information for the target controlled device included in the second target instruction, and in a case where the first priority is a non-highest priority and no target instruction for the target controlled device sent by a client other than the first client is received within the first time length, control the target controlled device according to the first control information, wherein the second target instruction further comprises a second priority, and the second priority is higher than the first priority, and the first control information is different from the second control information.
10. An energy storage valve controller characterized by, The energy storage valve controller comprises a processor and a memory, and the memory stores a computer program, and the processor is configured to execute the computer program to implement the method in any one of claims 1 to 8.