Kernel-user state cooperative parallel starting optimization method for image seeker

By employing a collaborative approach of kernel-mode parallel initialization and user-mode intelligent scheduling, the hardware initialization and recognition performance bottlenecks of the image seeker system are resolved, resulting in a significant reduction in system startup time and an improvement in CPU utilization, while also supporting priority scheduling for time-sensitive scenarios.

CN122363760APending Publication Date: 2026-07-10HUNAN HUANAN OPTOELECTRONIC GRP CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN HUANAN OPTOELECTRONIC GRP CO LTD
Filing Date
2026-04-13
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing image guidance head systems have bottlenecks in hardware initialization and recognition performance, resulting in long task preparation time and reduced recognition performance, which affects the probability of successful task completion.

Method used

A collaborative parallel startup method is adopted, which combines kernel-mode parallel initialization, cross-mode synchronization interface and user-mode intelligent scheduling module. By splitting kernel tasks into parallel threads, initialization progress is synchronized in real time, user-mode services are scheduled in parallel, and multi-core CPUs are used for parallel execution and real-time perception of kernel initialization progress.

Benefits of technology

It significantly shortens system startup time, improves CPU multi-core utilization and task processing efficiency, supports priority scheduling requirements in time-sensitive scenarios, reduces task processes by more than 60%, and increases CPU core utilization to more than 70%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122363760A_ABST
    Figure CN122363760A_ABST
Patent Text Reader

Abstract

The application discloses a kernel-user state cooperative parallel starting optimization method for an image seeker, a framework constructed based on a kernel state parallel initialization layer, a cross state synchronization interface and a user state intelligent scheduling module, kernel tasks are split into parallel threads, real-time synchronization initialization progress is realized, and user state services are scheduled in parallel, so that the system starting time is shortened, the utilization rate of a multi-core CPU is improved, the task cycle of system starting is significantly shortened, and the perception delay problem caused by a traditional serial starting process is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fast response technology for seeker systems, and in particular to a kernel-user space collaborative parallel startup optimization method for image seekers. Background Technology

[0002] Image seekers acquire target images through visible light or infrared imaging and utilize algorithms to automatically capture, identify, and track the target, ultimately outputting the line-of-sight error or target position. Image seekers are suitable for nighttime or low-visibility environments and are also being developed in fields such as smart homes, intelligent transportation, and security monitoring. However, existing image seekers generally suffer from two major drawbacks:

[0003] 1. Hardware initialization bottleneck: The single-core serial execution mode is used to complete operations such as sensor calibration, FPGA configuration, and storage self-test, which means that the multi-core CPU only uses 1 core to execute the serial process, and the typical task preparation time is as long as 11 seconds.

[0004] 2. Recognition performance degradation: The separation of kernel and user space leads to the superposition of delays in the task processing chain. Actual tests show that traditional solutions will increase the time for target recognition at the end of the process by 40%, which directly affects the probability of successful task completion.

[0005] Taking a certain serial scheme as an example: the traditional startup process takes about 28% of the total flight time, of which kernel initialization takes about 5 seconds and user-space image algorithm loading takes about 7 seconds. This timing blockage severely restricts the flexibility of the task. Summary of the Invention

[0006] To address the aforementioned issues, the present invention aims to provide a kernel-user space collaborative parallel startup optimization method for image seekers, applicable to intelligent image seeker platforms equipped with the Kunlun operating system. This method focuses on resolving the image recognition and perception delay problem caused by the traditional serial startup process, significantly shortening the system startup task cycle, and improving system performance in complex electromagnetic environments.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: a kernel-user space collaborative parallel startup optimization method for image seekers, based on a framework constructed from a kernel space parallel initialization layer, a cross-state synchronization interface, and a user space intelligent scheduling module. The parallel startup optimization method includes the following steps:

[0008] Step 1, Kernel-mode parallel initialization: During the operating system kernel initialization phase, the initialization task is split into multiple independent parallel threads. The thread startup order is determined by topological sorting, and dependent tasks are synchronized using completion signals.

[0009] Step 2, Cross-mode progress synchronization: Expose the kernel initialization progress to user space through the sysfs interface and update the task completion status in real time;

[0010] Step 3, User-space parallel scheduling: The user-space service manager monitors the above progress. After the kernel initialization is complete, it starts unrelated user-space services in parallel according to the service dependencies.

[0011] Furthermore, the completion signal mentioned in step 1 is a kernel completion object used to synchronize the execution order of dependent tasks.

[0012] Furthermore, the sysfs interface path mentioned in step 2 is / sys / kernel / init_progress, and user space monitors changes to this file through inotify.

[0013] Furthermore, the user-space service manager mentioned in step 3 is systemd, and the parallel startup of services is achieved through the --parallel parameter.

[0014] Furthermore, the initialization task described in step 1 is split into multiple independent parallel threads. This is achieved by using a multi-core CPU to execute the kernel initialization task simultaneously, breaking it down into independent parallel units. The do_initcalls function in kernel init / main.c is traversed to identify parallelizable tasks, a directed acyclic graph is constructed to describe task dependencies, and a kernel thread is created for each independent task.

