A method and electronic device for starting an operating system image service

By decomposing the image service into core and non-core services, and loading the core services first and then loading the non-core services asynchronously, the problem of slow image service startup is solved, achieving fast startup and efficient operating system startup.

CN119829150BActive Publication Date: 2026-03-10GUANGZHOU KETENG INFORMATION TECH
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies cannot achieve rapid startup of image services, which affects the availability and service quality of the operating system.

Method used

The image service is broken down into core services and multiple non-core services. Core services are loaded first, and after the core services are loaded, the non-core services are loaded asynchronously in the order they were loaded.

Benefits of technology

By optimizing the image structure and startup order, the image service was able to start up quickly, improving the startup efficiency and stability of the operating system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829150B_ABST
    Figure CN119829150B_ABST
Patent Text Reader

Abstract

This invention discloses a method and electronic device for starting an operating system-oriented image service. The method includes: responding to an operating system-oriented image service startup command, decomposing the image service to be started into a core service and multiple non-core services, and starting the core service by loading the core service; after the core service is loaded, sequentially loading the multiple non-core services according to their loading order to start them sequentially. The technical solution of this invention can achieve rapid startup of an operating system-oriented image service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to an operating system-oriented image service startup method and electronic device. Background Technology

[0002] The Dehong IoT Operating System is an industrial IoT operating system launched for the power industry. It aims to meet the needs of power equipment for interconnection, efficient collaboration, and intelligent management, and provides a unified and efficient operating platform for power equipment.

[0003] Building upon this, the image service for the operating system is a core component for operating system operation. The image service is loaded into memory when the power device boots up. Power devices have extremely high requirements for boot speed and stability, meaning that the efficiency of the image service startup directly impacts the availability and quality of service of the operating system.

[0004] In the process of realizing this invention, the inventors discovered the following technical problems in the prior art: the rapid startup of image services is currently not possible, and this problem urgently needs to be solved. Summary of the Invention

[0005] This invention provides a method and electronic device for starting an operating system-oriented image service, so as to achieve rapid startup of an operating system-oriented image service.

[0006] According to one aspect of the present invention, a method for starting an operating system image service is provided, which may include:

[0007] In response to the operating system-oriented image service startup command, the image service to be started is decomposed into core services and multiple non-core services;

[0008] Start the core service by loading the core service;

[0009] Once the core services have been loaded, the non-core services are loaded sequentially according to their loading order, and then started sequentially.

[0010] According to another aspect of the present invention, an electronic device is provided, which may include:

[0011] At least one processor; and

[0012] A memory that is communicatively connected to at least one processor; wherein,

[0013] The memory stores a computer program that can be executed by at least one processor, such that when the at least one processor executes the program, it implements the operating system-oriented image service startup method provided in any embodiment of the present invention.

[0014] The technical solution of this invention, in response to the operating system-oriented image service startup command, decomposes the image service to be started into a core service and multiple non-core services, reducing the size of the image service and thus optimizing the image structure. Furthermore, by loading the core service to start it, the core service is prioritized for startup. Once the core service is loaded, the multiple non-core services are loaded sequentially according to their loading order, thus completing the image service startup process. This technical solution, by prioritizing the loading of the core service and delaying the loading of non-core services asynchronously through a layered image mechanism (i.e., waiting for the core service to finish loading before asynchronously loading them in the background), achieves rapid startup of the image service.

[0015] It should be understood that the description in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart of an operating system-oriented image service startup method provided by an embodiment of the present invention;

[0018] Figure 2 This is a flowchart of another operating system-oriented image service startup method provided by an embodiment of the present invention;

[0019] Figure 3 This is a flowchart of another operating system-oriented image service startup method provided by an embodiment of the present invention;

[0020] Figure 4 This is a flowchart of another operating system-oriented image service startup method provided by an embodiment of the present invention;

[0021] Figure 5 This is a flowchart of an optional example of another operating system-oriented image service startup method provided according to an embodiment of the present invention;

[0022] Figure 6This is a structural block diagram of an operating system-oriented image service startup device according to an embodiment of the present invention;

