CN117234601A - System starting method and device, electronic equipment and storage medium - Google Patents

System starting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117234601A
CN117234601A CN202311142409.2A CN202311142409A CN117234601A CN 117234601 A CN117234601 A CN 117234601A CN 202311142409 A CN202311142409 A CN 202311142409A CN 117234601 A CN117234601 A CN 117234601A
Authority
CN
China
Prior art keywords
determining
system file
state parameter
file
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311142409.2A
Other languages
Chinese (zh)
Inventor
石昌帅
寇浩锋
安建军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202311142409.2A priority Critical patent/CN117234601A/en
Publication of CN117234601A publication Critical patent/CN117234601A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The disclosure provides a system starting method, a system starting device, electronic equipment and a storage medium, relates to the technical field of computers, and particularly relates to the technical field of artificial intelligence such as automatic driving and deep learning. The specific implementation scheme is as follows: firstly, in the system starting process, determining the current system starting reason and the current value of the preset state parameter in the system, then determining the target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter, and finally loading the target system file. Therefore, based on the current values of the system starting reasons and the state parameters, the target system files are determined and loaded, so that the monitoring of faults caused by restarting the system due to abnormal running states is realized.

Description

System starting method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, in particular to the technical field of artificial intelligence such as automatic driving and deep learning, and specifically relates to a system starting method, a system starting device, electronic equipment and a storage medium.
Background
Currently, there are generally two types of gold images (gold images) and images (images) in systems. Normally, the system runs an image, and only when the system is restarted due to errors in the hardware initialization process, the system is switched to the golden image.
Disclosure of Invention
The present disclosure aims to solve, at least to some extent, one of the technical problems in the related art.
An embodiment of a first aspect of the present disclosure provides a method for starting a system, including:
in the system starting process, determining the current system starting reason and the current value of a preset state parameter in the system, wherein the value of the preset state parameter is used for representing the restarting times of the system due to abnormal running state;
determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter;
and loading the target system file.
An embodiment of a second aspect of the present disclosure provides a system startup device, including:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining the current system starting reason and the current value of the preset state parameter in the system starting process, and the preset state parameter value is used for representing the restarting times of the system due to abnormal running state;
the second determining module is used for determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter;
And the loading module is used for loading the target system file.
Embodiments of a third aspect of the present disclosure provide a computer device comprising: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the starting method of the system as provided by the embodiment of the first aspect of the disclosure when the processor executes the program.
An embodiment of a fourth aspect of the present disclosure proposes a computer readable storage medium storing a computer program which, when executed by a processor, implements a method for starting up a system as proposed by an embodiment of the first aspect of the present disclosure.
An embodiment of a fifth aspect of the present disclosure proposes a computer program product comprising a computer program which, when executed by a processor, implements a method of starting up a system as proposed by an embodiment of the first aspect of the present disclosure.
The system starting method, the device, the computer equipment and the storage medium provided by the disclosure have the following beneficial effects:
in the embodiment of the disclosure, firstly, in a system starting process, determining a current system starting reason and a current value of a preset state parameter in the system, then, according to at least one of the system starting reason and the current value of the state parameter, determining a target system file to be loaded, and finally, loading the target system file. Therefore, based on the current values of the system starting reasons and the state parameters, the target system files are determined and loaded, so that the monitoring of faults caused by restarting the system due to abnormal running states is realized.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of a method for starting a system according to an embodiment of the disclosure;
FIG. 2 is a flow chart of a method for starting up a system according to an embodiment of the disclosure;
FIG. 3 is a flowchart of a system start-up method according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of a system start-up method according to an embodiment of the present disclosure;
FIG. 5 is a flowchart of a system start-up method according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a system start-up method according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a system starting device according to an embodiment of the disclosure;
FIG. 8 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The present disclosure relates to the field of artificial intelligence techniques for autopilot, deep learning, and the like.
Artificial intelligence (Artificial Intelligence), english is abbreviated AI. It is a new technical science for researching, developing theory, method, technology and application system for simulating, extending and expanding human intelligence.
Deep learning, which is the inherent law and presentation hierarchy of learning sample data, is greatly helpful to the interpretation of data such as text, images and sounds. The final goal of deep learning is to enable a machine to analyze learning capabilities like a person, and to recognize text, images, and sound data.
Autopilot, also known as unmanned, computerized or wheeled mobile robots, is a leading edge technology that relies on computer and artificial intelligence technology to achieve complete, safe, efficient driving without human manipulation.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
In the related art, there are generally two types of gold images (golden images) and images (images) in the system. Normally, the system runs an image, only if an error in The process of initializing hardware causes The system to restart, the system is switched to The golden image, then an Over-The-Air (OTA) service is executed to repair or upgrade The program package in The image, but The method in The prior art cannot detect The faults of The software in The process of running and some bus communication, so when The faults occur and cause The system to restart, the system is not switched to The golden image, and The program package in The image cannot be repaired or upgraded.
The disclosure proposes a method for starting a system, in which, during the running process of a program in an image, by checking the running state of resources and tasks in the running process of the system, when any abnormality is detected to cause the restarting of the system, a preset identifier is added by one, and when the value of the identifier is greater than or equal to a threshold value, the running golden image is triggered, and an OTA service is started to repair or upgrade the program in the image. Therefore, not only can the fault which causes the restarting of the system in the running process of the program be monitored, but also the reliability and stability of the program in the image are ensured.
The following describes a method, apparatus, electronic device, and storage medium for starting up a system according to an embodiment of the present disclosure with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for starting a system according to an embodiment of the disclosure.
As shown in fig. 1, the method for starting up the system may include the steps of:
step 101, determining a current system starting reason and a current value of a preset state parameter in the system starting process, wherein the preset value of the state parameter is used for representing the restarting times of the system due to abnormal running state.
It should be noted that, in general, when a system is started, a pointer points to a Boot Loader (Boot Loader) first, and then a specific system file is loaded by the Boot Loader to complete the system startup.
The reason for system start-up, which may be any reason for hardware initialization failure, task operation error, etc., is not limited in this disclosure.
The preset state parameter is used for identifying the number of times that the system is restarted due to abnormal running state.
It should be noted that, the value of the state parameter increases with the number of restarting times caused by the abnormal running state.
In the present disclosure, during a system start-up process, a bootloader first determines a current system start-up reason and a current value of a state parameter preset in a system.
Step 102, determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter.
The target system file is an image file for realizing the system function.
In some possible implementations, the target system file is determined to be the first system file in the event that the system boot cause is a hardware initialization failure.
The first system file is an image file for realizing the basic functions of the system.
In the present disclosure, when the system start-up reason is that the hardware initialization fails, it may be considered that the hardware of the system fails during the initialization, so that the system cannot be started up, and at this time, the system may determine the first system file as the target system file, and re-initialize the hardware.
In some possible implementations, the target system file is determined to be the first system file if the current value of the state parameter is greater than the threshold.
The threshold is a threshold value of the state parameter, which may be preset for the system, for example, the threshold may be 3, which is not limited in this disclosure.
In the present disclosure, when the current value of the state parameter is greater than the threshold value, it may be considered that the fault that causes the system to restart based on the abnormal running state is not an accidental event, and at this time, the system may determine the first system file as the target system file, and re-perform hardware initialization.
In some possible implementation forms, the target system file is determined to be the second system file when the system start-up cause is not hardware initialization failure and the current value of the state parameter is less than or equal to the threshold value.
The second system file is an image file for realizing the global function of the system.
In the present disclosure, when the system start-up cause is not a hardware initialization failure and the current value of the state parameter is less than or equal to the threshold, it may be considered that a failure that causes a system restart based on an abnormal running state has an contingency, and at this time, the system may determine the second system file as a target system file, and initialize the hardware.
In the method, the boot loader determines the target system file to be loaded based on any one of the current values of the system starting reasons and the state parameters, so that whether the system is restarted due to hardware initialization failure or the system is restarted due to abnormal running state, the boot loader can quickly home in the corresponding target system file.
Step 103, loading the target system file.
In some possible implementations, when loading the target system file, it is first necessary to determine the target address corresponding to the target system file, and then point the pointer to the target address.
The target address is the first address of the target system file stored in the system memory.
In the present disclosure, the boot loader may load the target system file after determining the target system file. When loading the target system file, firstly determining a target address corresponding to the target system file, and then pointing the pointer to the target address, so that the system can perform hardware initialization based on the target system file to finish system starting.
In the embodiment of the disclosure, firstly, in a system starting process, determining a current system starting reason and a current value of a preset state parameter in the system, then, according to at least one of the system starting reason and the current value of the state parameter, determining a target system file to be loaded, and finally, loading the target system file. Therefore, based on the current values of the system starting reasons and the state parameters, the target system files are determined and loaded, so that the monitoring of faults caused by restarting the system due to abnormal running states is realized.
Fig. 2 is a flowchart of a method for starting up a system according to an embodiment of the disclosure.
As shown in fig. 2, the method for starting up the system may include the steps of:
step 201, determining a current system starting reason and a current value of a preset state parameter in the system starting process, wherein the preset value of the state parameter is used for representing the restarting times of the system due to abnormal running state.
Step 202, determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter.
Step 203, loading the target system file.
The specific implementation manner of step 201 to step 203 may refer to the detailed descriptions in other embodiments in the disclosure, and will not be described in detail herein.
In step 204, if the target system file is the first system file, the over-the-air OTA service is started, and the second system file in the system is updated, where the first system file is used to implement the basic function of the system, and the second system file is used to implement the global function of the system.
In the disclosure, when the target system file is the first system file, it may be considered that in the current system start, the system may be restarted due to a failure in initializing the hardware, or may be restarted due to an abnormal running state, and a failure in restarting the system due to an abnormal running state is not an accidental event, at this time, the boot loader loads the first system file to initialize the hardware, and starts the OTA service to update the second system file, thereby implementing an operation of repairing or updating the second system file based on the running state.
In step 205, when the current value of the state parameter is greater than the threshold value, the value of the state parameter is set to zero.
In the disclosure, after loading a first system file and starting an OTA service, after updating a second system file, when the current value of a state parameter is found to be greater than a threshold value, because the OTA service is triggered to update the second system file, it can be considered that a fault that causes a system restart based on an abnormal running state has been repaired or upgraded, so that the value of the state parameter can be set to zero, so as to restart counting of the state parameter.
In the embodiment of the disclosure, firstly, in a system starting process, determining a current system starting reason and a current value of a preset state parameter in the system, then, according to at least one of the system starting reason and the current value of the state parameter, determining a target system file to be loaded, loading the target system file, starting an over-the-air OTA service under the condition that the target system file is a first system file, updating a second system file in the system, and then, setting the value of the state parameter to zero under the condition that the current value of the state parameter is greater than a threshold value. Therefore, based on the first system file, OTA service is started to update the second system file, so that the operation of repairing or upgrading the program in the second system file based on the running state is triggered, and the reliability and stability of the program in the second system file are ensured.
Fig. 3 is a flowchart of a method for starting up a system according to an embodiment of the disclosure.
As shown in fig. 3, the method for starting up the system may include the steps of:
step 301, determining a current system starting reason and a current value of a preset state parameter in the system in a system starting process, wherein the preset value of the state parameter is used for representing the restarting times of the system due to abnormal running state.
Step 302, determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter.
Step 303, loading the target system file.
The specific implementation manner of steps 301 to 303 may refer to the detailed descriptions in other embodiments of the disclosure, and will not be described in detail herein.
Step 304, when the update period of the state parameter is reached, the value of the state parameter is set to zero.
The update period is a period for updating the value of the state parameter, which may be preset for the system, for example, the update period of the state parameter may be set to one week, which is not limited in the disclosure.
It should be noted that, in the update period of the state parameter, if the value of the state parameter is not greater than the threshold value, it may be considered that the fault that causes the restart of the system based on the abnormal operation state is extremely accidental, and at this time, the value of the state parameter may be set to zero, and the count of the state parameter in the next period may be restarted.
In the embodiment of the disclosure, firstly, in a system starting process, determining a current system starting reason and a current value of a preset state parameter in the system, determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter, then loading the target system file, and setting the value of the state parameter to zero under the condition that an updating period of the state parameter is reached. Therefore, when the update period of the state parameter is reached, the value of the state parameter is set to zero, so that the fault caused by restarting the system due to the abnormal running state is further monitored.
Fig. 4 is a flowchart of a method for starting a system according to an embodiment of the disclosure.
As shown in fig. 4, the method for starting up the system may include the steps of:
step 401, determining a current system starting reason and a current value of a preset state parameter in the system in a system starting process, wherein the preset value of the state parameter is used for representing the restarting times of the system due to abnormal running state.
Step 402, determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter.
Step 403, loading the target system file.
The specific implementation manner of steps 401 to 403 may refer to the detailed descriptions in other embodiments in this disclosure, and will not be described in detail herein.
In step 404, in the case that the target system file is the second system file, the hardware initialization process is monitored.
In the present disclosure, when the target system file is the second system file, it may be considered that the cause of the system restart is not hardware initialization failure, and the failure of the system restart caused by the abnormal running state is an accidental event, and at this time, the boot loader loads the second system file, performs hardware initialization on the system, and monitors the hardware initialization process.
In step 405, if a hardware initialization failure is detected, a system restart service is triggered, and it is determined that the system start-up is due to the hardware initialization failure.
In the present disclosure, when a hardware initialization failure is detected, the bootloader will trigger a system restart service, and at the same time, determine the hardware initialization failure as a system start reason.
In the embodiment of the disclosure, firstly, in a system starting process, determining a current system starting reason and a current value of a preset state parameter in the system, determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter, then loading the target system file, monitoring a hardware initialization process when the target system file is a second system file, triggering a system restarting service when the hardware initialization failure is monitored, and determining that the system starting reason is the hardware initialization failure. Therefore, under the condition that the target system file is the second system file, the hardware initialization process is monitored, and therefore the fault of restarting the system caused by the hardware initialization failure is monitored.
Fig. 5 is a flowchart of a method for starting up a system according to an embodiment of the disclosure.
As shown in fig. 5, the method for starting up the system may include the steps of:
in step 501, during the system start-up process, determining the current system start-up reason and the current value of the preset state parameter in the system, where the preset value of the state parameter is used to characterize the number of restarting times of the system due to abnormal running state.
Step 502, determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter.
Step 503, loading the target system file.
The specific implementation manner of step 501 to step 503 may refer to the detailed descriptions in other embodiments in the disclosure, and will not be described in detail herein.
Step 504, during the running process of the system, the resource status and the task running status in the system are monitored respectively.
In some possible implementations, the resources in the system to be monitored may include at least one of: ethernet Eth interface, eth bus, serial bus UART, serial peripheral interface SPI, integrated circuit bus IIC, memory surplus space.
In the method, the boot loader can monitor the resource state in the system in the running process of the system, so that the fault of restarting the system caused by non-hardware initialization failure can be rapidly monitored.
In some possible implementation forms, in the process of monitoring the running state of the task, firstly, determining the type of each task in the running state in the system, then, determining the monitoring mode of each task according to the type of each task, and finally, monitoring the running state of each task based on the monitoring mode of each task, so that the fault of restarting the system caused by abnormal running state of the task can be monitored.
The task type may be a periodic task, or may also be an event task, or may also be a logic task, or the like, which is not limited in this disclosure.
It should be noted that, the types of tasks are different, and the monitoring modes of the corresponding tasks are also different.
For example, when the task type is "periodic tasks", monitoring of the viability of the task may be selected; when the task type is 'event task', the deadline of the task can be selected to be monitored; when the task type is a logical task, the logic of the task can be selectively monitored.
It should be noted that, one task may need to monitor multiple items of data, or may need to monitor only one item of data.
Step 505, triggering the system restart service and adding one to the value of the state parameter when any state satisfies the system restart condition.
The system restart condition is a condition preset by the boot loader and used for triggering the system restart, which is not limited in the disclosure.
In the present disclosure, when any state satisfies a system restart condition, a system restart service is triggered, and it may be considered that the system is restarted due to an abnormal operation state, where the value of a state parameter needs to be increased by one.
Next, referring to fig. 6, a method for starting a system according to an embodiment of the present disclosure is described, fig. 6 is a schematic diagram of a method for starting a system according to an embodiment of the present disclosure, as shown in fig. 6, image0 is a second system file, golden Image is a first system file, bootloader is a bootloader, and error_stus is a preset status parameter.
Firstly, dividing two mirror image file storage areas in a system memory space, namely a second system file and a first system file, and simultaneously, a boot loader area.
Then in the mirror image, hardware initialization monitoring, resource state monitoring, task runtime state monitoring and the like are performed through one monitoring task. If none of these monitoring is problematic, the status parameter is zeroed out; if any abnormal state occurs in the task operation process to cause the system to restart, the value of the state parameter is increased by one, and in the system restarting process, the boot loader area is required to be checked again, and if the value of the state parameter is greater than the threshold value, the boot loader loads the first system file, simultaneously starts OTA service and repairs or updates the second system file.
In the embodiment of the disclosure, firstly, in the system starting process, determining the current system starting reason and the current value of the preset state parameter in the system, determining the target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter, then loading the target system file, monitoring the resource state and the task running state in the system respectively in the system running process, triggering the system restarting service under the condition that any state meets the system restarting condition, and adding one value of the state parameter. Therefore, the resource state and the task running state in the system are monitored, and the monitoring of faults caused by restarting the system due to the abnormality of the task running state is further realized.
In order to implement the above embodiment, the present disclosure further proposes a starting device of a system.
Fig. 7 is a schematic structural diagram of a starting device of a system according to an embodiment of the disclosure.
As shown in fig. 7, the starting device 700 of the system includes: a first determining module 701, a second determining module 702, and a loading module 703.
A first determining module 701, configured to determine, during a system start-up process, a current system start-up cause and a current value of a preset state parameter in the system, where the preset state parameter value is used to characterize a number of times that the system is restarted due to an abnormal running state;
a second determining module 702, configured to determine, according to at least one of a system start reason and a current value of a state parameter, a target system file to be loaded;
a loading module 703, configured to load the target system file.
In one possible implementation manner of the present disclosure, the second determining module 702 is specifically configured to:
under the condition that the system starting reason is hardware initialization failure, determining a target system file as a first system file; or,
under the condition that the current value of the state parameter is larger than a threshold value, determining the target system file as a first system file; or,
And under the condition that the system starting reason is not hardware initialization failure and the current value of the state parameter is smaller than or equal to the threshold value, determining the target system file as the second system file.
In one possible implementation of the present disclosure, the loading module 703 is further configured to:
and under the condition that the target system file is a first system file, starting an over-the-air OTA service, and updating a second system file in the system, wherein the first system file is used for realizing the basic function of the system, and the second system file is used for realizing the global function of the system.
In one possible implementation of the present disclosure, the loading module 703 is further configured to:
and under the condition that the current value of the state parameter is larger than the threshold value, setting the value of the state parameter to zero.
In one possible implementation of the present disclosure, the method further includes:
a processing module (not shown in the figure) is configured to set the value of the state parameter to zero when the update period of the state parameter is reached.
In one possible implementation of the present disclosure, the loading module 703 is further configured to:
monitoring a hardware initialization process under the condition that the target system file is a second system file;
And triggering the system restart service under the condition that the hardware initialization failure is monitored, and determining that the system start is caused by the hardware initialization failure.
In one possible implementation of the present disclosure, the loading module 703 is further configured to:
in the running process of the system, monitoring the resource state and the task running state in the system respectively;
and triggering the system restart service and adding one value of the state parameter under the condition that any state meets the system restart condition.
In one possible implementation of the present disclosure, the loading module 703 is further configured to:
determining the type of each task in the running state in the system;
determining a monitoring mode of each task according to the type of each task;
the running state of each task is monitored based on the monitoring mode of each task.
In one possible implementation of the present disclosure, the resources in the system to be monitored include at least one of:
ethernet Eth interface, eth bus, serial bus UART, serial peripheral interface SPI, integrated circuit bus IIC, memory surplus space.
In one possible implementation manner of the present disclosure, the loading module 703 is specifically configured to:
Determining a target address corresponding to a target system file;
the pointer is pointed to the target address.
The functions and specific implementation principles of the foregoing modules in the embodiments of the present disclosure may refer to the foregoing method embodiments, and are not repeated herein.
In the embodiment of the disclosure, firstly, in a system starting process, determining a current system starting reason and a current value of a preset state parameter in the system, then, according to at least one of the system starting reason and the current value of the state parameter, determining a target system file to be loaded, and finally, loading the target system file. Therefore, based on the current values of the system starting reasons and the state parameters, the target system files are determined and loaded, so that the monitoring of faults caused by restarting the system due to abnormal running states is realized.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 8 illustrates a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as a startup method of the system. For example, in some embodiments, the method of system startup may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 800 via ROM802 and/or communication unit 809. When the computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the start-up method of the system described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the method of starting up the system by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
In the embodiment of the disclosure, firstly, in a system starting process, determining a current system starting reason and a current value of a preset state parameter in the system, then, according to at least one of the system starting reason and the current value of the state parameter, determining a target system file to be loaded, and finally, loading the target system file. Therefore, based on the current values of the system starting reasons and the state parameters, the target system files are determined and loaded, so that the monitoring of faults caused by restarting the system due to abnormal running states is realized.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, the meaning of "a plurality" is at least two, such as two, three, etc., unless explicitly specified otherwise. In the description of the present disclosure, the words "if" and "if" are used to be interpreted as "at … …" or "at … …" or "in response to a determination" or "in the … … case".
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (23)

