WO2023138101A1 - Wake-on-lan method and computer device - Google Patents

Wake-on-lan method and computer device Download PDF

Info

Publication number
WO2023138101A1
WO2023138101A1 PCT/CN2022/122790 CN2022122790W WO2023138101A1 WO 2023138101 A1 WO2023138101 A1 WO 2023138101A1 CN 2022122790 W CN2022122790 W CN 2022122790W WO 2023138101 A1 WO2023138101 A1 WO 2023138101A1
Authority
WO
WIPO (PCT)
Prior art keywords
startup
identification information
wake
target object
instruction information
Prior art date
Application number
PCT/CN2022/122790
Other languages
French (fr)
Chinese (zh)
Inventor
翟庆伟
王兴隆
李金锋
Original Assignee
苏州浪潮智能科技有限公司
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 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2023138101A1 publication Critical patent/WO2023138101A1/en

Links

Images

Classifications

    • 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/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular, to a method for waking up on network and a computer device.
  • Wake On LAN is a wake-up on LAN technology, which can wake up a machine that is in a dormant or shut-down state and make it enter a working or power-on state by sending a data packet of wake-up on LAN to the network card of the target machine.
  • Wake-on-LAN boot technology is of great significance for servers without a Baseboard Management Controller (BMC) out-of-band management chip.
  • BMC Baseboard Management Controller
  • this technology can only wake up the target machine and then enter the first boot item, but cannot control the boot behavior after boot. Enter the U disk to start, the operation is cumbersome, and the current wake-up on network technology is not enough.
  • the present application provides a wake-up from network start-up method and computer equipment to solve the technical problem that the data packet in the wake-up from LAN technology in the prior art can only wake up a machine in a dormant or shut-down state, so that it enters a working or booting state, but cannot control the start-up behavior after booting.
  • the present application provides a method for wake-up from network, the method corresponds to a computer device, the computer device includes at least a network card and a controller, and the method is executed by the network card, including:
  • the startup data includes identification information of one of the target objects to be started among the plurality of target objects to be started;
  • the identification information is written into the preset location, so that after the controller determines that the computer device is awakened, according to the identification information stored in the preset location, it determines the target object to be started, and executes the start operation on the target object.
  • the present application provides another network wake-up boot method, the method corresponds to a computer device, the computer device includes at least a network card and a controller, and the method is executed by the controller, including:
  • the startup data After determining that the computer device is woken up, reading the startup data from a preset location, wherein the startup data includes first identification information of one of the target objects to be started among the plurality of target objects to be started;
  • the start operation on the target object is performed.
  • a computer device including a network card, a controller, a communication interface, a memory, and a communication bus, wherein the network card, the controller, the communication interface, and the memory complete mutual communication through the communication bus;
  • the controller is configured to implement the steps of the wake-on-LAN startup method in any one embodiment of the second aspect when executing the program stored in the memory.
  • a non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by a computer device, the steps of the wake-up on network boot method according to any one of the embodiments of the first aspect are implemented;
  • the wake-up data packet is parsed to obtain the start-up data.
  • the activation data includes identification information of one of the multiple target objects to be activated.
  • the network card can write the identification information to a preset location for storage. So that after the subsequent controller determines that the computer device is awakened, it can determine the target object to be started according to the identification information stored in the preset location, and then perform a corresponding start operation. In this process, the target object to be started can be determined according to the start data added in the wake-up data packet.
  • the present application can more conveniently and flexibly adjust the first startup item after the machine wakes up.
  • FIG. 1 is a schematic flow chart of a method for waking up on LAN provided by an embodiment of the present application
  • FIG. 2 is a schematic flow chart of another wake-up on network boot method provided by the embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for determining a target object to be activated according to the first identification information provided by the present application
  • FIG. 4 is a schematic flowchart of a method for determining whether to start a target object corresponding to the first startup instruction information in the next cycle according to the first startup instruction information provided by the present application;
  • FIG. 5 is a schematic flow diagram of the overall method of wake-up on LAN provided by this application.
  • FIG. 6 is a schematic structural diagram of a wake-up on network boot device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of another device for wake-up on LAN provided by the embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • Fig. 9 schematically shows a non-volatile readable storage medium for holding or carrying program codes for realizing the method according to the present application.
  • FIG. 1 is a schematic flow diagram of a network wake-up and boot method provided in an embodiment of the present application, the method corresponds to a computer device, the computer device includes at least a network card and a controller, and the method is executed by the network card, including:
  • Step 110 acquiring a wake-up data packet.
  • the wake-up data packet is remotely sent to the network card in the local area network, wherein the start-up data for controlling the start-up behavior is added to the wake-up data packet.
  • the wake-on-LAN data packet has a fixed structure and a total of 108 bytes in content.
  • the first 6 bytes are filled with all FFs in the prior art, and the next 96 bytes are filled with the MAC address of the awakened network card (6-byte MAC is repeated 6 times), and the last 6 bytes are filled with passwords.
  • the startup data is added to some of the first 6 bytes.
  • Step 120 analyzing the wake-up data packet to obtain start-up data.
  • the network card in the computer device parses the wake-up data packet to obtain startup data, and the startup data includes identification information of one of the target objects to be started among the plurality of target objects to be started.
  • the target object to be started may include, for example, a hard disk, a USB flash drive, or a network card, etc.
  • the network card mentioned here is different from the executive network card in this embodiment, and the network card is used to connect to other network cards in the PXE intervention system.
  • the network card in this embodiment is a network card with a wake-up function.
  • Step 130 write the identification information into a preset location.
  • the network card After the network card receives the identification information corresponding to the target object to be started, it will write the identification information into a preset location, such as a network card driver, so that after the controller in the subsequent computer device determines that the computer device is awakened, it determines the target object to be started according to the identification information stored in the preset location, and performs a startup operation on the target object.
  • a preset location such as a network card driver
  • the identification information is embodied in the form of the first field.
  • the startup data is the startup data corresponding to the hard disk, and the identification information is 00, or the startup data is the startup data corresponding to the USB disk, and the identification information is 01, etc.
  • the target objects are distinguished by different field values corresponding to the first field.
  • the activation data may include activation instruction information corresponding to the target object in addition to identification information corresponding to the target object to be activated.
  • the activation instruction information is used to indicate the validity period of the activation data corresponding to the target object.
  • the validity period here may refer to a specific number of validity periods, for example, counting from the current number of times, a total of 5 validation times, or always valid, or only valid once.
  • the specific limitation of the effective period can be set according to the actual situation, and will not be explained here.
  • the controller after the controller executes the target objects to be activated indicated by the activation data, it also includes determining whether the activation data corresponding to each target object is still valid in the next cycle according to the activation instruction information.
  • the controller may directly delete the startup data corresponding to the target object. If the startup data continues to take effect, it needs to be retained. The details will be described in the next embodiment, and will not be repeated here.
  • the start instruction information is embodied in the form of the second field.
  • 00 means it is valid for life
  • 01 means it is valid only once. Then, when the field value of the second field corresponding to the startup instruction information in the startup data corresponding to a certain target object is 00, it means that the target object still needs to be started after the computer device is woken up and turned on next time. Or, when the field value of the second field is 01, after the computer device is woken up and turned on next time, there is no need to start the target object, but to start other configured target objects to be started.
  • the field values of the first field and the second field may be repeated field values such as 00, 01, etc., they represent different meanings based on different fields. Therefore, even if the field values are the same, because the field values are stored in different fields, naturally they cannot represent the same meaning.
  • the user When the user expects to perform power-on wake-up on a target object to be started, it can be configured through the start-up data. In this way, the situation in the prior art that the target machine directly enters the first default startup item after waking up and starting up can be overcome. That is to say, it is possible to flexibly configure the target object to be started after the machine wakes up, and the effective period of the start operation can also be configured. For example, it takes effect once, or it is valid for a long time, etc., and the operation is more convenient.
  • the wake-up data packet is parsed to obtain the start-up data.
  • the activation data includes identification information of one of the multiple target objects to be activated.
  • the network card can write the identification information to a preset location for storage. So that after the subsequent controller determines that the computer device is awakened, it can determine the target object to be started according to the identification information stored in the preset location, and then perform a corresponding start operation. In this process, the target object to be started can be determined according to the start data added in the wake-up data packet.
  • the present application can more conveniently and flexibly adjust the first startup item after the machine wakes up.
  • the user can enter the network card for PXE boot after waking up and booting, or enter the U disk for booting, making it more convenient and quick to start the network card and U disk.
  • the method can be applied to various wake-up-on-LAN startup scenarios.
  • FIG. 2 is a schematic flow chart of another network wake-up and boot method provided by the embodiment of the present application.
  • the method corresponds to a computer device, and the computer device includes at least a network card and a controller.
  • the method is executed by the controller, including:
  • Step 210 when it is determined that the computer device is woken up, read startup data from a preset location.
  • the computer device after obtaining the wake-up data packet, the computer device can be woken up.
  • the activation data includes first identification information of a target object to be activated among the multiple target objects to be activated.
  • Step 220 After determining the target object to be activated according to the first identification information, perform an activation operation on the target object.
  • the startup data includes the first identification information. Then, the object to be started can be determined according to the first identification information.
  • the controller pre-stores an identification information mapping table generated according to each object to be started and the corresponding identification information.
  • the target object to be started is determined according to the first identification information, it can be realized in the following manner, as shown in FIG. 3 for details, including the following steps:
  • Step 310 matching the first identification information with each identification information in the pre-stored identification information mapping table.
  • Step 320 when it is determined that the first identification information matches the second identification information in the identification information mapping table, determine that the target object to be activated corresponding to the second identification information is the target object to be activated corresponding to the first identification information.
  • the second identification information is any identification information in the identification information mapping table.
  • the target object to be started is a hard disk.
  • the first identification information is 01
  • the target object to be started is a USB flash drive.
  • the object to be started is a network card or the like. After the target object is determined, the start operation on the target object can be performed.
  • the network card here is different from the network card in the previous embodiment.
  • the network card mentioned in the previous embodiment is only a network card with a wake-up function, which is used to implement the specific operation steps of the above embodiment.
  • the network card to be started in this implementation is the network card used to connect to the PXE and access the system.
  • the network card in the previous embodiment may also be defined as the first network card, and here the network card referred to by the target object to be started is defined as the second network card.
  • the startup data also includes first startup instruction information corresponding to the target object; the method also includes:
  • the first activation instruction information it is determined whether to activate the target object corresponding to the first activation instruction information in the next cycle.
  • the reason for determining whether to start the target object corresponding to the start instruction in the next cycle is to consider the way of processing the start data after the start operation on the target object is executed this time. In one case, if the target object needs to be activated when the computer device is woken up in the next cycle, then the corresponding activation data is retained; otherwise, the activation data can be deleted to save storage space.
  • determining whether to start the target object corresponding to the first startup instruction information in the next cycle can be implemented in the following manner, as shown in FIG. 4 for details.
  • the method includes:
  • Step 410 matching the first startup instruction information with each startup instruction information in the pre-stored startup instruction information mapping table.
  • Step 420 When it is determined that the first startup instruction information matches the second startup instruction information in the startup instruction information mapping table, determine the valid period corresponding to the second startup command information as the valid period corresponding to the first startup command information.
  • the start command information mapping table includes at least two start command information, and a validity period corresponding to each start command information, and the second start command information is one of the start command information in the start command information mapping table.
  • the target object indicated by the identification information in the startup data is a hard disk
  • the startup command information in the startup data is 00
  • the first startup item configured is the hard disk by default
  • the second field corresponding to the effective period is 00, which means it is always valid.
  • the startup command information in the startup data is 01, it means that only this time the machine wakes up and starts up, the first startup item is the hard disk, and the effective period is 1 time.
  • the startup data needs to be kept without any processing. Otherwise, if the effective period is once, delete the startup data.
  • the controller may be a Basic Input/Output System (BIOS for short).
  • BIOS Basic Input/Output System
  • the start-up data is read from a preset location, and according to the first identification information of one of the target objects to be started among the multiple target objects to be started included in the start-up data, the start-up operation for the target object corresponding to the first identification information is completed.
  • the target object to be started can be determined according to the start data added in the wake-up data packet.
  • Fig. 5 is a schematic diagram of the overall method flow of wake-up on network provided by the present application, as shown in Fig. 5 for details.
  • Fig. 5 shows the overall process of remotely sending a wake-up data packet from the local area network to the first network card (in order to distinguish it from the second network card, the first network card is used here for illustration), and after the first network card performs the corresponding operation, the BIOS reads the startup data and executes the startup operation of the corresponding target object. Including sending wake-up data packets remotely in the LAN, and adding start-up data to control start-up behavior in the data packets.
  • the first network card After receiving the wake-up data packet, the first network card parses the wake-up data packet, obtains the start-up data, and writes it into the driver of the first network card.
  • the BIOS reads the first network card driver, and after obtaining the startup data, determines which target object the first startup item is based on the field value of the first field in the startup data, and determines whether the startup data will continue to take effect in the next cycle according to the field value of the second field. If not, the corresponding startup data in the first network card driver is cleared. It is guaranteed to take effect only for a single startup, if so, do not clear the corresponding startup data in the first network card driver, and ensure that it is still valid for the next startup.
  • FIG. 6 is a wake-on-LAN startup device provided by an embodiment of the present application, and the device includes: an acquisition module 601 , an analysis module 602 , and a processing module 603 .
  • the parsing module 602 is configured to parse the wake-up data packet to obtain startup data, wherein the startup data includes identification information of one of the target objects to be started among the plurality of target objects to be started;
  • the processing module 603 is configured to write the identification information into the preset location, so that the controller determines the target object to be started according to the identification information stored in the preset location after determining that the computer device is woken up, and executes a startup operation on the target object.
  • the identification information is embodied in the form of the first field.
  • the activation data further includes activation instruction information corresponding to the target object; wherein, the activation instruction information is used to indicate an effective period of the activation data corresponding to the target object.
  • the start instruction information is embodied in the form of the second field.
  • the quantity of startup data includes multiple.
  • a wake-up on network boot device provided in an embodiment of the present application, after obtaining the wake-up data packet, parses the wake-up data packet to obtain the start-up data.
  • the activation data includes identification information of one of the multiple target objects to be activated.
  • the network card can write the identification information to a preset location for storage. So that after the subsequent controller determines that the computer device is awakened, it can determine the target object to be started according to the identification information stored in the preset location, and then perform a corresponding start operation. In this process, the target object to be started can be determined according to the start data added in the wake-up data packet.
  • the present application can more conveniently and flexibly adjust the first startup item after the machine wakes up.
  • the user can enter the network card for PXE boot after waking up and booting, or enter the U disk for booting, making it more convenient and quick to start the network card and U disk.
  • the method can be applied to various wake-up-on-LAN startup scenarios.
  • FIG. 7 is a wake-on-LAN boot device provided by an embodiment of the present application, which includes: a determination module 701 , a reading module 702 , and an execution module 703 .
  • the reading module 702 is configured to read the startup data from a preset position after the determination module 701 determines that the computer device is awakened, wherein the startup data includes first identification information of one of the target objects to be started among the plurality of target objects to be started;
  • the execution module 703 is configured to execute a start operation on the target object after determining the target object to be started according to the first identification information.
  • the startup data also includes startup instruction information corresponding to the target object; the determining module 701 is further configured to determine whether to start the target object corresponding to the startup instruction information in the next cycle according to the startup instruction information.
  • the execution module 703 is specifically configured to match the first identification information with each identification information in the pre-stored identification information mapping table;
  • the identification information mapping table includes a plurality of identification information and target object information that has a mapping relationship with each identification information, and the second identification information is any identification information in the identification information mapping table.
  • the determining module 701 is specifically configured to match the first startup instruction information with each startup instruction information in the pre-stored startup instruction information mapping table;
  • the startup command information mapping table includes at least two startup command information, and a valid period corresponding to each startup command information, and the second startup command information is any one of the at least two startup command information.
  • a wake-up on network boot device reads startup data from a preset location after determining that the computer device is woken up, and completes the startup operation for the target object corresponding to the first identification information according to the first identification information of one of the target objects to be started among the plurality of target objects to be started included in the startup data.
  • the target object to be started can be determined according to the start data added in the wake-up data packet.
  • the method can be applied to various wake-up-on-LAN startup scenarios.
  • the embodiment of the present application provides a computer device, including a network card 111, a controller 112, a communication interface 113, a memory 114, and a communication bus 115, wherein the network card 111, the controller 112, the communication interface 113, and the memory 114 complete mutual communication through the communication bus 115.
  • Memory 114 used to store computer programs
  • the network card 111 when the network card 111 is used to execute the program stored in the memory 114, implement the network wake-up and boot method provided by any method embodiment corresponding to FIG. 1 , including:
  • the startup data includes identification information of one of the target objects to be started among the plurality of target objects to be started;
  • the identification information is written into the preset location, so that after the controller determines that the computer device is awakened, according to the identification information stored in the preset location, it determines the target object to be started, and executes the start operation on the target object.
  • the identification information is embodied in the form of the first field.
  • the activation data further includes activation instruction information corresponding to the target object; wherein, the activation instruction information is used to indicate an effective period of the activation data corresponding to the target object.
  • the start instruction information is embodied in the form of the second field.
  • the quantity of startup data includes multiple.
  • the controller is configured to execute the program stored in the memory 114 to implement the method for wake-up on network provided by any method embodiment corresponding to FIG. 2 to FIG. 4 , including:
  • the startup data After determining that the computer device is woken up, reading the startup data from a preset location, wherein the startup data includes first identification information of one of the target objects to be started among the plurality of target objects to be started;
  • the start operation on the target object is performed.
  • the startup data also includes startup instruction information corresponding to the target object; the method also includes:
  • start instruction information it is determined whether to start the target object corresponding to the start instruction information in the next cycle.
  • mapping table mapping table
  • the identification information mapping table includes a plurality of identification information and target object information that has a mapping relationship with each identification information, and the second identification information is any identification information in the identification information mapping table.
  • the startup command information mapping table includes at least two startup command information, and a valid period corresponding to each startup command information, and the second startup command information is any one of the at least two startup command information.
  • the embodiment of the present application also provides a non-volatile readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the wake-up on network method provided in any one of the foregoing method embodiments are implemented.
  • the various component embodiments of the present application may be realized in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the electronic device according to the embodiments of the present application.
  • DSP digital signal processor
  • the present application can also be implemented as an apparatus or apparatus program (eg, computer program and computer program product) for performing a part or all of the methods described herein.
  • Such a program implementing the present application may be stored on a computer-readable medium, or may be in the form of one or more signals.
  • Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
  • an electronic device that can implement a method according to the present application may conventionally include a processor and a computer program product in the form of a memory or a computer-readable medium.
  • the memory may be electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk or ROM.
  • the memory has storage space for program code for carrying out any of the method steps in the methods described above.
  • the storage space for program codes may include respective program codes for respectively implementing various steps in the above methods.
  • These program codes can be read from or written into one or more computer program products.
  • These computer program products comprise program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a non-volatile readable storage medium 90 as with reference to FIG. 9 .
  • the non-volatile readable storage medium 90 may have storage segments, storage space, etc. arranged similarly to a memory in an electronic device.
  • the program code can eg be compressed in a suitable form.
  • the non-volatile readable storage medium includes computer-readable codes 901, that is, codes that can be read by, for example, a processor, and these codes, when run by an electronic device, cause the electronic device to perform the various steps in the methods described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