[0023] Figure 7 This is a schematic diagram of the structure of an electronic device that implements the operating system-oriented image service startup method according to an embodiment of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The same applies to "target," "original," etc., and will not be repeated here. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] Before introducing the embodiments of the present invention, the implementation process of the currently used image service startup scheme and the specific reasons why it cannot achieve fast startup of image services will be explained by way of example, so as to better understand why the embodiments of the present invention can quickly start image services.

[0027] For example, current image service designs typically employ a monolithic architecture, where built-in services must be loaded synchronously before startup. However, the synchronous loading of non-core services can impact the startup speed of core services, thus hindering the rapid startup of the image service. Therefore, optimizing the image structure and the startup order of image services are crucial for improving the startup speed of image services.

[0028] Figure 1This is a flowchart of a method for starting an operating system-oriented image service provided in an embodiment of the present invention. This embodiment is applicable to starting an image service. The method can be executed by an operating system-oriented image service starting device provided in this embodiment of the present invention. This device can be implemented in software and / or hardware, and can be integrated into an electronic device, which can be various terminal devices or servers, particularly power equipment among various terminal devices.

[0029] See Figure 1 The method of this invention specifically includes the following steps:

[0030] S110. In response to the operating system-oriented image service startup command, the image service to be started is decomposed into core services and multiple non-core services.

[0031] The image service startup instruction can be understood as an instruction to start the image service, which is an image service for the operating system. In combination with the application scenarios that may be involved in the embodiments of the present invention, it may include at least one of the following: system kernel, basic driver, file system, network protocol stack, logging system, monitoring service and device management tools. This is related to the actual situation and is not specifically limited here.

[0032] In response to the image service startup command, the image service is decomposed into a core service and multiple non-core services. In this embodiment of the invention, the core service and non-core services can optionally be configured as needed.

[0033] Specifically, for core services, optionally, the number of core services can be one or more, depending on the actual situation, and no specific limit is made here. Alternatively, the one or more non-core services may include at least one of the following: system kernel, basic drivers, file system, and network protocol stack, depending on the actual situation, and no specific limit is made here. Among these, the system kernel is the core part of the operating system, responsible for managing hardware resources and providing low-level services. Basic drivers ensure that hardware can communicate and function properly, such as storage device drivers and network drivers. The file system is used to load drivers for the boot disk file system. The network protocol stack is used to provide basic network communication capabilities.

[0034] For non-core services, there are multiple such services. Optionally, these multiple non-core services may include a logging system, monitoring services, and device management tools, depending on the specific circumstances and without specific limitations. The logging system is responsible for recording various information generated by the operating system during operation. The monitoring service is primarily used to monitor hardware devices connected to the computer, which may include internal components (such as hard drives and graphics cards) and external devices (such as mice and keyboards). Device management tools are primarily used to manage and configure hardware devices connected to the computer.

[0035] In this embodiment of the invention, core services may also be referred to as core modules, and non-core services may also be referred to as non-core modules; no specific limitation is made here.

[0036] S120. Start the core service by loading the core service.

[0037] In this invention, core services are loaded to start them, ensuring that more critical core services are loaded first. Optionally, when there are multiple core services, these services can be loaded synchronously or sequentially; this can be configured as needed and is not specifically limited here.

[0038] S130. If the core service has been loaded, load the multiple non-core services in sequence according to the loading order of the multiple non-core services, so as to start the multiple non-core services in sequence.

[0039] The loading order represents the order in which multiple non-core services are loaded. With the core services already loaded, multiple non-core services can be loaded sequentially according to the loading order, thus enabling the sequential startup of these non-core services and completing the startup process of the image service.

[0040] The technical solution of this invention, in response to the operating system-oriented image service startup command, decomposes the image service to be started into a core service and multiple non-core services, reducing the size of the image service and thus optimizing the image structure. Furthermore, by loading the core service to start it, the core service is prioritized for startup. Once the core service is loaded, the multiple non-core services are loaded sequentially according to their loading order, thus completing the image service startup process. This technical solution, by prioritizing the loading of the core service and delaying the loading of non-core services asynchronously through a layered image mechanism (i.e., waiting for the core service to finish loading before asynchronously loading them in the background), achieves rapid startup of the image service.

