Equipment starting method and device and electronic equipment

By determining the business volume and the optimization process startup sequence in the device, the problem of device startup relying on a fixed framework or hardware platform is solved, and the rapid startup and efficient business processing of the device in high-traffic scenarios are achieved.

CN119473408APending Publication Date: 2025-02-18CHINA TELECOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411472516.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing equipment startup technology relies on a fixed framework or hardware platform, and lacks consideration for the overall startup of software and hardware, resulting in long startup time, complex implementation and difficult maintenance, especially inconvenient application in high traffic and high business volume scenarios.

Method used

By determining the service volume of the device, including hardware and software business information, when the service volume exceeds the preset threshold, the startup sequence of multiple processes is determined, and the target process is started according to the startup sequence and the number of CPU cores, and the device startup process is optimized.

Benefits of technology

It realizes rapid start-up of equipment and efficient business processing, solves the problems of long start-up time and difficulty in unified maintenance, and is suitable for high-traffic scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473408A_ABST
    Figure CN119473408A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment starting method and device and electronic equipment. The method comprises the steps that the service volume of equipment is determined, and the service volume comprises hardware service information and software service information of the equipment; under the condition that the business volume exceeds a preset business volume threshold value, determining a starting sequence of a plurality of processes of the equipment; and starting a target process in the equipment according to the starting sequence and the CPU core number. According to the method and the device, the technical problems that equipment starting time is relatively long and unified maintenance is difficult due to the fact that equipment starting generally depends on a fixed frame or a hardware platform and overall software and hardware starting is lacked in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology and security, and in particular to a device startup method, apparatus and electronic device. Background Art

[0002] The device startup technology in the relevant technology mainly includes startup solutions based on specific frameworks, specific hardware platforms and differentiated systems. Although these solutions can optimize the startup process to a certain extent, they generally have problems such as long startup time, complex implementation, and difficult maintenance. There is also a lack of unified consideration of the startup conditions of software and hardware, which limits their application and adaptability in high-traffic and high-business volume scenarios.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a device startup method, apparatus, and electronic device to at least solve the technical problems of long device startup time and difficulty in unified maintenance due to the fact that device startup in related technologies usually relies on a fixed framework or hardware platform and lacks consideration of the overall startup of software and hardware.

[0005] According to one aspect of an embodiment of the present application, a device startup method is provided, including: determining the business volume of the device, wherein the business volume includes hardware business information and software business information of the device; when the business volume exceeds a preset business volume threshold, determining the startup order of multiple processes of the device; and starting the target process in the device according to the startup order and the number of CPU cores.

[0006] Optionally, determining the startup order of multiple processes of the device includes: obtaining a quick start file of the device, wherein the quick start file is used to represent process startup information of the device after the last successful operation; determining the startup attributes of the device based on the quick start file, wherein the startup attributes include at least process names and startup priorities of multiple processes of the device; and determining the startup order based on the startup attributes.

[0007] Optionally, determining the startup order based on the startup attributes includes: determining a dependency graph of the device based on the startup attributes, wherein the dependency graph is a directed graph representing dependencies between multiple processes; determining the in-degree of each process in the dependency graph, wherein the in-degree represents the number of edges pointing to each process in the dependency graph; adding processes with an in-degree of zero to a process list, and updating the in-degrees of other processes until all processes in the dependency graph are added to the process list; and determining the startup order based on the process list.

[0008] Optionally, starting the target process in the device according to the startup order and the number of CPU cores includes: determining the number of CPU cores of the device; determining the number of processes to be started of the device according to the number of CPU cores; and starting the target process according to the process name, the startup order and the number of processes to be started.

[0009] Optionally, after starting the target process in the device according to the startup sequence and system resource usage, the method also includes: receiving a business request to be processed by the target process; determining business parameters in the business request and verifying the legitimacy of the business parameters; and when the legitimacy of the business parameters is verified, processing business data corresponding to the business request through the target process.

[0010] Optionally, after processing the business data corresponding to the business request through the target process, the method also includes: determining a first processing result of the business data by the target process; when the first processing result indicates that the business data processing failed, reprocessing the business data through the target process to obtain a second processing result; when the second processing result indicates that the business data processing failed, reprocessing the business data through the target process and determining the number of failures of the business data; when the number of failures exceeds a preset attempt threshold, regenerating a business request corresponding to the business data.

[0011] Optionally, when the business volume does not exceed a preset business volume threshold, multiple processes in the device are started according to a preset start sequence.

[0012] According to another aspect of an embodiment of the present application, a device startup device is also provided, including: a first determination module, used to determine the business volume of the device, wherein the business volume includes the hardware business information and software business information of the device; a second determination module, used to determine the startup order of multiple processes of the device when the business volume exceeds a preset business volume threshold; a startup module, used to start the target process in the device according to the startup order and system resource usage.

[0013] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the above-mentioned device startup method.

[0014] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, the non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned device startup method by running the computer program.

