Service initialization configuration method and device, equipment and storage medium
By obtaining service category information and preloading configuration parameter information, diversion of service resources for delay initialization and key initialization, and monitoring the system operation load in real time, dynamically adjusting service priority and resource allocation, it solves the problem of excessive CPU load caused by service initialization in automotive electronic systems, and achieves efficient and stable operation of the system and balances performance and energy efficiency.
Patent Information
- Application Number
- CN202510320623.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-17
AI Technical Summary
In existing automotive electronic systems, the SOME/IP service initialization method causes excessive CPU load, affecting the system response speed and stability, and the initialization of critical services and non-critical services is carried out simultaneously, increasing system power consumption and shortening hardware service life.
By obtaining service category information and preloading configuration parameter information, diversion of service resources for delay initialization and key initialization, and real-time monitoring of system operation load, dynamically adjusting service priority and resource allocation, and completing service initialization configuration.
Effectively reduce system load, shorten stable running time, improve system response speed and stability, significantly improve system overall performance, and achieve a balance between performance and energy efficiency.
Smart Images

Figure CN120166032A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of automotive electronic systems, and particularly to a service initialization configuration method, apparatus, device, and storage medium. Background Art
[0002] In automotive electronic systems, with the development of vehicle intelligence and networking, the communication requirements between electronic control units are increasing continuously. As an efficient service-oriented communication architecture, the SOME / IP protocol is widely used to implement communication between various systems inside the vehicle. It can support complex vehicle functions, such as autonomous driving and intelligent cockpits, to ensure the normal operation and function realization of the vehicle.
[0003] Currently, the existing SOME / IP service initialization method usually initializes all services at once when the system starts, including operations such as loading a large number of configuration parameters, initializing the protocol stack, and performing service registration. Moreover, all services have no priority and are initialized in a fixed order one by one.
[0004] However, the existing initialization method of initializing all services at once will cause the CPU to bear an excessive load during the startup phase, consume a large amount of resources, affect the response speed and stability of the system. Also, the initialization of critical services and non-critical services is carried out simultaneously, further increasing the burden on the CPU. At the same time, it increases the power consumption of the system and shortens the service life of the hardware. Therefore, how to perform service initialization configuration more efficiently and stably has become an urgent problem to be solved.
[0005] The above content is only used to assist in understanding the technical solution of this application, and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The main purpose of this application is to provide a service initialization configuration method, apparatus, device, and storage medium, aiming to solve the technical problem of how to perform service initialization configuration more efficiently and stably.
[0007] To achieve the above purpose, this application proposes a service initialization configuration method, and the method includes:
[0008] Obtain service category information and pre-loaded configuration parameter information;
[0009] Based on the service category information, perform service initialization to split service resources and determine initialization service information. The service initialization includes delayed initialization and critical initialization;
[0010] Based on the initialization service information and the pre-loaded configuration parameter information, monitor the system operation load, adjust the initialization service priority, and reallocate system resources to complete the service initialization configuration.
[0011] In one embodiment, the steps of obtaining service category information and preloading configuration parameter information include:
[0012] Obtain vehicle function information and target service configuration parameters;
[0013] Perform category division on the vehicle function information to identify the service category, configure the service category priority, and determine the service category information, where the service category information includes critical service information, secondary service information, and background service information;
[0014] Read the target service configuration parameters, update the configuration parameters, and determine the preloading configuration parameter information.
[0015] In one embodiment, the steps of initializing the service and diverting service resources based on the service category information to determine the initialization service information include:
[0016] Perform delayed initialization and delayed resource occupation based on the secondary service information and background service information in the service category information to determine the delayed initialization information;
[0017] Perform critical initialization and sequentially execute subtasks based on the critical service information in the service category information to determine the critical initialization information;
[0018] Obtain the initialization service information based on the delayed initialization information and the critical initialization information.
[0019] In one embodiment, the steps of performing delayed initialization and delayed resource occupation based on the secondary service information and background service information in the service category information to determine the delayed initialization information include:
[0020] Obtain the system load limit information and background service request information;
[0021] Initialize the secondary service based on the system load limit information and the secondary service information in the service category information to determine the secondary service initialization information;
[0022] Initialize the background service based on the system load limit information, the background service request information, and the background service information in the service category information to determine the background service initialization information;
[0023] Obtain the delayed initialization information based on the secondary service initialization information and the background service initialization information.
[0024] In one embodiment, the steps of performing critical initialization and sequentially executing subtasks based on the critical service information in the service category information to determine the critical initialization information include:
[0025] Based on the identification of the dependency relationships of subtask dependencies in the service category information, determine the subtask initialization method, where the subtask initialization method includes parallel initialization and serial initialization;
[0026] Based on the parallel initialization and the serial initialization, perform initialization on the critical service subtasks in sequence to obtain critical initialization information.
[0027] In one embodiment, the step of monitoring the system running load based on the initialization service information and the preloaded configuration parameter information, adjusting the initialization service priority, and reallocating system resources to complete the service initialization configuration includes:
[0028] Obtain idle function information;
[0029] Based on the idle function information, the initialization service information, and the preloaded configuration parameter information, monitor the system running load to determine load monitoring information;
[0030] Based on the load monitoring information, adjust the initialization service priority, and reallocate system resources to complete the service initialization configuration.
[0031] In one embodiment, the step of adjusting the initialization service priority based on the load monitoring information and reallocating system resources to complete the service initialization configuration includes:
[0032] Obtain target system load information;
[0033] Based on the load monitoring information and the target system load information, adjust the initialization service priority to determine service subscription information;
[0034] Based on the service subscription information, reallocate system resources to complete the service initialization configuration.
[0035] In addition, to achieve the above object, the present application also proposes a service initialization configuration device, where the service initialization configuration device includes:
[0036] An acquisition module, configured to acquire service category information and preloaded configuration parameter information;
[0037] A processing module, configured to perform service initialization to split service resources based on the service category information to determine initialization service information, where the service initialization includes delayed initialization and critical initialization;
[0038] An execution module, configured to monitor the system running load based on the initialization service information and the preloaded configuration parameter information, and adjust the initialization service priority and reallocate system resources to complete the service initialization configuration.
[0039] In addition, to achieve the above object, the present application further provides a service initialization configuration device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the service initialization configuration method as described above.
[0040] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the service initialization configuration method as described above.
[0041] One or more technical solutions proposed by the present application have at least the following technical effects:
[0042] A service initialization configuration method proposed in this embodiment obtains service category information and pre-loaded configuration parameter information; based on the service category information, it performs service initialization to shunt service resources and determines initialization service information, where the service initialization includes lazy initialization and critical initialization; based on the initialization service information and the pre-loaded configuration parameter information, it monitors the system operation load, adjusts the initialization service priority, and reallocates system resources to complete the service initialization configuration. By obtaining service category information and pre-loaded configuration parameter information, the present application classifies service functions and assigns priorities, pre-loads common configuration parameters into the memory at the same time, initializes critical services preferentially, and uses lazy initialization for secondary services and background services. It monitors the system operation load in real time, dynamically adjusts the service priority according to the load situation, reasonably allocates system resources, completes the service initialization configuration, effectively reduces the system load, shortens the stable operation time, improves the system response speed and stability, significantly enhances the overall performance of the system, and achieves the balance between overall performance and energy efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0044] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0045] Figure 1 It is a schematic flowchart provided for Embodiment 1 of the service initialization configuration method of the present application;
[0046] Figure 2Schematic diagram of service classification for the service initialization configuration method of this application;
[0047] Figure 3 Schematic diagram of the initialization process for the service initialization configuration method of this application;
[0048] Figure 4 Schematic diagram of preloading configuration parameters for the service initialization configuration method of this application;
[0049] Figure 5 Schematic diagram of the process provided by the second embodiment of the service initialization configuration method of this application;
[0050] Figure 6 Schematic diagram of the module structure of the service initialization configuration device in the embodiment of this application;
[0051] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the service initialization configuration method in the embodiment of this application.
[0052] The implementation, functional features, and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments
[0053] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.
[0054] For a better understanding of the technical solutions of this application, the following will be described in detail in combination with the drawings of the specification and specific embodiments.
[0055] The main solution of the embodiment of this application is: obtaining service category information and preloading configuration parameter information; based on the service category information, performing service initialization to divert service resources, determining initialization service information, where the service initialization includes lazy initialization and critical initialization; monitoring the system operation load based on the initialization service information and the preloading configuration parameter information, and adjusting the initialization service priority to reallocate system resources to complete the service initialization configuration.
[0056] In this embodiment, for the convenience of description, the following will be described with the service initialization configuration device as the execution subject.
[0057] Since the initialization method of the prior art initializes all services at once, it will cause the CPU to bear too high a load during the startup phase, consume a large amount of resources, affect the response speed and stability of the system, and the initialization of critical services and non-critical services is carried out simultaneously, further increasing the burden on the CPU. At the same time, it increases the power consumption of the system and shortens the service life of the hardware.
[0058] The present application provides a solution, which obtains service category information and preloaded configuration parameter information; based on the service category information, initializes and diverts service resources for services to determine initial service information, where the service initialization includes lazy initialization and critical initialization; monitors the system operation load based on the initial service information and the preloaded configuration parameter information, and adjusts the initial service priority to redistribute system resources to complete the service initial configuration.
[0059] As can be seen from the above embodiments, the present application classifies service functions and assigns priorities by obtaining service category information and preloaded configuration parameter information, preloads common configuration parameters into memory at the same time, preferentially initializes critical services, and uses lazy initialization for secondary services and background services, monitors the system operation load in real time, dynamically adjusts the service priority according to the load situation, reasonably distributes system resources, completes the service initial configuration, effectively reduces the system load, shortens the stable operation time, improves the response speed and stability of the system, significantly enhances the overall performance of the system, and achieves the balance between overall performance and energy efficiency.
[0060] Based on this, an embodiment of the present application provides a service initial configuration method, referring to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the service initial configuration method of the present application.
[0061] In this embodiment, the service initial configuration method includes steps S10 to S30:
[0062] Step S10, obtaining service category information and preloaded configuration parameter information;
[0063] It should be noted that the service category information reflects the characteristics of dividing vehicle functions and configuring the initialization priority, and the preloaded configuration parameter information reflects the characteristics of preloading the key configuration parameters required during the system initialization process.
[0064] It can be understood that by classifying and prioritizing services to obtain service category information, it is avoided to initialize all services at one time when the system starts, and resources are dynamically allocated according to service requirements, avoiding resource waste, significantly reducing the initial load of the CPU and memory, and using the preloaded configuration parameter information can quickly obtain the necessary configuration parameters, reduce the data reading time during the initialization process, enable the system to enter the stable operation state faster, and improve the system initialization efficiency.
[0065] For easy understanding, taking the obtaining of service category information and preloaded configuration parameter information as an example for illustration, where the information collection device is an information collection module and the storage device is a memory.
[0066] The information collection module obtains vehicle function information, i.e., the functions of SOME / IP services, obtains target service configuration parameters, i.e., SOME / IP service configuration parameters, classifies and identifies the service category for the vehicle function information, configures the service category priority, and determines the service category information. The service category information includes critical service information, secondary service information, and background service information, i.e., as Figure 2 shown Figure 2 is a schematic diagram of service classification for the service initialization configuration method of this application. Services are classified into critical service category A according to the functions of SOME / IP services. According to the degree of relevance to the core control of the vehicle, services related to vehicle safety control are classified into critical service category A, such as the braking system service and the steering system service. Services are classified into secondary service category B according to real-time requirements. According to the time requirements of vehicle interaction, entertainment system services, navigation system services, etc. are classified into secondary service category B. Services are classified into background service category C according to the importance to the system. According to the degree of impact on vehicle safety, system log recording services, software update check services, etc. are classified into background service category C. And according to the real-time requirements of the service and the importance to the system, corresponding priorities are assigned to each category and specific service. For example, the priority of critical services is set to the highest, such as level 10, the priority of secondary services is set to medium, such as level 5, and the priority of background services is set to the lowest, such as level 1.
[0067] Read the target service configuration parameters, and update the configuration parameters to determine the preloaded configuration parameter information. That is, before the system starts, common SOME / IP service configuration parameters are preloaded into the memory and cached. During the service initialization process, the configuration parameters are directly read from the cache, reducing the time to read data from the storage device and the I / O operations of the CPU. And a fixed period, such as updating the configuration parameters in the cache every day, is set to ensure the accuracy and timeliness of the data.
[0068] Perform subsequent processing based on the service category information and the preloaded configuration parameter information.
[0069] In a feasible implementation manner, step S10 may include steps A11 to A13:
[0070] Step A11, obtain vehicle function information and target service configuration parameters;
[0071] It should be noted that the vehicle function information reflects the characteristics of each function in the vehicle system, and the target service configuration parameters reflect the characteristics of the key configuration information required during system initialization.
[0072] It can be understood that the vehicle function information can be used to classify and prioritize services, avoiding initializing all services at once when the system starts, significantly reducing the initial load on the CPU, reducing the system startup time, and the target service configuration parameters can be used to preload common configuration parameters into the memory and cache them before the system starts, thereby reducing the time to read data from the storage device and the I / O operations of the CPU.
[0073] Step A12, classify the vehicle function information to identify the service category, configure the service category priority, and determine the service category information, where the service category information includes critical service information, secondary service information, and background service information;
[0074] It can be understood that the service category information can be divided by various criteria. For example, functions related to vehicle control are identified as critical services, such as the braking system service and the steering system service; functions related to vehicle interaction are identified as secondary services, such as the entertainment system service and the navigation system service; functions related to vehicle safety are identified as background services, such as the system logging service and the software update check service, and corresponding priorities are configured for each type of service. The priority of critical services is set to the highest, such as level 10; the priority of secondary services is set to medium, such as level 5; the priority of background services is set to the lowest, such as level 1.
[0075] Step A13, read the target service configuration parameters and update the configuration parameters to determine the preloaded configuration parameter information.
[0076] It can be understood that the preloaded configuration parameter information can include the configuration information, protocol stack parameters, and communication parameters corresponding to the services, which are dynamically adjusted according to different vehicle functions and usage scenarios to ensure that the system can operate efficiently under different working conditions, quickly complete the initialization operation when the system starts, reduce the waiting time during the initialization process, and improve the startup efficiency and response speed of the system.
[0077] Step S20, based on the service category information, perform service initialization to divert service resources and determine the initialization service information, where the service initialization includes delayed initialization and critical initialization;
[0078] It should be noted that the initialization service information reflects the characteristics of resource allocation using the service initialization method to initialize services in the configured priority order.
[0079] It can be understood that the initialization service information can include delayed initialization information and critical initialization information. Through different initialization service strategies, such as Figure 3 shown Figure 3This is a schematic diagram of the initialization process of the service initialization configuration method of this application. Here, t represents time. For secondary services and background services, the lazy initialization method can be used to delay the processing of non-essential services and prioritize the processing of critical services. For critical services, the critical initialization method can be used to execute subtasks in serial or parallel order according to the default order, so as to reasonably allocate resources, further optimize the startup efficiency and running performance of the system, avoid CPU and memory overload caused by initializing all services at once, and significantly speed up the system's entry into the stable running state.
[0080] For ease of understanding, taking the determination of initialization service information as an example for illustration, where the information collection device is the information collection module, the storage device is the memory, and the processing device is the processing module.
[0081] The information collection module obtains service category information, such as critical service information, secondary service information, and background service information, and performs lazy initialization and delays resource occupation based on the secondary service information and background service information in the service category information to determine the lazy initialization information. That is, for secondary services and background services, the lazy initialization strategy is adopted. When the system starts, only critical services are initialized, and secondary services and background services are initialized when the system is idle or needed, so as to obtain the lazy initialization information. Based on the critical service information in the service category information, critical initialization is performed to execute subtasks in order to determine the critical initialization information. That is, for critical services, the dependency relationships between various subtasks in the initialization process are analyzed, so as to select the subtask initialization method, such as serial execution and parallel execution, and initialize the subtasks according to the default order and the selected subtask initialization method, so as to obtain the critical initialization information. Based on the lazy initialization information and the critical initialization information, the initialization service information is obtained, and subsequent processing is performed based on the initialization service information.
[0082] Step S30, monitor the system running load based on the initialization service information and the pre-loaded configuration parameter information, and adjust the initialization service priority to reallocate system resources to complete the service initialization configuration.
[0083] It should be noted that the initialization service priority reflects the characteristic of adjusting the priority configured in advance according to the function category during initialization.
[0084] For ease of understanding, taking the acquisition of initialization service information and pre-loaded configuration parameter information as an example for illustration, where the information collection device is the information collection module, the storage device is the memory, and the execution device is the execution module.
[0085] The information collection module obtains idle function information, that is, collects the function characteristics that the user has not used for a long time, monitors the system operation load based on the idle function information, the initialization service information, and the preloaded configuration parameter information, and determines the load monitoring information. That is, during the service initialization process, the load condition of the CPU is monitored in real time to obtain the load of the current system, such as 80%, and the target system load information is obtained, such as 75%. Based on the load monitoring information and the target system load information, the initialization service priority is adjusted to determine the service subscription information, that is, as Figure 4 shown Figure 4 is a schematic diagram of preloading configuration parameters for the service initialization configuration method of this application. When the load of the current system exceeds the target system load information, the CPU load is too high, and the initialization speed of non-critical services is paused or slowed down to reduce the pressure on the CPU. According to the real-time operation situation of the system, the initialization order and priority of the services are dynamically adjusted, the configuration parameters are updated according to the actual communication requirements, unnecessary services or service entities are initialized to 0, and they are not initialized after the next power-on. At the same time, if a service that needs to be re-initialized is recognized, the configuration parameters need to be updated synchronously and the initialization is sent immediately, so as to obtain the service subscription information. Based on the service subscription information, the system resources are reallocated to complete the service initialization configuration.
[0086] In a feasible implementation manner, step S30 may include steps B11 to B13:
[0087] Step B11, obtain idle function information;
[0088] It should be noted that the idle function information reflects the characteristics of the resource availability of the system in an unoccupied or low-load state during operation.
[0089] It can be understood that the idle function information can represent the current idle resource situation of the system, including unused CPU time slices, idle memory spaces, and other unoccupied hardware resources, clarify the range of resources that can be utilized in the current operating state, understand the current resource availability in real time, so as to dynamically adjust the resource allocation strategy, avoid resource waste, and improve resource utilization rate.
[0090] Step B12, monitor the system operation load based on the idle function information, the initialization service information, and the preloaded configuration parameter information, and determine the load monitoring information;
[0091] It should be noted that the load monitoring information reflects the characteristics of the resource usage status and load level of the system during operation.
[0092] It can be understood that the load monitoring information may include the CPU usage rate, memory occupancy rate, I / O operation frequency, and the current load conditions of other key resources, so as to understand in real time whether the current operating state is within the normal range, whether there is an overload risk, which services or tasks have a high resource occupancy, and timely discover potential overload risks, and avoid resource bottlenecks by dynamically adjusting service priorities and resource allocation, ensure the high efficiency and stability of system operation, make full use of idle resources to complete the initialization of secondary services, and significantly improve the overall performance of the system.
[0093] Step B13, adjust the initialization service priority based on the load monitoring information, and re-allocate system resources to complete the service initialization configuration.
[0094] It can be understood that by monitoring the system operation load and dynamically adjusting the service priority, resources can be reasonably allocated according to the real-time load conditions, avoiding service initialization failures or delays caused by insufficient resources, improving the overall performance and stability of the system, and flexibly adjusting the resource configuration according to different operating environments and requirements, enhancing the adaptive ability of the system, so that it can still operate efficiently under complex working conditions.
[0095] In a feasible implementation manner, step B13 may include steps C11 to C13:
[0096] Step C11, obtain the target system load information;
[0097] It should be noted that the target system load information reflects the characteristics of the resource occupancy level and performance target that the system expects to achieve under the ideal operating state.
[0098] It can be understood that the target system load information may include the target CPU usage rate, target memory occupancy rate, and target I / O operation frequency, which can be preset according to the actual needs and design goals of the system, and are used to guide the reasonable allocation and optimization of system resources, ensuring that the system can maintain within the best performance range during operation.
[0099] Step C12, adjust the initialization service priority based on the load monitoring information and the target system load information, and determine the service subscription information;
[0100] It should be noted that the service subscription information reflects the characteristics of the result after the re-allocation of the initialization priorities of each service according to the current load conditions and target load requirements during the dynamic adjustment process of the system.
[0101] It can be understood that the service subscription information enables the system to dynamically adjust the service priority according to the current load conditions, ensuring the flexibility and adaptability of resource allocation, avoiding resource waste or overload, giving priority to ensuring the normal operation of critical services, reducing service initialization failures or delays caused by insufficient resources, and thus improving the overall stability of the system.
[0102] Step C13, reallocate system resources based on the service subscription information to complete the service initialization configuration.
[0103] It can be understood that by reallocating system resources for initialization, the initialization function resources can be allocated more flexibly, ensuring that the functions required by users are initialized normally, reducing service initialization failures or delays caused by insufficient resources, avoiding resource waste or overload, reasonably adjusting the service initialization order, and while ensuring that critical services run first, making full use of idle resources to complete the initialization of secondary services or background functions, thus improving the overall performance and response speed of the system.
[0104] A service initialization configuration method proposed in this embodiment obtains service category information and preloading configuration parameter information; based on the service category information, perform service initialization to split service resources and determine the initialization service information, where the service initialization includes delayed initialization and critical initialization; monitor the system running load based on the initialization service information and the preloading configuration parameter information, and adjust the initialization service priority to reallocate system resources to complete the service initialization configuration. This solves the technical problem of how to perform service initialization configuration more efficiently and stably. Compared with the prior art, in this application, services are classified and priorities are assigned, common configuration parameters are preloaded into memory, and service initialization is performed. Critical services are processed first, while secondary services and background services are delayed until the system is idle or under specific conditions for initialization. At the same time, the system running load is monitored in real time, the service initialization priority is dynamically adjusted according to the load conditions, and system resources are reallocated to complete the service initialization configuration, reducing the CPU resource consumption during system startup, enabling the system to enter a stable running state faster, improving the system's response speed and user experience, and avoiding excessive occupation of CPU resources by non-critical services, ensuring that critical services can be initialized and executed first, improving the reliability and stability of the system, and by optimizing the initialization process, making full use of the computing resources of multi-core CPUs, shortening the total service initialization time, improving the overall performance of the system, and at the same time, being able to adaptively adjust the number of initialized services, reducing initialization resource consumption and Ethernet bus load.
[0105] Based on the first embodiment of this application, in the second embodiment of this application, for the same or similar content as in the above-mentioned first embodiment, reference can be made to the above introduction and will not be elaborated hereinafter.
[0106] In this embodiment, refer toFigure 5 , Figure 5 This is a schematic flowchart provided for the second embodiment of the gateway traffic splitting detection method of this application. Step S20 specifically includes steps S21 to S23:
[0107] Step S21: Based on the secondary service information and background service information in the service category information, perform delay initialization to occupy resources, and determine the delay initialization information;
[0108] It should be noted that the delay initialization information reflects the characteristics of the system's resource allocation strategy for non-critical services.
[0109] It can be understood that the delay initialization information indicates that the service will not immediately occupy resources for initialization at the initial stage of system startup. Instead, according to the current load situation and resource availability of the system, it will gradually start when the system is idle or under specific conditions, avoiding indiscriminate initialization of all services during the startup stage, thereby reducing the resource pressure during system startup.
[0110] For easy understanding, taking the determination of delay initialization information as an example for illustration, where the information collection device is the information collection module, the storage device is the memory, and the processing device is the processing module.
[0111] The information collection module obtains the system load limit information, such as 20%, and obtains the background service request information, such as an emergency security patch update request pushed by the vehicle enterprise server. Based on the system load limit information and the secondary service information in the service category information, initialize the secondary service to determine the secondary service initialization information, that is, preset the trigger condition for delay initialization. For example, when the system CPU load is lower than 30%, trigger the initialization of the secondary service. At this time, if the system load limit information is 20%, perform the initialization of the secondary service to obtain the secondary service initialization information. Based on the system load limit information, the background service request information, and the background service information in the service category information, initialize the background service to determine the background service initialization information, that is, when the system is in an idle state, such as when the system CPU load is lower than 30%, trigger the initialization of the secondary service. If the system load limit information is 20%, determine that the system is idle. At this time, if a specific service request is received, as the background service request information, such as the software update check service is in the background non-activated state, when an emergency security patch update request pushed by the vehicle enterprise server is received, this update service becomes a specific service, as the background service request information, and will initialize the background process, trigger operations such as downloading patches, verifying file integrity, and preparing the installation environment to ensure that the vehicle software is always in a safe and reliable state, thereby performing the initialization of the background service to obtain the background service initialization information. Based on the secondary service initialization information and the background service initialization information, obtain the delay initialization information, and perform subsequent processing based on the delay initialization information.
[0112] In a feasible implementation, step S21 may include steps D11 to D14:
[0113] Step D11, obtaining system load limit information and background service request information;
[0114] It should be noted that the system load limit information reflects the characteristics of the maximum resource load capacity that the system can withstand during operation, and the background service request information reflects the characteristics of the request signal that is triggered or needs to be initialized in the current operating environment of the background service.
[0115] It can be understood that the system load limit information provides clear boundary conditions for resource management, enabling the system to reasonably arrange service initialization within the scope allowed by resources, avoiding resource overload, improving resource utilization, while the background service request information enables the system to dynamically trigger the initialization of background services according to actual needs, enhancing the flexibility and adaptability of the system, enabling it to better cope with complex operating environments. By combining the system load limit information and the background service request information, the system can dynamically adjust the initialization strategy, avoiding initialization failures or system performance degradation caused by insufficient resources, thereby improving the overall stability of the system.
[0116] Step D12, initializing the secondary services based on the system load limit information and the secondary service information in the service category information, and determining the secondary service initialization information;
[0117] It should be noted that the secondary service initialization information reflects the characteristics of the initialization status of services that are non-critical but have real-time requirements when resources permit in the system.
[0118] It can be understood that the secondary service initialization information can clarify the initialization timing, sequence, and resource allocation of the secondary services, enabling the system to gradually initialize the secondary services when resources permit, avoiding initialization failures or system performance degradation caused by insufficient resources, while improving the flexibility and efficiency of resource allocation, and reasonably arranging the initialization timing of the secondary services. The system can quickly respond to the real-time needs of users after the initialization of critical services is completed, enhancing the user experience.
[0119] Step D13, initializing the background services based on the system load limit information, the background service request information, and the background service information in the service category information, and determining the background service initialization information;
[0120] It should be noted that the background service initialization information reflects the characteristics of the initialization status of the background services when specific conditions are met in the system.
[0121] It can be understood that the background service initialization information clarifies the initialization timing, triggering conditions, and resource allocation of the background service, enabling the system to flexibly start the background service when resources permit and meet the requirements, avoiding initialization failures or system performance degradation caused by insufficient resources, while improving the flexibility and efficiency of resource allocation, making full use of idle resources to complete the initialization of the background service, thereby enhancing the overall performance and response speed of the system and enabling it to maintain efficient operation under complex working conditions.
[0122] Step D14, obtaining the delayed initialization information based on the secondary service initialization information and the background service initialization information.
[0123] It can be understood that by performing delayed initialization on the secondary service and the background service, the system can initialize only the critical services during the startup phase, significantly reducing the initial load on the CPU and memory, accelerating the speed at which the system enters the stable operation state, and dynamically adjusting the initialization order according to the current resource availability to avoid resource waste and improve resource utilization.
[0124] Step S22, performing sub-tasks for key initialization sequence execution based on the critical service information in the service category information to determine the critical initialization information;
[0125] It should be noted that the critical initialization information reflects the characteristics of the execution information of sub-tasks during the initialization of critical services.
[0126] It can be understood that the critical initialization information enables the system to select an appropriate method to initialize sub-tasks according to the characteristics of critical services, reducing the initialization time and improving the response speed of the system. By combining parallel and serial initialization, the computing power of multi-core CPUs is fully utilized, significantly enhancing the startup efficiency of critical services.
[0127] For ease of understanding, taking the determination of critical initialization information as an example for illustration, where the information acquisition device is the information acquisition module, the storage device is the memory, and the processing device is the processing module.
[0128] The information collection module obtains service category information, such as key service information, secondary service information, and background service information, identifies sub-task dependencies based on the key service information in the service category information, and determines the sub-task initialization method. The sub-task initialization method includes parallel initialization and serial initialization. That is, for key services, analyze the dependencies between each sub-task during the initialization process. For mutually independent sub-tasks, use the parallel initialization method to make full use of the computing resources of the multi-core CPU and shorten the initialization time of key services. For sub-tasks with dependencies, use the serial initialization method to ensure that each sub-task is correctly executed in order. Initialize the key service sub-tasks sequentially based on the parallel initialization and the serial initialization to obtain key initialization information, and perform subsequent processing based on the key initialization information.
[0129] In a feasible implementation manner, step S22 may include steps E11 to E12:
[0130] Step E11, identify sub-task dependencies based on the key service information in the service category information, and determine the sub-task initialization method. The sub-task initialization method includes parallel initialization and serial initialization;
[0131] It should be noted that the sub-task initialization method reflects the characteristics of the execution strategy of sub-tasks during the initialization of key services.
[0132] It can be understood that the sub-task initialization method clarifies whether the sub-task uses parallel initialization or serial initialization. The parallel initialization method can make full use of the computing resources of the multi-core CPU to quickly complete the initialization of multiple mutually independent sub-tasks, significantly shortening the initialization time of independent sub-tasks. The serial initialization method ensures that sub-tasks with dependencies can be correctly executed in order, avoiding initialization failures or errors caused by dependency conflicts.
[0133] Step E12, initialize the key service sub-tasks sequentially based on the parallel initialization and the serial initialization to obtain key initialization information.
[0134] It can be understood that when initializing key services, the default is to initialize in sequence, which can improve the overall performance and stability of the system and enable the system to quickly enter a stable running state.
[0135] Step S23, obtain initialization service information based on the delayed initialization information and the key initialization information.
[0136] It can be understood that the initialization service information can characterize the resource occupation mode and initialization sequence of different types of services in the system startup phase, prioritize the processing of high-priority services to ensure that critical services can be started and run normally in a timely manner, delay the processing of low-priority services, trigger initialization when the system is idle or under specific conditions, avoid excessive resource occupation, and balance the overall performance and stability of the system.
[0137] For ease of understanding, taking the acquisition of delayed initialization information and critical initialization information as an example for illustration, where the information acquisition device is the information acquisition module, the storage device is the memory, and the processing device is the processing module.
[0138] The information acquisition module acquires the delayed initialization information and the critical initialization information. That is, for secondary services and background services, a delayed initialization strategy is adopted. When the system starts, only critical services are initialized, while secondary services and background services are initialized when the system is idle or needed. For critical services, the dependency relationships between various subtasks in the initialization process are analyzed, and then the subtask initialization method is selected, such as serial execution and parallel execution. The subtasks are initialized according to the default order and the selected subtask initialization method. Based on the delayed initialization information and the critical initialization information, the initialization service information is obtained, that is, the initialization of the service function is sequentially executed using the obtained delayed initialization information and critical initialization information. Based on the initialization service information, the system load is monitored, and the system is controlled to complete the service initialization configuration.
[0139] A service initialization configuration method proposed in this embodiment delays resource occupation through delayed initialization based on the secondary service information and background service information in the service category information to determine the delayed initialization information; performs critical initialization and sequentially executes subtasks based on the critical service information in the service category information to determine the critical initialization information; and obtains the initialization service information based on the delayed initialization information and the critical initialization information. This solves the technical problem of how to perform service initialization configuration more efficiently and stably. Compared with the prior art, in this application, services are divided into critical services, secondary services, and background services. A delayed initialization strategy is adopted for secondary services and background services, and initialization is triggered only when the system is idle or under specific conditions, thereby delaying resource occupation. For critical services, initialization is sequentially executed according to the dependency relationships of subtasks, including parallel and serial methods, to ensure that their initialization is completed quickly and efficiently, realizing reasonable resource allocation, significantly reducing the resource consumption during system startup, accelerating the speed of the system entering the stable operation state, improving the response speed and stability of the system, reducing power consumption, extending the service life of the hardware, and significantly enhancing the overall performance and user experience of the system.
[0140] This application also provides a service initialization configuration device. Please refer to Figure 6, the service initialization configuration device includes:
[0141] An acquisition module 10, configured to acquire service category information and preloaded configuration parameter information;
[0142] A processing module 20, configured to perform service initialization to shunt service resources based on the service category information, and determine initialization service information, where the service initialization includes lazy initialization and critical initialization;
[0143] An execution module 30, configured to monitor the system operation load based on the initialization service information and the preloaded configuration parameter information, and adjust the initialization service priority to reallocate system resources to complete the service initialization configuration.
[0144] The acquisition module 10 is further configured to acquire vehicle function information and target service configuration parameters;
[0145] Perform category division on the vehicle function information to identify the service category, and configure the service category priority to determine the service category information, where the service category information includes critical service information, secondary service information, and background service information;
[0146] Read the target service configuration parameters, and update the configuration parameters to determine the preloaded configuration parameter information.
[0147] The processing module 20 is further configured to perform lazy initialization to delay resource occupation based on the secondary service information and the background service information in the service category information, and determine the lazy initialization information;
[0148] Perform critical initialization to sequentially execute subtasks based on the critical service information in the service category information, and determine the critical initialization information;
[0149] Obtain the initialization service information based on the lazy initialization information and the critical initialization information.
[0150] The processing module 20 is further configured to acquire system load limit information and background service request information;
[0151] Initialize the secondary service based on the system load limit information and the secondary service information in the service category information, and determine the secondary service initialization information;
[0152] Initialize the background service based on the system load limit information, the background service request information, and the background service information in the service category information, and determine the background service initialization information;
[0153] Obtain the lazy initialization information based on the secondary service initialization information and the background service initialization information.
[0154] The processing module 20 is further configured to identify sub-task dependency relationships based on the key service information in the service category information, and determine sub-task initialization methods, where the sub-task initialization methods include parallel initialization and serial initialization;
[0155] Perform initialization on the key service sub-tasks in sequence based on the parallel initialization and the serial initialization to obtain key initialization information.
[0156] The execution module 30 is further configured to obtain idle function information;
[0157] Monitor the system operation load based on the idle function information, the initialization service information, and the preloaded configuration parameter information to determine load monitoring information;
[0158] Adjust the initialization service priority based on the load monitoring information, and reallocate system resources to complete service initialization configuration.
[0159] The execution module 30 is further configured to obtain target system load information;
[0160] Adjust the initialization service priority based on the load monitoring information and the target system load information to determine service subscription information;
[0161] Reallocate system resources based on the service subscription information to complete service initialization configuration.
[0162] The service initialization configuration device provided in this application adopts the service initialization configuration method in the above embodiment, and can solve the technical problem of how to perform service initialization configuration more efficiently and stably. Compared with the prior art, the beneficial effects of the service initialization configuration device provided in this application are the same as those of the service initialization configuration method provided in the above embodiment, and other technical features in the service initialization configuration device are the same as those disclosed in the method of the above embodiment, and will not be elaborated here.
[0163] This application provides a service initialization configuration device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the service initialization configuration method in the first embodiment above.
[0164] Next, refer to Figure 7, which shows a schematic structural diagram of a service initialization configuration device suitable for implementing the embodiments of the present application. The service initialization configuration device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The shown service initialization configuration device is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0165] As Figure 7 shown, the service initialization configuration device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to the program stored in the ROM (Read Only Memory) 1002 or the program loaded from the storage device 1003 into the RAM (Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the service initialization configuration device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the service initialization configuration device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a service initialization configuration device with various systems, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems may be implemented or had.
[0166] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium. The computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by a processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.
[0167] The service initialization configuration device provided by the present application adopts the service initialization configuration method in the above-mentioned embodiment, and can solve the technical problem of how to perform service initialization configuration more efficiently and stably. Compared with the prior art, the beneficial effects of the service initialization configuration device provided by the present application are the same as those of the service initialization configuration method provided by the above-mentioned embodiment, and other technical features in the service initialization configuration device are the same as the features disclosed in the method of the previous embodiment, which will not be elaborated here.
[0168] It should be understood that each part disclosed in the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0169] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0170] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the service initialization configuration method in the above-mentioned embodiment.
[0171] The computer-readable storage medium provided by the present application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: electrical connections with 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 of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0172] The above computer-readable storage medium can be included in the service initialization configuration device; or it can exist separately without being assembled into the service initialization configuration device.
[0173] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by the service initialization configuration device, the service initialization configuration device is caused to: obtain service category information and pre-loaded configuration parameter information; perform service initialization to divert service resources based on the service category information, and determine initialization service information, where the service initialization includes lazy initialization and critical initialization; monitor the system operation load based on the initialization service information and the pre-loaded configuration parameter information, and adjust the initialization service priority to re-allocate system resources to complete the service initialization configuration.
[0174] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0175] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0176] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.
[0177] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned service initialization configuration method, and can solve the technical problem of how to perform service initialization configuration more efficiently and stably. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the service initialization configuration method provided by the above embodiments, and will not be elaborated here.
[0178] The above are only some embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. A service initialization configuration method, characterized in that: The method includes: Obtain service category information and preload configuration parameter information; Perform service initialization based on the service category information to divert service resources and determine initialization service information, wherein the service initialization includes delayed initialization and key initialization; Based on the initialization service information and the preloaded configuration parameter information, the system operation load is monitored, and the initialization service priority is adjusted and the system resources are reallocated to complete the service initialization configuration.
2. The method according to claim 1, characterized in that The steps of obtaining service category information and preloading configuration parameter information include: Obtain vehicle function information and target service configuration parameters; Classify the vehicle function information into categories to identify service categories, configure service category priorities, and determine service category information, wherein the service category information includes key service information, secondary service information, and background service information; The target service configuration parameters are read, and the configuration parameters are updated to determine the preloaded configuration parameter information.
3. The method according to claim 1, characterized in that The step of performing service initialization and diverting service resources based on the service category information and determining the initialization service information comprises: Delay initialization and delay occupation of resources are performed based on the secondary service information and the background service information in the service category information, and delay initialization information is determined; Perform key initialization sequence execution subtasks based on key service information in the service category information to determine key initialization information; Initialization service information is obtained based on the delayed initialization information and the key initialization information.
4. The method according to claim 3, characterized in that The step of performing delayed initialization and delayed occupation of resources based on the secondary service information and the background service information in the service category information, and determining delayed initialization information comprises: Get system load limit information and background service request information; Initializing the secondary service based on the system load limit information and the secondary service information in the service category information, and determining the secondary service initialization information; Initialize the background service based on the system load limit information, the background service request information and the background service information in the service category information, and determine the background service initialization information; Delayed initialization information is obtained based on the secondary service initialization information and the background service initialization information.
5. The method according to claim 3, characterized in that The step of performing the subtask of performing the key initialization sequence based on the key service information in the service category information and determining the key initialization information comprises: Identify subtask dependencies based on key service information in the service category information, and determine a subtask initialization method, wherein the subtask initialization method includes parallel initialization and serial initialization; Based on the parallel initialization and the serial initialization, the key service subtasks are initialized sequentially to obtain key initialization information.
6. The method according to claim 1, characterized in that The step of monitoring the system operation load based on the initialization service information and the preloaded configuration parameter information, and adjusting the initialization service priority and reallocating system resources to complete the service initialization configuration includes: Get idle function information; Monitor the system operation load based on the idle function information, the initialization service information and the preloaded configuration parameter information, and determine load monitoring information; The initialization service priority is adjusted based on the load monitoring information, and system resources are reallocated to complete the service initialization configuration.
7. The method according to claim 6, characterized in that The step of adjusting the initialization service priority based on the load monitoring information and reallocating system resources to complete the service initialization configuration includes: Get target system load information; Adjusting the initialization service priority based on the load monitoring information and the target system load information, and determining service subscription information; The service initialization configuration is completed by reallocating system resources based on the service subscription information.
8. A service initialization configuration device, characterized in that: The device comprises: An acquisition module, used to acquire service category information and preload configuration parameter information; A processing module, configured to perform service initialization based on the service category information to divert service resources and determine initialization service information, wherein the service initialization includes delayed initialization and key initialization; The execution module is used to monitor the system operation load based on the initialization service information and the preloaded configuration parameter information, and adjust the initialization service priority and reallocate system resources to complete the service initialization configuration.
9. A service initialization configuration device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the service initialization configuration method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the service initialization configuration method according to any one of claims 1 to 7 are implemented.