User driver loading method and device, equipment and storage medium

By dynamically compiling and loading kernel modules, personalizing the drivers according to user behavior and environmental data, solving the problems of excessive kernel size, high resource consumption and poor adaptability in traditional kernel design, and achieving efficient resource utilization and low maintenance costs system.

CN119512643APending Publication Date: 2025-02-25HONGHU WANLIAN (JIANGSU) TECH DEV CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411524041.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the kernel design of traditional operating system, statically compiled drivers lead to excessive kernel size, high resource consumption, long startup time, and inability to flexibly add, update or delete, resulting in poor system adaptability and maintainability.

Method used

By obtaining the kernel source code file and compiling and generating the kernel module file, the target kernel file is determined based on the target user's behavior data and environment data for driver loading, and dynamic and personalized driver loading is achieved.

Benefits of technology

It improves the efficiency of system resources utilization, reduces system burden, improves operating speed and response capabilities, reduces maintenance costs and risks, provides personalized driving services, and meets user specific needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512643A_ABST
    Figure CN119512643A_ABST
Patent Text Reader

Abstract

The invention discloses a user-driven loading method and device, equipment and a storage medium. Comprising the steps of obtaining a kernel source code file, and obtaining a manufacturing file according to the kernel source code file; compiling the kernel source code file according to the manufacturing file to generate a kernel module file; obtaining user behavior data and environment data of a target user, and determining a target kernel file from the kernel module file according to the user behavior data; and performing driver loading of the target user according to the target kernel file and the environment data through the compiling construction tool. The kernel source code file is obtained and compiled to generate the kernel module file, the target kernel file can be determined according to behavior data and environment data of different users for driver loading, the system can better adapt to various complex and changeable user requirements and use environments, drivers are loaded in a targeted mode according to actual behaviors and environments of the users, and the user experience is improved. Unnecessary driving modules are prevented from occupying system resources, and the utilization efficiency of the system resources is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a user-driven loading method, device, equipment and storage medium. Background Art

[0002] In the field of computer operating systems, a kernel module is a program code that can be dynamically loaded into the kernel and unloaded at runtime. Kernel modules are usually used to add new device drivers, file system support, or expand kernel functionality.

[0003] Traditional operating system kernel designs often statically compile all drivers that may be needed into the kernel. However, the existing technology has significant defects. On the one hand, it will cause the kernel size to be too large, increase the system's resource consumption and startup time. On the other hand, since statically compiled drivers cannot be flexibly added, updated or deleted, the system's adaptability and maintainability are poor for newly emerging hardware devices or drivers that need to be improved. In addition, when there are multiple hardware devices in the system and not all devices are used at the same time, statically loaded drivers will occupy unnecessary system resources and affect the overall performance of the system. Summary of the invention

[0004] The present invention provides a user driver loading method, device, equipment and storage medium to compile kernel module files in the Hongmeng system and adaptively load them.

[0005] According to one aspect of the present invention, a user-driven loading method is provided, the method comprising:

[0006] Obtain the kernel source code file, and obtain the production file according to the kernel source code file;

[0007] Compile the kernel source code file according to the production file to generate a kernel module file;

[0008] Obtain user behavior data and environment data of the target user, and determine the target kernel file from the kernel module file according to the user behavior data;

[0009] The target user's driver is loaded according to the target kernel file and environment data through the compilation and construction tool.

[0010] Optionally, before obtaining the kernel source code file, the method further includes: installing a compiler, a software construction tool and a header file, wherein the software construction tool includes a linker; and forming a development tool chain based on the compiler, the software construction tool and the header file.

[0011] Optionally, obtaining a production file based on a kernel source code file includes: verifying the kernel source code file through a compiler to determine a function check status; when the function check status is normal, obtaining a kernel source code path, compilation options, and link options; and generating a production file based on the kernel source code path, compilation options, and link options.

[0012] Optionally, the kernel source code file is compiled according to the production file to generate a kernel module file, including: calling a compiler and a linker through the production file; compiling the kernel source code file through the compiler to generate a compiled file; and linking the compiled file into a kernel module file through the linker.

[0013] Optionally, determining a target kernel file from kernel module files based on user behavior data includes: building a behavior prediction model and inputting user behavior data into the behavior prediction model to obtain an output target function identifier; and filtering out the target kernel file from the kernel module files based on the target function identifier.