A Wake-on-LAN method and a computer device. The Wake-on-LAN method comprises: acquiring a wake-up data packet (110); parsing the wake-up data packet to obtain startup data (120); and writing identification information to a preset position (130). Compared with fixed startup items after machine wake-up in the prior art, the Wake-on-LAN method can more conveniently and flexibly adjust a first startup item after machine wake-up, so as to meet the needs of existing users to control a startup behavior for any startup item after wake-up and startup; subsequently, a user does not need to enter a network card for PXE startup or enter a USB flash disk for startup after wake-up and startup, so that the startup of the network card, and the startup operation of the USB flash disk and the like are more convenient and faster; a target machine can be woken up and started up according to the needs of users so as to enter different startup items, and therefore, the method can be suitable for a variety of Wake-on-LAN scenarios.

Description

网络唤醒开机方法及计算机设备Network wake-up boot method and computer equipment
相关申请的交叉引用Cross References to Related Applications
本申请要求于2022年01月19日提交中国专利局,申请号为202210063401.6,申请名称为“网络唤醒开机方法及计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the China Patent Office on January 19, 2022, with the application number 202210063401.6, and the application name is "Network wake-up boot method and computer equipment", the entire content of which is incorporated in this application by reference.
技术领域technical field
本申请实施例涉及计算机技术领域,尤其涉及一种网络唤醒开机方法及计算机设备。The embodiments of the present application relate to the field of computer technology, and in particular, to a method for waking up on network and a computer device.
背景技术Background technique
网络唤醒开机(Wake On LAN,简称WOL)是一种局域网唤醒技术,通过给目标机器的网卡发送网络唤醒开机的数据包,可以将处在休眠或关机状态的机器唤醒,使之进入工作或者开机状态。网络唤醒开机技术对于没有基板管理控制器(Baseboard Management Controller,简称BMC)带外管理芯片的服务器具有重要意义,但是针对处在关机状态的目标机器,这种技术只能唤醒目标机器开机,随即进入第一个启动项,却不能控制开机后的启动行为,如果存在多个启动项,比如硬盘、U盘等,而用户需要唤醒后进入网卡进行预启动执行环境(Pre-boot Execution Environment,简称PXE)启动,或者进入U盘进行启动,操作麻烦,当前的网络唤醒开机技术则无法满足。Wake On LAN (WOL for short) is a wake-up on LAN technology, which can wake up a machine that is in a dormant or shut-down state and make it enter a working or power-on state by sending a data packet of wake-up on LAN to the network card of the target machine. Wake-on-LAN boot technology is of great significance for servers without a Baseboard Management Controller (BMC) out-of-band management chip. However, for a target machine that is in a shutdown state, this technology can only wake up the target machine and then enter the first boot item, but cannot control the boot behavior after boot. Enter the U disk to start, the operation is cumbersome, and the current wake-up on network technology is not enough.
发明内容Contents of the invention
本申请提供了一种网络唤醒开机方法及计算机设备,以解决现有技术中局域网唤醒技术中的数据包只能将处于休眠或者关机状态的机器唤醒,使其进入工作或者开机状态,但是不能够控制开机后的启动行为的技术问题。The present application provides a wake-up from network start-up method and computer equipment to solve the technical problem that the data packet in the wake-up from LAN technology in the prior art can only wake up a machine in a dormant or shut-down state, so that it enters a working or booting state, but cannot control the start-up behavior after booting.
第一方面,本申请提供了一种网络唤醒开机方法,该方法对应于一种计算机设备,计算机设备至少包括网卡和控制器,该方法由网卡执行,包括:In a first aspect, the present application provides a method for wake-up from network, the method corresponds to a computer device, the computer device includes at least a network card and a controller, and the method is executed by the network card, including:
获取唤醒数据包;Get the wake-up packet;
对唤醒数据包进行解析,获取启动数据,其中,启动数据中包括多个待启动的目标对象中的其中一个待启动的目标对象的标识信息;Analyzing the wake-up data packet to obtain startup data, wherein the startup data includes identification information of one of the target objects to be started among the plurality of target objects to be started;
将标识信息写入到预设位置,以便控制器在确定计算机设备被唤醒后,根据预设位置存储的标识信息,确定待启动的目标对象,并对目标对象执行启动操作。The identification information is written into the preset location, so that after the controller determines that the computer device is awakened, according to the identification information stored in the preset location, it determines the target object to be started, and executes the start operation on the target object.
第二方面,本申请提供了另一种网络唤醒开机方法,该方法对应于一种计算机设备,计算机设备至少包括网卡和控制器,该方法由控制器执行,包括:In the second aspect, the present application provides another network wake-up boot method, the method corresponds to a computer device, the computer device includes at least a network card and a controller, and the method is executed by the controller, including:
当确定计算机设备被唤醒后,从预设位置读取启动数据,其中,启动数据包括多个待启动的目标对象中的其中一个待启动的目标对象的第一标识信息;After determining that the computer device is woken up, reading the startup data from a preset location, wherein the startup data includes first identification information of one of the target objects to be started among the plurality of target objects to be started;
根据第一标识信息,确定待启动的目标对象后,执行对目标对象的启动操作。After the target object to be started is determined according to the first identification information, the start operation on the target object is performed.
第三方面,提供了一种计算机设备,包括网卡、控制器、通信接口、存储器和通信总线,其中,网卡、控制器,通信接口,存储器通过通信总线完成相互间的通信;In a third aspect, a computer device is provided, including a network card, a controller, a communication interface, a memory, and a communication bus, wherein the network card, the controller, the communication interface, and the memory complete mutual communication through the communication bus;
存储器,用于存放计算机程序;memory for storing computer programs;
网卡,用于执行存储器上所存放的程序时,实现第一方面任一项实施例的网络唤醒开机方法的步骤;When the network card is used to execute the program stored in the memory, implement the steps of the wake-up on network boot method in any one of the embodiments of the first aspect;
控制器,用于执行存储器上所存放的程序时,实现第二方面任一项实施例的网络唤醒开机方法的步骤。The controller is configured to implement the steps of the wake-on-LAN startup method in any one embodiment of the second aspect when executing the program stored in the memory.
第四方面,提供了一种非易失性可读存储介质,其上存储有计算机程序,计算机程序被计算机设备执行时,实现如第一方面任一项实施例的网络唤醒开机方法的步骤;In a fourth aspect, there is provided a non-volatile readable storage medium, on which a computer program is stored, and when the computer program is executed by a computer device, the steps of the wake-up on network boot method according to any one of the embodiments of the first aspect are implemented;
或者,实现如第二方面任一项实施例的网络唤醒开机方法的步骤。Alternatively, implement the steps of the wake-up on LAN boot method according to any one of the embodiments of the second aspect.
本申请实施例提供的上述技术方案与现有技术相比具有如下优点:Compared with the prior art, the above-mentioned technical solutions provided by the embodiments of the present application have the following advantages:
本申请实施例提供的该方法,获取唤醒数据包后,对唤醒数据包进行解析,获取启动数据。在启动数据中,包括有多个待启动的目标对象中的其中一个待启动的目标对象的标识信息。网卡可以将标识信息写入到预设位置,以进行存储。以便后续控制器在确定计算机设备被唤醒后,可以根据预设位置存储的标识信息,确定待启动的目标对象,然后执行相应的启动操作。该过程中,可以根据唤醒数据包中添加的启动数据,来确定待启动的目标对象。相较于现有技术中的机器唤醒后的固定开机启动项而言,本申请可以更加方便、灵活的调整机器唤醒后的第一个开机启动项。以满足现有用户在唤醒开机后,对任意启动项的启动行为进行控制的需求。通过该方式,后续无需用户在唤醒开机后,进入网卡进行PXE启动,或者进入U盘进行启动,使其对于网卡的启动,以及U盘等的启动操作更加方便快捷。而且,由于其可以根据用户的需求对目标机器进行唤醒启动从而进入不同的启动项,所以该方法可以适用于多种网络唤醒开机场景。In the method provided by the embodiment of the present application, after obtaining the wake-up data packet, the wake-up data packet is parsed to obtain the start-up data. The activation data includes identification information of one of the multiple target objects to be activated. The network card can write the identification information to a preset location for storage. So that after the subsequent controller determines that the computer device is awakened, it can determine the target object to be started according to the identification information stored in the preset location, and then perform a corresponding start operation. In this process, the target object to be started can be determined according to the start data added in the wake-up data packet. Compared with the fixed startup items after the machine wakes up in the prior art, the present application can more conveniently and flexibly adjust the first startup item after the machine wakes up. To meet the needs of existing users to control the startup behavior of any startup item after waking up and turning on the computer. In this way, there is no need for the user to enter the network card for PXE boot after waking up and booting, or enter the U disk for booting, making it more convenient and quick to start the network card and U disk. Moreover, since it can wake up and start the target machine according to the needs of the user so as to enter different startup items, the method can be applied to various wake-up-on-LAN startup scenarios.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solution of the present application. In order to understand the technical means of the present application more clearly, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the specific implementation methods of the present application are enumerated below.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings that are required in the description of the embodiments or prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other accompanying drawings can also be obtained based on these drawings without creative work.
图1为本申请实施例提供的一种网络唤醒开机方法流程示意图;FIG. 1 is a schematic flow chart of a method for waking up on LAN provided by an embodiment of the present application;
图2为本申请实施例提供的另一种网络唤醒开机方法流程示意图;FIG. 2 is a schematic flow chart of another wake-up on network boot method provided by the embodiment of the present application;
图3为本申请提供的根据第一标识信息,确定待启动的目标对象的方法流程示意图;FIG. 3 is a schematic flowchart of a method for determining a target object to be activated according to the first identification information provided by the present application;
图4为本申请提供的根据第一启动指令信息,确定下一周期是否启动与第一启动指令信息对应的目标对象的方法流程示意图;4 is a schematic flowchart of a method for determining whether to start a target object corresponding to the first startup instruction information in the next cycle according to the first startup instruction information provided by the present application;
图5本申请提供的网络唤醒开机整体方法流程示意图;FIG. 5 is a schematic flow diagram of the overall method of wake-up on LAN provided by this application;
图6为本申请实施例提供的一种网络唤醒开机装置结构示意图;FIG. 6 is a schematic structural diagram of a wake-up on network boot device provided by an embodiment of the present application;
图7为本申请实施例提供的另一种网络唤醒开机装置结构示意图;FIG. 7 is a schematic structural diagram of another device for wake-up on LAN provided by the embodiment of the present application;
图8为本申请实施例提供一种计算机设备结构示意图;FIG. 8 is a schematic structural diagram of a computer device provided by an embodiment of the present application;
图9示意性地示出了用于保持或者携带实现根据本申请的方法的程序代码的非易失性可读存储介质。Fig. 9 schematically shows a non-volatile readable storage medium for holding or carrying program codes for realizing the method according to the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
为便于对本申请实施例的理解,下面将结合附图以具体实施例做进一步的解释说明,实施例并不构成对本申请实施例的限定。In order to facilitate the understanding of the embodiments of the present application, the following will further explain and illustrate with specific embodiments in conjunction with the accompanying drawings, and the embodiments do not constitute a limitation to the embodiments of the present application.
针对背景技术中所提及的技术问题,本申请实施例提供了一种网络唤醒开机方法,具体参见图1所示。图1为本申请实施例提供的一种网络唤醒开机方法流程示意图,该方法对应于一种计算机设备,计算机设备至少包括网卡和控制器,方法由网卡执行,包括:Aiming at the technical problems mentioned in the background art, an embodiment of the present application provides a method for waking up on LAN, as shown in FIG. 1 for details. Fig. 1 is a schematic flow diagram of a network wake-up and boot method provided in an embodiment of the present application, the method corresponds to a computer device, the computer device includes at least a network card and a controller, and the method is executed by the network card, including:
步骤110,获取唤醒数据包。 Step 110, acquiring a wake-up data packet.
具体的,局域网内远程发送唤醒数据包给到网卡,其中,唤醒数据包中加入控制启动行为的启动数据。Specifically, the wake-up data packet is remotely sent to the network card in the local area network, wherein the start-up data for controlling the start-up behavior is added to the wake-up data packet.
在一个具体的例子中,网络唤醒数据包结构固定,内容共108字节,前6字节在现有技术中是全FF填充,接下来的96字节填充被唤醒的网卡MAC地址(6字节MAC重复6次),最后6字节填写密码,无密码用00补位。而在本申请中,则是将启动数据加入到前6字节中的某些字节中。In a specific example, the wake-on-LAN data packet has a fixed structure and a total of 108 bytes in content. The first 6 bytes are filled with all FFs in the prior art, and the next 96 bytes are filled with the MAC address of the awakened network card (6-byte MAC is repeated 6 times), and the last 6 bytes are filled with passwords. However, in this application, the startup data is added to some of the first 6 bytes.
步骤120,对唤醒数据包进行解析,获取启动数据。 Step 120, analyzing the wake-up data packet to obtain start-up data.
具体的,计算机设备中的网卡对唤醒数据包进行解析,获取启动数据,在启动数据中,包括多个待启动的目标对象中的其中一个待启动的目标对象的标识信息。Specifically, the network card in the computer device parses the wake-up data packet to obtain startup data, and the startup data includes identification information of one of the target objects to be started among the plurality of target objects to be started.
在一个可选的例子中,待启动的目标对象例如可以包括硬盘、U盘,或者网卡等等,这里所提及的网卡和本实施例中的执行主体网卡不同,该网卡是用于连接PXE介入系统中的其他网卡。本实施例中的网卡就是一种具有唤醒功能的网卡。In an optional example, the target object to be started may include, for example, a hard disk, a USB flash drive, or a network card, etc. The network card mentioned here is different from the executive network card in this embodiment, and the network card is used to connect to other network cards in the PXE intervention system. The network card in this embodiment is a network card with a wake-up function.
步骤130,将标识信息写入到预设位置。 Step 130, write the identification information into a preset location.
具体的,网卡收到与待启动的目标对象对应的标识信息后,会将该标识信息写入到预设位置,例如网卡驱动中,用以方便后续计算机设备中的控制器在确定计算机设备被唤醒后,根据预设位置存储的标识信息,确定待启动的目标对象,并对目标对象执行启动操作。Specifically, after the network card receives the identification information corresponding to the target object to be started, it will write the identification information into a preset location, such as a network card driver, so that after the controller in the subsequent computer device determines that the computer device is awakened, it determines the target object to be started according to the identification information stored in the preset location, and performs a startup operation on the target object.
在一个具体的例子中,标识信息,以第一字段的形式体现。例如启动数据是与硬盘对应的启动数据,标识信息为00,或者,启动数据是与U盘对应的启动数据,标识信息为01等。通过第一字段对应的不同字段值,来对目标对象进行区分。In a specific example, the identification information is embodied in the form of the first field. For example, the startup data is the startup data corresponding to the hard disk, and the identification information is 00, or the startup data is the startup data corresponding to the USB disk, and the identification information is 01, etc. The target objects are distinguished by different field values corresponding to the first field.
进一步可选的,启动数据中除包括与待启动的目标对象对应的标识信息之外,还可以包括与目标对象对应的启动指令信息。其中,启动指令信息,用于指示与目标对象对应的启动数据的生效周期。Further optionally, the activation data may include activation instruction information corresponding to the target object in addition to identification information corresponding to the target object to be activated. Wherein, the activation instruction information is used to indicate the validity period of the activation data corresponding to the target object.
具体而言,这里的生效周期可以指具体的生效周期数量,比如从当前次数起算,一共生效5次,又或者始终有效,又或者仅单次有效。具体的生效周期的限制,可以根据实际情况设定,这里不做过多说明。Specifically, the validity period here may refer to a specific number of validity periods, for example, counting from the current number of times, a total of 5 validation times, or always valid, or only valid once. The specific limitation of the effective period can be set according to the actual situation, and will not be explained here.
也即是说,控制器执行完启动数据所指示的待启动的目标对象后,还包括根据启动指令信息,确定与每一个目标对象对应的启动数据在下一周期是否依然生效。That is to say, after the controller executes the target objects to be activated indicated by the activation data, it also includes determining whether the activation data corresponding to each target object is still valid in the next cycle according to the activation instruction information.
如果启动数据不生效,则控制器可以直接删除与该目标对象对应的启动数据。如果启动数据继续生效,则需要保留,具体的将在下一个实施例中说明,这里不再过多赘述。If the startup data is not valid, the controller may directly delete the startup data corresponding to the target object. If the startup data continues to take effect, it needs to be retained. The details will be described in the next embodiment, and will not be repeated here.
在一个可选的例子中,启动指令信息以第二字段的形式体现。In an optional example, the start instruction information is embodied in the form of the second field.
例如,00表示终生有效,01表示只生效一次。那么,当某个目标对象对应的启动数据中,启动指令信息对应的第二字段的字段值为00时,则表示下一次计算机设备被唤醒开机 后,依然需要启动该目标对象。或者,当第二字段的字段值为01的情况下,下一次计算机设备被唤醒开机后,无需再启动该目标对象,而是启动其他已配置的待启动的目标对象。For example, 00 means it is valid for life, and 01 means it is valid only once. Then, when the field value of the second field corresponding to the startup instruction information in the startup data corresponding to a certain target object is 00, it means that the target object still needs to be started after the computer device is woken up and turned on next time. Or, when the field value of the second field is 01, after the computer device is woken up and turned on next time, there is no need to start the target object, but to start other configured target objects to be started.
需要说明的是,虽然第一字段和第二字段的字段值都有可能是00,01等重复的字段值,但是基于字段不同,代表的意义不同。所以,即使字段值相同,因为字段值存储在不同的字段中,自然也不能代表同一种含义。It should be noted that although the field values of the first field and the second field may be repeated field values such as 00, 01, etc., they represent different meanings based on different fields. Therefore, even if the field values are the same, because the field values are stored in different fields, naturally they cannot represent the same meaning.
当用户期望对某个待启动的目标对象执行开机唤醒后,可以通过启动数据进行配置实现。通过该方式,可以克服现有技术中目标机器唤醒开机后,直接进入第一个默认启动项的情况。也即是,可以灵活配置机器开机唤醒后执行启动的目标对象,而且,还可以配置启动操作的生效周期。例如一次生效,还是长期有效等,操作更加方便。When the user expects to perform power-on wake-up on a target object to be started, it can be configured through the start-up data. In this way, the situation in the prior art that the target machine directly enters the first default startup item after waking up and starting up can be overcome. That is to say, it is possible to flexibly configure the target object to be started after the machine wakes up, and the effective period of the start operation can also be configured. For example, it takes effect once, or it is valid for a long time, etc., and the operation is more convenient.
本申请实施例提供的网络唤醒开机方法,获取唤醒数据包后,对唤醒数据包进行解析,获取启动数据。在启动数据中,包括有多个待启动的目标对象中的其中一个待启动的目标对象的标识信息。网卡可以将标识信息写入到预设位置,以进行存储。以便后续控制器在确定计算机设备被唤醒后,可以根据预设位置存储的标识信息,确定待启动的目标对象,然后执行相应的启动操作。该过程中,可以根据唤醒数据包中添加的启动数据,来确定待启动的目标对象。相较于现有技术中的机器唤醒后的固定开机启动项而言,本申请可以更加方便、灵活的调整机器唤醒后的第一个开机启动项。以满足现有用户在唤醒开机后,对任意启动项的启动行为进行控制的需求。通过该方式,后续无需用户在唤醒开机后,进入网卡进行PXE启动,或者进入U盘进行启动,使其对于网卡的启动,以及U盘等的启动操作更加方便快捷。而且,由于其可以根据用户的需求对目标机器进行唤醒启动从而进入不同的启动项,所以该方法可以适用于多种网络唤醒开机场景。In the wake-up-on-LAN startup method provided in the embodiment of the present application, after obtaining the wake-up data packet, the wake-up data packet is parsed to obtain the start-up data. The activation data includes identification information of one of the multiple target objects to be activated. The network card can write the identification information to a preset location for storage. So that after the subsequent controller determines that the computer device is awakened, it can determine the target object to be started according to the identification information stored in the preset location, and then perform a corresponding start operation. In this process, the target object to be started can be determined according to the start data added in the wake-up data packet. Compared with the fixed startup items after the machine wakes up in the prior art, the present application can more conveniently and flexibly adjust the first startup item after the machine wakes up. To meet the needs of existing users to control the startup behavior of any startup item after waking up and turning on the computer. In this way, there is no need for the user to enter the network card for PXE boot after waking up and booting, or enter the U disk for booting, making it more convenient and quick to start the network card and U disk. Moreover, since it can wake up and start the target machine according to the needs of the user so as to enter different startup items, the method can be applied to various wake-up-on-LAN startup scenarios.
本申请实施例还提供了另一种网络唤醒开机方法,具体参见图2所示。图2为本申请实施例提供的另一种网络唤醒开机方法流程示意图,该方法对应于一种计算机设备,计算机设备至少包括网卡和控制器,该方法由控制器执行,包括:The embodiment of the present application also provides another wake-on-LAN startup method, as shown in FIG. 2 for details. Fig. 2 is a schematic flow chart of another network wake-up and boot method provided by the embodiment of the present application. The method corresponds to a computer device, and the computer device includes at least a network card and a controller. The method is executed by the controller, including:
步骤210,当确定计算机设备被唤醒后,从预设位置读取启动数据。 Step 210, when it is determined that the computer device is woken up, read startup data from a preset location.
具体的,如上一实施例所介绍的,在获取唤醒数据包后,可以对计算机设备进行唤醒。Specifically, as described in the previous embodiment, after obtaining the wake-up data packet, the computer device can be woken up.
然后从预设位置,例如网卡驱动中读取启动数据。其中,启动数据包括多个待启动的目标对象中的其中一个待启动的目标对象的第一标识信息。Then read the boot data from a preset location, such as a network card driver. Wherein, the activation data includes first identification information of a target object to be activated among the multiple target objects to be activated.
步骤220,根据第一标识信息,确定待启动的目标对象后,执行对目标对象的启动操作。Step 220: After determining the target object to be activated according to the first identification information, perform an activation operation on the target object.
具体的,启动数据中包括第一标识信息。那么,可以根据第一标识信息,确定待启动的对象。Specifically, the startup data includes the first identification information. Then, the object to be started can be determined according to the first identification information.
在一个具体的例子中,控制器中预存储有根据每一个待启动对象以及与之对应的标识信息生成的标识信息映射表。In a specific example, the controller pre-stores an identification information mapping table generated according to each object to be started and the corresponding identification information.
那么,在执行根据第一标识信息,确定待启动的目标对象时,可以通过如下方式实现,具体参见图3所示,包括如下步骤:Then, when the target object to be started is determined according to the first identification information, it can be realized in the following manner, as shown in FIG. 3 for details, including the following steps:
步骤310,将第一标识信息,与预存储的标识信息映射表中的每一个标识信息进行匹配。 Step 310, matching the first identification information with each identification information in the pre-stored identification information mapping table.
步骤320,当确定第一标识信息与标识信息映射表中的第二标识信息匹配时,则确定与第二标识信息对应的待启动的目标对象,为第一标识信息对应的待启动的目标对象。 Step 320, when it is determined that the first identification information matches the second identification information in the identification information mapping table, determine that the target object to be activated corresponding to the second identification information is the target object to be activated corresponding to the first identification information.
其中,第二标识信息为标识信息映射表中的任一个标识信息。Wherein, the second identification information is any identification information in the identification information mapping table.
例如,如上一实施例中所介绍的,假设第一标识信息为00,则确定待启动的目标对象为硬盘。当第一标识信息为01时,确定待启动的目标对象为U盘。当第一标识信息为02时,待启动的对象为网卡等。在确定目标对象后,即可执行对该目标对象的启动操作。需要说明的是,这里的网卡和上一实施例中的网卡不同。上一实施例中所说的网卡仅仅是具有唤醒功能的网卡,用以实现上述实施例的具体操作步骤。而本实施中待启动的网卡,则是用以连接到PXE,接入系统的网卡。为进行区分,也可以将上一实施例中的网卡定义为第一网卡,这里待启动的目标对象所指的网卡定义为第二网卡。For example, as described in the previous embodiment, assuming that the first identification information is 00, it is determined that the target object to be started is a hard disk. When the first identification information is 01, it is determined that the target object to be started is a USB flash drive. When the first identification information is 02, the object to be started is a network card or the like. After the target object is determined, the start operation on the target object can be performed. It should be noted that the network card here is different from the network card in the previous embodiment. The network card mentioned in the previous embodiment is only a network card with a wake-up function, which is used to implement the specific operation steps of the above embodiment. The network card to be started in this implementation is the network card used to connect to the PXE and access the system. For distinction, the network card in the previous embodiment may also be defined as the first network card, and here the network card referred to by the target object to be started is defined as the second network card.
进一步可选的,启动数据还包括与目标对象对应的第一启动指令信息;该方法还包括:Further optionally, the startup data also includes first startup instruction information corresponding to the target object; the method also includes:
根据第一启动指令信息,确定下一周期是否启动与第一启动指令信息对应的目标对象。According to the first activation instruction information, it is determined whether to activate the target object corresponding to the first activation instruction information in the next cycle.
具体的,之所以确定下一周期是否启动与启动指令对应的目标对象,是考虑到在本次执行完对目标对象的启动操作后,对于启动数据的处理方式。在一种情况中,如果下一周期计算机设备被唤醒的情况下,同样需要启动该目标对象,那么相应的启动数据则保留,否则,可以删除该启动数据,以节省存储空间。Specifically, the reason for determining whether to start the target object corresponding to the start instruction in the next cycle is to consider the way of processing the start data after the start operation on the target object is executed this time. In one case, if the target object needs to be activated when the computer device is woken up in the next cycle, then the corresponding activation data is retained; otherwise, the activation data can be deleted to save storage space.
在一个可选例子中,根据第一启动指令信息,确定下一周期是否启动与第一启动指令信息对应的目标对象,可以通过如下方式实现,具体参见图4所示,该方法包括:In an optional example, according to the first startup instruction information, determining whether to start the target object corresponding to the first startup instruction information in the next cycle can be implemented in the following manner, as shown in FIG. 4 for details. The method includes:
步骤410,将第一启动指令信息与预存储的启动指令信息映射表中的每一个启动指令信息进行匹配。 Step 410, matching the first startup instruction information with each startup instruction information in the pre-stored startup instruction information mapping table.
步骤420,当确定与第一启动指令信息与启动指令信息映射表中的第二启动指令信息匹配时,确定第二启动指令信息对应的生效周期,为第一启动指令信息对应的生效周期。Step 420: When it is determined that the first startup instruction information matches the second startup instruction information in the startup instruction information mapping table, determine the valid period corresponding to the second startup command information as the valid period corresponding to the first startup command information.
其中,启动指令信息映射表中包括至少两个启动指令信息,以及与每一个启动指令信息对应的生效周期,第二启动指令信息为启动指令信息映射表中的其中一个启动指令信息。Wherein, the start command information mapping table includes at least two start command information, and a validity period corresponding to each start command information, and the second start command information is one of the start command information in the start command information mapping table.
如上所介绍的,假设启动数据中的标识信息所指示的目标对象为硬盘,启动数据中的启动指令信息为00,则认为机器唤醒开机后,配置的第一个启动项默认为硬盘,生效周期所对应的第二字段是00,即为始终有效。如果启动数据中的启动指令信息为01,则表示只有本次机器唤醒开机,第一启动项为硬盘,生效周期为1次。As mentioned above, assuming that the target object indicated by the identification information in the startup data is a hard disk, and the startup command information in the startup data is 00, it is considered that after the machine wakes up and starts up, the first startup item configured is the hard disk by default, and the second field corresponding to the effective period is 00, which means it is always valid. If the startup command information in the startup data is 01, it means that only this time the machine wakes up and starts up, the first startup item is the hard disk, and the effective period is 1 time.
当确定生效周期为始终有效时,则需要保留启动数据,不作任何处理。否则,如果生效周期为一次,则删除该启动数据。When it is determined that the validity period is always valid, the startup data needs to be kept without any processing. Otherwise, if the effective period is once, delete the startup data.
在一个具体的例子中,控制器可以是基本输入/输出系统(Basic Input Output System,简称BIOS)。In a specific example, the controller may be a Basic Input/Output System (BIOS for short).
本申请实施例提供的网络唤醒开机方法,在确定计算机设备被唤醒后,从预设位置读取启动数据,根据启动数据中所包括的多个待启动的目标对象中的其中一个待启动的目标对象的第一标识信息,完成针对与第一标识信息对应的目标对象的启动操作。该过程中,可以根据唤醒数据包中添加的启动数据,来确定待启动的目标对象。相较于现有技术中的机器唤醒后的固定开机启动项而言,本申请可以更加方便、灵活的调整机器唤醒后的第一个开机启动项。以满足现有用户在唤醒开机后,对任意启动项的启动行为进行控制的需求。通过该方式,后续无需用户在唤醒开机后,进入网卡进行PXE启动,或者进入U盘进行启动,使其对于网卡的启动,以及U盘等的启动操作更加方便快捷。而且,由于其可以根据用户的需求对目标机器进行唤醒启动从而进入不同的启动项,所以该方法可以适用于多种网络唤醒开机场景。In the wake-up-on-LAN start-up method provided in the embodiment of the present application, after it is determined that the computer device is woken up, the start-up data is read from a preset location, and according to the first identification information of one of the target objects to be started among the multiple target objects to be started included in the start-up data, the start-up operation for the target object corresponding to the first identification information is completed. In this process, the target object to be started can be determined according to the start data added in the wake-up data packet. Compared with the fixed startup items after the machine wakes up in the prior art, the present application can more conveniently and flexibly adjust the first startup item after the machine wakes up. To meet the needs of existing users to control the startup behavior of any startup item after waking up and turning on the computer. In this way, there is no need for the user to enter the network card for PXE boot after waking up and booting, or enter the U disk for booting, making it more convenient and quick to start the network card and U disk. Moreover, since it can wake up and start the target machine according to the needs of the user so as to enter different startup items, the method can be applied to various wake-up-on-LAN startup scenarios.
图5为本申请提供的网络唤醒开机整体方法流程示意图,具体参见图5所示,图5中示意出了从局域网内远程发送唤醒数据包到第一网卡(为与第二网卡相区分,这里使用第一网卡来说明),以及第一网卡执行相应操作后,BIOS读取启动数据执行相应目标对象的启动操作的整体流程。包括局域网内远程发送唤醒数据包,在数据包中加入控制启动行为的启动数据。第一网卡收到唤醒数据包后,解析唤醒数据包,获取启动数据,并写入到第一网卡驱动中。计算机设备唤醒开机后,BIOS读取第一网卡驱动,获取启动数据后,根据启动数据中的第一字段的字段值,确定第一启动项为哪个目标对象,并根据第二字段的字段值,判定启动数据在下一周期是否继续生效。如果否,则将第一网卡驱动中的相应启动数据清零。保证仅单次启动生效,如果是,则不去清除第一网卡驱动中的相应启动数据,保证下次启动依然 生效。Fig. 5 is a schematic diagram of the overall method flow of wake-up on network provided by the present application, as shown in Fig. 5 for details. Fig. 5 shows the overall process of remotely sending a wake-up data packet from the local area network to the first network card (in order to distinguish it from the second network card, the first network card is used here for illustration), and after the first network card performs the corresponding operation, the BIOS reads the startup data and executes the startup operation of the corresponding target object. Including sending wake-up data packets remotely in the LAN, and adding start-up data to control start-up behavior in the data packets. After receiving the wake-up data packet, the first network card parses the wake-up data packet, obtains the start-up data, and writes it into the driver of the first network card. After the computer device wakes up and starts up, the BIOS reads the first network card driver, and after obtaining the startup data, determines which target object the first startup item is based on the field value of the first field in the startup data, and determines whether the startup data will continue to take effect in the next cycle according to the field value of the second field. If not, the corresponding startup data in the first network card driver is cleared. It is guaranteed to take effect only for a single startup, if so, do not clear the corresponding startup data in the first network card driver, and ensure that it is still valid for the next startup.
具体的实施过程均已在上述方法实施例中做了详细介绍,这里不再过多说明。The specific implementation process has been introduced in detail in the foregoing method embodiments, and will not be further described here.
以上,为本申请所提供的网络唤醒开机几个方法实施例,下文中则介绍说明本申请所提供的网络唤醒开机其他实施例,具体参见如下。The above are several embodiments of the wake-on-on-lan method provided by the present application, and other embodiments of the wake-on-on-lan provided in the present application are described below, and details are as follows.
图6为本申请实施例提供的一种网络唤醒开机装置,该装置包括:获取模块601、解析模块602、处理模块603。FIG. 6 is a wake-on-LAN startup device provided by an embodiment of the present application, and the device includes: an acquisition module 601 , an analysis module 602 , and a processing module 603 .
获取模块601,用于获取唤醒数据包;An acquisition module 601, configured to acquire a wake-up data packet;
解析模块602,用于对唤醒数据包进行解析,获取启动数据,其中,启动数据中包括多个待启动的目标对象中的其中一个待启动的目标对象的标识信息;The parsing module 602 is configured to parse the wake-up data packet to obtain startup data, wherein the startup data includes identification information of one of the target objects to be started among the plurality of target objects to be started;
处理模块603,用于将标识信息写入到预设位置,以便控制器在确定计算机设备被唤醒后,根据预设位置存储的标识信息,确定待启动的目标对象,并对目标对象执行启动操作。The processing module 603 is configured to write the identification information into the preset location, so that the controller determines the target object to be started according to the identification information stored in the preset location after determining that the computer device is woken up, and executes a startup operation on the target object.
可选的,标识信息,以第一字段的形式体现。Optionally, the identification information is embodied in the form of the first field.
可选的,启动数据中还包括与目标对象对应的启动指令信息;其中,启动指令信息,用于指示与目标对象对应的启动数据的生效周期。Optionally, the activation data further includes activation instruction information corresponding to the target object; wherein, the activation instruction information is used to indicate an effective period of the activation data corresponding to the target object.
可选的,启动指令信息以第二字段的形式体现。Optionally, the start instruction information is embodied in the form of the second field.
可选的,启动数据的数量包括多个。Optionally, the quantity of startup data includes multiple.
本申请实施例提供的网络唤醒开机装置中各部件所执行的功能均已在上述图1所对应的方法实施例中做了详细的描述,因此这里不再赘述。The functions performed by each component in the wake-on-LAN boot device provided in the embodiment of the present application have been described in detail in the method embodiment corresponding to FIG. 1 above, so details are not repeated here.
本申请实施例提供的一种网络唤醒开机装置,获取唤醒数据包后,获取唤醒数据包后,对唤醒数据包进行解析,获取启动数据。在启动数据中,包括有多个待启动的目标对象中的其中一个待启动的目标对象的标识信息。网卡可以将标识信息写入到预设位置,以进行存储。以便后续控制器在确定计算机设备被唤醒后,可以根据预设位置存储的标识信息,确定待启动的目标对象,然后执行相应的启动操作。该过程中,可以根据唤醒数据包中添加的启动数据,来确定待启动的目标对象。相较于现有技术中的机器唤醒后的固定开机启动项而言,本申请可以更加方便、灵活的调整机器唤醒后的第一个开机启动项。以满足现有用户在唤醒开机后,对任意启动项的启动行为进行控制的需求。通过该方式,后续无需用户在唤醒开机后,进入网卡进行PXE启动,或者进入U盘进行启动,使其对于网卡的启动,以及U盘等的启动操作更加方便快捷。而且,由于其可以根据用户的需求对目标机器进行唤醒启动从而进入不同的启动项,所以该方法可以适用于多种网络唤醒开机场景。A wake-up on network boot device provided in an embodiment of the present application, after obtaining the wake-up data packet, parses the wake-up data packet to obtain the start-up data. The activation data includes identification information of one of the multiple target objects to be activated. The network card can write the identification information to a preset location for storage. So that after the subsequent controller determines that the computer device is awakened, it can determine the target object to be started according to the identification information stored in the preset location, and then perform a corresponding start operation. In this process, the target object to be started can be determined according to the start data added in the wake-up data packet. Compared with the fixed startup items after the machine wakes up in the prior art, the present application can more conveniently and flexibly adjust the first startup item after the machine wakes up. To meet the needs of existing users to control the startup behavior of any startup item after waking up and turning on the computer. In this way, there is no need for the user to enter the network card for PXE boot after waking up and booting, or enter the U disk for booting, making it more convenient and quick to start the network card and U disk. Moreover, since it can wake up and start the target machine according to the needs of the user so as to enter different startup items, the method can be applied to various wake-up-on-LAN startup scenarios.
图7为本申请实施例提供的一种网络唤醒开机装置,该装置包括:确定模块701、读取模块702,以及执行模块703。FIG. 7 is a wake-on-LAN boot device provided by an embodiment of the present application, which includes: a determination module 701 , a reading module 702 , and an execution module 703 .
确定模块701,用于确定计算机设备是否被唤醒;A determining module 701, configured to determine whether the computer device is awakened;
读取模块702,用于当确定模块701确定计算机设备被唤醒后,从预设位置读取启动数据,其中,启动数据包括多个待启动的目标对象中的其中一个待启动的目标对象的第一标识信息;The reading module 702 is configured to read the startup data from a preset position after the determination module 701 determines that the computer device is awakened, wherein the startup data includes first identification information of one of the target objects to be started among the plurality of target objects to be started;
执行模块703,用于根据第一标识信息,确定待启动的目标对象后,执行对目标对象的启动操作。The execution module 703 is configured to execute a start operation on the target object after determining the target object to be started according to the first identification information.
可选的,启动数据还包括与目标对象对应的启动指令信息;确定模块701,还用于根据启动指令信息,确定下一周期是否启动与启动指令信息对应的目标对象。Optionally, the startup data also includes startup instruction information corresponding to the target object; the determining module 701 is further configured to determine whether to start the target object corresponding to the startup instruction information in the next cycle according to the startup instruction information.
可选的,执行模块703,具体用于将第一标识信息,与预存储的标识信息映射表中的每一个标识信息进行匹配;Optionally, the execution module 703 is specifically configured to match the first identification information with each identification information in the pre-stored identification information mapping table;
当确定第一标识信息与标识信息映射表中的第二标识信息匹配时,则确定第二标识信息对应的待启动的目标对象,为与第一标识信息对应的待启动的目标对象,其中,标识信息映射表中包括多个标识信息,以及与每一个标识信息具有映射关系的目标对象信息,第二标识信息为标识信息映射表中的任一个标识信息。When it is determined that the first identification information matches the second identification information in the identification information mapping table, it is determined that the target object to be started corresponding to the second identification information is the target object to be activated corresponding to the first identification information, wherein the identification information mapping table includes a plurality of identification information and target object information that has a mapping relationship with each identification information, and the second identification information is any identification information in the identification information mapping table.
可选的,确定模块701,具体用于将第一启动指令信息与预存储的启动指令信息映射表中的每一个启动指令信息进行匹配;Optionally, the determining module 701 is specifically configured to match the first startup instruction information with each startup instruction information in the pre-stored startup instruction information mapping table;
当确定与第一启动指令信息与启动指令信息映射表中的第二启动指令信息匹配时,确定第二启动指令信息对应的生效周期,为第一启动指令信息对应的生效周期,其中,启动指令信息映射表中包括至少两个启动指令信息,以及与每一个启动指令信息对应的生效周期,第二启动指令信息为至少两个启动指令信息中的任一个。When it is determined that the first startup instruction information matches the second startup instruction information in the startup instruction information mapping table, determine the valid period corresponding to the second startup command information, which is the valid period corresponding to the first startup command information, wherein the startup command information mapping table includes at least two startup command information, and a valid period corresponding to each startup command information, and the second startup command information is any one of the at least two startup command information.
本申请实施例提供的网络唤醒开机装置中各部件所执行的功能均已在上述图2及图4所对应的方法实施例中做了详细的描述,因此这里不再赘述。The functions performed by each component in the wake-on-LAN boot device provided in the embodiment of the present application have been described in detail in the above method embodiments corresponding to FIG. 2 and FIG. 4 , so details are not repeated here.
本申请实施例提供的一种网络唤醒开机装置,在确定计算机设备被唤醒后,从预设位置读取启动数据,根据启动数据中所包括的多个待启动的目标对象中的其中一个待启动的目标对象的第一标识信息,完成针对与第一标识信息对应的目标对象的启动操作。该过程中,可以根据唤醒数据包中添加的启动数据,来确定待启动的目标对象。相较于现有技术中的机器唤醒后的固定开机启动项而言,本申请可以更加方便、灵活的调整机器唤醒后的第一个开机 启动项。以满足现有用户在唤醒开机后,对任意启动项的启动行为进行控制的需求。通过该方式,后续无需用户在唤醒开机后,进入网卡进行PXE启动,或者进入U盘进行启动,使其对于网卡的启动,以及U盘等的启动操作更加方便快捷。而且,由于其可以根据用户的需求对目标机器进行唤醒启动从而进入不同的启动项,所以该方法可以适用于多种网络唤醒开机场景。A wake-up on network boot device provided in an embodiment of the present application reads startup data from a preset location after determining that the computer device is woken up, and completes the startup operation for the target object corresponding to the first identification information according to the first identification information of one of the target objects to be started among the plurality of target objects to be started included in the startup data. In this process, the target object to be started can be determined according to the start data added in the wake-up data packet. Compared with the fixed startup item after the machine wakes up in the prior art, the application can more conveniently and flexibly adjust the first startup item after the machine wakes up. To meet the needs of existing users to control the startup behavior of any startup item after waking up and turning on the computer. In this way, there is no need for the user to enter the network card for PXE boot after waking up and booting, or enter the U disk for booting, making it more convenient and quick to start the network card and U disk. Moreover, since it can wake up and start the target machine according to the needs of the user so as to enter different startup items, the method can be applied to various wake-up-on-LAN startup scenarios.
如图8所示,本申请实施例提供了一种计算机设备,包括网卡111、控制器112、通信接口113、存储器114和通信总线115,其中,网卡111、控制器112,通信接口113,存储器114通过通信总线115完成相互间的通信。As shown in FIG. 8 , the embodiment of the present application provides a computer device, including a network card 111, a controller 112, a communication interface 113, a memory 114, and a communication bus 115, wherein the network card 111, the controller 112, the communication interface 113, and the memory 114 complete mutual communication through the communication bus 115.
存储器114,用于存放计算机程序; Memory 114, used to store computer programs;
在本申请一个实施例中,网卡111,用于执行存储器114上所存放的程序时,实现图1所对应的任一方法实施例提供的网络唤醒开机方法,包括:In one embodiment of the present application, when the network card 111 is used to execute the program stored in the memory 114, implement the network wake-up and boot method provided by any method embodiment corresponding to FIG. 1 , including:
获取唤醒数据包;Get the wake-up packet;
对唤醒数据包进行解析,获取启动数据,其中,启动数据中包括多个待启动的目标对象中的其中一个待启动的目标对象的标识信息;Analyzing the wake-up data packet to obtain startup data, wherein the startup data includes identification information of one of the target objects to be started among the plurality of target objects to be started;
将标识信息写入到预设位置,以便控制器在确定计算机设备被唤醒后,根据预设位置存储的标识信息,确定待启动的目标对象,并对目标对象执行启动操作。The identification information is written into the preset location, so that after the controller determines that the computer device is awakened, according to the identification information stored in the preset location, it determines the target object to be started, and executes the start operation on the target object.
可选的,标识信息,以第一字段的形式体现。Optionally, the identification information is embodied in the form of the first field.
可选的,启动数据中还包括与目标对象对应的启动指令信息;其中,启动指令信息,用于指示与目标对象对应的启动数据的生效周期。Optionally, the activation data further includes activation instruction information corresponding to the target object; wherein, the activation instruction information is used to indicate an effective period of the activation data corresponding to the target object.
可选的,启动指令信息以第二字段的形式体现。Optionally, the start instruction information is embodied in the form of the second field.
可选的,启动数据的数量包括多个。Optionally, the quantity of startup data includes multiple.
控制器,用于执行存储器114上所存放的程序时,实现图2至图4所对应的任一方法实施例提供的网络唤醒开机方法,包括:The controller is configured to execute the program stored in the memory 114 to implement the method for wake-up on network provided by any method embodiment corresponding to FIG. 2 to FIG. 4 , including:
当确定计算机设备被唤醒后,从预设位置读取启动数据,其中,启动数据包括多个待启动的目标对象中的其中一个待启动的目标对象的第一标识信息;After determining that the computer device is woken up, reading the startup data from a preset location, wherein the startup data includes first identification information of one of the target objects to be started among the plurality of target objects to be started;
根据第一标识信息,确定待启动的目标对象后,执行对目标对象的启动操作。After the target object to be started is determined according to the first identification information, the start operation on the target object is performed.
可选的,启动数据还包括与目标对象对应的启动指令信息;方法还包括:Optionally, the startup data also includes startup instruction information corresponding to the target object; the method also includes:
根据启动指令信息,确定下一周期是否启动与启动指令信息对应的目标对象。According to the start instruction information, it is determined whether to start the target object corresponding to the start instruction information in the next cycle.
可选的,将第一标识信息,与预存储的标识信息映射表中的每一个标识信息进行匹配;Optionally, matching the first identification information with each identification information in the pre-stored identification information mapping table;
当确定第一标识信息与标识信息映射表中的第二标识信息匹配时,则确定第二标识信息对应的待启动的目标对象,为与第一标识信息对应的待启动的目标对象,其中,标识信息映射表中包括多个标识信息,以及与每一个标识信息具有映射关系的目标对象信息,第二标识信息为标识信息映射表中的任一个标识信息。When it is determined that the first identification information matches the second identification information in the identification information mapping table, it is determined that the target object to be started corresponding to the second identification information is the target object to be activated corresponding to the first identification information, wherein the identification information mapping table includes a plurality of identification information and target object information that has a mapping relationship with each identification information, and the second identification information is any identification information in the identification information mapping table.
可选的,将第一启动指令信息与预存储的启动指令信息映射表中的每一个启动指令信息进行匹配;Optionally, matching the first startup instruction information with each startup instruction information in the pre-stored startup instruction information mapping table;
当确定与第一启动指令信息与启动指令信息映射表中的第二启动指令信息匹配时,确定第二启动指令信息对应的生效周期,为第一启动指令信息对应的生效周期,其中,启动指令信息映射表中包括至少两个启动指令信息,以及与每一个启动指令信息对应的生效周期,第二启动指令信息为至少两个启动指令信息中的任一个。When it is determined that the first startup instruction information matches the second startup instruction information in the startup instruction information mapping table, determine the valid period corresponding to the second startup command information, which is the valid period corresponding to the first startup command information, wherein the startup command information mapping table includes at least two startup command information, and a valid period corresponding to each startup command information, and the second startup command information is any one of the at least two startup command information.
本申请实施例还提供了一种非易失性可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现如前述任意一个方法实施例提供的网络唤醒开机方法的步骤。The embodiment of the present application also provides a non-volatile readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the wake-up on network method provided in any one of the foregoing method embodiments are implemented.
本申请的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本申请实施例的电子设备中的一些或者全部部件的一些或者全部功能。本申请还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本申请的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present application may be realized in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the electronic device according to the embodiments of the present application. The present application can also be implemented as an apparatus or apparatus program (eg, computer program and computer program product) for performing a part or all of the methods described herein. Such a program implementing the present application may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
例如,可以实现根据本申请的方法的电子设备传统上可以包括:处理器和以存储器形式的计算机程序产品或者计算机可读介质。存储器可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器具有用于执行上述方法中的任何方法步骤的程序代码的存储空间。例如,用于程序代码的存储空间可以包括分别用于实现上面的方法中的各种步骤的各个程序代码。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图9的非易失性可读存储介质90。该非易失性可读存储介质90可以具有与电子设备中的存储器类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,非易失性可读存储介质包括计算机可读代码901,即可以由例如诸如处理器读取的代码,这些代码当由电子设备运行时,导致该电子设备执行上面所描述的方法中的各个步骤。For example, an electronic device that can implement a method according to the present application may conventionally include a processor and a computer program product in the form of a memory or a computer-readable medium. The memory may be electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk or ROM. The memory has storage space for program code for carrying out any of the method steps in the methods described above. For example, the storage space for program codes may include respective program codes for respectively implementing various steps in the above methods. These program codes can be read from or written into one or more computer program products. These computer program products comprise program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such a computer program product is typically a non-volatile readable storage medium 90 as with reference to FIG. 9 . The non-volatile readable storage medium 90 may have storage segments, storage space, etc. arranged similarly to a memory in an electronic device. The program code can eg be compressed in a suitable form. Generally, the non-volatile readable storage medium includes computer-readable codes 901, that is, codes that can be read by, for example, a processor, and these codes, when run by an electronic device, cause the electronic device to perform the various steps in the methods described above.
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements but also other elements not expressly listed or which are inherent to such process, method, article or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
以上仅是本申请的具体实施方式,使本领域技术人员能够理解或实现本申请。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所申请的原理和新颖特点相一致的最宽的范围。The above are only specific implementation manners of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims (20)

  1. 一种网络唤醒开机方法,其特征在于,所述方法对应于一种计算机设备,所述计算机设备至少包括网卡和控制器,所述方法由所述网卡执行,包括:A method for waking up on network, wherein the method corresponds to a computer device, the computer device at least includes a network card and a controller, and the method is executed by the network card, including:
    获取唤醒数据包;Get the wake-up packet;
    对所述唤醒数据包进行解析,获取启动数据,其中,所述启动数据中包括多个待启动的目标对象中的其中一个待启动的目标对象的标识信息;Analyzing the wake-up data packet to obtain start-up data, wherein the start-up data includes identification information of one of the target objects to be started among a plurality of target objects to be started;
    将所述标识信息写入到预设位置,以便所述控制器在确定所述计算机设备被唤醒后,根据所述预设位置存储的所述标识信息,确定待启动的目标对象,并对所述目标对象执行启动操作。Writing the identification information into a preset location, so that the controller determines the target object to be started according to the identification information stored in the preset location after determining that the computer device is awakened, and performs a startup operation on the target object.
  2. 根据权利要求1所述的方法,其特征在于,所述标识信息,以第一字段的形式体现。The method according to claim 1, wherein the identification information is embodied in the form of a first field.
  3. 根据权利要求1或2所述的方法,其特征在于,所述启动数据中还包括与所述目标对象对应的启动指令信息;其中,所述启动指令信息,用于指示与所述目标对象对应的所述启动数据的生效周期。The method according to claim 1 or 2, wherein the activation data further includes activation instruction information corresponding to the target object; wherein the activation instruction information is used to indicate a valid period of the activation data corresponding to the target object.
  4. 根据权利要求3所述的方法,其特征在于,所述启动指令信息以第二字段的形式体现。The method according to claim 3, wherein the start instruction information is embodied in the form of a second field.
  5. 根据权利要求1-4任一所述的方法,其特征在于,所述获取唤醒数据包,包括:The method according to any one of claims 1-4, wherein said obtaining the wake-up data packet comprises:
    接收局域网内远程发送的唤醒数据包;所述唤醒数据包中加入有控制启动行为的启动数据。Receiving the wake-up data packet sent remotely in the local area network; the start-up data for controlling the start-up behavior is added to the wake-up data packet.
  6. 根据权利要5所述的方法,其特征在于,所述启动数据被加入至所述唤醒数据包中指定位的字节中。The method according to claim 5, wherein the startup data is added to a byte of a specified bit in the wake-up data packet.
  7. 根据权利要求1-4任一所述的方法,其特征在于,所述预设位置包括所述网卡的网卡驱动。The method according to any one of claims 1-4, wherein the preset location includes a network card driver of the network card.
  8. 一种网络唤醒开机方法,其特征在于,所述方法对应于一种计算机设备,所述计算机设备至少包括网卡和控制器,所述方法由所述控制器执行,包括:A method for waking up on network, wherein the method corresponds to a computer device, the computer device at least includes a network card and a controller, and the method is executed by the controller, including:
    响应于所述计算机设备被唤醒,从预设位置读取启动数据,其中,所述启动数据包括多个待启动的目标对象中的其中一个待启动的目标对象的第一标识信息;reading activation data from a preset location in response to the computer device being woken up, wherein the activation data includes first identification information of one of the target objects to be activated among the plurality of target objects to be activated;
    根据所述第一标识信息,确定待启动的目标对象后,执行对所述目标对象的启动操作。After the target object to be started is determined according to the first identification information, the start operation on the target object is performed.
  9. 根据权利要求8所述的方法,其特征在于,所述启动数据还包括与所述目标对象对应的第一启动指令信息;所述方法还包括:The method according to claim 8, wherein the startup data further includes first startup instruction information corresponding to the target object; the method further includes:
    根据所述第一启动指令信息,确定下一周期是否启动与所述第一启动指令信息对应的所述目标对象。According to the first activation instruction information, it is determined whether to activate the target object corresponding to the first activation instruction information in a next cycle.
  10. 根据权利要求8或9所述的方法,其特征在于,所述根据所述第一标识信息,确定待启动的目标对象,具体包括:The method according to claim 8 or 9, wherein the determining the target object to be started according to the first identification information specifically includes:
    将所述第一标识信息,与预存储的标识信息映射表中的每一个标识信息进行匹配;Matching the first identification information with each identification information in the pre-stored identification information mapping table;
    响应于确定所述第一标识信息与所述标识信息映射表中的第二标识信息匹配,则确定第二标识信息对应的待启动的目标对象,为与所述第一标识信息对应的待启动的目标对象,其中,所述标识信息映射表中包括多个标识信息,以及与每一个标识信息具有映射关系的目标对象信息,所述第二标识信息为所述标识信息映射表中的任一个标识信息。In response to determining that the first identification information matches the second identification information in the identification information mapping table, determine that the target object to be started corresponding to the second identification information is the target object to be started corresponding to the first identification information, wherein the identification information mapping table includes a plurality of identification information and target object information that has a mapping relationship with each identification information, and the second identification information is any identification information in the identification information mapping table.
  11. 根据权利要求9所述的方法,其特征在于,所述根据所述第一启动指令信息,确定下一周期是否启动与所述第一启动指令信息对应的所述目标对象,具体包括:The method according to claim 9, wherein the determining whether to start the target object corresponding to the first startup instruction information in the next cycle according to the first startup instruction information specifically includes:
    将所述第一启动指令信息与预存储的启动指令信息映射表中的每一个启动指令信息进行匹配;Matching the first startup instruction information with each startup instruction information in the pre-stored startup instruction information mapping table;
    响应于确定与所述第一启动指令信息与所述启动指令信息映射表中的第二启动指令信息匹配,确定所述第二启动指令信息对应的生效周期,为所述第一启动指令信息对应的生效周期,其中,所述启动指令信息映射表中包括至少两个启动指令信息,以及与每一个启动指令信息对应的生效周期,所述第二启动指令信息为至少两个启动指令信息中的任一个;In response to determining that the first startup instruction information matches the second startup instruction information in the startup instruction information mapping table, determine an effective period corresponding to the second startup instruction information, which is the effective period corresponding to the first startup instruction information, wherein the startup instruction information mapping table includes at least two startup instruction information, and a valid period corresponding to each startup instruction information, and the second startup instruction information is any one of the at least two startup instruction information;
    根据所述生效周期确定下一周期是否启动与所述第一启动指令信息对应的所述目标对象。Determine whether to activate the target object corresponding to the first activation instruction information in a next period according to the effective period.
  12. 根据权利要求11所述的方法,其特征在于,在所述生效周期为始终有效的情况下,所述根据所述生效周期确定下一周期是否启动与所述第一启动指令信息对应的所述目标对象,包括:The method according to claim 11, wherein, in the case that the valid period is always valid, determining whether to start the target object corresponding to the first startup instruction information in the next period according to the valid period comprises:
    始终确定下一周期启动与所述第一启动指令信息对应的所述目标对象。It is always determined to start the target object corresponding to the first start instruction information in the next cycle.
  13. 根据权利要求11所述的方法,其特征在于,在所述生效周期为单次有效的情况下,所述根据所述生效周期确定下一周期是否启动与所述第一启动指令信息对应的所述目标对象,包括:The method according to claim 11, wherein, in the case that the valid period is valid once, determining whether to start the target object corresponding to the first startup instruction information in the next period according to the valid period comprises:
    确定下一周期不启动与所述第一启动指令信息对应的所述目标对象。It is determined not to start the target object corresponding to the first start instruction information in the next period.
  14. 根据权利要求11所述的方法,其特征在于,所述方法还包括:The method according to claim 11, characterized in that the method further comprises:
    在确定下一周期启动与所述第一启动指令信息对应的所述目标对象的情况下,保留 所述启动数据。If it is determined that the target object corresponding to the first startup instruction information is started in the next cycle, the startup data is retained.
  15. 根据权利要求11所述的方法,其特征在于,所述方法还包括:The method according to claim 11, characterized in that the method further comprises:
    在确定下一周期不启动与所述第一启动指令信息对应的所述目标对象的情况下,删除所述启动数据。If it is determined that the target object corresponding to the first activation instruction information will not be activated in the next period, the activation data is deleted.
  16. 一种网络唤醒开机装置,其特征在于,所述装置包括:A network wake-up boot device, characterized in that the device includes:
    获取模块,用于获取唤醒数据包;Obtaining a module for obtaining a wake-up data packet;
    解析模块,用于对所述唤醒数据包进行解析,获取启动数据,其中,所述启动数据中包括多个待启动的目标对象中的其中一个待启动的目标对象的标识信息;A parsing module, configured to parse the wake-up data packet to obtain startup data, wherein the startup data includes identification information of one of the target objects to be started among a plurality of target objects to be started;
    处理模块,用于将所述标识信息写入到预设位置,以便所述控制器在确定所述计算机设备被唤醒后,根据所述预设位置存储的所述标识信息,确定待启动的目标对象,并对所述目标对象执行启动操作。A processing module, configured to write the identification information into a preset location, so that the controller determines the target object to be started according to the identification information stored in the preset location after determining that the computer device is awakened, and executes a startup operation on the target object.
  17. 一种网络唤醒开机装置,其特征在于,所述装置包括:A network wake-up boot device, characterized in that the device includes:
    确定模块,用于确定计算机设备是否被唤醒;A determining module, configured to determine whether the computer device is awakened;
    读取模块,用于响应于所述计算机设备被唤醒,从预设位置读取启动数据,其中,所述启动数据包括多个待启动的目标对象中的其中一个待启动的目标对象的第一标识信息;A reading module, configured to read activation data from a preset location in response to the computer device being woken up, wherein the activation data includes first identification information of one of the multiple target objects to be activated;
    执行模块,用于根据所述第一标识信息,确定待启动的目标对象后,执行对所述目标对象的启动操作。An execution module, configured to execute a start operation on the target object after determining the target object to be started according to the first identification information.
  18. 一种计算机设备,其特征在于,包括网卡、控制器、通信接口、存储器和通信总线,其中,所述网卡、所述控制器,所述通信接口,所述存储器通过通信总线完成相互间的通信;A computer device, characterized in that it includes a network card, a controller, a communication interface, a memory, and a communication bus, wherein the network card, the controller, the communication interface, and the memory complete mutual communication through the communication bus;
    所述存储器,用于存放计算机程序;The memory is used to store computer programs;
    所述网卡,用于执行存储器上所存放的程序时,实现权利要求1-7任一项所述的网络唤醒开机方法的步骤;When the network card is used to execute the program stored in the memory, it realizes the steps of the network wake-up booting method described in any one of claims 1-7;
    所述控制器,用于执行存储器上所存放的程序时,实现权利要求8-15任一项所述的网络唤醒开机方法的步骤。The controller is configured to implement the steps of the wake-up-on-LAN startup method described in any one of claims 8-15 when executing the program stored in the memory.
  19. 一种非易失性可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被计算机设备执行时,实现如权利要求1-7任一项所述的网络唤醒开机方法的步骤;或者,执行实现如权利要求8-15任一项所述的网络唤醒开机方法的步骤。A non-volatile readable storage medium on which a computer program is stored, wherein, when the computer program is executed by a computer device, the steps of the method for waking up on network as described in any one of claims 1-7 are realized; or, the steps for implementing the method for waking up on network as described in any one of claims 8-15 are executed.
  20. 一种计算机程序,包括计算机可读代码,其特征在于,当所述计算机可读代码在计算处理设备上运行时,导致所述计算处理设备执行如权利要求1-7任一项所述的网络 唤醒开机方法的步骤;或者,执行实现如权利要求8-15任一项所述的网络唤醒开机方法的步骤。A computer program, comprising computer-readable codes, characterized in that, when the computer-readable codes are run on a computing processing device, the computing processing device is caused to execute the steps of the method for waking up on LAN according to any one of claims 1-7;