[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, including computer instructions, which implement the above-mentioned device startup method when executed by a processor.

[0016] In an embodiment of the present application, by determining the business volume of the device, wherein the business volume includes the hardware business information and software business information of the device; when the business volume exceeds a preset business volume threshold, determining the startup order of multiple processes of the device; starting the target process in the device according to the startup order and the number of CPU cores, the purpose of optimizing the device startup process and reducing the device startup time is achieved, thereby achieving the technical effect of fast device startup and efficient business processing in high business volume scenarios, and further solving the technical problems of long device startup time and difficulty in unified maintenance due to the fact that device startup in related technologies usually relies on a fixed framework or hardware platform and lacks consideration of the overall startup of hardware and software. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 is a hardware structure diagram of a computer terminal for implementing a device startup method according to an embodiment of the present application;

[0019] Figure 2 is a flow chart of a device startup method according to an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of a device startup process according to an embodiment of the present application;

[0021] Figure 4 is a schematic diagram of a service delivery process according to an embodiment of the present application;

[0022] Figure 5 is a schematic diagram of a quick start backup process according to an embodiment of the present application;

[0023] Figure 6 It is a structural diagram of a device starting apparatus according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution 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 only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] First, some nouns or terms that appear in the process of explaining the embodiments of the present application are subject to the following explanations:

[0027] Galaxy Framework: A specific software architecture or framework used to manage and coordinate multiple services or processes on a device. The Galaxy Framework accelerates device startup by configuring a cache mechanism, but its application scope is limited and is only effective in specific scenarios and is not universal.

[0028] CPLD (Complex Programmable Logic Device): An integrated circuit with fixed logic units and programmable connection structures that can be used to implement various digital logic functions.

[0029] FPGA (Field-Programmable Gate Array): A programmable integrated circuit whose logic functions and connection structures can be reconfigured while the device is running.

[0030] Process: In computer science, a process is a running instance of a program. It contains the program's instructions, data, and resources allocated to it by the operating system, such as CPU time, memory, etc. In this application, a process specifically refers to a software service or hardware module that needs to be loaded when the device starts.

[0031] CPU core count: refers to the number of cores in the device's processor, which is an important indicator of the device's processing power. In this application, the number of CPU cores is used to determine the number of background tasks that can be started simultaneously, so as to achieve balanced use of resources and improve startup efficiency.

[0032] In the current network technology field, especially when dealing with the startup of large-scale 5G bearer networks and 5G network element devices, the startup solutions in related technologies are mainly divided into the following three categories, each of which has its own special limitations and challenges:

[0033] Device startup solutions based on specific frameworks: This type of solution usually relies on specific software architectures such as the Galaxy framework, and accelerates device startup by configuring a cache mechanism. However, this method that relies on a specific framework lacks versatility, may not be suitable for all scenarios, and is not convenient for cross-platform applications.

[0034] Device startup solutions based on specific hardware platforms: These solutions focus on hardware-level startup optimization, such as using CPLD to control FPGA startup. Although this method achieves fast startup at the hardware level, it is limited by the device hardware configuration and is only applicable to the startup of specific hardware such as FPGA, without considering software-level optimization.

[0035] Device startup solutions based on differentiated systems: This type of solution is mainly aimed at embedded devices, and achieves fast startup by customizing the bootloader and kernel. However, this method is difficult to adapt to the rapidly iterating software environment, because each software update requires reconfiguring the bootloader and kernel, which prolongs the implementation cycle and may increase the complexity of maintenance.

[0036] In order to solve the problem of poor device startup efficiency in the related art, the present application embodiment provides a device startup method, which can be run on Figure 1 In the computer terminal shown, the computer terminal is described below.

[0037] The device startup method embodiment provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a device startup method. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions connected via a wired and / or wireless network. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0038] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0039] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the device startup method in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the above-mentioned device startup method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0040] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0041] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0042] It should be noted that, in some optional embodiments, the above Figure 1 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.

[0043] In the above-mentioned operating environment, an embodiment of the present application provides an embodiment of a device startup method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0044] Figure 2 is a flow chart of a device startup method according to an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:

[0045] Step S202: determining the service volume of the device, wherein the service volume includes hardware service information and software service information of the device.

[0046] In the above step S202, the hardware service information and software service information saved after the device was successfully started last time can be read from the quick start file and used as the service volume when the device is currently started for analysis.

[0047] Among them, the quick start file is a unified file that stores the startup information of the device's software and hardware processes. Before the device starts or after the last successful operation, the system will save key startup configuration and status information to the quick start file, including but not limited to: process name, startup parameters, startup attributes, module status and business data, etc. The quick start file is used to store and optimize the startup configuration of the device so that it can be quickly restored to the state of the last successful operation without loading configuration and data from scratch, thereby significantly shortening the startup time.

[0048] Furthermore, hardware and software service information together constitute the representation of the current or expected service volume of the device. They are directly related to the service processing capability and resource requirements of the device and are an important basis for determining the startup strategy.