[0014] Optionally, the target user's driver is loaded according to the target kernel file and environmental data through a compilation and construction tool, including: determining a loading strategy according to the environmental data, wherein the loading strategy includes loading time and loading amount; and dynamically loading the target kernel file according to the loading strategy through a compilation and construction tool.

[0015] Optionally, the method further includes: obtaining user feedback data, and adjusting the behavior prediction model according to the user feedback data.

[0016] According to another aspect of the present invention, there is provided a user-driven loading device, the device comprising:

[0017] A production file acquisition module is used to acquire a kernel source code file and acquire a production file according to the kernel source code file;

[0018] A kernel module file generation module is used to compile the kernel source code file according to the production file to generate a kernel module file;

[0019] A target kernel file determination module is used to obtain user behavior data and environment data of a target user, and determine a target kernel file from a kernel module file according to the user behavior data;

[0020] The personalized driver loading module is used to load the driver for the target user according to the target kernel file and environment data through the compilation and construction tool.

[0021] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0022] at least one processor;

[0023] and a memory communicatively coupled to the at least one processor;

[0024] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a user-driven loading method described in any embodiment of the present invention.

[0025] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a user-driven loading method described in any embodiment of the present invention when executed.

[0026] The technical solution of the embodiment of the present invention, by obtaining the kernel source code file and compiling to generate the kernel module file, can determine the target kernel file for driver loading according to the behavior data and environment data of different users, so that the system can better adapt to various complex and changeable user needs and usage environments, and load the driver in a targeted manner according to the actual user behavior and environment, thereby avoiding unnecessary driver modules from occupying system resources and improving the utilization efficiency of system resources. Accurate driver loading reduces the system burden, improves the system's operating speed and responsiveness, thereby improving the overall performance. The dynamic driver loading method makes the system maintenance and update more convenient, without the need to recompile and deploy the entire kernel, reducing maintenance costs and risks. It can provide personalized driver services for target users to meet their specific needs, significantly improving user satisfaction and experience.

[0027] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 is a flow chart of a user-driven loading method provided according to Embodiment 1 of the present invention;

[0030] Figure 2 This is a schematic diagram of a cross-compilation process provided according to Embodiment 1 of the present invention;

[0031] Figure 3is a flow chart of another user-driven loading method provided according to Embodiment 2 of the present invention;

[0032] Figure 4 is a schematic structural diagram of a user-driven loading device provided according to Embodiment 3 of the present invention;

[0033] Figure 5 It is a structural schematic diagram of an electronic device for implementing a user-driven loading method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

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

[0036] Embodiment 1

[0037] Figure 1 A flowchart of a user-driven loading method is provided for the first embodiment of the present invention. This embodiment is applicable to user personalization. The method can be executed by a user-driven loading device. The user-driven loading device can be implemented in the form of hardware and / or software. The user-driven loading device can be configured in a computer controller. Figure 1 As shown, the method includes:

[0038] S110, obtaining a kernel source code file, and obtaining a production file according to the kernel source code file.

[0039] Among them, the kernel source code file refers to the original program code set of the operating system kernel, which contains various instructions and logics to implement the core functions of the operating system, such as memory management, process scheduling, device drivers, etc. The source code file of the kernel module usually has a .c extension and can be written using any text editor. The make file refers to the Makefile file, which specifies the rules and dependencies for compiling the kernel module. In the Makefile file, you need to specify the path of the kernel source code, as well as the compile options and link options. The make file is used to guide the compilation process of the kernel source code, determine the compile options, dependencies, etc., in order to generate a kernel module or kernel version that meets specific requirements.

[0040] Optionally, before obtaining the kernel source code file, the method further includes: installing a compiler, a software construction tool and a header file, wherein the software construction tool includes a linker; and forming a development tool chain based on the compiler, the software construction tool and the header file.

[0041] It should be noted that different operating systems and hardware platforms may require different types of compilers. For example, for the Linux kernel, the commonly used compiler is the gcc compiler. Software build tools are used to automate the process of building software projects. Software build tools include linkers, which are used to merge multiple target files and possible library files in the compilation process into an executable file or shared library. Software build tools can also include Make, CMake, etc. The build tool is used to automatically determine the compilation order, dependencies, etc. based on the configuration files and source code structure of the project, and call the compiler for compilation. For example, the Make tool determines the compilation rules by reading the Makefile file. When the source code changes, the Make tool can only recompile the affected parts, saving time and resources.