PCT/CN2022/122790 2022-01-19 2022-09-29 Wake-on-lan method and computer device WO2023138101A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210063401.6A CN114443152B (en) 2022-01-19 2022-01-19 Network wake-up starting-up method and computer equipment
CN202210063401.6 2022-01-19

Publications (1)

Publication Number Publication Date
WO2023138101A1 true WO2023138101A1 (en) 2023-07-27

Family

ID=81368460

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/122790 WO2023138101A1 (en) 2022-01-19 2022-09-29 Wake-on-lan method and computer device

Country Status (2)

Country Link
CN (1) CN114443152B (en)
WO (1) WO2023138101A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443152B (en) * 2022-01-19 2023-07-14 苏州浪潮智能科技有限公司 Network wake-up starting-up method and computer equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6282642B1 (en) * 1998-11-18 2001-08-28 International Business Machines Corporation System for presetting a first or second remote boot protocol by a computer remotely receiving and storing a boot parameter prior to being powered on
US6292890B1 (en) * 1998-09-29 2001-09-18 Compaq Computer Corporation Computer system with dynamically configurable boot order
US20050144493A1 (en) * 2003-12-31 2005-06-30 International Business Machines Corporation Remote management of boot application
US20060288202A1 (en) * 2005-06-17 2006-12-21 Mark Doran Method for network restart
CN107864042A (en) * 2017-10-31 2018-03-30 青岛海信电器股份有限公司 Application program awakening method and device
CN110297663A (en) * 2018-03-21 2019-10-01 阿里巴巴集团控股有限公司 Awakening method, device, terminal and the medium of application program
CN114443152A (en) * 2022-01-19 2022-05-06 苏州浪潮智能科技有限公司 Network wake-up starting method and computer equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021017B (en) * 2014-06-17 2017-12-26 北京奇虎科技有限公司 The treating method and apparatus of startup item
CN112055189A (en) * 2020-09-15 2020-12-08 上海跃影科技有限公司 Holographic system with network awakening function and network awakening method thereof
CN113010215B (en) * 2021-03-12 2023-03-21 山东英信计算机技术有限公司 Method, device and equipment for quickly restarting operating system and readable medium
CN113672292A (en) * 2021-08-09 2021-11-19 深圳市猿人创新科技有限公司 Equipment awakening method and device, electronic equipment and computer storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6292890B1 (en) * 1998-09-29 2001-09-18 Compaq Computer Corporation Computer system with dynamically configurable boot order
US6282642B1 (en) * 1998-11-18 2001-08-28 International Business Machines Corporation System for presetting a first or second remote boot protocol by a computer remotely receiving and storing a boot parameter prior to being powered on
US20050144493A1 (en) * 2003-12-31 2005-06-30 International Business Machines Corporation Remote management of boot application
US20060288202A1 (en) * 2005-06-17 2006-12-21 Mark Doran Method for network restart
CN107864042A (en) * 2017-10-31 2018-03-30 青岛海信电器股份有限公司 Application program awakening method and device
CN110297663A (en) * 2018-03-21 2019-10-01 阿里巴巴集团控股有限公司 Awakening method, device, terminal and the medium of application program
CN114443152A (en) * 2022-01-19 2022-05-06 苏州浪潮智能科技有限公司 Network wake-up starting method and computer equipment