[0041] Figure 2This is a flowchart of another operating system-oriented image service startup method provided in this embodiment of the invention. This embodiment is based on and optimized from the above-described technical solutions. In this embodiment, optionally, some non-core services among the core services and multiple non-core services are preloaded into memory; starting the core service by loading the core service may include: starting the core service by loading the core service from memory; wherein, the non-core services preloaded into memory are loaded from memory. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.

[0042] See Figure 2 The method in this embodiment may specifically include the following steps:

[0043] S210. In response to the operating system-oriented image service startup instruction, the image service to be started is decomposed into a core service and multiple non-core services, wherein the core service and some of the non-core services are preloaded into memory.

[0044] S220. Start the core service by loading the core service from memory.

[0045] Since the core services have been preloaded into memory, they can be loaded from memory, thereby reducing disk read latency and further improving the startup speed of the image service.

[0046] S230. If the core service has been loaded, load the multiple non-core services in sequence according to the loading order of the multiple non-core services, so as to start the multiple non-core services in sequence. Among them, the non-core services preloaded into memory are loaded from memory.

[0047] Among them, non-core services preloaded into memory can be loaded from memory, thereby reducing disk read latency and further improving the startup speed of the image service.

[0048] The technical solution of this invention reduces disk read latency and further improves the startup speed of the image service by preloading core services and some non-core services into memory and then loading these services from memory.

[0049] An alternative technical solution involves preloading non-core services into memory, which are determined in advance through the following steps:

[0050] After the mirror service is started a first preset number of times, the first service among multiple non-core services whose usage time after startup is greater than or equal to a preset first duration threshold is determined.

[0051] Collect the first operating parameters of the first service, generate a popularity coefficient based on the first operating parameters, and if the popularity coefficient is greater than or equal to a preset popularity threshold, preload the first service as a non-core service into memory.

[0052] The first service can be understood as a non-core service whose usage time after startup is greater than or equal to a preset first duration threshold. The first service's first operating parameters are collected. In this technical solution, the first operating parameters may optionally include at least one of the following after the r-th startup: usage time of the first service, number of calls, average memory usage, maximum memory usage, average CPU usage, and maximum CPU usage. This is related to the actual situation and is not specifically limited here. A popularity coefficient is generated based on the first operating parameters. If the popularity coefficient is greater than or equal to a preset popularity threshold, the first service is preloaded into memory as a non-core service. That is, when the image service starts next time, this non-core service can be preloaded into memory.

[0053] In the technical solution, the first preset number of times can be 4, 5 or 6 times, the first duration threshold can be 50 minutes, 60 minutes or 70 minutes, and the preset popularity threshold can be 0.5, 0.6 or 0.7. These can all be set according to actual needs, and no specific limitation is made here.

[0054] The above technical solution achieves adaptive adjustment of the size of core services by calculating the popularity coefficient of non-core services.

[0055] Based on this, optionally, the first running parameters may include the usage duration, number of calls, average memory usage, maximum memory usage, average CPU usage, and maximum CPU usage of the first service after the r-th startup;

[0056] The above technical solution enables rapid and accurate calculation of the heat coefficient.

[0057] Figure 3This is a flowchart of another operating system-oriented image service startup method provided in this embodiment of the invention. This embodiment is based on the above-mentioned technical solutions and optimized. In this embodiment, optionally, the loading order can be predetermined by the following steps: after the image service is started a second preset number of times, determine a number of second services among multiple non-core services whose startup usage time is greater than or equal to a preset second duration threshold; collect the second running parameters corresponding to each second service, and construct graph network data based on all the collected second running parameters; input the graph network data into a pre-trained loading order prediction model, and obtain the loading order based on the output of the loading order prediction model. The explanations of terms that are the same as or corresponding to those in the above embodiments will not be repeated here.

[0058] See Figure 3 The method in this embodiment may specifically include the following steps:

[0059] S310. For an operating system-oriented image service, after the image service is started a second preset number of times, determine a number of second services among multiple non-core services whose usage time after startup is greater than or equal to a preset second duration threshold, wherein the non-core services are obtained by decomposing the image service.

[0060] The second service can be understood as a non-core service whose usage time after startup is greater than or equal to a preset second duration threshold. In this embodiment of the invention, optionally, the second duration threshold can be the same as or different from the first duration threshold mentioned above, which can be set as needed and is not specifically limited here.