[0049] Hardware service information covers the hardware configuration, status, and performance indicators of the device, such as the speed and usage of the network interface, the read and write rate of the storage device, the activation status of the hardware module, etc. Hardware service information reflects the service processing capabilities of the device hardware level, including data transmission speed, storage capacity, availability of hardware modules, etc. When the hardware resources are close to or reach their maximum processing capacity, the hardware service information will also indicate a higher service volume.

[0050] Software business information usually includes running services, processes and their parameter configurations, as well as the usage of system resources (such as memory and CPU). Software business information can indicate the number and type of software services that the device is processing or can process, as well as the load and demand of these services. For example, if the device is running multiple high-load application services, the software business information will reflect a large business processing demand, indicating that the current business volume is high.

[0051] The combination of hardware and software business information can provide a comprehensive view to assess the overall business processing needs and capabilities of the device. For example, high software service load and hardware resources running close to full capacity together indicate that the device is processing a large number of businesses, that is, the business volume is high. This comprehensive assessment is more accurate and comprehensive than considering only software or hardware business information because it considers two key aspects of device performance.

[0052] The purpose of this step is to quantify the current business needs of the device, including the amount of data to be processed, the frequency of service requests, etc. The determination of business volume is crucial for subsequent processes because it will determine whether the system needs to start the fast startup process and how to optimize the startup strategy of the process.

[0053] Step S204: when the business volume exceeds a preset business volume threshold, determine the startup sequence of multiple processes of the device.

[0054] In the above step S204, when it is determined that the business volume of the device exceeds the preset business volume threshold, it indicates that the device needs to efficiently process a large amount of business. At this time, the startup sequence of multiple processes in the device can be determined by analyzing the quick start file and determining the startup attributes of the device. Among them, the startup attribute refers to the characteristics or parameters related to the startup of the device's software and hardware processes defined in the quick start file, such as the process name, startup priority and resource requirements of multiple processes in the device. By analyzing the startup attribute, the dependency between multiple processes can be determined, and the startup sequence of multiple processes can be optimized to ensure that the dependency between processes is satisfied. At the same time, processes that can run independently are started in parallel as much as possible, thereby effectively improving the startup efficiency of the device.

[0055] Step S206, starting the target process in the device according to the startup sequence and the number of CPU cores.

[0056] In the above step S206, the target process can be started according to the startup sequence generated in the previous step and the current number of CPU cores of the device. For example, the system resources are polled and the appropriate CPU is selected for scheduling to avoid uneven resource allocation and ensure that each process can be started in the shortest time.

[0057] Through the above steps S202 to S206, the purpose of optimizing the device startup process and reducing the device startup time is achieved, thereby achieving the technical effect of rapid device startup and efficient business processing in high-traffic scenarios, thereby solving the technical problems of long device startup time and difficulty in unified maintenance due to the fact that device startup in related technologies usually relies on a fixed framework or hardware platform and lacks consideration of the overall startup of software and hardware. The following is a detailed description.

[0058] In the device startup process of the embodiment of the present application, there are four modules, namely, the quick start analysis module, the quick start scheduling module, the service delivery module and the quick start backup module. Through the collaborative work of these four modules, the rapid startup of the device and the efficient delivery of service data are achieved, while ensuring the stability of the startup process and the availability of the device. The specific module analysis is as follows:

[0059] The quick start analysis module is the first step in the quick start process of the device. It ensures the optimization of the startup sequence and the efficient use of resources. At the same time, it determines the startup process by the business volume, which improves the flexibility and adaptability of the device startup. Specifically, the quick start analysis module obtains the current software business information and hardware business information of the device by reading the startup file, including the process name, startup attributes, startup parameters, etc., and then generates a quick start sequence view of the device. The quick start sequence view determines the order in which each process on the device is started. In addition, the quick start analysis module will also decide whether to start the quick start process based on the current business volume data of the device. If the business volume exceeds the preset business volume threshold, the quick start process will be triggered; otherwise, the normal startup process will be executed.

[0060] Quick Start Scheduling Module: Responsible for executing the overall startup scheduling of the device. Its main tasks include polling the system background resources (such as the number of CPU cores), starting the corresponding number of background tasks, and binding these tasks to a specific CPU, so as to achieve efficient resource utilization and parallel startup of processes. The Quick Start Scheduling Module ensures that the processes in the startup sequence view can be started in an optimized order, while avoiding the idleness of some CPU core resources. Through dynamic scheduling and resource binding, the efficiency of device startup is improved.

[0061] Business delivery module: responsible for the unified delivery of business data to the application processes and hardware components in the device, ensuring the rapid and stable delivery of business data, improving the efficiency of business processing and the response speed of the device. Specifically, the business delivery module directly launches the process for independently started businesses and delivers business data based on the quick start sequence view. For modules with a pre-start relationship, the process is launched in sequence and data is delivered. This not only achieves efficient delivery of business data, but also ensures the correctness of business data.

