CN116679814A - Power panel control method and device, electronic equipment and storage medium - Google Patents

Power panel control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116679814A
CN116679814A CN202310555275.0A CN202310555275A CN116679814A CN 116679814 A CN116679814 A CN 116679814A CN 202310555275 A CN202310555275 A CN 202310555275A CN 116679814 A CN116679814 A CN 116679814A
Authority
CN
China
Prior art keywords
power panel
data
local host
host
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310555275.0A
Other languages
Chinese (zh)
Inventor
李潮琪
肖军华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wingtech Communication Co Ltd
Original Assignee
Wingtech Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wingtech Communication Co Ltd filed Critical Wingtech Communication Co Ltd
Priority to CN202310555275.0A priority Critical patent/CN116679814A/en
Publication of CN116679814A publication Critical patent/CN116679814A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/266Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/452Remote windowing, e.g. X-Window System, desktop virtualisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Power Sources (AREA)

Abstract

The present disclosure relates to a power panel control method, an apparatus, an electronic device, and a storage medium, where the present disclosure determines whether a local host is currently on-line by connecting the local host and a remote host to the same physical bus, and if the local host is currently on-line, the power panel is controlled by the local host, and if the local host is not currently on-line, the power panel is controlled by a control page of the remote host, and two paths of hardware buses are not required to be configured, so that a dual-host control mode can be implemented through one path of hardware bus, occupation of hardware resources can be reduced, and control cost can be reduced. In addition, the output channel of the power panel is modularized, the output channel is replaced by the modularized slave computers, each modularized channel can be used as a slave computer to be mounted on the physical bus, the modularized channels are independent of each other and do not affect each other, even if hardware of one channel is damaged, normal use of the power panel is not affected, the number of the slave computers can be configured according to requirements, and the expansibility is strong.

Description