[0061] A second service is determined from a number of non-core services, and the number of such second services is multiple.

[0062] S320. Collect the second operating parameters corresponding to each second service, and construct the graph network data based on all the collected second operating parameters.

[0063] Specifically, for each second service, a second operating parameter can be collected. In this embodiment of the invention, optionally, the second operating parameter can be the same as or different from the first operating parameter mentioned above, which can be set as needed and is not specifically limited here.

[0064] Furthermore, graph network data is constructed based on all the collected second operating parameters. In this embodiment, optionally, the graph network data may include nodes, node features, and edges between nodes, wherein each node corresponds to a second service, i.e., a mapping relationship is established between nodes and the second service. Features can be obtained by processing the second operating parameters corresponding to the nodes. Based on this, optionally, for missing values ​​in the second operating parameters, the missing value can be filled by interpolation using the average of the second operating parameters from two consecutive starts, and then normalized using Z-Score standardization to generate features. Alternatively, the dimensionality of the features can be increased by extracting features from the second operating parameters, or the second operating parameters from each start can be normalized using the Min-Max normalization method to generate features, and so on.

[0065] S330. Input the graph network data into the pre-trained loading order prediction model, and obtain the loading order of multiple non-core services based on the output of the loading order prediction model.

[0066] The graph network data is input into the loading order prediction model to obtain the loading order of multiple second services, and further to obtain the loading order of multiple non-core services. When the image service is started again, multiple non-core services can be loaded according to this loading order.

[0067] In an embodiment of the present invention, optionally, during the training process of the loading order prediction model, the loading order of non-core services can be manually adjusted, the startup time of the mirror service after each adjustment can be recorded, and the loading order corresponding to the shortest startup time can be taken as the label for model training.

[0068] S340. In response to the image service startup command, the image service to be started is decomposed into a core service and multiple non-core services.

[0069] S350. Start the core service by loading the core service.

[0070] S360. Once the core services have been loaded, load multiple non-core services sequentially according to the loading order, and start the multiple non-core services in sequence.

[0071] In one embodiment of the invention, optionally, when the loading order is represented by a loading priority value, non-core services can be loaded sequentially in ascending order of loading priority value.

[0072] The technical solution of this invention constructs graph network data and combines it with a loading order prediction model to perform spatiotemporal analysis on the graph network data in order to adjust the loading order of non-core services, so as to minimize the startup time of the image service for the operating system.

[0073] Figure 4 This is a flowchart of another operating system-oriented image service startup method provided in this embodiment of the invention. This embodiment is based on the above-mentioned technical solutions and optimized. In this embodiment, optionally, constructing graph network data based on all collected second operating parameters may include: for each second service, generating a node corresponding to the second service, and processing the second operating parameters of the second service to obtain the node's features; for every two nodes among all generated nodes, if there is a dependency relationship between the second services corresponding to the two nodes, and / or the correlation coefficient between the features corresponding to the two nodes is greater than a preset correlation coefficient threshold, constructing an edge between the two nodes; constructing graph network data based on all generated nodes, all obtained features, and all constructed edges. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.

[0074] See Figure 4 The method in this embodiment may specifically include the following steps:

[0075] S410. For an operating system-oriented image service, after the image service is started a second preset number of times, determine a number of second services among multiple non-core services whose usage time after startup is greater than or equal to a preset second duration threshold, wherein the non-core services are obtained by decomposing the image service.

[0076] S420. For each second service, generate a node corresponding to the second service, collect the second operating parameters of the second service, and process the second operating parameters to obtain the characteristics of the node.

[0077] In one embodiment of the invention, optionally, the features of a node can be represented by a feature sequence. The feature sequence may include sequence units of a second preset number of times. Each sequence unit is represented by a feature vector, which is generated by processing the second running parameters.

[0078] S430. For every two nodes among all generated nodes, if there is a dependency relationship between the second services corresponding to the two nodes, and / or the correlation coefficient between the features corresponding to the two nodes is greater than the preset correlation coefficient threshold, an edge is constructed between the two nodes.