1. A method of starting up a system, comprising:
in the system starting process, determining the current system starting reason and the current value of a preset state parameter in the system, wherein the value of the preset state parameter is used for representing the restarting times of the system due to abnormal running state;
determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter;
and loading the target system file.
2. The method of claim 1, wherein the determining the target system file to be loaded according to any one of the system start reason and the current value of the state parameter comprises:
under the condition that the system starting reason is hardware initialization failure, determining the target system file as the first system file; or,
Determining the target system file as the first system file under the condition that the current value of the state parameter is larger than a threshold value; or,
and under the condition that the system starting reason is not hardware initialization failure and the current value of the state parameter is smaller than or equal to the threshold value, determining the target system file as the second system file.
3. The method of claim 1, wherein after said loading said target system file, further comprising:
and under the condition that the target system file is a first system file, starting an over-the-air OTA service, and updating a second system file in the system, wherein the first system file is used for realizing the basic function of the system, and the second system file is used for realizing the global function of the system.
4. The method of claim 3, wherein after said updating the second system file in the system, further comprising:
and setting the value of the state parameter to zero under the condition that the current value of the state parameter is larger than a threshold value.
5. The method of claim 1, further comprising:
and under the condition that the updating period of the state parameter is reached, setting the value of the state parameter to zero.
6. The method of any of claims 1-5, wherein after said loading the target system file, further comprising:
monitoring a hardware initialization process under the condition that the target system file is a second system file;
and triggering a system restart service under the condition that the hardware initialization failure is monitored, and determining that the system start reason is the hardware initialization failure.
7. The method of any of claims 1-5, wherein after said loading the target system file, further comprising:
in the running process of the system, respectively monitoring the resource state and the task running state in the system;
and triggering the system restart service and adding one to the value of the state parameter under the condition that any state meets the system restart condition.
8. The method of claim 7, wherein the process of monitoring the task operational status comprises:
determining the type of each task in the system in an operation state;
determining a monitoring mode of each task according to the type of each task;
and monitoring the running state of each task based on the monitoring mode of each task.
9. The method of claim 7, wherein the resources in the system to be monitored comprise at least one of:
ethernet Eth interface, eth bus, serial bus UART, serial peripheral interface SPI, integrated circuit bus IIC, memory surplus space.
10. The method of any of claims 1-5, wherein the loading the target system file comprises:
determining a target address corresponding to the target system file;
a pointer is directed to the target address.
11. A system start-up device comprising:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining the current system starting reason and the current value of the preset state parameter in the system starting process, and the preset state parameter value is used for representing the restarting times of the system due to abnormal running state;
the second determining module is used for determining a target system file to be loaded according to at least one of the system starting reason and the current value of the state parameter;
and the loading module is used for loading the target system file.
12. The apparatus of claim 11, wherein the second determining module is specifically configured to:
under the condition that the system starting reason is hardware initialization failure, determining the target system file as the first system file; or,
Determining the target system file as the first system file under the condition that the current value of the state parameter is larger than a threshold value; or,
and under the condition that the system starting reason is not hardware initialization failure and the current value of the state parameter is smaller than or equal to the threshold value, determining the target system file as the second system file.
13. The apparatus of claim 11, wherein the loading module is further to:
and under the condition that the target system file is a first system file, starting an over-the-air OTA service, and updating a second system file in the system, wherein the first system file is used for realizing the basic function of the system, and the second system file is used for realizing the global function of the system.
14. The apparatus of claim 13, wherein the loading module is further to:
and setting the value of the state parameter to zero under the condition that the current value of the state parameter is larger than a threshold value.
15. The apparatus of claim 11, further comprising:
and the processing module is used for setting the value of the state parameter to zero under the condition that the updating period of the state parameter is reached.
16. The apparatus of claims 11-15, wherein the loading module is further to:
monitoring a hardware initialization process under the condition that the target system file is a second system file;
and triggering a system restart service under the condition that the hardware initialization failure is monitored, and determining that the system start reason is the hardware initialization failure.
17. The apparatus of claims 11-15, wherein the loading module is further to:
in the running process of the system, respectively monitoring the resource state and the task running state in the system;
and triggering the system restart service and adding one to the value of the state parameter under the condition that any state meets the system restart condition.
18. The apparatus of claim 17, wherein the loading module is further to:
determining the type of each task in the system in an operation state;
determining a monitoring mode of each task according to the type of each task;
and monitoring the running state of each task based on the monitoring mode of each task.
19. The apparatus of claim 17, wherein the resources in the system to be monitored comprise at least one of:
Ethernet Eth interface, eth bus, serial bus UART, serial peripheral interface SPI, integrated circuit bus IIC, memory surplus space.
20. The apparatus according to claims 11-15, wherein the loading module is specifically configured to:
determining a target address corresponding to the target system file;
a pointer is directed to the target address.
21. An electronic device, comprising:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions that are likely to be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
22. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-10.
23. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-10.
CN202311142409.2A 2023-09-05 2023-09-05 System starting method and device, electronic equipment and storage medium Pending CN117234601A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311142409.2A CN117234601A (en) 2023-09-05 2023-09-05 System starting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311142409.2A CN117234601A (en) 2023-09-05 2023-09-05 System starting method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117234601A true CN117234601A (en) 2023-12-15