[0015] Furthermore, the process described in step 2, which involves exposing the kernel initialization progress to user space via the sysfs interface, involves systemd sensing the kernel initialization progress in real time, creating the / sys / kernel / init_progress file under sysfs, writing the status of each parallel task in real time, and allowing user space to obtain the progress by reading this file.

[0016] Furthermore, the user-space service manager in step 3 monitors the aforementioned progress by using the newly added InitProgressMonitor unit in systemd, which monitors changes in / sys / kernel / init_progress through inotify. When the root file system is detected to be mounted, the parallel startup of the user-space service is immediately triggered.

[0017] Furthermore, the parallel startup of unrelated user-space services based on service dependencies described in step 3 involves using the systemd-analyze deps tool to scan the Unit files of all services, extract dependencies, and start unrelated services simultaneously by creating multiple child processes.

[0018] This invention shortens system startup time and improves the utilization of multi-core CPUs by splitting kernel tasks into parallel threads, synchronizing initialization progress in real time, and scheduling user-space services in parallel. Compared with existing technologies, the advantages of this invention are as follows:

[0019] 1. CPU multi-core utilization increased to over 70%;

[0020] 2. The entire task process is reduced by more than 60%;

[0021] 3. Supports dynamic priority preemptive scheduling to ensure priority scheduling needs in time-sensitive scenarios such as infrared and visible light dual-mode recognition. Attached Figure Description

[0022] Figure 1 This is a diagram illustrating the overall architecture of the present invention;

[0023] Figure 2 Startup time graph before system query optimization;

[0024] Figure 3 Startup time graph after system query optimization;

[0025] Figure 4 A comparison of measured data before and after optimization of the image seeker. Detailed Implementation

[0026] The technical solution of the present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0027] like Figure 1 As shown in the figure, this embodiment presents a kernel-user space collaborative parallel startup optimization method for image seekers. Based on a framework constructed from a kernel-space parallel initialization layer, a cross-state synchronization interface, and a user-space intelligent scheduling module, the specific operation steps are as follows:

[0028] Step 1: Kernel-mode parallel initialization (modifying the Kunlun operating system kernel)

[0029] Objective: To break down the kernel initialization task into independent parallel units and execute them simultaneously using a multi-core CPU;

[0030] Task splitting logic: Traverse the do_initcalls function in kernel init / main.c, identify parallelizable tasks, such as device tree parsing, storage driver loading, network driver probe, etc., and construct a directed acyclic graph (DAG) to describe task dependencies, such as "device tree parsing" → "storage driver loading";

[0031] Parallel execution is implemented by creating a kernel thread (kthread_create) for each dependency-free task, determining the thread startup order through topological sorting, and synchronizing dependencies using completion objects (e.g., the storage driver thread needs to wait for the device tree to complete parsing). Key code examples are provided below.

[0032] / / Define the parallel task structure

[0033] struct parallel_task {

[0034] const char *name; / / Task name

[0035] void (*func)(void); / / Task entry function

[0036] struct completion *dep; / / Completion signal for the dependency

[0037] };

[0038] / / Device tree parsing task

[0039] static void __init dt_parse_task(void) {

[0040] do_device_tree_parse(); / / Actual parsing logic

[0041] complete(&dt_parse_done); / / Notify dependent tasks

[0042] }

[0043] / / Storage driver loading task (depends on device tree parsing)

[0044] static void __init storage_driver_task(void) {

[0045] wait_for_completion(&dt_parse_done); / / Wait for the dependency to complete

[0046] load_storage_drivers(); / / Load SATA / NVMe drivers in parallel

[0047] complete(&storage_done); / / Notify the next level task

[0048] }

[0049] / / Start all parallel tasks

[0050] static void __init start_parallel_init(void) {

[0051] struct parallel_task tasks[] = {

[0052] {"dt-parse", dt_parse_task, NULL},

[0053] {"storage-driver", storage_driver_task, &dt_parse_done},

[0054] {"net-driver", net_driver_task, &storage_done},

[0055] / / ... Other tasks (such as root file system mounting, etc.)

[0056] };

[0057] for (int i = 0; i < ARRAY_SIZE(tasks); i++) {

[0058] if (tasks[i].dep) wait_for_completion(tasks[i].dep);

[0059] kthread_run(tasks[i].func, NULL, "parallel-%s", tasks[i].name);

[0060] }}

[0061] Effect verification: On the image seeker platform, the kernel initialization time was reduced from 2.264 seconds to 687 milliseconds, and the CPU core utilization (8 cores) was improved from single-core loading to core 1 to core 7. At the same time, 7 cores were used for loading, and the efficiency was improved from 12.5% ​​to 87.5%.

[0062] Step 2, Cross-mode synchronization interface (kernel → user space)

[0063] Objective: To enable systemd to monitor kernel initialization progress in real time without waiting for a fixed duration;