[0079] In this embodiment of the invention, optionally, a dependency relationship may exist between upstream and downstream services. This is because the upstream service must be started first for the downstream service to use. For example, the upstream service may be a gateway service, a permission verification service, and a log service, etc., while the downstream service may be a power system business service, etc. This depends on the specific circumstances and is not specifically limited here. The correlation coefficient threshold can be set as needed, for example, it could be 0.6, 0.7, or 0.8, etc., and is not specifically limited here.

[0080] S440. Construct the graph network data based on all generated nodes, all obtained features, and all constructed edges.

[0081] S450. Input the graph network data into the pre-trained loading order prediction model, and obtain the loading order of multiple non-core services based on the output of the loading order prediction model.

[0082] S460. In response to the image service startup command, the image service to be started is decomposed into a core service and multiple non-core services.

[0083] S470. Start the core service by loading the core service.

[0084] S480. If the core services have been loaded, load multiple non-core services in sequence according to the loading order, so as to start multiple non-core services in sequence.

[0085] The technical solution of this invention achieves accurate construction of graph network data through the dependency and association relationships between the various second services.

[0086] An optional technical solution is that the feature is represented by a feature sequence, the feature sequence includes sequence units of a number that is a second preset number of times, each sequence unit is represented by a feature vector, and the feature vector is generated by processing the second running parameters;

[0087] The correlation coefficient is expressed by the following formula:

[0088] ;

[0089] in, Let N represent the correlation coefficients with the a-th node and the b-th node, where 1 ≤ a ≤ N, 1 ≤ b ≤ N, a ≠ b, and N represents the number of nodes in the graph network data. Indicates the second preset number of times; Indicates cosine similarity; This represents the i-th sequence unit corresponding to the a-th node; This represents the i-th sequence unit corresponding to the b-th node.

[0090] in, This represents the i-th sequence unit corresponding to the a-th node, that is, the i-th sequence unit of the feature sequence corresponding to the feature of the a-th node. Similarly, this will not be elaborated upon here.

[0091] The above technical solution enables the accurate determination of the correlation coefficient.

[0092] Another optional technical solution involves a graph network data set that includes N nodes. The loading sequence prediction model comprises N first hidden layers, one second hidden layer, and N classifiers connected sequentially. The N first hidden layers correspond one-to-one with the N nodes, and the N classifiers also correspond one-to-one with the N nodes.

[0093] The input to the second hidden layer is graph network data, and the output is a graph update matrix. The graph update matrix includes N update vectors, which are respectively input into the corresponding classifiers. The classification space of the classifiers represents the loading priority of the second service corresponding to the classifiers.

[0094] In this technical solution, optionally, the N first hidden layers can share weight parameters and bias parameters, and each first hidden layer includes R2 hidden units. Each hidden unit of the first hidden layer can be constructed based on a gated recurrent unit (GRU) unit.

[0095] The input to the u-th hidden unit of the nth first hidden layer can be the u-th sequence unit of the feature sequence corresponding to the feature of the nth node in the graph network data, where 1 ≤ n ≤ N and 1 ≤ u ≤ R2. The output can be a hidden vector. The hidden vector output by the R2-th hidden unit of the nth first hidden layer serves as the feature of the nth node.

[0096] The second hidden layer takes graph network data as input and outputs a graph update matrix. This matrix contains N update vectors, each fed into a corresponding classifier. The classifier's classification space represents the loading priority of the second service mapped to a node. Optionally, the loading priority can be represented by a positive integer between 1 and N, with smaller priority values ​​indicating that non-core services are loaded first.

[0097] Based on this, optionally, the second hidden layer calculates the graph update matrix using the following formula:

[0098] ;

[0099] ;

[0100] in Represents the graph update matrix; This represents the sigmoid activation function. Let represent the update vector of the i-th node, where 1 ≤ i ≤ N; This indicates a stacking operation on the update vectors corresponding to N nodes; T represents the transpose operation. This represents the hidden vector of the i-th node; This represents the hidden vector of the j-th node; This represents the set of nodes that are connected to the i-th node by an edge; Indicates the number of nodes in the set; Indicates the first weight parameter; This represents the second weighting parameter; This represents the third weighting parameter; Indicates the first bias parameter; This represents the second bias parameter.