Power panel control method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a power panel control method, a device, an electronic device and a storage medium.
Background
In order to have good compatibility and adapt to various application scenarios, most power boards have two control modes, namely local control and remote control. Each control mode needs to be controlled by a bus, and a communication protocol needs to be followed.
The communication protocol (modbus) is widely used as a serial communication protocol in the industry field, and can be used for remote host control or local host control, and currently, the modbus protocol adopts a single host control mode, namely, a power panel is controlled to output through one host (a remote host or a local host).
In the prior art, the modbus protocol does not support a multi-host control mode, which requires control based on different bus interfaces. If the multi-host control mode is to be realized, multiple hardware buses need to be configured, for example, two hardware buses can be configured to realize the dual-host control mode, however, the above method can increase the consumption of hardware resources and raise the control cost. In addition, in the prior art, a power panel is output by multiple channels, the normal use of the power panel can be influenced by hardware damage of one channel, and if the output channels are required to be increased, the power panel needs to be redesigned, so that the expansibility is poor.
Disclosure of Invention
In order to solve the technical problems, the present disclosure provides a power panel control method, a device, an electronic device and a storage medium, so as to reduce occupation of hardware resources and reduce cost.
In a first aspect, an embodiment of the present disclosure provides a power panel control method, in which a local host and a remote host are connected to the same physical bus in advance, an output channel of the power panel is modularized, and a modularized slave replaces the output channel, the method including:
initializing and configuring a power panel;
judging whether the local host is on line currently or not;
if the local host is currently online, controlling a power panel through the local host;
and if the local host is not on line currently, controlling the power panel through a control page of the remote host.
In some embodiments, the initializing the power panel includes:
reading configuration data of a power panel, wherein the configuration data comprises current configuration information, voltage configuration information, default parameter information and calibration parameter information;
and initializing and configuring the power panel according to the configuration data.
In some embodiments, the determining whether the local host is currently online includes:
responding to the operation of a user for acquiring target data on a local host, and sending a request for acquiring the target data to a target slave;
and if the target data returned by the target slave is received, determining that the local host is currently online.
In some embodiments, the controlling, by the local host, the power panel includes:
responding to the operation of clicking a key on a local host by a user, and obtaining an operation type and operation data, wherein the operation type comprises a read data type and a write data type;
and controlling the power panel according to the operation type and the operation data.
In some embodiments, the controlling the power panel according to the operation type and the operation data includes:
if the operation type is a read data type, determining identification information of a target slave machine and data to be read from the operation data;
searching state data of the target slave corresponding to the identification information of the target slave;
reading data to be read from the state data of the target slave machine;
and displaying the data to be read on a display panel of the local host.
In some embodiments, the controlling the power panel according to the operation type and the operation data includes:
if the operation type is the write-in data type, determining the identification information, the target address and the data to be written of the target slave machine from the operation data;
determining a target slave according to the identification information of the target slave;
and writing the data to be written into the target address of the target slave.
In some embodiments, after the control of the power panel by the control page of the remote host, the method further includes:
and responding to the switching operation of the user on the control page of the remote host, disconnecting the power panel from the remote host, and establishing the connection between the power panel and the local host.
In a second aspect, an embodiment of the present disclosure provides a power strip control apparatus, which connects a local host and a remote host to the same physical bus in advance, modularizes an output channel of the power strip, replaces the output channel with a modularized slave, including:
the configuration module is used for carrying out initialization configuration on the power panel;
the judging module is used for judging whether the local host is on line currently;
the first control module is used for controlling a power panel through the local host if the local host is on line currently;
and the second control module is used for controlling the power panel through a control page of the remote host if the local host is not on line currently.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method according to the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored thereon a computer program for execution by a processor to implement the method of the first aspect.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement a method as described in the first aspect.
According to the power panel control method, the device, the electronic equipment and the storage medium, the local host and the remote host are connected to the same physical bus, the power panel is initialized and configured, whether the local host is on line or not is judged, if the local host is on line, the power panel is controlled through the local host, and if the local host is not on line, the power panel is controlled through a control page of the remote host. Compared with the prior art, the method and the device have the advantages that the local host and the remote host are connected to the same physical bus, the power panel is initialized and configured, whether the local host is on line or not is judged, if the local host is on line currently, the power panel is controlled through the local host, if the local host is off line currently, the power panel is controlled through the control page of the remote host, two paths of hardware buses are not required to be configured, a double-host control mode can be realized through one path of hardware buses, occupation of hardware resources can be reduced, and control cost is reduced. In addition, the output channel of the power panel is modularized, each modularized channel can be used as a slave to be mounted on the physical bus, the modularized channels are independent of each other and do not affect each other, even if the hardware of one channel is damaged, the normal use of the power panel is not affected, the number of the slaves can be configured according to the requirements, the slaves can be distinguished by setting different marks, and the expansibility is strong.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a power panel control method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an application scenario provided in an embodiment of the present disclosure;
fig. 3 is a flowchart of a power panel control method according to another embodiment of the present disclosure;
fig. 4 is a flowchart of a power panel control method according to another embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a power panel control device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
In order to have good compatibility and adapt to various application scenarios, most power boards have two control modes, namely local control and remote control. Each control mode needs to be controlled by a bus, and a communication protocol needs to be followed.
The communication protocol (modbus) is widely used as a serial communication protocol in the industry field, and can be used for remote host control or local host control, and currently, the modbus protocol adopts a single host control mode, namely, a power panel is controlled to output through one host (a remote host or a local host).
In the prior art, the modbus protocol does not support a multi-host control mode, which requires control based on different bus interfaces. If the multi-host control mode is to be realized, multiple hardware buses need to be configured, for example, two hardware buses can be configured to realize the dual-host control mode, however, the above method can increase the consumption of hardware resources and raise the control cost. In addition, in the prior art, a power panel is output by multiple channels, the normal use of the power panel can be influenced by hardware damage of one channel, and if the output channels are required to be increased, the power panel needs to be redesigned, so that the expansibility is poor. In view of this problem, embodiments of the present disclosure provide a power panel control method, which is described below in connection with specific embodiments.
The modbus protocol is generally based on a 485 bus, which is a standard defining the electrical characteristics of the drivers and receivers in balanced digital multi-drop systems. The 485 bus adopts a half duplex working mode to support the communication of multiple-point data. The 485 bus network topology generally adopts a bus type structure with matched terminals, namely, each node is connected in series by adopting a bus, and a ring or star network is not supported.
Fig. 1 is a flowchart of a power panel control method provided by an embodiment of the present disclosure, where the method may be applied to an electronic device, and the method may be applied to an application scenario shown in fig. 2, where the application scenario includes a remote host, a local host, a physical bus (485 bus), and three slaves, three slaves are configured on the power panel, the three slaves are mounted on the physical bus, the local host and the remote host are connected on the same physical bus, and the slaves on the power panel may be controlled by using two hosts. The method can be applied to the scene of controlling the power panel through the double hosts, two paths of hardware buses are not required to be configured, a double-host control mode can be realized through one path of hardware buses, occupation of hardware resources can be reduced, and control cost is reduced. In addition, adopt multichannel output on a power strip among the prior art, if the passageway of output is to increase, then need redesign power strip, the expansibility is poor, and this disclosure is with the output channel modularization of power strip to the slave of modularization replaces output channel, and every modularization passageway can all be as a slave machine to be installed on physical bus, can dispose the slave machine quantity according to the demand, distinguishes through setting up different marks, and the expansibility is strong. It can be appreciated that the power panel control method provided by the embodiment of the present disclosure may also be applied in other scenarios.
The following describes the control method of the power panel shown in fig. 1 in combination with the application scenario shown in fig. 2, where a local host and a remote host are connected to the same physical bus in advance, an output channel of the power panel is modularized, and a modularized slave replaces the output channel, and the method includes the following steps:
s101, initializing and configuring the power panel.
In this step, the electronic device performs initialization configuration on the power panel. For example, the power panel is configured in an initialized manner according to the initial configuration data of the power panel. Specifically, a power panel management thread may be established, and the power panel is configured in an initialized manner through the power panel management thread.
S102, judging whether the local host is currently on line or not.
After the power panel is configured in an initialized mode, the electronic equipment judges whether the local host is on line currently. Specifically, the electronic device may determine, through a power panel management thread, whether the local host is currently online. If it is determined that the local host is currently online, executing S103; if it is determined that the local host is not currently on-line, S104 is performed.
And S103, if the local host is currently online, controlling the power panel through the local host.
If the local host is judged to be on line currently, the power panel is controlled by the local host as shown in fig. 2.
And S104, if the local host is not on line currently, controlling the power panel through a control page of the remote host.
And if the local host is judged to be not on line currently, controlling the power panel through a control page of the remote host. For example, the remote host is a computer terminal, and the control page on the computer is used for controlling the power panel, as shown in fig. 2, so that the data of three slaves on the power panel can be monitored. When the remote host is on line, the connection of the local host is disconnected, the priority of the remote host is higher than that of the local host, and a double-host control mode can be realized through one hardware bus.
According to the embodiment of the disclosure, the local host and the remote host are connected to the same physical bus, the power panel is initialized and configured, whether the local host is on line or not is judged, if the local host is on line, the power panel is controlled through the local host, and if the local host is not on line, the power panel is controlled through a control page of the remote host. Compared with the prior art, the method and the device have the advantages that the local host and the remote host are connected to the same physical bus, the power panel is initialized and configured, whether the local host is on line or not is judged, if the local host is on line currently, the power panel is controlled through the local host, if the local host is off line currently, the power panel is controlled through the control page of the remote host, two paths of hardware buses are not required to be configured, a double-host control mode can be realized through one path of hardware buses, occupation of hardware resources can be reduced, and control cost is reduced. In addition, the output channel of the power panel is modularized, the output channel is replaced by the modularized slave computers, each modularized channel can be used as a slave computer to be mounted on the physical bus, the modularized channels are independent of each other and do not affect each other, even if hardware of one channel is damaged, normal use of the power panel is not affected, the number of the slave computers can be configured according to requirements, different identifiers are set for distinguishing the power panel, and the power panel is high in expansibility.
Fig. 3 is a flowchart of a power panel control method according to another embodiment of the present disclosure, as shown in fig. 3, the method includes the following steps:
s301, reading configuration data of a power panel, wherein the configuration data comprises current configuration information, voltage configuration information, default parameter information and calibration parameter information.
The electronic equipment reads configuration data of the power panel, wherein the configuration data comprises current configuration information, voltage configuration information, default parameter information and calibration parameter information. For example, a power strip management thread may be established by which configuration data of the power strip is read.
In some embodiments, the current configuration information includes an input current, an output current, and the voltage configuration information includes an input voltage, an output voltage.
S302, initializing and configuring the power panel according to the configuration data.
After the configuration data of the power panel are read, the electronic equipment performs initialization configuration on the power panel according to the configuration data.
S303, responding to the operation of acquiring target data on the local host by a user, and sending a request for acquiring the target data to the target slave.
For example, the user obtains the output voltage and the output current of the slave 1, the target data is the output voltage and the output current, the target slave is the slave 1, the user performs an operation of obtaining the target data on the local host, and the electronic device responds to the operation of obtaining the target data on the local host by the user and sends a request for obtaining the target data to the target slave.
And S304, if the target data returned by the target slave is received, determining that the local host is currently online.
And after receiving a request for acquiring the target data sent by the electronic equipment, the target slave machine inquires the target data and returns the target data to the electronic equipment. And if the target data returned by the target slave is received, determining that the local host is currently online. In some embodiments, when target data returned by the target slave is received, the target data may be displayed on a display panel of the local host.
In some embodiments, if target data returned by the target slave is not received, it is determined that the local master is not currently online.
S305, responding to the operation of clicking a key on the local host by a user, and obtaining an operation type and operation data, wherein the operation type comprises a read data type and a write data type.
In this step, after determining that the local host is currently online, the user clicks a key on the local host, for example, inputs an operation to be performed on the local host, where the operation to be performed may be writing data in the slave 2 or reading voltage data of the slave 3, which is not limited in this embodiment. And the electronic equipment responds to the operation of clicking a key on the local host by a user to obtain an operation type and operation data, wherein the operation type comprises a read data type and a write data type. In some embodiments, the read data type and the write data type each have corresponding type identification information from which the current operation type can be identified.
S306, controlling the power panel according to the operation type and the operation data.
After obtaining the operation type and the operation data, the electronic device may control the power panel according to the operation type and the operation data.
In some embodiments, S306 may include, but is not limited to, S3061, S3062, S3063, S3064:
s3061, if the operation type is the read data type, determining identification information of the target slave machine and data to be read from the operation data.
When the operation type is the read data type, the electronic equipment determines the identification information of the target slave machine and the data to be read from the operation data.
S3062, searching state data of the target slave corresponding to the identification information of the target slave.
In some optional embodiments, the state data of each slave on the power panel is stored in a register, and the electronic device can find the state data of the target slave according to the identification information of the target slave.
S3063, reading data to be read from the state data of the target slave.
Further, the electronic equipment reads the data to be read from the state data of the target slave.
And S3064, displaying the data to be read on a display panel of the local host.
After the data to be read is read, the electronic equipment displays the data to be read on a display panel of the local host.
According to the embodiment of the disclosure, the configuration data of the power panel is read, wherein the configuration data comprises current configuration information, voltage configuration information, default parameter information and calibration parameter information, and the power panel is initialized and configured according to the configuration data. Further, in response to an operation of acquiring target data on a local host by a user, a request for acquiring the target data is sent to a target slave, and if the target data returned by the target slave is received, the local host is determined to be on line currently. And further, responding to the operation of clicking a key on the local host by a user, and obtaining an operation type and operation data, wherein the operation type comprises a read data type and a write data type, and the power panel is controlled according to the operation type and the operation data. When the local host is determined to be currently online, the operation type and the operation data are obtained in response to the operation of clicking the key by the user on the local host, wherein the operation type comprises the read data type and the write data type, and the power panel is controlled according to the operation type and the operation data.
Fig. 4 is a flowchart of a power panel control method according to another embodiment of the present disclosure, as shown in fig. 4, the method includes the following steps:
s401, initializing and configuring the power panel.
Specifically, the implementation process and principle of S401 and S101 are identical, and will not be described herein.
S402, judging whether the local host is on line currently, if so, executing S403, otherwise, executing S407.
After the power panel is initialized and configured, whether the local host is on line or not is judged. If the local host is currently online, performing S403 and steps after S403; if the local host is not currently on-line, S407 is performed.
S403, responding to the operation of clicking a key on the local host by a user, and obtaining an operation type and operation data, wherein the operation type comprises a read data type and a write data type.
Specifically, the implementation process and principle of S403 and S305 are consistent, and will not be described herein.
S404, if the operation type is the write-in data type, determining the identification information, the target address and the data to be written of the target slave machine from the operation data.
In this step, the electronic device determines whether the operation type is a write data type, and if the operation type is a write data type, determines identification information, a target address, and data to be written of the target slave from the operation data. In some embodiments, when the power panel management thread of the electronic device determines that the operation type is a write-in data type, the power panel management thread sends the operation data to a control thread, and determines, from the operation data, identification information, a target address and data to be written in of a target slave through the control thread.
S405, determining the target slave according to the identification information of the target slave.
After determining the identification information of the target slave, the electronic device may determine the target slave according to the identification information of the target slave. Specifically, after the control thread of the electronic device determines the identification information of the target slave, the control thread determines the target slave according to the identification information of the target slave.
S406, writing the data to be written into the target address of the target slave.
After determining a target slave, the electronic equipment writes the data to be written into the target address of the target slave. Specifically, the control thread of the electronic device writes the data to be written into the target address of the target slave.
S407, if the local host is not on line currently, controlling the power panel through a control page of the remote host.
Specifically, the implementation process and principle of S407 and S104 are consistent, and will not be described here again.
In some embodiments, after the control of the power panel by the control page of the remote host, the method further includes: and responding to the switching operation of the user on the control page of the remote host, disconnecting the power panel from the remote host, and establishing the connection between the power panel and the local host.
In this embodiment, the electronic device responds to the switching operation of the user on the control page of the remote host, disconnects the connection between the power panel and the remote host, and establishes the connection between the power panel and the local host, so as to implement dual switching between the remote host and the local host.
According to the embodiment of the disclosure, by carrying out initialization configuration on the power panel, whether the local host is on line or not is judged, if the local host is on line, the operation type and the operation data are obtained in response to the operation of clicking a key on the local host by a user, wherein the operation type comprises a read data type and a write data type. Further, if the operation type is a write-in data type, determining identification information, a target address and data to be written in of a target slave from the operation data, determining the target slave according to the identification information of the target slave, and further writing the data to be written in into the target address of the target slave. And if the local host is not on line, controlling the power panel through a control page of the remote host. Because the judging basis is set, the power panel is controlled according to different judging results, and compared with the prior art, the dual-host control mode can be realized through one hardware bus without configuring two hardware buses, so that the occupation of hardware resources can be reduced, and the control cost is reduced.
Fig. 5 is a schematic structural diagram of a power panel control device according to an embodiment of the present disclosure. The power panel control apparatus may be the terminal device of the above embodiment, or the power panel control apparatus may be a part or component in the terminal device. The power panel control apparatus provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the power panel control method, as shown in fig. 5, the power panel control apparatus 50 includes: the configuration module 51, the judgment module 52, the first control module 53 and the second control module 54; the configuration module 51 is configured to perform initialization configuration on the power panel; the judging module 52 is used for judging whether the local host is on line currently; the first control module 53 is configured to control a power panel through the local host if the local host is currently online; the second control module 54 is configured to control the power panel through a control page of the remote host if the local host is not currently on-line.
Optionally, when the configuration module 51 performs the initialization configuration on the power panel, the configuration module is specifically configured to: reading configuration data of a power panel, wherein the configuration data comprises current configuration information, voltage configuration information, default parameter information and calibration parameter information; and initializing and configuring the power panel according to the configuration data.
Optionally, the determining module 52 is specifically configured to: responding to the operation of a user for acquiring target data on a local host, and sending a request for acquiring the target data to a target slave; and if the target data returned by the target slave is received, determining that the local host is currently online.
Optionally, when the first control module 53 controls the power panel through the local host, the first control module is specifically configured to: responding to the operation of clicking a key on a local host by a user, and obtaining an operation type and operation data, wherein the operation type comprises a read data type and a write data type; and controlling the power panel according to the operation type and the operation data.
Optionally, when the first control module 53 controls the power panel according to the operation type and the operation data, the first control module is specifically configured to: if the operation type is a read data type, determining identification information of a target slave machine and data to be read from the operation data; searching state data of the target slave corresponding to the identification information of the target slave; reading data to be read from the state data of the target slave machine; and displaying the data to be read on a display panel of the local host.
Optionally, when the first control module 53 controls the power panel according to the operation type and the operation data, the first control module is specifically configured to: if the operation type is the write-in data type, determining the identification information, the target address and the data to be written of the target slave machine from the operation data; determining a target slave according to the identification information of the target slave; and writing the data to be written into the target address of the target slave.
Optionally, the apparatus further includes: a switching module 55; the switching module 55 is configured to disconnect the power panel from the remote host and establish a connection between the power panel and the local host in response to a switching operation of the user on a control page of the remote host.
The power panel control device of the embodiment shown in fig. 5 may be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. The electronic device provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the power panel control method, as shown in fig. 6, the electronic device 60 includes: a memory 61, a processor 62, computer programs and a communication interface 63; wherein the computer program is stored in the memory 61 and configured to be executed by the processor 62 for the power panel control method as described above.
In addition, the embodiment of the present disclosure also provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the power panel control method described in the above embodiment.
Further, the embodiments of the present disclosure also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement the power panel control method as described above.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
initializing and configuring a power panel;
judging whether the local host is on line currently or not;
if the local host is currently online, controlling a power panel through the local host;
and if the local host is not on line currently, controlling the power panel through a control page of the remote host.
In addition, the electronic device may also perform other steps in the power panel control method as described above.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A power strip control method, characterized in that a local host and a remote host are connected to the same physical bus in advance, an output channel of the power strip is modularized, and a modularized slave replaces the output channel, the method comprising:
initializing and configuring a power panel;
judging whether the local host is on line currently or not;
if the local host is currently online, controlling a power panel through the local host;
and if the local host is not on line currently, controlling the power panel through a control page of the remote host.
2. The method of claim 1, wherein the initializing the power panel comprises:
reading configuration data of a power panel, wherein the configuration data comprises current configuration information, voltage configuration information, default parameter information and calibration parameter information;
and initializing and configuring the power panel according to the configuration data.
3. The method of claim 1, wherein determining whether the local host is currently online comprises:
responding to the operation of a user for acquiring target data on a local host, and sending a request for acquiring the target data to a target slave;
and if the target data returned by the target slave is received, determining that the local host is currently online.
4. The method of claim 1, wherein the controlling the power panel by the local host comprises:
responding to the operation of clicking a key on a local host by a user, and obtaining an operation type and operation data, wherein the operation type comprises a read data type and a write data type;
and controlling the power panel according to the operation type and the operation data.
5. The method of claim 4, wherein controlling the power panel according to the operation type and the operation data comprises:
if the operation type is a read data type, determining identification information of a target slave machine and data to be read from the operation data;
searching state data of the target slave corresponding to the identification information of the target slave;
reading data to be read from the state data of the target slave machine;
and displaying the data to be read on a display panel of the local host.
6. The method of claim 4, wherein controlling the power panel according to the operation type and the operation data comprises:
if the operation type is the write-in data type, determining the identification information, the target address and the data to be written of the target slave machine from the operation data;
determining a target slave according to the identification information of the target slave;
and writing the data to be written into the target address of the target slave.
7. The method of claim 1, wherein after the control of the power panel by the control page of the remote host, the method further comprises:
and responding to the switching operation of the user on the control page of the remote host, disconnecting the power panel from the remote host, and establishing the connection between the power panel and the local host.
8. A power panel control device is characterized in that a local host and a remote host are connected to the same physical bus in advance, an output channel of the power panel is modularized, and a modularized slave replaces the output channel, and the device comprises:
the configuration module is used for carrying out initialization configuration on the power panel;
the judging module is used for judging whether the local host is on line currently;
the first control module is used for controlling a power panel through the local host if the local host is on line currently;
and the second control module is used for controlling the power panel through a control page of the remote host if the local host is not on line currently.
9. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202310555275.0A 2023-05-15 2023-05-15 Power panel control method and device, electronic equipment and storage medium Pending CN116679814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310555275.0A CN116679814A (en) 2023-05-15 2023-05-15 Power panel control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310555275.0A CN116679814A (en) 2023-05-15 2023-05-15 Power panel control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116679814A true CN116679814A (en) 2023-09-01