[0064] The kernel exposes the progress interface: a file named / sys / kernel / init_progress is created under sysfs, and the status of each parallel task is written in real time, such as "dt-parse: done" and "storage-driver: 80%". The user space can obtain the progress by reading this file;

[0065] User-space monitoring logic: systemd adds an InitProgressMonitor unit, which monitors changes to / sys / kernel / init_progress via inotify; when "root-fs-mounted" (root file system mounted) is detected, it immediately triggers the parallel startup of user-space services. Key configuration example:

[0066] # / etc / systemd / system / init-progress-monitor.service

[0067] [Unit]

[0068] Description=Kernel Init Progress Monitor

[0069] RequiresMountsFor= / sys / kernel / init_progress

[0070] [Service]

[0071] Type=simple

[0072] ExecStart= / bin / sh -c "inotifywait -e modify / sys / kernel / init_progress| \

[0073] grep 'root-fs-mounted' && \

[0074] systemctl start --parallel user-services"

[0075] Step 3: User-space intelligent scheduling module (extended Systemd)

[0076] Objective: To enable user-space services to break free from serial dependencies and support the parallel startup of unrelated services;

[0077] Dependency analysis: Use the systemd-analyze deps tool to scan the Unit files of all services and extract their dependencies. For example, nginx depends on network.target, but not on sshd.

[0078] Parallel startup is achieved by creating multiple child processes to start services that have no dependencies, such as sshd, nginx, and dockerd, simultaneously. The comparison shows that in the traditional solution, starting these three services serially takes 7.514 seconds, while starting them in parallel takes only 4.857 seconds (a reduction of 35.3%).

[0079] See Figure 2 , 3 4. Taking a certain image guidance head platform as an example, the performance improvement effect after implementing the method of the present invention is shown in the following table:

[0080] index Traditional solution Invention Solution Increase Total system startup time 7.514 seconds 4.857 seconds Overall startup time is 35% faster Kernel initialization time 2.264 seconds 0.687 seconds Kernel initialization time is 70% faster. User-mode service startup time 3.438 seconds 2.895 seconds User-mode service startup time is 16% faster. CPU core utilization (kernel stage) 12.5% 87.5% CPU core utilization increased by 600%.

[0081] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A kernel-user space collaborative parallel startup optimization method for image seekers, characterized in that, Based on a framework built from a kernel-mode parallel initialization layer, a cross-mode synchronization interface, and a user-mode intelligent scheduling module, the parallel startup optimization method includes the following steps: Step 1, Kernel-mode parallel initialization: During the operating system kernel initialization phase, the initialization task is split into multiple independent parallel threads. The thread startup order is determined by topological sorting, and dependent tasks are synchronized using completion signals. Step 2, Cross-mode progress synchronization: Expose the kernel initialization progress to user space through the sysfs interface and update the task completion status in real time; Step 3, User-space parallel scheduling: The user-space service manager monitors the above progress. After the kernel initialization is complete, it starts unrelated user-space services in parallel according to the service dependencies.

2. The kernel-user space collaborative parallel startup optimization method for image seekers according to claim 1, characterized in that, The completion signal mentioned in step 1 is a kernel completion object used to synchronize the execution order of dependent tasks.

3. The kernel-user space collaborative parallel startup optimization method for image seekers according to claim 1, characterized in that, The sysfs interface path mentioned in step 2 is / sys / kernel / init_progress, and user space monitors changes to this file through inotify.

4. The kernel-user space collaborative parallel startup optimization method for image seekers according to claim 1, characterized in that, The user-space service manager mentioned in step 3 is systemd, and the parallel startup of services is achieved through the --parallel parameter.

5. The kernel-user space collaborative parallel startup optimization method for image seekers according to claim 2, characterized in that, The initialization task described in step 1 is split into multiple independent parallel threads. This is achieved by using a multi-core CPU to execute the kernel initialization task simultaneously, breaking it down into independent parallel units. The do_initcalls function in kernel init / main.c is traversed to identify parallelizable tasks, a directed acyclic graph is constructed to describe task dependencies, and a kernel thread is created for each independent task.

6. The kernel-user space collaborative parallel startup optimization method for image seekers according to claim 3, characterized in that, The step 2 described above involves exposing the kernel initialization progress to user space via the sysfs interface. This is achieved by using systemd to monitor the kernel initialization progress in real time, creating the / sys / kernel / init_progress file under sysfs, and writing the status of each parallel task in real time. User space can then obtain the progress by reading this file.

7. The kernel-user space collaborative parallel startup optimization method for image seekers according to claim 4, characterized in that, The user-space service manager mentioned in step 3 monitors the progress by using the newly added InitProgressMonitor unit in systemd, which monitors changes in / sys / kernel / init_progress through inotify. When the root file system is detected to be mounted, the parallel startup of user-space services is immediately triggered.

8. The kernel-user space collaborative parallel startup optimization method for image seekers according to claim 7, characterized in that, The step 3, which involves starting unrelated user-space services in parallel based on service dependencies, uses the systemd-analyze deps tool to scan the Unit files of all services, extract dependencies, and start unrelated services simultaneously by creating multiple child processes.