[0101] In this technical solution, optionally, the weight parameters and bias parameters of the loading order prediction model are learnable hyperparameters. For example, if the size of the hidden vector of a node is 1×8, then the second weight parameter... and the third weight parameter It can be designed as an 8×16 matrix, then the size of the node update vector is 1×16. If the matrix is ​​of size N×16, then multiplying it by its transpose results in a matrix of size N×N. The first weight parameter... If it can be an N×16 matrix, then the final graph update matrix is ​​obtained. The size is N×16.

[0102] To better understand the various technical solutions mentioned above, an example of starting an image service for the Dianhong IoT operating system is provided below for illustration.

[0103] For example, see Figure 5 The specific implementation process is as follows:

[0104] S1 decomposes the image service for the Dianhong IoT operating system into core services and non-core services. Core services are preloaded into memory, while non-core services are loaded asynchronously and delayed through a layered image mechanism.

[0105] S2, within the first preset number of startups (i.e. the first preset number of startups described above) R1, collect the first operating parameters of non-core services whose usage time after the mirror service is started is greater than or equal to the preset first duration threshold, and generate a popularity coefficient based on the first operating parameters.

[0106] S3 determines if the popularity coefficient is greater than or equal to the preset popularity threshold, and then preloads the corresponding non-core service into memory when the image service starts next time.

[0107] S4, within the second preset number of startups (i.e. the second preset number of startups described above) R2, collect the second running parameters of non-core services whose usage time after the mirror service starts is greater than or equal to the preset second duration threshold, and construct graph network data accordingly.

[0108] S5 inputs the graph network data into the loading order prediction model, outputs the loading order, and loads non-core services according to the loading order list when the image service starts next time.

[0109] The above example decomposes the image service for the Dianhong IoT operating system into core services and non-core services to reduce the size of the image service; the size of the core service is adaptively adjusted by calculating the heat coefficient of the non-core services, and graph network data is constructed based on the dependency and association relationships of the non-core services. The loading order prediction model is used to perform spatiotemporal analysis on the graph network data to adjust the loading order of the non-core services, so as to minimize the startup time of the image service for the Dianhong IoT operating system.

[0110] Figure 6 This is a structural block diagram of an operating system-oriented image service startup apparatus provided in an embodiment of the present invention. This apparatus is used to execute the operating system-oriented image service startup method provided in any of the above embodiments. This apparatus and the operating system-oriented image service startup methods of the various embodiments described above belong to the same inventive concept. Details not described in detail in the embodiments of the operating system-oriented image service startup apparatus can be found in the embodiments of the operating system-oriented image service startup method described above. See also... Figure 6 The device may specifically include: a mirror service decomposition module 510, a core service loading module 520, and a non-core service loading module 530.

[0111] Among them, the image service decomposition module 510 is used to decompose the image service to be started into a core service and multiple non-core services in response to the image service startup command for the operating system.

[0112] Core service loading module 520 is used to start the core service by loading the core service;

[0113] The non-core service loading module 530 is used to load multiple non-core services sequentially according to the loading order of multiple non-core services after the core services have been loaded, so as to start the multiple non-core services sequentially.

[0114] Optionally, core services and some non-core services are preloaded into memory; core service loading module 520 is specifically used for:

[0115] The core service is started by loading it from memory;

[0116] Non-core services that are preloaded into memory are loaded from memory.

[0117] Based on this, optional non-core services preloaded into memory are determined in advance through the following modules:

[0118] The first service determination module is used to determine the first service among multiple non-core services whose usage time after startup is greater than or equal to a preset first duration threshold after the image service has been started a first preset number of times.

[0119] The non-core service acquisition module is used to collect the first operating parameters of the first service, generate a popularity coefficient based on the first operating parameters, and, if the popularity coefficient is greater than or equal to a preset popularity threshold, preload the first service as a non-core service into memory.

[0120] Based on this, optionally, the first running parameters may include the usage duration of the first service after the r-th startup, the number of calls, the average memory usage, the maximum memory usage, the average CPU usage, and the maximum CPU usage.

[0121] Optionally, the loading order can be predetermined by the following modules:

[0122] The second service determination module is used to determine, after the image service has been started a second preset number of times, multiple second services among multiple non-core services whose usage time after startup is greater than or equal to a preset second duration threshold.