[0062] Quick Start Backup Module: handles abnormal events during the quick startup process, including maintenance of the quick startup failure list and automatic recovery processing. When the startup file is updated, the quick startup backup module backs up at least the two most recent successful startup files so that they can be used to restore the device status when the startup fails. During the startup process, if an abnormality occurs, the backup module will record the failure information and try to recover automatically until the threshold for allowed attempts is reached, thereby improving the stability of the startup process and the availability of the device. The quick startup backup module ensures that the device can automatically recover in the face of abnormalities or failures through the backup and recovery mechanism, avoiding instability and unavailability during the device startup process.

[0063] The coordinated work of these four modules realizes the automation, efficiency and intelligence of the rapid startup of the equipment. Together, they ensure that the equipment can start up quickly and run stably in high-traffic scenarios, and have the ability to automatically handle exceptions and recover.

[0064] Figure 3 is a schematic diagram of a device startup process according to an embodiment of the present application, such as Figure 3 As shown in the figure, the startup process covers the interaction between the quick start analysis module, the quick start scheduling module and the user process / hardware. Specifically, the quick start analysis module first reads the quick start file generated after the device was successfully started last time, and verifies the legitimacy of the business parameters in the quick start file by reading the quick start file, generates the business view of the device, and decides whether to execute the quick start or the normal start process based on whether the business volume of the device reaches the preset threshold. If the quick start is triggered, the quick start scheduling module will start the background tasks according to the system resources and the number of CPU cores, and bind these tasks to specific CPU cores to optimize performance. At the same time, the system will dynamically adjust the affinity of the tasks and start the corresponding process according to the quick start sequence view regenerated by the startup attributes. The user process / hardware is responsible for executing the business delivery process in this process, which may involve generating quick start files and normal startup. The entire mechanism is designed to ensure that the device can start efficiently and stably according to the current business load, and quickly deliver business data to the corresponding user process or hardware module.

[0065] In the above step S204, determining the startup sequence of multiple processes of the device includes: obtaining a quick start file of the device, wherein the quick start file is used to indicate the process startup information of the device after the last successful operation; determining the startup attributes of the device according to the quick start file, wherein the startup attributes at least include the process names and startup priorities of multiple processes of the device; and determining the startup sequence according to the startup attributes. Figure 3 The device startup process in the following section analyzes this process in detail:

[0066] In the embodiment of the present application, by acquiring and parsing the quick start file, the quick start analysis module can determine the startup properties of the device, including the process name, startup priority and other key parameters. Based on these startup properties, the module generates a quick start sequence view, optimizes the startup sequence of the process, and ensures that the device can be started quickly and stably while meeting business needs. This process avoids manual intervention, can automatically adapt to different business volumes, and provides an efficient device startup solution. The specific process can be as follows:

[0067] First, the quick start analysis module reads the quick start file from the device storage. The quick start file stores all the process startup information after the last successful operation of the device. This information is saved when the device is shut down normally so that it can be quickly restored to the previous state at the next startup. The information contained in the quick start file is crucial to determine the startup order because it records all startup-related properties, including but not limited to process name, startup parameters, pre-dependencies, and startup priority.

[0068] Secondly, parse the quick start file and extract the startup attributes of each process. The startup attributes include at least the process name and startup priority. The process name is used to uniquely identify each process, and the startup priority reflects the priority of the process relative to other processes at startup, which is usually pre-set by the system based on the importance and dependencies of the process. In addition, the startup attributes may also contain other important information, such as the hardware resource requirements of the process, the software environment configuration, and the list of pre-modules (that is, other processes that must be started before the process is started).

[0069] After obtaining the startup properties of all processes, the quick start analysis module will determine the startup order of multiple processes on the device based on this information. By analyzing the dependency graph of the device, the dependencies between processes are identified to ensure that processes that depend on other processes can only be started after the dependent processes are started. At the same time, based on the startup priority, the quick start analysis module can prioritize the startup of processes with higher priorities to meet business needs.

[0070] In the above process, the startup sequence is determined according to the startup attributes, including: determining the dependency graph of the device according to the startup attributes, wherein the dependency graph is a directed graph representing the dependency relationship between multiple processes; determining the in-degree of each process in the dependency graph, wherein the in-degree represents the number of edges pointing to each process in the dependency graph; adding processes with zero in-degree to the process list, and updating the in-degrees of other processes until all processes in the dependency graph are added to the process list; and determining the startup sequence according to the process list. The specific process can be as follows:

[0071] First, a dependency graph of the device is generated based on startup attributes (such as the process names and process priorities of multiple processes). The dependency graph is a directed graph in which nodes represent processes and directed edges represent dependencies, pointing from one process to another, indicating that the latter depends on the former. The quick start analysis module reads the startup attributes of all processes from the quick start file and then builds a dependency graph, which intuitively shows the process dependency structure when the device is started.

[0072] It should be noted that Figure 3 The quick start sequence view in is an optimized process startup flowchart, which clearly shows the startup sequence of each process, which processes can be started in parallel, and which processes need to be started in sequence to meet dependencies. It is the guiding basis for the quick start scheduling module to execute device startup, ensuring the correct startup sequence between processes and the reasonable allocation of resources. The dependency graph is part of the device architecture and describes the fixed dependencies between processes. That is, the quick start analysis module first determines the basic startup sequence based on the device's dependency graph, and then adjusts this sequence according to the business volume and resource status to generate the device's quick start sequence view.