Family

ID=87782779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310555275.0A Pending CN116679814A (en) 2023-05-15 2023-05-15 Power panel control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116679814A (en)

Similar Documents

Publication Publication Date Title
CN103229478B (en) A kind of method and apparatus determining virtual-machine drift
CN114048164B (en) Chip interconnection method, system, device and readable storage medium
MX2014009070A (en) Characteristic information acquisition method, device and network equipment.
CN104516838A (en) Management path determining method and device
CN110609656B (en) Storage management method, electronic device, and computer program product
US11575540B2 (en) Method and system for managing network-to-network interconnection
CN113098787B (en) Flow processing method and equipment
CN116679814A (en) Power panel control method and device, electronic equipment and storage medium
US8738816B2 (en) Management of detected devices coupled to a host machine
KR20180074128A (en) Diagnosis message routing system and method for gateway of vehicle
CN113434089B (en) Data moving method and device and PCIE system
CN114650223B (en) Network configuration method and device of Kubernetes cluster and electronic equipment
CN116126613A (en) Position detection method and device of PCIe (peripheral component interconnect express) equipment, electronic equipment and storage medium
CN112714420B (en) Network access method and device of wifi hotspot providing equipment and electronic equipment
CN115374042A (en) Bus switching method, device, equipment and medium
CN114546444A (en) Vehicle upgrading method and device, electronic equipment, medium and automatic driving vehicle
US10795848B2 (en) Dual way communication method, system, and master device thereof
CN110673799B (en) Cluster partnership establishment method, system, equipment and computer medium
CN113961497A (en) Communication circuit system, method, chip and storage medium
CN116599917B (en) Network port determining method, device, equipment and storage medium
KR20190130812A (en) A vehicle and method for controlling communication thereof
CN114338358B (en) Data interaction method, device, storage medium and PLC
US11516936B2 (en) Hybrid management switch/cabling system
US20230318979A1 (en) Bidirectional ring-based interconnection networks for multiprocessors
US10803008B2 (en) Flexible coupling of processor modules

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination