Control method, device and equipment
By using CPLD in the device to receive server control requests and perform CPU reset or power management, the problem of low control flexibility after the device CPU crashes is solved, remote control is achieved and security is improved.
Patent Information
- Application Number
- CN202411837001.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-01
AI Technical Summary
The central processor (CPU) may crash during operation, resulting in less flexibility in device control and requires manual operation or a higher cost substrate manager (BMC) for reset or control.
By introducing complex programmable logic devices (CPLDs) into the device, the CPLD receives the control request sent by the server, obtains the corresponding control instructions, and resets the CPU according to the instructions or controls the power module to power the device up and down.
Remote reset and power management of device CPU are realized, improving the flexibility and security of device control, and avoiding the needs of manual operation and high-cost BMC.
Smart Images

Figure CN119739273A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a device control method, apparatus, and device. Background Art
[0002] The central processing unit (CPU) of a device may freeze during operation. In this case, the device needs to be repaired.
[0003] In actual application, when it is determined that the device CPU is dead, the device can be manually reset through the device operation panel, or the system can be restored by pressing the power button. If a baseboard management controller (BMC) is set in the device, the CPU can be controlled by the BMC to reset or turn on and off the device. In the above process, manual operation or setting of a high-cost BMC control device is required, resulting in low flexibility in device control. Summary of the invention
[0004] The embodiments of the present application provide a control method, an apparatus and a device to solve the problem of low flexibility in device control.
[0005] In a first aspect, an embodiment of the present application provides a device control method, which is applied to a control device, wherein the control device includes a central processing unit (CPU), a complex programmable logic device (CPLD), and a power control module, and the method includes:
[0006] The CPLD receives a control request sent by a server, wherein the control request is used to request control of the CPU of the control device and the power control module, and the control request includes a first field;
[0007] The CPLD obtains a control instruction corresponding to the control request according to the first field;
[0008] According to the control instruction, the CPLD performs a reset process on the CPU, or the CPLD controls the power control module to perform power on and off process on the control device.
[0009] In a possible implementation, acquiring, according to the first field, a control instruction corresponding to the control request includes:
[0010] Get the preset fields;
[0011] If the first field matches the preset field, user information corresponding to the control request sent by the server is received, and a control instruction corresponding to the control request is obtained based on the user information, wherein the user information includes at least a user identifier and key information corresponding to the user identifier.
[0012] When the first field matches the preset field, the CPLD of the server receives the user information and obtains the control instruction corresponding to the control request according to the user information, instead of performing subsequent processing on each user information, thereby improving the security of the control device.
[0013] In a possible implementation, obtaining, according to the user information, a control instruction corresponding to the control request includes:
[0014] Acquire preset user information, the preset user information including a preset user identifier and preset key information corresponding to the preset user identifier;
[0015] Matching the user information with the preset user information to obtain a matching result, wherein the matching result is a matching success or a matching failure;
[0016] If the matching result is that the match is successful, a control instruction corresponding to the control request is obtained.
[0017] When the matching result is successful, the control instruction corresponding to the control request is obtained, rather than obtaining each control instruction, thereby improving the security of the control device.
[0018] In a possible implementation, matching the user information with the preset user information to obtain a matching result includes:
[0019] If the user identifier matches the preset user identifier, and the key information matches the preset key information, determining that the matching result is a successful match;
[0020] If the user identifier does not match the preset user identifier, and / or the key information does not match the preset key information, then the matching result is determined to be the matching failure.
[0021] Determine the matching result between the user information and the preset user information, so as to determine whether to obtain and execute the control instruction. Instead of executing each control instruction, the security of the control device is improved.
[0022] In a possible implementation, according to the control instruction, the CPLD performs a reset process on the CPU, or the CPLD controls the power control module to perform power on and off process on the control device, including:
[0023] If the control instruction is used to instruct to reset the CPU, the CPLD sends a reset signal to the CPU, so that the CPU is reset according to the reset signal;
[0024] If the control instruction is used to instruct to power on the control device, the CPLD sends a power-on signal to the power control module, so that the power control module controls the power supply of the control device to power on;
[0025] If the control instruction is used to instruct to power off the control device, the CPLD sends a power-off signal to the power control module, so that the power control module controls the power of the control device to power off.
[0026] CPLD can determine the corresponding signal according to the control instruction and control the device through the signal, thus improving the accuracy of device control.
[0027] In a possible implementation manner, the control device further includes a memory; and the method further includes:
[0028] If it is determined that the control device receives updated preset user information, after the power control module of the control device controls the power-on process of the control device, the preset user information stored in the memory is deleted and the updated preset user information is stored.
[0029] Users can update user information as needed, which improves the security of controlling devices and the flexibility of remote controlling devices.
[0030] In a second aspect, an embodiment of the present application provides a control device, the device comprising:
[0031] A receiving module, used for the CPLD to receive a control request sent by the server, wherein the control request is used to request to control the CPU and the power control module of the control device, and the control request includes a first field;
[0032] An acquisition module, used for the CPLD to acquire a control instruction corresponding to the control request according to the first field;
[0033] The processing module is used for, according to the control instruction, the CPLD performs a reset process on the CPU, or the CPLD controls the power control module to perform power on and off process on the control device.
[0034] In a possible implementation manner, the acquisition module is specifically used to:
[0035] Get the preset fields;
[0036] If the first field matches the preset field, user information corresponding to the control request sent by the server is received, and a control instruction corresponding to the control request is obtained based on the user information, wherein the user information includes at least a user identifier and key information corresponding to the user identifier.
[0037] In a possible implementation manner, the acquisition module is specifically used to:
[0038] Acquire preset user information, the preset user information including a preset user identifier and preset key information corresponding to the preset user identifier;
[0039] Matching the user information with the preset user information to obtain a matching result, wherein the matching result is a matching success or a matching failure;
[0040] If the matching result is that the match is successful, a control instruction corresponding to the control request is obtained.
[0041] In a possible implementation manner, the acquisition module is specifically used to:
[0042] If the user identifier matches the preset user identifier, and the key information matches the preset key information, determining that the matching result is a successful match;
[0043] If the user identifier does not match the preset user identifier, and / or the key information does not match the preset key information, then the matching result is determined to be the matching failure.
[0044] In a possible implementation manner, the processing module is specifically used to:
[0045] If the control instruction is used to instruct to reset the CPU, the CPLD sends a reset signal to the CPU, so that the CPU is reset according to the reset signal;
[0046] If the control instruction is used to instruct to power on the control device, the CPLD sends a power-on signal to the power control module, so that the power control module controls the power supply of the control device to power on;
[0047] If the control instruction is used to instruct to power off the control device, the CPLD sends a power-off signal to the power control module, so that the power control module controls the power of the control device to power off.
[0048] In a possible implementation manner, the device further includes a storage module.
[0049] Wherein, the storage module is used for:
[0050] If it is determined that the control device receives updated preset user information, after the power control module of the control device controls the power-on process of the control device, the preset user information stored in the memory is deleted and the updated preset user information is stored.
[0051] In a third aspect, an embodiment of the present application provides a control device, including:
[0052] at least one processor; and
[0053] a memory communicatively connected to the at least one processor; wherein,
[0054] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any method described in the first aspect.
[0055] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute any one of the methods in the first aspect.
[0056] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements any method in the first aspect when executed by a processor.
[0057] The device control method, apparatus and device provided in the embodiments of the present application are such that the control device can receive a control request sent by a server through a CPLD and obtain a control instruction corresponding to the control request. According to the control instruction, the CPU is reset through the CPLD, or the power control module is controlled by the CPLD to power on and off the control device. In this way, the user can remotely control the CPU and power supply of the device through the server, and the control device can reset or power on and off the CPU of the device through the CPLD. This avoids the situation where manual operation or the setting of a high-cost BMC control device is required after determining that the CPU has crashed. The flexibility of device control is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0059] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application;
[0060] Figure 2 A flow chart of a control method provided in an embodiment of the present application;
[0061] Figure 3 A schematic diagram of a process for receiving user information provided in an embodiment of the present application;
[0062] Figure 4 A flow chart of another control method provided in an embodiment of the present application;
[0063] Figure 5 A schematic diagram of a process of controlling a device provided in an embodiment of the present application;
[0064] Figure 6 A schematic diagram of the structure of a control device provided in an embodiment of the present application;
[0065] Figure 7 A schematic diagram of the structure of another control device provided in an embodiment of the present application;
[0066] Figure 8 A schematic diagram of the structure of a control device provided in an embodiment of the present application.
[0067] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0068] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0069] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0070] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0071] For ease of understanding, below, combined Figure 1 , the application scenarios to which the embodiments of the present application are applicable are described.
[0072] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 , including a first device 101, the first device can be a control device, a terminal device, a server, etc. The first device 101 is provided with a CPU, a power module, a complex programmable logic device (CPLD) and a BMC. When it is determined that the CPU of the first device 101 is dead, the device can be manually reset through the operation panel of the device, or the system can be restored by pressing the power button. The first device 101 can also control the CPU to reset or switch the device through the BMC.
[0073] In the above process, manual operation or setting of a high-cost BMC control device is required, resulting in low flexibility in device control.
[0074] In an embodiment of the present application, the control device can receive a control request sent by a server through a CPLD, and obtain a control instruction corresponding to the control request. According to the control instruction, the CPU is reset through the CPLD, or the power control module is controlled by the CPLD to power on and off the control device. In this way, the user can remotely control the CPU and power supply of the device through the server, and the control device can reset or power on and off the CPU of the device through the CPLD control device. This avoids the situation where manual operation or setting of a high-cost BMC control device is required after determining that the CPU has crashed. The flexibility of device control is improved.
[0075] The method shown in the present application is described below by means of specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.
[0076] Figure 2 A flow chart of a control method provided in an embodiment of the present application. Figure 2 , the method may include:
[0077] S201. CPLD receives a control request sent by a server.
[0078] The execution subject of the embodiment of the present application can be a control device, or a device control device arranged in the control device. The device control device can be implemented by software, or by a combination of software and hardware. The control device includes a CPU, a CPLD and a power control module.
[0079] The control request is used to request to control the CPU and the power control module of the control device, and the control request includes a first field.
[0080] After the server establishes a communication connection with the control device, when the user determines that the CPLD of the control device is faulty, or the user needs to control the control device, the user can send a control request to the server through the terminal device. The control request can be in the form of a message, data, etc. After receiving the control request, the server sends the control request to the CPU and CPLD of the control device.
[0081] The user can input the first field through the application in the terminal device. The terminal device generates a control request in response to the user's input selection request and sends the control request to the server.
[0082] For example, a user enters field 1 in an application of a terminal device, and the terminal device generates a control request in response to the user's input selection request. The control request is used to request control of the CPU and power control module of the control device, and the control request includes field 1. The terminal device sends the control request to the server. After receiving the control request, the server sends the control request to the CPU and CPLD of the control device.
[0083] S202: The CPLD obtains a control instruction corresponding to the control request according to the first field.
[0084] The CPLD can obtain the control instruction corresponding to the control request according to the first field in the following manner: obtain the preset field; if the first field matches the preset field, receive the user information corresponding to the control request sent by the server, and obtain the control instruction corresponding to the control request according to the user information, wherein the user information includes at least a user identifier and key information corresponding to the user identifier.
[0085] The server also includes a memory. The preset fields can be set in advance and stored in the memory.
[0086] When the CPLD determines that the first field matches the preset field, a response instruction is sent to the server. After receiving the response instruction, the server displays the operation page through the terminal device. The user can enter user information in the operation page, and the terminal device sends the user information to the server in response to the user's input operation. The server sends the user information to the CPLD of the control device.
[0087] The key information may be a password, fingerprint information, face information, etc. The key information may be determined according to user needs and usage scenarios, and this application does not impose any restrictions.
[0088] Next, combine Figure 3 , a process of CPLD receiving user information corresponding to a control request sent by a server is described. Figure 3 A schematic diagram of the process of receiving user information provided in the embodiment of the present application. Figure 3 , including interface 301~interface 302. Interface 301~interface 302 can be pages provided for the terminal device. Please refer to interface 301, assuming that the preset field is field 1, according to the above example, it can be determined that the first field matches the preset field. Therefore, the CPLD sends a response instruction to the server. After receiving the response instruction, the server displays the operation page through the terminal device. The operation page includes a drop-down selection menu corresponding to the user identification, a drop-down menu corresponding to the key information, and a text input box.
[0089] Referring to interface 302, the user determines that the user ID is user A in the drop-down selection menu corresponding to the user ID, determines that the key information is password A in the drop-down menu corresponding to the key information, and clicks the confirmation icon. The terminal device generates user information in response to the user's input selection operation. And sends the user information to the server. After receiving the user information, the server sends the user information to the CPLD of the control device.
[0090] When the control device determines that the user information matches the preset user information stored in the memory, the control device continues to receive the control instruction.
[0091] When the first field matches the preset field, the CPLD of the server receives the user information and obtains the control instruction corresponding to the control request according to the user information, instead of performing subsequent processing on each user information, thereby improving the security of the control device.
[0092] The CPU and CPLD of the control device are respectively provided with a transmitting end and a receiving end. The server sends data to the CPU and the CPLD, and the receiving end of the CPU and the receiving end of the CPLD receive the data at the same time. When the data sent by the server needs to be processed by the CPU, the CPU can process the data and obtain the processing result. And send the processing result to the CPLD through the sending end of the CPU. The CPLD can receive the processing result through the receiving end and send the processing result to the server in a transparent transmission manner. When the data sent by the server includes a control request, the CPLD does not transparently transmit the data to the server when receiving the data sent by the CPU. At this time, the CPLD receives user information and receives control instructions based on the user information.
[0093] S203: According to the control instruction, the CPLD resets the CPU, or the CPLD controls the power control module to power on and off the control device.
[0094] The CPLD can determine the reset signal or the power-on / off signal according to the control instruction, thereby resetting the CPU, or controlling the power control module to power on and off the control device.
[0095] For example, according to the above example, it is determined that the user information includes user A and password A. The CPLD determines that the user information matches the preset user information stored in the memory. At this time, the CPLD receives a control instruction, which is used to instruct the CPU to reset. The CPLD sends a reset signal to the CPU, and after the CPU receives the reset signal, it resets according to the reset signal.
[0096] In the control method provided by the embodiment of the present application, the CPLD receives a control request sent by the server. The CPLD obtains the control instruction corresponding to the control request according to the first field. According to the control instruction, the CPLD resets the CPU, or the CPLD controls the power control module to power on and off the control device. In this way, the user can remotely control the CPU and power supply of the device through the server, and the control device resets or powers on and off the CPU of the device through the CPLD. This avoids the situation where manual operation or setting of a high-cost BMC control device is required after determining that the CPU has crashed. The flexibility of device control is improved.
[0097] Based on any of the above embodiments, Figure 4 , the detailed process of controlling the equipment is explained.
[0098] Figure 4 This is a flow chart of another control method provided in the embodiment of the present application. Figure 4 , the method comprising:
[0099] S401: Receive a control request sent by a server.
[0100] It should be noted that Figure 4 The execution subject of the illustrated embodiment is a CPLD in the control device.
[0101] It should be noted that the execution process of S401 can refer to S201 and will not be repeated here.
[0102] S402: Obtain a preset field.
[0103] The CPLD can obtain the preset fields from the memory of the control device.
[0104] S403: If the first field matches the preset field, receive user information corresponding to the control request sent by the server.
[0105] If the first field and the preset field do not match, the control request is not processed and the control device continues to operate normally.
[0106] For example, the control request sent by the server received by the CPLD includes field 2, and the CPLD determines that the first field matches the preset field. Therefore, the user information corresponding to the control request sent by the server received by the CPLD includes user B and password B.
[0107] S404: Obtain preset user information.
[0108] The preset user information includes a preset user identifier and preset key information corresponding to the preset user identifier.
[0109] The preset user information may be set in advance and stored in a memory of the control device.
[0110] For example, the CPLD obtains preset user information including user B and password B in the memory.
[0111] The user can also update the preset user information through the terminal device. The terminal device can send the updated preset user information to the server. After receiving the updated preset user information, the server sends the preset user information to the CPLD of the control device. If the CPLD of the control device determines that the control device has received the updated preset user information, after the power control module of the control device controls the power supply of the control device to power on, the preset user information stored in the memory is deleted, and the updated preset user information is stored.
[0112] Users can update user information as needed, which improves the security of controlling devices and the flexibility of remote controlling devices.
[0113] For example, the preset user information stored in the memory of the control device includes user B and password B. When the CPLD of the control device determines that the received updated user information includes user B and password B1, the CPLD of the control device caches the updated preset storage information, and after the power control module of the control device controls the power-on processing of the control device, that is, after the control device is turned on again, the user B and password B stored in the memory are deleted, and the user B and password B1 are stored.
[0114] S405: Match the user information with the preset user information to obtain a matching result.
[0115] The matching result is a successful match or a failed match.
[0116] The user information and the preset user information can be matched in the following manner to obtain a matching result: if the user identifier matches the preset user identifier, and the key information matches the preset key information, the matching result is determined to be a successful match; if the user identifier does not match the preset user identifier, and / or the key information does not match the preset key information, the matching result is determined to be a failed match.
[0117] Determine the matching result between the user information and the preset user information, so as to determine whether to obtain and execute the control instruction. Instead of executing each control instruction, the security of the control device is improved.
[0118] For example, according to the above example, it is determined that the user information includes user B and password B, and the preset user information includes user B and password B. The CPLD determines that the user identifier matches the preset user identifier, and the key information matches the preset key information. Therefore, the CPLD determines that the matching result is a successful match.
[0119] S406: If the matching result is successful, obtain the control instruction corresponding to the control request.
[0120] If the matching result is a match failure, a prompt message is generated and sent to the server so that the server displays the prompt message through the terminal device. The prompt message indicates that the user information is wrong.
[0121] If the matching result is successful, the CPLD of the control device sends a response message to the server. The server displays the control page through the terminal device according to the response message. The user can enter the control instruction in the control page. The terminal device generates the control instruction in response to the user's input operation and sends the control instruction to the server. After receiving the control instruction, the server sends the control instruction to the CPLD of the control device.
[0122] For example, according to the above example, it is determined that the matching result is a successful match. At this time, the control instruction corresponding to the control request sent by the CPLD and received by the server is control instruction B.
[0123] S407: According to the control instruction, the CPLD resets the CPU, or the CPLD controls the power control module to power on and off the control device.
[0124] The CPLD can reset the CPU or control the power supply control module to power on and off the control device according to the control instruction in the following manner: if the control instruction is used to instruct the CPU to be reset, the CPLD sends a reset signal to the CPU so that the CPU is reset according to the reset signal; if the control instruction is used to instruct the control device to be powered on, the CPLD sends a power-on signal to the power supply control module so that the power supply control module controls the power supply of the control device to be powered on; if the control instruction is used to instruct the control device to be powered off, the CPLD sends a power-off signal to the power supply control module so that the power supply control module controls the power supply of the control device to be powered off.
[0125] The reset signal may be an RST (Reset) signal. The power-on signal and the power-off signal may be enable signals.
[0126] CPLD can determine the corresponding signal according to the control instruction and control the device through the signal, thus improving the accuracy of device control.
[0127] For example, according to the above example, the control instruction is determined to be control instruction B, and control instruction B is used to instruct to reset the CPU. At this time, the CPLD sends a reset signal to the CPU, and after receiving the reset signal, the CPU resets according to the reset signal.
[0128] The control method provided in the embodiment of the present application receives a control request sent by a server. Obtain a preset field. If the first field matches the preset field, then receive the user information corresponding to the control request sent by the server. Obtain the preset user information. Match the user information with the preset user information to obtain a matching result. If the matching result is a successful match, obtain the control instruction corresponding to the control request. According to the control instruction, the CPLD resets the CPU, or the CPLD controls the power control module to power on and off the control device. In this way, the user can remotely control the CPU and power supply of the device through the server, and the control device resets or powers on and off the CPU of the device through the CPLD control device. Avoid the situation where manual operation or setting of a high-cost BMC control device is required after determining that the CPU has crashed. Improve the flexibility of device control. And the CPLD obtains the control instruction based on the matching result between the user information and the preset user information, avoids unverified users controlling the device, and improves the security of the control device.
[0129] Based on any of the above embodiments, Figure 5 , the process of controlling the equipment is illustrated with examples.
[0130] Figure 5 This is a schematic diagram of the process of controlling the device provided in the embodiment of the present application. Figure 5 , including a terminal device 501, a server 502 and a control device 503. The terminal device 501 can be a mobile phone, a tablet computer, a computer, etc. The control device 503 includes a CPU, a CPLD, a power control module and a memory. Among them, the memory can be an electrically erasable programmable read-only memory (Electrically-Erasable Programmable Read-Only Memory, E2PROM). When the control device 503 operates normally, the CPU and CPLD of the control device 503 simultaneously receive data sent by the sending end of the server 502. The CPU of the control device 503 processes the data, obtains the processing result, and sends the processing result to the CPLD. The CPLD of the control device 503 sends the processing result to the server 502 in a transparent transmission manner.
[0131] When it is determined that the CPU of the control device 503 is faulty, the user can enter the first field in the application of the terminal device 501. The terminal device 501 generates a control request in response to the user's input operation. The control request controls the CPU and the power control module of the control device 503, and the control request includes field 3. The terminal device 501 sends a control request to the server 502. After receiving the control request through the receiving end, the server 502 sends the control request to the CPU and CPLD of the control device 503 through the sending end. The CPLD of the control device 503 obtains the preset field in the memory, and determines that the first field matches the preset field. At this time, when the CPLD of the control device 503 receives the data sent by the CPU, it does not transparently transmit the data to the server.
[0132] The CPLD of the control device 503 sends a response instruction to the server 502. After receiving the response instruction through the receiving end, the server 502 displays the operation page through the application of the terminal device 501. The user can enter user information in the operation page, and the terminal device 501 sends the user information to the server 502 in response to the user's input operation. The server 502 sends the user information to the CPLD of the control device 503 through the sending end. The user information includes user C and password C. The CPLD of the control device 503 obtains the preset user information including user C and password C in the memory.
[0133] The CPLD of the control device 503 matches the user information with the preset user information, and obtains a matching result of successful matching. The CPLD of the control device 503 sends a response message to the server 502. The server 502 displays a control page through the terminal device 501 according to the response message. The user can enter a control instruction in the control page, and the terminal device 501 generates a control instruction in response to the user's input operation and sends the control instruction to the server. After receiving the control instruction through the receiving end, the server 502 sends the control instruction to the CPLD of the control device 503 through the sending end.
[0134] After receiving the control instruction, the CPLD of the control device 503 determines that the control instruction is used to instruct the control device to power off, and then the CPLD of the control device 503 sends a power-off signal to the power control module. The power control module of the control device 503 controls the power of the control device 503 to power off according to the power-off signal.
[0135] The control process provided in the embodiment of the present application receives a control request sent by a server. Obtain a preset field. If the first field matches the preset field, the user information corresponding to the control request sent by the server is received. Obtain the preset user information. The user information is matched with the preset user information to obtain a matching result. If the matching result is a successful match, the control instruction corresponding to the control request is obtained. According to the control instruction, the CPLD resets the CPU, or the CPLD controls the power control module to power on and off the control device. In this way, the user can remotely control the CPU and power supply of the device through the server, and the control device resets or powers on and off the CPU of the device through the CPLD control device. Avoid the situation where manual operation or setting of a high-cost BMC control device is required after determining that the CPU has crashed. Improve the flexibility of device control. And the CPLD obtains the control instruction based on the matching result between the user information and the preset user information, avoids unverified users controlling the device, and improves the security of the control device.
[0136] Figure 6 This is a schematic diagram of the structure of a control device provided in an embodiment of the present application. Figure 6 , the equipment control device 10 may include:
[0137] A receiving module 11, used for the CPLD to receive a control request sent by the server, wherein the control request is used to request to control the CPU and the power control module of the control device, and the control request includes a first field;
[0138] An acquisition module 12, configured for the CPLD to acquire a control instruction corresponding to the control request according to the first field;
[0139] The processing module 13 is used for, according to the control instruction, the CPLD performs a reset process on the CPU, or the CPLD controls the power control module to perform power on and off process on the control device.
[0140] In a possible implementation manner, the acquisition module 12 is specifically configured to:
[0141] Get the preset fields;
[0142] If the first field matches the preset field, user information corresponding to the control request sent by the server is received, and a control instruction corresponding to the control request is obtained based on the user information, wherein the user information includes at least a user identifier and key information corresponding to the user identifier.
[0143] In a possible implementation manner, the acquisition module 12 is specifically configured to:
[0144] Acquire preset user information, the preset user information including a preset user identifier and preset key information corresponding to the preset user identifier;
[0145] Matching the user information with the preset user information to obtain a matching result, wherein the matching result is a matching success or a matching failure;
[0146] If the matching result is that the match is successful, a control instruction corresponding to the control request is obtained.
[0147] In a possible implementation manner, the acquisition module 12 is specifically configured to:
[0148] If the user identifier matches the preset user identifier, and the key information matches the preset key information, determining that the matching result is a successful match;
[0149] If the user identifier does not match the preset user identifier, and / or the key information does not match the preset key information, then the matching result is determined to be the matching failure.
[0150] In a possible implementation manner, the processing module 13 is specifically used to:
[0151] If the control instruction is used to instruct to reset the CPU, the CPLD sends a reset signal to the CPU, so that the CPU is reset according to the reset signal;
[0152] If the control instruction is used to instruct to power on the control device, the CPLD sends a power-on signal to the power control module, so that the power control module controls the power supply of the control device to power on;
[0153] If the control instruction is used to instruct to power off the control device, the CPLD sends a power-off signal to the power control module, so that the power control module controls the power of the control device to power off.
[0154] The control device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0155] Figure 7 A schematic diagram of the structure of another control device provided in an embodiment of the present application. Figure 6 Based on the examples shown, see Figure 7 The equipment control device 10 also includes a storage module 14.
[0156] Wherein, the storage module 14 is used for:
[0157] If it is determined that the control device receives updated preset user information, after the power control module of the control device controls the power-on process of the control device, the preset user information stored in the memory is deleted and the updated preset user information is stored.
[0158] The control device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0159] Figure 8 This is a schematic diagram of the structure of the control device provided in the embodiment of the present application. The control device may be the control device shown in the above embodiment, see Figure 8 The control device 20 may include: a memory 21 and a processor 22. Exemplarily, the memory 21 and the processor 22 are interconnected via a bus 23.
[0160] The memory 21 is used to store program instructions;
[0161] The processor 22 is used to execute the program instructions stored in the memory, so as to enable the control device 20 to execute the method shown in the above method embodiment.
[0162] The control device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0163] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above method.
[0164] The embodiment of the present application may also provide a computer program product, including a computer program, which can implement the above method when executed by a processor.
[0165] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The above-mentioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the above-mentioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid state drive, magnetic tape, floppy disk, optical disc and any combination thereof.
[0166] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0167] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0169] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0170] In the present application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". The terms "first", "second", etc. in the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In the present application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.
Claims
1. A control method, characterized in that: Applied to a control device, the control device includes a central processing unit CPU, a complex programmable logic device CPLD and a power control module, and the method includes: The CPLD receives a control request sent by a server, wherein the control request is used to request control of the CPU of the control device and the power control module, and the control request includes a first field; The CPLD obtains a control instruction corresponding to the control request according to the first field; According to the control instruction, the CPLD performs a reset process on the CPU, or the CPLD controls the power control module to perform power on and off process on the control device.
2. The method according to claim 1, characterized in that Acquiring, according to the first field, a control instruction corresponding to the control request, including: Get the preset fields; If the first field matches the preset field, user information corresponding to the control request sent by the server is received, and a control instruction corresponding to the control request is obtained based on the user information, wherein the user information includes at least a user identifier and key information corresponding to the user identifier.
3. The method according to claim 2, characterized in that Acquiring a control instruction corresponding to the control request according to the user information includes: Acquire preset user information, the preset user information including a preset user identifier and preset key information corresponding to the preset user identifier; Matching the user information with the preset user information to obtain a matching result, wherein the matching result is a matching success or a matching failure; If the matching result is that the match is successful, a control instruction corresponding to the control request is obtained.
4. The method according to claim 3, characterized in that: The user information is matched with the preset user information to obtain a matching result, including: If the user identifier matches the preset user identifier, and the key information matches the preset key information, determining that the matching result is a successful match; If the user identifier does not match the preset user identifier, and / or the key information does not match the preset key information, then the matching result is determined to be the matching failure.
5. The method according to any one of claims 1 to 4, characterized in that: According to the control instruction, the CPLD performs a reset process on the CPU, or the CPLD controls the power control module to perform power on and off process on the control device, including: If the control instruction is used to instruct to reset the CPU, the CPLD sends a reset signal to the CPU, so that the CPU is reset according to the reset signal; If the control instruction is used to instruct to power on the control device, the CPLD sends a power-on signal to the power control module, so that the power control module controls the power supply of the control device to power on; If the control instruction is used to instruct to power off the control device, the CPLD sends a power-off signal to the power control module, so that the power control module controls the power of the control device to power off.
6. The method according to any one of claims 1 to 5, characterized in that: The control device further includes a memory; and the method further includes: If it is determined that the control device receives updated preset user information, after the power control module of the control device controls the power-on process of the control device, the preset user information stored in the memory is deleted and the updated preset user information is stored.
7. A control device, characterized in that: The device comprises: A receiving module, used for the CPLD to receive a control request sent by the server, wherein the control request is used to request to control the CPU and the power control module of the control device, and the control request includes a first field; An acquisition module, used for the CPLD to acquire a control instruction corresponding to the control request according to the first field; The processing module is used for, according to the control instruction, the CPLD performs a reset process on the CPU, or the CPLD controls the power control module to perform power on and off process on the control device.
8. A control device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: in, The computer instructions are used to make a computer execute the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Reset control device and method
CN102508533A
System and method for controlling restart of server
CN117234812A
Server mainboard power-off control method and device, computer equipment and storage medium
CN117784905A
Server remote shutdown method and device
CN117971026A
Power supply control method and device of server, storage medium and electronic equipment
CN119002672A