[0073] After generating the dependency graph, the quick start analysis module calculates the in-degree of each process, that is, the number of edges pointing to the process. The in-degree reflects the degree of dependence of other processes on the current process. For example, if a process has multiple predecessor modules, the in-degree of the process will be greater than zero. For processes without predecessor modules, that is, there are no edges pointing to them in the dependency graph, their in-degree is zero.

[0074] Furthermore, the quick start analysis module searches the dependency graph for processes with zero in-degree, which do not need to wait for other processes when starting. Once found, they are added to the process list, and the quick start analysis module updates the in-degree of other processes that depend on these processes, minus the number of edges pointing to them. This process is repeated until all processes are added to the process list. In this way, the quick start analysis module dynamically determines the set of processes that can be started immediately, as well as the dependencies of other processes that need to be updated after they are started.

[0075] Finally, when all processes are added to the process list, the quick start analysis module will determine the startup order of multiple processes on the device based on the order in the list. This order takes into account the startup priority of the process, resource requirements, and dependencies dynamically adjusted through the above steps, thereby optimizing process startup. The quick start service delivery module will then directly pull up the processes that can be started concurrently based on this startup order and deliver business data. For dependent processes, they will be started in the established order.

[0076] Through the above steps, the quick start analysis module can generate an optimized startup sequence, which not only satisfies the dependencies between processes, but also starts independent processes concurrently as much as possible according to the business volume and system resources, thereby shortening the overall startup time of the device and improving the efficiency of business data delivery. This strategy based on dependency graph and dynamic in-degree calculation is a key innovation in the device quick startup method, ensuring efficient and stable device startup.

[0077] In the above step S206, starting the target process in the device according to the startup sequence and the number of CPU cores includes: determining the number of CPU cores of the device; determining the number of processes to be started of the device according to the number of CPU cores; and starting the target process according to the process name, the startup sequence and the number of processes to be started.

[0078] In the embodiment of the present application, starting the target process in the device according to the startup sequence and the number of CPU cores is a key step in converting the quick startup strategy into an actual process startup operation. The specific process can be as follows:

[0079] The quick start scheduling module first needs to obtain the number of CPU cores currently available on the device. The number of CPU cores reflects the parallel processing capability of the processor and is an important parameter that determines the number of processes that can be started simultaneously. When the device starts, knowing the number of CPU cores helps the quick start scheduling module to allocate resources reasonably and avoid resource waste or overload.

[0080] After obtaining the number of CPU cores, the quick start scheduling module determines the number of processes that can be started simultaneously based on the device's resource status and business needs. Usually, this number does not exceed the number of CPU cores to ensure that each process has sufficient computing resources. The quick start scheduling module will try to start multiple processes in parallel, but it also considers the dependencies between processes to avoid starting a process when the dependencies are not met, resulting in startup failure.

[0081] Finally, the quick start scheduling module will refer to the process name and start order recorded in the quick start sequence view, as well as the number of processes to be started, and start starting the target process. This process will follow the following principles:

[0082] Concurrent launch: For processes with zero in-degree (i.e., those with no pre-dependencies), the fast-start scheduling module will try to launch as many processes as possible simultaneously to fully utilize the multi-core computing power of the device.

[0083] Sequential startup: For processes with pre-dependencies, modules will be started in the order defined in the quick start sequence view to ensure that the dependencies are met.

[0084] Resource allocation: When starting the target process, the quick start scheduling module will also bind the process to a specific CPU core based on the resource requirements of each process to avoid resource conflicts and waste.

[0085] Exception handling: During the startup process, if there is a startup failure or insufficient resources, the quick start scheduling module will record the exception, may pause or readjust the startup strategy, and notify the quick start backup module to perform fault recovery.

[0086] In the above process, the number of CPU cores is a direct reflection of the device's parallel processing capability, which determines the number of processes that can be processed simultaneously during the startup process. The quick start scheduling module dynamically adjusts the process startup strategy, reasonably allocates resources according to the number of CPU cores and the dependencies between processes, and realizes fast parallel startup of processes, thereby speeding up the startup speed of the device and improving business processing efficiency.

[0087] In the embodiment of the present application, after starting the target process in the device according to the startup sequence and the system resource usage, the method further includes: receiving a service request to be processed by the target process; determining the service parameters in the service request and verifying the legitimacy of the service parameters; and processing the service data corresponding to the service request through the target process when the legitimacy of the service parameters is verified. Figure 4 The business processing steps are as follows:

[0088] Figure 4 It is a schematic diagram of a service delivery process according to an embodiment of the present application, and the service delivery process covers the interaction between the quick-start scheduling module, the service delivery module and the user process / hardware. Specifically, the service delivery process executes service delivery according to the quick-start sequence view. First, the service request is received and the legitimacy of the service parameters in the service request is verified; once the verification is passed, the service process will be started independently, and the specific user process or hardware module (that is, the above-mentioned target process) will be located according to the process name; then the module will load the service data independently, and continue to deliver subsequent service data without waiting for the execution result, until all service data in the view are delivered, and finally the user process / hardware executes the service and finally delivers it, and marks the service delivery completion, and returns the service delivery result. The whole process is designed to ensure that service data is delivered to the target process or device quickly and efficiently to achieve the smooth execution of the service.