[0042] Specifically, header files are files that contain information such as function declarations, macro definitions, and data structure definitions. For kernel development, header files contain various kernel interfaces and data structure definitions. Installing header files ensures that the compiler can correctly identify and process various kernel functions and data structures when compiling kernel source code. The compiler converts source code into machine code, the software build tool manages the compilation process, and the header file provides interface information. The three together constitute the development tool chain.

[0043] Optionally, obtaining a production file based on a kernel source code file includes: verifying the kernel source code file through a compiler to determine a function check status; when the function check status is normal, obtaining a kernel source code path, compilation options, and link options; and generating a production file based on the kernel source code path, compilation options, and link options.

[0044] Among them, the kernel is the core part of the operating system, and its correctness and stability directly affect the operation of the entire system. Therefore, the compiler will perform strict functional checks on the kernel source code to ensure that each functional module can work properly. For example, the compiler may check whether the memory management module allocates and releases memory correctly, whether the process scheduling module allocates CPU time fairly, etc. If any functional problems are found, the compiler will report errors so that developers can fix them.

[0045] Specifically, the production file will record the path of the kernel source code so that the compilation tool can find the source code. It will also contain compilation options and linking options to ensure that the compilation and linking processes proceed as expected. The kernel source code path is obtained so that the subsequent compilation and building processes can correctly find the source code file. Compilation options are used to control the behavior of the compiler to generate target code that meets specific requirements. Compilation options may include optimization levels, generation of debugging information, support for specific hardware platforms, etc. Linking options are used to control the behavior of the linker to combine the compiled target files and library files into the final executable file or kernel module. Linking options may include specifying the linked library files, setting the link address, etc.

[0046] S120, compile the kernel source code file according to the production file to generate a kernel module file.

[0047] The kernel module file refers to the KO file, which is a functional unit that can be independently loaded into the operating system kernel and can dynamically expand the kernel's functions at runtime. Compilation is the process of converting the language used by the kernel source code into machine executable code.

[0048] Optionally, the kernel source code file is compiled according to the production file to generate a kernel module file, including: calling a compiler and a linker through the production file; compiling the kernel source code file through the compiler to generate a compiled file; and linking the compiled file into a kernel module file through the linker.

[0049] Among them, the make file can be thought of as a configuration guide that tells the controller where to find the compiler and linker executables and provides the parameters to pass to them. For example, in a Unix / Linux-based system, the make file may contain instructions like "gcc-O2-I / path / to / include-c source.c", where "gcc" is the name of the compiler, "-O2" is the optimization option, "-I / path / to / include" is the path to the include file, "source.c" is the source code file to be compiled, and "-c" is the compilation option. The system will parse this instruction and perform the corresponding operations to call the compiler.

[0050] Specifically, the compilation process in this embodiment is a cross-compilation process. Cross-compilation is to generate code on one platform that can be executed on another platform. Therefore, different CPUs need corresponding compilers, and cross-compilation is like translation, translating the same program code into different CPU corresponding languages. It should be noted that the compiler itself is also a program and must be run on a corresponding CPU platform. The compilation process is a complex process composed of different sub-functions in a sequential order. Figure 2 A schematic diagram of a cross-compilation process is provided for the first embodiment of the present invention, wherein the compilation process includes functions such as preprocessing, compilation, assembly, and linking. Each sub-function is implemented by a separate tool, and they are combined to form a complete tool set. At the same time, the compilation process is a sequential process, involving the order in which the tools are used. Each tool is connected in series according to the sequence relationship to form a compilation tool chain.

[0051] Specifically, the role of the linker is to combine multiple compiled files and required library files into an executable file or kernel module file. The compiled files are linked by the linker to generate a kernel module file, which can be loaded into the operating system kernel to expand the kernel's functions.

[0052] S130, obtaining user behavior data and environment data of a target user, and determining a target kernel file from kernel module files according to the user behavior data.

[0053] Among them, user behavior data refers to the various operations and activity information of the target user in the process of using the computer system, such as frequently used software programs, types of websites visited, frequency and habits of operations, etc. By analyzing user behavior, it is possible to determine which kernel modules are the most critical and commonly used for the user. Environmental data includes network status and time period. The target kernel file refers to the kernel part that is most suitable for the target user, selected and combined from the kernel module file based on user behavior data and environmental data.

[0054] S140, loading the driver of the target user according to the target kernel file and environment data through the compiling and building tool.

[0055] The compiling and building tool refers to a software tool that converts source code into an executable program or other target file, and the compiling and building tool may be a gcc compiler. The compiling and building tool may compile and link the kernel source code according to the instructions in the production file to generate a kernel module file or a target kernel file. Driver loading refers to loading the device driver into the operating system kernel so that the operating system can identify and control the hardware device.