Also Published As

Publication number Publication date
CN114443152A (en) 2022-05-06
CN114443152B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN1261868C (en) Method of rapid computer start-up
US9710045B2 (en) Managing network wake-up commands
CN103412769B (en) External card parameter configuration, equipment and system
US9128729B1 (en) System and method for automatically configuring bios performance profiles
CN110069280B (en) Electronic device and firmware updating method thereof
WO2017059721A1 (en) Information storage method, device and server
US20140082346A1 (en) Method and System for Managing Basic Input/Output System (BIOS) Configuration Data of BIOS
WO2023138101A1 (en) Wake-on-lan method and computer device
EP3028145A1 (en) Parallelizing boot operations
TWI743395B (en) The method for updating firmware via remote utility、computer system and non-transitory computer-readable medium
US7093118B2 (en) System and method for external bus device support
WO2021120830A1 (en) Method and apparatus for launching operating system, computer device, and storage medium
JP2014006726A (en) Controller, electronic apparatus, and control method of usb device
TW201721414A (en) Method for initializing peripheral devices and electronic device using the same
TWI486874B (en) Electronic apparatus and booting method
TWI475485B (en) Firmware flashing method and related computer system
TWI464583B (en) Method of obtaining command for triggering function
CN111338699A (en) Computer mainboard initialization method and device, computer equipment and storage medium
WO2020113478A1 (en) Address information processing method and apparatus, electronic device, and storage medium
CN107391174A (en) A kind of control method and control device of system online upgrading
JP5489278B2 (en) Information processing apparatus and activation method thereof
CN112241141B (en) Hardware configuration method, system, device and medium of PLC control system
WO2012062132A1 (en) Self-programming method and device for file system based on nand flash memory
CN113010236A (en) Program execution method, device, equipment and storage medium
US11977897B2 (en) Mounting position of NVMe or SATA on a backplane using bay slot ID

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22921528

Country of ref document: EP

Kind code of ref document: A1