[0089] In the above process, the quick-start service delivery module is not only responsible for delivering service data, but also undertakes the parsing and legitimacy verification of service requests, ensuring that service data is processed correctly and securely. This process is closely integrated with the quick-start strategy, that is, after the device is quickly started and reaches a stable state, it can immediately receive and process service requests, thereby improving the overall response speed and service capabilities of the device. At the same time, legitimacy verification further enhances the security of the system and avoids system failures or security risks caused by illegal or incorrect service parameters. Through these steps, the embodiment of the present application realizes a smooth transition of the device from quick startup to efficient service processing, meeting the needs of high-traffic and high-volume business scenarios.

[0090] Figure 5 is a schematic diagram of a quick start backup process according to an embodiment of the present application, such as Figure 5 As shown, the quick-start backup process covers the business delivery module and the quick-start backup module. Specifically, the business delivery module is responsible for executing the business delivery process, including verifying the legitimacy of business parameters, starting business processes, loading business data, and marking the end of business delivery after completion. The quick-start backup module executes exceptions in the business processing process. When it receives a backup request, it backs up the two most recent successful quick-start files, and adds the failed module to the failure list when an exception occurs. After waiting for all normal business data to be loaded, it traverses and re-delivers the failed business data. If the number of failed data exceeds the allowed number of attempts, the backup module will execute the automatic recovery process, exit the current business delivery process, select the most recent successful quick-start file, and restart the business delivery process. On the whole, the two modules work together to ensure the successful delivery of business data, and can perform effective backup and recovery when encountering exceptions.

[0091] In the above process, restarting the business delivery process includes: determining a first processing result of the target process on the business data; when the first processing result indicates that the business data processing failed, reprocessing the business data through the target process to obtain a second processing result; when the second processing result indicates that the business data processing failed, reprocessing the business data through the target process and determining the number of failures of the business data; when the number of failures exceeds a preset attempt threshold, regenerating a business request corresponding to the business data.

[0092] In the embodiment of the present application, after the device is started and starts to process business data, an exception handling and retry process is also involved to ensure the reliability and stability of business data processing. The specific process can be as follows:

[0093] First, determine the first processing result of the target process on the business data, that is, when the target process (i.e., the process in the running state after the device is started) processes the business data, there will be an initial processing result. The first processing result indicates whether the business data is successfully processed, which can be the completion status of the business operation, return code, error information, etc. By determining the first processing result, the system can determine whether the business data processing encounters a problem.

[0094] Secondly, if the first processing result indicates that the business data processing has failed, the business data is reprocessed by the target process to obtain a second processing result. Specifically, if the initial processing of the business data fails, the system will automatically trigger the reprocessing mechanism. The target process will try to process the business data again, which may involve re-reading data, executing business logic, updating resource status, etc. After reprocessing, the system will determine the processing result again, that is, the second processing result, to check whether the problem has been solved.

[0095] Furthermore, if the second processing result still shows that the business data processing has failed, the quick start backup module will record the failure and increase the failure count of the business data. The failure count is used to track the number of business data processing failures, which helps the system determine whether further recovery measures are needed.

[0096] Finally, when the number of failures exceeds the preset attempt threshold, the business request corresponding to the business data will be regenerated. The preset attempt threshold is a system-set upper limit that limits the number of times the same business data can be reprocessed. If the number of failures of the business data reaches or exceeds this threshold, the system will consider that simple reprocessing can no longer solve the problem, and a more advanced recovery strategy will be adopted.

[0097] For example, the quick-start backup module will regenerate the business request corresponding to the business data, which may mean using the backup startup file, a more advanced error recovery process, or forwarding the request to other available processes or devices for processing. The regenerated business request usually contains more detailed error information and recovery instructions so that the system or operation and maintenance personnel can more accurately locate the problem and take measures.

[0098] For another example: To prevent invalid cyclic attempts, the quick-start backup module will stop the current business delivery process to avoid further consumption of system resources and time.

[0099] For another example, the quick start backup module will select the most recently successfully loaded file from the backed up quick start files. This file contains the configuration and status information when the device is running successfully, and is the basis for rolling back to a stable state.

[0100] By automatically retrying to process failed business data and taking more advanced recovery measures when the attempt threshold is reached, the system can automatically respond to abnormal situations encountered during startup and operation, reduce manual intervention, and improve the stability and availability of the equipment. This mechanism is particularly suitable for large-scale network environments and high-traffic scenarios, ensuring that the equipment can maintain its efficient and stable business processing capabilities even in complex or changing business environments.

[0101] Optionally, when the business volume does not exceed a preset business volume threshold, multiple processes in the device are started according to a preset start sequence.