[0056] Optionally, the target user's driver is loaded according to the target kernel file and environmental data through a compilation and construction tool, including: determining a loading strategy according to the environmental data, wherein the loading strategy includes loading time and loading amount; and dynamically loading the target kernel file according to the loading strategy through a compilation and construction tool.

[0057] Specifically, the controller needs to determine network status detection, that is, real-time monitoring of network bandwidth and latency, and adjust the loading strategy according to different network environments (such as Wi-Fi). At the same time, the time period must be considered, that is, considering the differences in user behavior in different time periods, such as resource demand during peak and non-peak periods, allowing the system to load more resources when users are active and reduce the load when they are inactive.

[0058] Specifically, loading time refers to when the driver is loaded. If the environmental data shows that the system needs to use certain hardware devices immediately when it starts, the corresponding driver can be loaded when the system starts to ensure that the device is available in time. For example, the hard disk controller driver usually needs to be loaded early in the system startup so that the operating system can access the data on the hard disk. If some devices do not have to be used when the system starts, the loading of their drivers can be delayed until the device is needed. In this way, the system startup time can be reduced and the system response speed can be improved.

[0059] Specifically, the loading amount refers to how many drivers are loaded at a time. If the environmental data shows that the system resources are relatively tight, such as limited memory or low CPU performance, you can choose to load only the necessary drivers to avoid loading too many drivers at the same time and occupying too many resources. For example, in order to save resources, only the most basic drivers may be loaded, and other drivers are dynamically loaded when needed. If the system resources are sufficient and the user may frequently use multiple hardware devices, more drivers can be loaded at one time to improve the system's responsiveness and user experience.

[0060] Ultimately, the compilation and construction tools can compile and build the target kernel files according to the loading strategy to adapt to the specific environment. Dynamic loading means that during system operation, the controller can dynamically adjust the loading strategy according to the user's current operation behavior. For example, if the user stays in a certain functional module for a long time, the system can prioritize loading related data. It can also prioritize and set priorities for resources that need to be loaded based on predicted needs. When resources are insufficient, key components are loaded first to ensure that the user experience is not affected. In addition, by setting thresholds for user behavior, when the user behavior pattern changes (such as reduced frequency), the loading strategy is automatically adjusted to reduce unnecessary resource consumption.

[0061] The technical solution of the embodiment of the present invention, by obtaining the kernel source code file and compiling to generate the kernel module file, can determine the target kernel file for driver loading according to the behavior data and environment data of different users, so that the system can better adapt to various complex and changeable user needs and usage environments, and load the driver in a targeted manner according to the actual user behavior and environment, thereby avoiding unnecessary driver modules from occupying system resources and improving the utilization efficiency of system resources. Accurate driver loading reduces the system burden, improves the system's operating speed and responsiveness, thereby improving the overall performance. The dynamic driver loading method makes the system maintenance and update more convenient, without the need to recompile and deploy the entire kernel, reducing maintenance costs and risks. It can provide personalized driver services for target users to meet their specific needs, significantly improving user satisfaction and experience.

[0062] Embodiment 2

[0063] Figure 3 This is a flowchart of a user-driven loading method provided in the second embodiment of the present invention. This embodiment adds the specific process of obtaining the user behavior data and environment data of the target user and determining the target kernel file from the kernel module file according to the user behavior data on the basis of the above-mentioned first embodiment. Among them, the specific contents of steps S210-S220 and S260 are roughly the same as steps S110-S120 and S140 in the first embodiment, so they will not be repeated in this embodiment. Figure 3 As shown, the method includes:

[0064] S210: Obtain a kernel source code file, and obtain a production file according to the kernel source code file.

[0065] Optionally, before obtaining the kernel source code file, the method further includes: installing a compiler, a software construction tool and a header file, wherein the software construction tool includes a linker; and forming a development tool chain based on the compiler, the software construction tool and the header file.

[0066] Optionally, obtaining a production file based on a kernel source code file includes: verifying the kernel source code file through a compiler to determine a function check status; when the function check status is normal, obtaining a kernel source code path, compilation options, and link options; and generating a production file based on the kernel source code path, compilation options, and link options.

[0067] S220, compile the kernel source code file according to the production file to generate a kernel module file.

[0068] Optionally, the kernel source code file is compiled according to the production file to generate a kernel module file, including: calling a compiler and a linker through the production file; compiling the kernel source code file through the compiler to generate a compiled file; and linking the compiled file into a kernel module file through the linker.