Family

ID=89087160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311142409.2A Pending CN117234601A (en) 2023-09-05 2023-09-05 System starting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117234601A (en)

Similar Documents

Publication Publication Date Title
US20170199737A1 (en) Efficient detection of architecture related bugs during the porting process
CN115794257B (en) System starting method, device, electronic equipment and storage medium
CN114168222B (en) Method and device for acquiring time consumption during starting, terminal equipment and storage medium
CN112527281B (en) Operator upgrading method and device based on artificial intelligence, electronic equipment and medium
CN112835639A (en) Hook implementation method, device, equipment, medium and product
CN113590287B (en) Task processing method, device, equipment, storage medium and scheduling system
CN117234601A (en) System starting method and device, electronic equipment and storage medium
CN114860322A (en) Substrate management controller, control method and electronic equipment
CN115454515A (en) System processing method and device and electronic equipment
CN112596814B (en) Integrated packaging method, apparatus, device, medium and program product for items
US11354109B1 (en) Firmware updates using updated firmware files in a dedicated firmware volume
CN113515291A (en) Equipment online upgrading method and device
CN115952004B (en) Resource allocation method, device, electronic equipment and storage medium
CN113326513B (en) Application testing method and device, system, electronic equipment and computer readable medium
CN114721871A (en) Data backup method and device and electronic equipment
US10691444B1 (en) Launching updated firmware files stored in a dedicated firmware volume
CN115562803A (en) Automatic recovery method, device, equipment and storage medium for mirror image file
CN117271333A (en) Data processing method and device, electronic equipment and readable storage medium
CN116301962A (en) Service model updating method, device, equipment and storage medium
CN117520080A (en) Server testing method, device, equipment and medium
CN115599682A (en) Environment availability detection method, device, equipment and storage medium
CN116225785A (en) Method, device and storage medium for automatically repairing computer startup fault
CN117724879A (en) Operating system exception analysis method, device and equipment
CN116991737A (en) Software testing method, system, electronic equipment and storage medium
CN116069764A (en) Data verification method, device, electronic equipment and storage medium

Legal Events

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