[0102] In the embodiment of the present application, if the detected current traffic volume does not exceed the preset traffic volume threshold, the system will follow a different normal startup process instead of a fast startup process. For example:

[0103] In the case of low business volume, the preset startup sequence is a fixed order in which processes are started when the device starts. This order is usually pre-defined when the device is configured to ensure that the device can start and run stably to meet basic business needs. The preset startup sequence takes into account the dependencies between processes. Starting in this order can avoid startup failures caused by unsatisfied dependencies.

[0104] When the quick start analysis module determines that the current business volume does not exceed the preset business volume threshold, it will instruct the system to start multiple processes in the device according to the preset startup order. This process may be more conservative and will not try to start independent processes in parallel as in the quick start process, but will start them one by one in a certain order to ensure that the system status and resource allocation of each process meet its needs before starting.

[0105] It should be noted that in the normal startup process, although there is no dynamic resource allocation and optimization in the fast startup process, the system will still monitor resource usage to ensure that there are enough resources when the process starts. In addition, the system will perform regular health checks to ensure that each process runs normally after startup. If an abnormality or failure is found, appropriate recovery measures will be taken.

[0106] The purpose of this optional process is to adopt a simpler and more stable startup strategy when the business volume is low, so as to reduce the complexity of device startup and avoid using the fast startup process when it is not necessary. Although the normal startup process may not be as fast as the fast startup process, it focuses more on stability and security and is suitable for scenarios with small business volume or low requirements for startup speed. By distinguishing between the fast startup process and the normal startup process, the system can flexibly respond to different business needs and provide an efficient and stable device startup solution.

[0107] In the embodiment of the present application, a method for quick startup of a device is proposed, the core of which is to dynamically generate a quick startup sequence view, optimize the process startup sequence, and intelligently schedule resources. Among them, the quick startup analysis module dynamically determines whether to start the quick startup process based on the software and hardware business information of the device, generates a quick startup sequence view by accurately analyzing the dependencies between processes, and determines the independent processes that can be started in parallel and the dependent processes that need to be started in sequence; the quick startup scheduling module intelligently schedules resources and starts the target process according to the number of CPU cores of the device and the quick startup sequence view, thereby achieving efficient resource utilization and quick startup of processes; the business delivery module quickly and concurrently pulls up independent processes and delivers business data based on the quick startup sequence view, and starts and delivers data in sequence for processes with dependencies, significantly improving the efficiency of business data delivery; the quick startup backup module effectively handles startup exceptions by backing up quick startup files and automatic recovery mechanisms, ensuring the stability of device startup and business continuity. At the same time, the flexibility of the solution makes it suitable for different business volumes, and it can intelligently switch between normal startup processes and quick startup processes to meet changing business needs.

[0108] In summary, this technical solution provides an efficient, stable and flexible quick startup solution for the device through its unique quick start strategy and intelligent scheduling mechanism, as well as a general server platform (that is, there is no need to rely on a specific framework and hardware platform), and takes into account the overall operation of software and hardware. It significantly improves the device startup and business processing capabilities in large-scale network environments.

[0109] According to an embodiment of the present application, a device startup apparatus is provided. It should be noted that the device startup apparatus of the embodiment of the present application can be used to execute the device startup method provided in the embodiment of the present application. The device startup apparatus provided in the embodiment of the present application is introduced below.

[0110] Figure 6 is a structural diagram of a device startup apparatus provided according to an embodiment of the present application. Figure 6 As shown, the device comprises:

[0111] A first determination module 60 is used to determine the service volume of the device, wherein the service volume includes hardware service information and software service information of the device;

[0112] A second determination module 62, configured to determine the startup order of multiple processes of the device when the traffic volume exceeds a preset traffic volume threshold;

[0113] The startup module 64 is used to start the target process in the device according to the startup sequence and the system resource usage.

[0114] Through the first determination module 60, the second determination module 62 and the startup module 64 in the above-mentioned device startup device, the purpose of optimizing the device startup process and reducing the device startup time is achieved, thereby achieving the technical effect of rapid device startup and efficient business processing in high business volume scenarios, and further solving the technical problems of long device startup time and difficulty in unified maintenance due to the fact that device startup in related technologies usually relies on a fixed framework or hardware platform and lacks consideration of the overall startup of software and hardware.

[0115] In the device startup device provided in the embodiment of the present application, the second determination module is also used to obtain a quick start file of the device, wherein the quick start file is used to represent the process startup information of the device after the last successful operation; determine the startup attributes of the device based on the quick start file, wherein the startup attributes include at least the process names and startup priorities of multiple processes of the device; and determine the startup order based on the startup attributes.

[0116] In the device startup device provided in the embodiment of the present application, the second determination module is also used to determine the dependency graph of the device according to the startup attributes, wherein the dependency graph is a directed graph representing the dependency relationship between multiple processes; determine the in-degree of each process in the dependency graph, wherein the in-degree represents the number of edges pointing to each process in the dependency graph; add processes with an in-degree of zero to the process list, and update the in-degrees of other processes until all processes in the dependency graph are added to the process list; and determine the startup order based on the process list.