[0069] S230: Obtain user behavior data and environment data of the target user.

[0070] Among them, user behavior data includes user operation data in the system, including key indicators such as click frequency, usage duration, access path, etc. In addition, it also includes user historical operation records, which are used to build behavior prediction models and analyze users' commonly used function modules and data requests.

[0071] S240: Build a behavior prediction model, and input user behavior data into the behavior prediction model to obtain an output target function identifier.

[0072] Specifically, the controller will analyze the collected historical operation records to find out the patterns and rules. For example, the user's operating habits in different time periods, the types of applications frequently used, the requirements for system performance, etc. can be analyzed, and based on the results of the analysis, the appropriate behavior prediction model type can be selected. The model type can include machine learning models such as decision trees, random forests, neural networks, etc. After the controller inputs the user behavior data into the behavior prediction model, the model will calculate based on the input data and output the prediction results. The input data can be a vector or a matrix, which contains the characteristics of the user behavior. For example, the type of application used by the user over a period of time, the frequency of operation, the system resource usage, etc. can be used as features to input the model. The output of the behavior prediction model is the target function identifier. The target function identifier represents the kernel function that the model predicts the user may need.

[0073] Optionally, the method further includes: obtaining user feedback data, and adjusting the behavior prediction model according to the user feedback data.

[0074] Specifically, the controller will collect user feedback, introduce a user feedback mechanism, collect user satisfaction with loading speed and functional modules, and incorporate feedback data into analysis. The loading algorithm is continuously adjusted and optimized based on user feedback to achieve truly personalized services. In addition, user customized settings can be performed, that is, users are allowed to manually adjust the loading settings according to their personal preferences, providing a more flexible user experience.

[0075] S250: Filter out a target kernel file from the kernel module files according to the target function identifier.

[0076] Specifically, further, the kernel module file is composed of multiple functional modules, each of which implements a specific kernel function, such as memory management, process scheduling, device driver, etc. The controller can filter out the target kernel file from the kernel module file according to the target function identifier, and after filtering out the target kernel file, it can be dynamically loaded into the kernel to implement a specific function. Dynamic loading can be performed while the system is running without restarting the system.

[0077] S260, loading the driver of the target user according to the target kernel file and environment data through the compiling and building tool.

[0078] Optionally, the target user's driver is loaded according to the target kernel file and environmental data through a compilation and construction tool, including: determining a loading strategy according to the environmental data, wherein the loading strategy includes loading time and loading amount; and dynamically loading the target kernel file according to the loading strategy through a compilation and construction tool.

[0079] The technical solution of the embodiment of the present invention, by obtaining the kernel source code file and compiling to generate the kernel module file, can determine the target kernel file for driver loading according to the behavior data and environment data of different users, so that the system can better adapt to various complex and changeable user needs and usage environments, and load the driver in a targeted manner according to the actual user behavior and environment, thereby avoiding unnecessary driver modules from occupying system resources and improving the utilization efficiency of system resources. Accurate driver loading reduces the system burden, improves the system's operating speed and responsiveness, thereby improving the overall performance. The dynamic driver loading method makes the system maintenance and update more convenient, without the need to recompile and deploy the entire kernel, reducing maintenance costs and risks. It can provide personalized driver services for target users to meet their specific needs, significantly improving user satisfaction and experience.

[0080] Embodiment 3

[0081] Figure 4 This is a schematic diagram of the structure of a user-driven loading device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a production file acquisition module 310, which is used to acquire a kernel source code file and acquire a production file according to the kernel source code file;

[0082] A kernel module file generating module 320, for compiling the kernel source code file according to the production file to generate a kernel module file;

[0083] A target kernel file determination module 330 is used to obtain user behavior data and environment data of a target user, and determine a target kernel file from kernel module files according to the user behavior data;

[0084] The personalized driver loading module 340 is used to load the driver of the target user according to the target kernel file and environment data through the compilation and construction tool.

[0085] Optionally, the device also includes: a development tool chain installation module, which is used to: install a compiler, software construction tools and header files before obtaining the kernel source code file, wherein the software construction tools include a linker; and form a development tool chain based on the compiler, software construction tools and header files.

[0086] Optionally, the production file acquisition module 310 is specifically used to: check the kernel source code file through the compiler to determine the function check status; when the function check status is normal, obtain the kernel source code path, compilation options and link options; generate the production file according to the kernel source code path, compilation options and link options.