[0123] The graph network data construction module is used to collect the second operating parameters corresponding to each second service, and construct graph network data based on all the collected second operating parameters.

[0124] The loading order acquisition module is used to input graph network data into a pre-trained loading order prediction model and obtain the loading order based on the output of the loading order prediction model.

[0125] Based on this, the optional graph network data construction module may include:

[0126] The feature acquisition unit is used to generate a node corresponding to each second service, and process the second running parameters of the second service to obtain the features of the node.

[0127] An edge construction unit is used to construct an edge between any two nodes in all generated nodes, provided that there is a dependency relationship between the second services corresponding to the two nodes and / or the correlation coefficient between the features corresponding to the two nodes is greater than a preset correlation coefficient threshold.

[0128] The graph network data construction unit is used to construct graph network data based on all generated nodes, all obtained features, and all constructed edges.

[0129] Based on this, optionally, the features can be represented by a feature sequence, which includes a sequence of units numbered a second preset number of times. Each sequence unit is represented by a feature vector, which is generated by processing the second running parameters.

[0130] The correlation coefficient is expressed by the following formula:

[0131] ;

[0132] in, Let N represent the correlation coefficients with the a-th node and the b-th node, where 1 ≤ a ≤ N, 1 ≤ b ≤ N, a ≠ b, and N represents the number of nodes in the graph network data. Indicates the second preset number of times; Indicates cosine similarity; This represents the i-th sequence unit corresponding to the a-th node; This represents the i-th sequence unit corresponding to the b-th node.

[0133] Alternatively, the graph network data includes N nodes, and the loading order prediction model includes N first hidden layers, one second hidden layer, and N classifiers connected sequentially. The N first hidden layers correspond one-to-one with the N nodes, and the N classifiers correspond one-to-one with the N nodes.

[0134] The input to the second hidden layer is graph network data, and the output is a graph update matrix. The graph update matrix includes N update vectors, which are respectively input into the corresponding classifiers. The classification space of the classifiers represents the loading priority of the second service corresponding to the classifiers.

[0135] Based on this, optionally, the second hidden layer calculates the graph update matrix using the following formula:

[0136] ;

[0137] ;

[0138] in Represents the graph update matrix; This represents the sigmoid activation function. Let represent the update vector of the i-th node, where 1 ≤ i ≤ N; This indicates a stacking operation on the update vectors corresponding to N nodes; T represents the transpose operation. This represents the hidden vector of the i-th node; This represents the hidden vector of the j-th node; This represents the set of nodes that are connected to the i-th node by an edge; Indicates the number of nodes in the set; Indicates the first weight parameter; This represents the second weighting parameter; This represents the third weighting parameter; Indicates the first bias parameter; This represents the second bias parameter.

[0139] The image service startup device for operating systems provided in this invention, through an image service decomposition module, responds to an image service startup command for the operating system by decomposing the image service to be started into a core service and multiple non-core services, reducing the size of the image service and thus optimizing the image structure. Furthermore, through a core service loading module, the core service is loaded to start the core service, achieving priority startup of the core service. Through a non-core service loading module, after the core service is loaded, multiple non-core services are loaded sequentially according to their loading order to start them sequentially, thus completing the image service startup process. This device, by prioritizing the loading of core services and delaying the loading of non-core services asynchronously through a layered image mechanism—that is, waiting for the core service to finish loading before asynchronously loading non-core services in the background—achieves rapid startup of the image service.

[0140] The operating system-oriented image service startup device provided in this embodiment of the invention can execute the operating system-oriented image service startup method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0141] It is worth noting that in the above embodiments of the image service startup device for operating systems, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0142] Figure 7A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0143] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0144] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0145] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the image service startup method for operating systems.

[0146] In some embodiments, the operating system-oriented image service boot method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the operating system-oriented image service boot method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the operating system-oriented image service boot method by any other suitable means (e.g., by means of firmware).