[0117] In the device startup device provided in the embodiment of the present application, the startup module is also used to determine the number of CPU cores of the device; determine the number of processes to be started of the device based on the number of CPU cores; and start the target process based on the process name, startup order and number of processes to be started.

[0118] In the device startup apparatus provided in the embodiment of the present application, the startup module is also used to start multiple processes in the device according to a preset startup sequence when the business volume does not exceed a preset business volume threshold.

[0119] The device startup device provided in the embodiment of the present application also includes a processing module 66, which is used to receive a business request to be processed by a target process; determine the business parameters in the business request and verify the legitimacy of the business parameters; when the legitimacy of the business parameters is verified, process the business data corresponding to the business request through the target process.

[0120] In the device startup device provided in the embodiment of the present application, the processing module is also used to determine a first processing result of the target process on the business data; when the first processing result indicates that the business data processing failed, the business data is reprocessed by the target process to obtain a second processing result; when the second processing result indicates that the business data processing failed, the business data is reprocessed by the target process and the number of failures of the business data is determined; when the number of failures exceeds a preset attempt threshold, a business request corresponding to the business data is regenerated.

[0121] An embodiment of the present application also provides an electronic device, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the above-mentioned device startup method.

[0122] It should be noted that the above electronic equipment is used to execute Figure 2 The device startup method shown in the figure, therefore the relevant explanations and instructions in the above device startup method are also applicable to the electronic device and will not be repeated here.

[0123] An embodiment of the present application further provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned device startup method by running the computer program.

[0124] It should be noted that the above non-volatile storage medium is used to execute Figure 2 The device startup method shown in the figure, therefore the relevant explanations in the above device startup method are also applicable to the non-volatile storage medium, and will not be repeated here.

[0125] An embodiment of the present application also provides a computer program product, including computer instructions, which implement the above-mentioned device startup method when executed by a processor.

[0126] It should be noted that the above-mentioned computer program product is used to execute Figure 2 The device startup method shown, therefore the relevant explanations in the above device startup method are also applicable to the computer program product and will not be repeated here.

[0127] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0128] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0129] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0130] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0131] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0133] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A device startup method, characterized in that: include: Determining a service volume of a device, wherein the service volume includes hardware service information and software service information of the device; When the traffic volume exceeds a preset traffic volume threshold, determining a startup order of multiple processes of the device; The target process in the device is started according to the startup sequence and the number of CPU cores.

2. The method according to claim 1, characterized in that: Determine the startup order of multiple processes of the device, including: Obtaining a quick start file of the device, wherein the quick start file is used to represent process startup information of the device after the last successful operation; Determining the startup attributes of the device according to the quick start file, wherein the startup attributes at least include process names and startup priorities of multiple processes of the device; The startup sequence is determined according to the startup attributes.

3. The method according to claim 2, characterized in that Determining the startup sequence according to the startup attribute includes: Determining a dependency graph of the device according to the startup attribute, wherein the dependency graph is a directed graph representing dependency relationships between the multiple processes; Determine the in-degree of each process in the dependency graph, wherein the in-degree represents the number of edges in the dependency graph pointing to each process; Add the process with zero in-degree to the process list, and update the in-degrees of other processes until all processes in the dependency graph are added to the process list; The startup sequence is determined according to the process list.

4. The method according to claim 3, characterized in that Starting the target process in the device according to the startup sequence and the number of CPU cores includes: Determine the number of CPU cores of the device; Determine the number of processes to be started on the device according to the number of CPU cores; The target process is started according to the process name, the start order and the number of processes to be started.

5. The method according to claim 2, characterized in that: After starting the target process in the device according to the startup sequence and the system resource usage, the method further includes: Receiving a service request to be processed by the target process; Determining the service parameters in the service request and verifying the legitimacy of the service parameters; When the validity of the service parameters is verified, the service data corresponding to the service request is processed by the target process.

6. The method according to claim 5, characterized in that After processing the service data corresponding to the service request through the target process, the method further includes: Determine a first processing result of the target process on the business data; When the first processing result indicates that the processing of the business data fails, reprocessing the business data through the target process to obtain a second processing result; When the second processing result indicates that the processing of the business data fails, reprocessing the business data through the target process and determining the number of failures of the business data; When the number of failures exceeds a preset attempt threshold, a service request corresponding to the service data is regenerated.

7. The method according to claim 1, characterized in that When the business volume does not exceed the preset business volume threshold, multiple processes in the device are started according to a preset start sequence.

8. A device for starting an equipment, characterized in that: include: A first determining module, configured to determine a service volume of a device, wherein the service volume includes hardware service information and software service information of the device; A second determination module, configured to determine a startup order of multiple processes of the device when the business volume exceeds a preset business volume threshold; A startup module is used to start the target process in the device according to the startup sequence and system resource usage.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store program instructions; The processor is connected to the memory and is used to execute the device startup method described in any one of claims 1 to 7.

10. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the device startup method according to any one of claims 1 to 7 by running the computer program.

11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the device startup method described in any one of claims 1 to 7 is implemented.