[0087] Optionally, the kernel module file generation module 320 is specifically used to: call the compiler and linker by making files; compile the kernel source code file by the compiler to generate a compiled file; and link the compiled file into a kernel module file by the linker.

[0088] Optionally, the target kernel file determination module 330 is specifically used to: construct a behavior prediction model, and input user behavior data into the behavior prediction model to obtain an output target function identifier; and filter out the target kernel file from the kernel module file according to the target function identifier.

[0089] Optionally, the personalized driver loading module 340 is specifically used to: determine a loading strategy according to environmental data, wherein the loading strategy includes a loading time and a loading amount; and dynamically load a target kernel file based on the loading strategy by compiling a construction tool.

[0090] Optionally, the device further includes: a feedback adjustment module, used to: obtain user feedback data, and adjust the behavior prediction model according to the user feedback data.

[0091] The technical solution of the embodiment of the present invention, by obtaining the kernel source code file and compiling to generate the kernel module file, can determine the target kernel file for driver loading according to the behavior data and environment data of different users, so that the system can better adapt to various complex and changeable user needs and usage environments, and load the driver in a targeted manner according to the actual user behavior and environment, thereby avoiding unnecessary driver modules from occupying system resources and improving the utilization efficiency of system resources. Accurate driver loading reduces the system burden, improves the system's operating speed and responsiveness, thereby improving the overall performance. The dynamic driver loading method makes the system maintenance and update more convenient, without the need to recompile and deploy the entire kernel, reducing maintenance costs and risks. It can provide personalized driver services for target users to meet their specific needs, significantly improving user satisfaction and experience.

[0092] A user-driven loading device provided in an embodiment of the present invention can execute a user-driven loading method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0093] Embodiment 4

[0094] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0095] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

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

[0097] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a user-driven loading method.

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

[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0101] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

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

[0103] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0104] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0105] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0106] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A user-driven loading method, characterized in that: include: Obtain a kernel source code file, and obtain a production file according to the kernel source code file; Compiling the kernel source code file according to the production file to generate a kernel module file; Acquire user behavior data and environment data of a target user, and determine a target kernel file from the kernel module file according to the user behavior data; The driver of the target user is loaded according to the target kernel file and the environment data through a compiling and building tool.

2. The method according to claim 1, characterized in that Before obtaining the kernel source code file, the method further includes: Installing a compiler, a software building tool, and a header file, wherein the software building tool includes a linker; A development tool chain is formed according to the compiler, the software building tool and the header file.

3. The method according to claim 2, characterized in that The step of obtaining a production file according to the kernel source code file includes: Checking the kernel source code file by the compiler to determine the function check status; When the function check result is that the function is normal, obtaining a kernel source code path, a compile option, and a link option; A production file is generated according to the kernel source code path, the compile option and the link option.

4. The method according to claim 2, characterized in that: The step of compiling the kernel source code file according to the production file to generate a kernel module file includes: calling the compiler and the linker through the make file; Compiling the kernel source code file by the compiler to generate a compiled file; The compiled file is linked into the kernel module file by the linker.

5. The method according to claim 1, characterized in that Determining a target kernel file from the kernel module file according to the user behavior data includes: Constructing a behavior prediction model, and inputting the user behavior data into the behavior prediction model to obtain an output target function identifier; A target kernel file is screened out from the kernel module file according to the target function identifier.

6. The method according to claim 5, characterized in that The step of loading the driver of the target user according to the target kernel file and the environment data by compiling and building a tool includes: Determine a loading strategy according to the environmental data, wherein the loading strategy includes a loading time and a loading amount; The target kernel file is dynamically loaded based on the loading strategy by compiling a construction tool.

7. The method according to claim 5, characterized in that The method further comprises: Obtain user feedback data, and adjust the behavior prediction model according to the user feedback data.

8. A user-driven loading device, characterized in that: include: A production file acquisition module is used to acquire a kernel source code file, and acquire a production file according to the kernel source code file; A kernel module file generating module, used for compiling the kernel source code file according to the production file to generate a kernel module file; A target kernel file determination module, used to obtain user behavior data and environment data of a target user, and determine a target kernel file from the kernel module file according to the user behavior data; The personalized driver loading module is used to load the driver of the target user according to the target kernel file and the environment data through a compiling and building tool.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 7 when executed.

Citation Information

Cited By

  • End-to-end compiling method of coarse-grained reconfigurable array based on hierarchical data stream

    CN120010860A