[0147] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0148] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0149] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0150] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0151] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0152] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0153] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0154] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for starting an operating system image service, characterized in that, The method comprises the following steps: in response to an operating system-oriented mirror service starting instruction, decomposing the mirror service to be started into a core service and a plurality of non-core services; starting the core service by loading the core service; when the core service loading is completed, loading the plurality of non-core services according to a loading sequence of the plurality of non-core services to sequentially start the plurality of non-core services; wherein the loading sequence is determined in advance by the following steps: after the mirror service is started for a second preset number of times, determining a plurality of second services from the plurality of non-core services, which have a usage time after starting greater than or equal to a preset second time threshold; collecting second running parameters corresponding to each of the second services, and constructing graph network data according to all the collected second running parameters; inputting the graph network data into a pre-trained loading sequence prediction model, and obtaining the loading sequence according to the output result of the loading sequence prediction model; the graph network data is constructed according to all the collected second running parameters, comprising: for each of the second services, generating a node corresponding to the second service, and processing the second running parameters of the second service to obtain the features of the node; for each of the two nodes in all the generated nodes, if there is a dependency relationship between the second services corresponding to the two nodes, and / or the correlation coefficient between the features corresponding to the two nodes is greater than a preset correlation coefficient threshold, an edge is constructed between the two nodes; constructing the graph network data according to all the generated nodes, all the obtained features, and all the constructed edges; the graph network data includes N nodes, and the loading sequence prediction model includes N first hidden layers, one second hidden layer, and N classifiers connected in sequence, the N first hidden layers correspond one-to-one to the N nodes, and the N classifiers correspond one-to-one to the N nodes; wherein, the input of the second hidden layer is the graph network data and the output is a graph update matrix, the graph update matrix includes N update vectors, the N update vectors are respectively input into the corresponding classifiers, and the classification space of the classifier represents the loading priority of the second service corresponding to the classifier.

2. The method of claim 1, wherein, the core service and part of the non-core services in the plurality of non-core services are preloaded into the memory; the core service is started by loading the core service from the memory; wherein the non-core services preloaded into the memory are loaded from the memory. the non-core services preloaded into the memory are determined in advance by the following steps:

3. The method of claim 2, wherein, after the mirror service is started for a first preset number of times, determining a first service from the plurality of non-core services, which has a usage time after starting greater than or equal to a preset first time threshold; ​ Collect a first running parameter of the first service, generate a hot degree coefficient according to the first running parameter, and in a case where the hot degree coefficient is greater than or equal to a preset hot degree threshold, take the first service as the non-core service preloaded into the memory.

4. The method of claim 3, wherein, The first running parameter includes a usage time length, a calling frequency, a memory average occupancy rate, a memory maximum occupancy rate, a central processing unit average occupancy rate and a central processing unit maximum occupancy rate of the first service after the rth start.

5. The method of claim 1, wherein, The feature is represented by a feature sequence, the feature sequence includes a sequence unit with a number of the second preset number, each sequence unit is represented by a feature vector, and the feature vector is generated by processing the second running parameter; The association coefficient is represented by the following formula: ; wherein, denotes the correlation coefficient corresponding to the a-th node and the b-th node, 1≤a≤N, 1≤b≤N, a≠b, N denotes the number of nodes in the graph network data; denotes the second preset number of times; denotes the cosine similarity; denotes the i-th sequence unit corresponding to the a-th node; denotes the i-th sequence unit corresponding to the b-th node.

6. The method of claim 1, wherein, The second hidden layer calculates the graph update matrix by the following formula: ; ; wherein, denotes the graph update matrix; denotes a sigmoid activation function, denotes an update vector of the i-th node, 1≤i≤N; denotes a stacking operation on the update vectors of the N nodes, respectively; T denotes a transpose operation; denotes a hidden vector of the i-th node; denotes a hidden vector of the j-th node; denotes a set of nodes connected to the i-th node by an edge; denotes the number of nodes in the set; denotes a first weight parameter; denotes a second weight parameter; denotes a third weight parameter; denotes a first bias parameter; denotes a second bias parameter.

7. An electronic device, comprising: The method comprises the steps of: at least one processor; and a memory in communication connection with the at least one processor; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the mirror service starting method facing the operating system according to any one of claims 1-6.

Citation Information

Patent Citations

  • Starting method and starting device of embedded type device

    CN105760201A

  • Information acquisition method and device

    CN112114783A

  • Virtual machine starting method and device and electronic equipment

    CN115437748A

  • Determining task importance through task graph structure

    CN118613813A