Data writing method and equipment
By using the target driver in electronic devices to write the motherboard function modules into the target storage space, the problem of the time spent on installing or updating the motherboard function modules in the prior art is solved, and a more efficient and convenient update process is achieved.
Patent Information
- Application Number
- CN202510185829.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, the overall update of the system on the motherboard is required every time the motherboard function module is installed or updated, resulting in a long time and poor convenience.
By obtaining the installation package corresponding to the target virtual device, perform the installation package to install the target driver, and use the target driver to write the motherboard function module to the target storage space to avoid overall system updates.
It significantly shortens the use time for motherboard function module installation or update, improves convenience, and reduces interference to motherboard system.
Smart Images

Figure CN120066547A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data writing, and particularly to a data writing method and device. Background Art
[0002] Currently, some motherboard function modules are installed on electronic devices, and these motherboard function modules can provide various functions for users of the electronic devices, including but not limited to device security and management.
[0003] In related technologies, these motherboard function modules are generally integrated into the motherboard of the electronic device. Therefore, each time a new motherboard function module is installed or the original motherboard function module is updated, the entire system on the motherboard needs to be updated, resulting in a long time-consuming installation or update process and poor convenience. Summary of the Invention
[0004] For this reason, this application discloses the following technical solutions:
[0005] In a first aspect of this application, a data writing method is provided, including:
[0006] Obtain a first installation package corresponding to a target virtual device, where the first installation package carries a first motherboard function module to be installed;
[0007] Execute the first installation package to install a target driver corresponding to the target virtual device;
[0008] Use the target driver to write the first motherboard function module into a target storage space to run the first motherboard function module in the electronic device.
[0009] Optionally, the using the target driver to write the first motherboard function module into the target storage space includes:
[0010] Use the target driver to write the first motherboard function module into the memory module of the electronic device;
[0011] Use the distribution module of the electronic device to write the first motherboard function module in the memory module into the target storage space.
[0012] Optionally, the using the distribution module of the electronic device to write the first motherboard function module in the memory module into the target storage space includes:
[0013] Obtain the storage location information of the first motherboard function module from the first installation package;
[0014] Use the distribution module of the electronic device to write the first motherboard function module in the memory module into the target storage space according to the storage location information.
[0015] Optionally, running the first main board function module in the electronic device includes:
[0016] Obtaining signature data corresponding to the first installation package;
[0017] When it is determined that the signature data meets the authentication conditions based on the key data of the electronic device, running the first main board function module in the electronic device.
[0018] Optionally, running the first main board function module in the electronic device includes:
[0019] Obtaining verification information corresponding to the first main board function module;
[0020] When it is determined that the verification information matches the target verification information, running the first main board function module in the electronic device.
[0021] Optionally, obtaining the verification information corresponding to the first main board function module includes at least one of the following:
[0022] Obtaining the verification information corresponding to the first main board function module carried in the first installation package;
[0023] Obtaining the verification information of the first main board function module from other electronic devices.
[0024] Optionally, it further includes:
[0025] Obtaining a second installation package corresponding to the target virtual device, where the second installation package carries a second main board function module to be installed;
[0026] Comparing the first version information of the first main board function module and the second version information of the second main board function module;
[0027] When the first main board function module and the second main board function module meet the replacement conditions, replacing the first main board function module in the target storage space with the second main board function module.
[0028] Optionally, the first main board function module and the second main board function module meeting the replacement conditions includes at least one of the following:
[0029] The release time of the second main board function module is after that of the first main board function module;
[0030] The performance parameters of the second main board function module are superior to those of the first main board function module.
[0031] Optionally, it further includes at least one of the following:
[0032] Send the device information of the target virtual device to the operating system of the electronic device through the target interface, so as to create the target virtual device in the operating system, where the target interface is an interface for power management and device configuration in the operating system;
[0033] Add the device information of the target virtual device to the registry of the operating system to create the target virtual device in the operating system.
[0034] The second aspect of this application provides an electronic device, including:
[0035] A memory for storing computer instructions;
[0036] A processor for executing the computer instructions to implement the following method:
[0037] Obtain a first installation package corresponding to the target virtual device, where the first installation package carries a first main board function module to be installed;
[0038] Execute the first installation package to install the target driver corresponding to the target virtual device;
[0039] Use the target driver to write the first main board function module into the target storage space to run the first main board function module in the electronic device. Description of the Drawings
[0040] In order 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, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0041] Figure 1 It is a flowchart of a data writing method provided by an embodiment of the present application;
[0042] Figure 2 It is a schematic diagram of a system architecture provided by an embodiment of the present application;
[0043] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed Embodiments
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0045] An embodiment of the present application provides a data writing method. Please refer to Figure 1 , and the method may include the following steps.
[0046] S101: Obtain a first installation package corresponding to a target virtual device, where the first installation package carries a first main board function module to be installed.
[0047] The data writing method provided in this embodiment may be executed by a processor of any electronic device capable of installing and running the main board function module. As an example, the electronic device may be a desktop computer, a laptop computer, etc., without limitation.
[0048] The electronic device may obtain the first installation package in various ways.
[0049] On the one hand, the electronic device may access any network, such as accessing the Internet or a local area network, and then obtain the first installation package transmitted by other electronic devices in the network through the accessed network. Exemplarily, the electronic device may access the Internet and download the first installation package from a server providing corresponding download services through the Internet.
[0050] On the one hand, the electronic device may have multiple device interfaces. The electronic device may connect to other physical devices through these device interfaces, and then read the first installation package stored on the connected physical device. Exemplarily, the device interface may be a Universal Serial Bus (USB) interface. The electronic device may connect to a USB flash disk, a mobile phone, a tablet computer, etc. through the USB interface, so as to read the first installation package stored in the above devices.
[0051] In this embodiment, each installation package may include one or more main board function modules to be installed. Different installation packages may contain different main board function modules. The electronic device may selectively obtain an installation package containing the first main board function module to be installed as the first installation package according to the main board function module to be installed.
[0052] Exemplarily, in the case of downloading an installation package from a server, the electronic device can display the relevant information of multiple installable installation packages on the display screen. The relevant information can indicate which motherboard function modules are included in the corresponding installation package. Then, the electronic device can, in response to the user's selection instruction, download the selected first installation package from the server.
[0053] S102. Execute the first installation package to install the target driver corresponding to the target virtual device.
[0054] The target virtual device is a virtual device pre-created in the operating system of the electronic device.
[0055] In this embodiment, relevant manufacturers can package the motherboard function modules and the target driver corresponding to the target virtual device to obtain an installation package containing the corresponding motherboard function modules. After obtaining the first installation package, the electronic device can execute the first installation package according to the method of installing a program in the operating system in the relevant technical field, so as to install the target driver in the first installation package in the operating system of the electronic device.
[0056] The process of installing the target driver can refer to the relevant technology and will not be elaborated here.
[0057] S103. Use the target driver to write the first motherboard function module into the target storage space to run the first motherboard function module in the electronic device.
[0058] The target storage space can be the storage space in the BIOS ROM of the electronic device, or can be the storage space pre-configured in the hard disk of the electronic device for storing motherboard function modules. As an example, in the case where the target storage space is the storage space in the BIOS ROM, the target driver can be used to write the first motherboard function module into the BIOS ROM. BIOS ROM represents the read-only memory (ROM) in the electronic device for storing the BIOS.
[0059] The address of the target storage space can be pre-configured in the header file included in the first installation package. When executing S103, the header file of the first installation package can be read to find the target storage space in the electronic device.
[0060] After writing the first motherboard function module into the target storage space, the electronic device can shut down and then power on again after shutdown, or can directly restart. After power on or restart, the electronic device can run the first motherboard function module written into the target storage space, so as to provide corresponding functions for the user through the first motherboard function module.
[0061] The beneficial effect of this embodiment is that:
[0062] Based on the data writing method of this embodiment, each time a new motherboard function module is installed or an original motherboard function module is updated, the electronic device can obtain a first installation package containing the first motherboard function module to be installed, and then write the first motherboard function module into the target storage space by installing the target driver, without the need to update the entire system on the motherboard. Therefore, the method of this embodiment can significantly shorten the time for installing or updating the motherboard function module and improve the convenience of installing or updating the motherboard function module.
[0063] In some related technologies, the system on the motherboard can include the Basic Input Output System (BIOS), can also include the Unified Extensible Firmware Interface (UEFI), or can include other systems, without limitation.
[0064] In step S103, the process of writing the first motherboard function module into the target storage space by using the target driver may include:
[0065] Use the target driver to write the first motherboard function module into the memory module of the electronic device;
[0066] Use the distribution module of the electronic device to write the first motherboard function module in the memory module into the target storage space.
[0067] The memory module may refer to the operating memory of the electronic device, for example, it may be the Random Access Memory (RAM) of the electronic device.
[0068] After the target driver is installed, the target driver can read each first motherboard function module carried in the first installation package, and then write each read first motherboard function module into the memory module of the electronic device.
[0069] After all the first motherboard function modules are written into the memory module, the distribution module can write each first motherboard function module from the memory module into the target storage space.
[0070] Please refer to Figure 2 , the distribution module is a program module pre-configured in the Basic Input Output System (BIOS) of this embodiment. On the one hand, the distribution module can be used to write the first motherboard function module to be installed from the memory module into the target storage space. On the other hand, it can authenticate and verify the motherboard function modules stored in the target storage space when the electronic device is powered on or restarted, and load the motherboard function modules that pass the authentication and verification into the processor for operation.
[0071] In some embodiments, after the target driver writes all the first mainboard function modules into the memory module, the electronic device can be triggered to restart. During the restart process of the electronic device, the distribution module can write the first mainboard function modules from the memory module into the target storage space.
[0072] During the restart process of the electronic device, its memory module remains powered on all the time. Therefore, the first mainboard function modules written into the memory module will not be lost.
[0073] The advantage of writing the first mainboard function modules into the target storage space during the restart process is that:
[0074] During the restart process, fewer programs are running on the electronic device. Writing the first mainboard function modules into the target storage space at this time can avoid the writing process being interrupted by other running programs and write the first mainboard function modules into the target storage space faster.
[0075] In some alternative embodiments, when using the distribution module to write the first mainboard function modules into the target storage space, it can:
[0076] Obtain the storage location information of the first mainboard function modules from the first installation package;
[0077] Use the distribution module of the electronic device to write the first mainboard function modules in the memory module into the target storage space according to the storage location information.
[0078] The storage location information of the first mainboard function modules can be pre-configured in the header file of the first installation package. The distribution module can obtain the storage location information of the first mainboard function modules from the header file of the first installation package before writing the first mainboard function modules, and then write the first mainboard function modules according to the storage location information.
[0079] Among them, the storage location information can be used to indicate whether the target storage space is the storage space of the BIOS ROM or the storage space of the electronic device hard disk, and can also be used to indicate which storage address in the target storage space each first mainboard function module is specifically written to.
[0080] In some alternative embodiments, before writing the first mainboard function modules, the storage location information of the first mainboard function modules can also be determined based on the user's operation, and then the first mainboard function modules are written to the position specified by the user in the target storage space according to the storage location information.
[0081] When running the first mainboard function module stored in the target storage space, the first mainboard function module can be authenticated and verified first. After the first mainboard function module passes the verification and authentication, the first mainboard function module is run. If the verification or authentication fails, the first mainboard function module is not run.
[0082] Among them, the order of verification and authentication is not limited. Verification can be performed first and then authentication, or authentication can be performed first and then verification, or authentication and verification can be performed simultaneously.
[0083] The method of authenticating the first mainboard function module can be:
[0084] Obtain the signature data corresponding to the first installation package;
[0085] When it is determined based on the key data of the electronic device that the signature data meets the authentication conditions, the first mainboard function module is run in the electronic device.
[0086] Among them, the signature data meeting the authentication conditions indicates that the first mainboard function module passes the authentication, and the signature data not meeting the authentication conditions indicates that the first mainboard function module fails the authentication.
[0087] The signature data can be obtained by the manufacturer providing the first installation package and written into the header file of the first installation package when packaging the first mainboard function module to obtain the installation package.
[0088] The method of obtaining the signature data can be to first obtain the data digest of the first installation package. The data digest can be obtained by processing the data contained in the first installation package with any one of the digest algorithms in the related technologies (such as a hash function), without limitation.
[0089] After obtaining the data digest, the private key in the key data can be used to encrypt the data digest to obtain the signature data.
[0090] The authentication process can be performed by Figure 2 the distribution module shown.
[0091] The distribution module can read the signature data from the header file of the first installation package, and the distribution module can obtain the public key in the key data released by the manufacturer by downloading through the network or reading from a USB flash drive. Thus, the distribution module can decrypt the signature data with the public key to obtain the decrypted data digest.
[0092] On the other hand, the distribution module can process the data contained in the first installation package with the same digest algorithm as when obtaining the signature data to obtain the reference data digest.
[0093] If the data digest after decryption is the same as the reference data digest, it is determined that the signature data meets the authentication conditions. If the data digest after decryption is different from the reference data digest, it is determined that the signature data does not meet the authentication conditions.
[0094] In this embodiment, the distribution module can verify the first main board function module, and the verification method can be:
[0095] Obtain the verification information corresponding to the first main board function module;
[0096] When it is determined that the verification information matches the target verification information, the first main board function module is run in the electronic device.
[0097] Please refer to Figure 2 , each main board function module can correspond to a piece of verification information. The verification information of the main board function module can be stored in the target storage space of the electronic device in the format of Table 1, or it can also be stored in other storage spaces different from the target storage space. For example, the main board function module can be stored in the BIOS ROM, and the corresponding verification information can be stored in the hard disk of the electronic device.
[0098] Table 1
[0099] Content Description GUID Function Module Unique Identification Code License Key Verification Information
[0100] Among them, GUID is the unique identification code of the main board function module, used to distinguish different main board function modules. License Key is the verification information of the main board function module, and this verification information can be a string or a binary number.
[0101] The target verification information can be a string or a binary number pre-configured in the distribution module.
[0102] The matching of the verification information and the target verification information can mean that the verification information is the same as the target verification information.
[0103] When verifying a first main board function module, the distribution module can compare the verification information of this first main board function module with the pre-configured target verification information. If the two are the same, it is determined that this first main board function module passes the verification. If the two are different, it is determined that this first main board function module fails the verification.
[0104] As an example, the target verification information may be the string "Activated", and the verification information of the first main board function module may be the string "Nonactivated" or the string "Activated". During the verification process, if it is found through comparison that the verification information of the first main board function module is consistent with the target verification information, both being "Activated", it is determined that the first main board function module passes the verification; if the two are inconsistent and the verification information of the first main board function module is "Nonactivated", it is determined that the first main board function module fails the verification.
[0105] As another example, the target verification information may be "1", and the verification information of the first main board function module may be "0" or "1". During the verification process, if it is found through comparison that the verification information of the first main board function module is consistent with the target verification information, both being "1", it is determined that the first main board function module passes the verification; if the two are inconsistent and the verification information of the first main board function module is "0", it is determined that the first main board function module fails the verification.
[0106] In this embodiment, the distribution module can obtain the verification information corresponding to the first main board function module through at least one of the following methods:
[0107] Obtaining method 1: Obtain the verification information corresponding to the first main board function module carried in the first installation package;
[0108] Obtaining method 2: Obtain the verification information of the first main board function module from other electronic devices.
[0109] In obtaining method 1, the verification information of the first main board function module can be packaged into the first installation package together with the first main board function module. When the target driver writes the first main board function module from the first installation package to the memory module, the verification information of the first main board function module can be written into the memory module together. Correspondingly, when the distribution module writes the first main board function module to the target storage space, the verification information of the first main board function module can be written into the target storage space or other specified locations together.
[0110] In obtaining method 2, the other electronic device can be a device connected to this electronic device (i.e., the electronic device that executes the method of the above embodiment) through a network. For example, it can be a server or a terminal device of an individual user. This electronic device can receive the verification information of the first main board function module transmitted by the other electronic device through the network, and then the distribution module writes these verification information into the specified location.
[0111] In the second acquisition method, the other electronic device may also be an entity device connected to this electronic device through the device interface of this electronic device. For example, it may be a USB flash drive, a mobile phone, a tablet computer, etc. connected to the USB interface of this electronic device. This electronic device may read the verification information of the first main board function module from the other electronic device through the device interface, and then the distribution module writes this verification information to the specified location.
[0112] In some optional embodiments, after writing the first main board function module to the target storage space, the distribution module may further perform the following steps:
[0113] Obtain a second installation package corresponding to the target virtual device, where the second installation package carries a second main board function module to be installed;
[0114] Compare the first version information of the first main board function module and the second version information of the second main board function module;
[0115] When the first main board function module and the second main board function module meet the replacement condition, replace the first main board function module in the target storage space with the second main board function module.
[0116] The method of obtaining the second installation package may be the same as the method of obtaining the first installation package described above, and will not be elaborated.
[0117] The second main board function module may be two different main board function modules from the first main board function module, and the functions provided by the second main board function module and the functions provided by the first main board function module may be the same.
[0118] For example, both the first main board function module and the second main board function module may be software modules providing power management functions, or may be software modules for controlling the operating frequencies of devices (such as a graphics processing unit GPU, a central processing unit CPU) of the electronic device.
[0119] In some embodiments, a main board function module may include the data shown in Table 2 below.
[0120] Table 2
[0121] Content Description GUID Function Module Unique Identification Code Vendor Code Function Module Provider Version Version Information Size Function Module Size Feature Body Function Main Body Module
[0122] In Table 2, Vendor Code is the code of the manufacturer providing this main board function module, used to distinguish different manufacturers providing main board function modules, Version is the version information of this main board function module, Size represents the data volume of this main board function module (such as 1MB, 400KB, etc.), and Feature Body is the program body of this main board function module. By running Feature Body in the processor, the function corresponding to this main board function module can be provided.
[0123] The GUID of a main board function module may include part of the data characterizing the functions provided by the main board function module. After obtaining the second installation package, the distribution module may determine whether the first main board function module and the second main board function module are different main board function modules providing the same function based on the GUIDs of the first main board function module and the second main board function module. If so, the above steps of comparing version information are executed. If not, the above steps of comparing version information may not be executed, and the second main board function module is written into the target storage space according to the data writing method of the foregoing embodiment.
[0124] By comparing the first version information and the second version information, the distribution module may determine whether the first main board function module and the second main board function module meet the replacement conditions. If the first main board function module and the second main board function module meet the replacement conditions, the distribution module replaces the first main board function module in the target storage space with the second main board function module. If the first main board function module and the second main board function module do not meet the replacement conditions, the distribution module may not write the second main board function module into the target storage space.
[0125] The method of replacing the first main board function module in the target storage space with the second main board function module may be to delete the first main board function module from the target storage space and then write the second main board function module into the target storage space; or it may be to directly write the second main board function module to the position where the first main board function module is stored in the target storage space and overwrite the original first main board function module with the second main board function module.
[0126] The method of writing the second main board function module is the same as the method of writing the first main board function module described above and will not be elaborated here.
[0127] Optionally, the first main board function module and the second main board function module meet the replacement conditions, including at least one of the following:
[0128] The release time of the second main board function module is after that of the first main board function module;
[0129] The performance parameters of the second main board function module are better than those of the first main board function module.
[0130] For the first case, the version information of each main board function module may include a number characterizing the release order of the main board function module. The larger the number, the later the release time of the corresponding main board function module.
[0131] The distribution module can compare the numbers representing the release order in the first version information and the numbers representing the release order in the second version information. If the former is less than the latter, it can be determined that the release time of the second main board function module is after the release time of the first main board function module; if the former is greater than the latter, it can be determined that the release time of the second main board function module is before the release time of the first main board function module.
[0132] For the second case, for main board function modules that provide different functions, the types of their performance parameters can be different. The version information of the main board function module can directly include the performance parameters of the main board function module, or can include characters or codes representing the performance parameters. Thus, the distribution module can compare the first version information and the second version information to determine whether the performance parameters of the second main board function module are superior to those of the first main board function module.
[0133] As some examples, when both the first main board function module and the second main board function module are used to regulate the operating frequency of the GPU, the performance parameter can be the upper limit of frequency regulation of the main board function module. The larger the upper limit of frequency regulation, the better the performance of the corresponding main board function module. Therefore, if it is determined after comparison that the upper limit of frequency regulation of the second main board function module is greater than that of the first main board function module, it indicates that the performance parameters of the second main board function module are superior to those of the first main board function module.
[0134] When both the first main board function module and the second main board function module are used to handle abnormal conditions of the hardware of the electronic device (such as the main board, memory, processor, fan, etc.), the performance parameter can be the handling time of the main board function module. The shorter the handling time, the faster the main board function module can handle the abnormal conditions of the hardware of the electronic device, and the better the performance of the main board function module. Therefore, if it is determined after comparison that the handling time of the second main board function module is less than that of the first main board function module, it indicates that the performance parameters of the second main board function module are superior to those of the first main board function module.
[0135] In some alternative embodiments, before executing the data writing method of the above embodiments, the foregoing target virtual device can also be created in the operating system of the electronic device in at least one of the following ways:
[0136] Creation method 1: Send the device information of the target virtual device to the operating system of the electronic device through the target interface to create the target virtual device in the operating system. The target interface is the interface in the operating system for power management and device configuration;
[0137] Creation method 2: Add the device information of the target virtual device to the registry of the operating system to create the target virtual device in the operating system.
[0138] The steps of creating the target virtual device described above can be performed by Figure 2 the virtual device module shown.
[0139] The virtual device module can be pre-installed in the BIOS of the electronic device by relevant manufacturers before the electronic device leaves the factory. Each time the electronic device is powered on, the virtual device module can create the target virtual device according to the foregoing steps.
[0140] In the first creation method, when the electronic device is powered on, the virtual device module can call the target interface of the operating system of the electronic device and send the device information of the target virtual device from the target interface to the operating system. The device information can have the same format as the device information sent through the target interface when physical devices (such as headphones, microphones, keyboards, etc.) are connected to the electronic device. The device information can include type information indicating the device type of the target virtual device, the name of the target virtual device, etc. Thus, the operating system can, in response to receiving the device information, recognize the virtual device module that sent the device information as the target virtual device.
[0141] In the second creation method, when the electronic device is powered on, the virtual device module can access the registry in the operating system used to register physical devices, add the device information of the target virtual device to the registry. The device information added to the registry can have the same format as the device information of other physical devices in the registry. After adding the device information, the operating system can add the above-mentioned target virtual device to the device list based on the device information in the registry.
[0142] An embodiment of this application also provides an electronic device. Please refer to Figure 3 , and the electronic device may include a memory 301 and a processor 302.
[0143] The memory 301 is used to store computer instructions;
[0144] The processor 302 is used to execute computer instructions to implement the following method:
[0145] Obtain a first installation package corresponding to the target virtual device, and the first installation package carries a first mainboard function module to be installed;
[0146] Execute the first installation package to install the target driver corresponding to the target virtual device;
[0147] Use the target driver to write the first mainboard function module into the target storage space to run the first mainboard function module in the electronic device.
[0148] Optionally, when the processor 302 uses the target driver to write the first mainboard function module into the target storage space, it can be used for:
[0149] Use the target driver to write the first main board function module into the memory module of the electronic device;
[0150] Use the distribution module of the electronic device to write the first main board function module of the memory module into the target storage space.
[0151] Optionally, when the processor 302 uses the distribution module of the electronic device to write the first main board function module of the memory module into the target storage space, it can be used for:
[0152] Obtain the storage location information of the first main board function module from the first installation package;
[0153] Use the distribution module of the electronic device to write the first main board function module of the memory module into the target storage space according to the storage location information.
[0154] Optionally, when the processor 302 runs the first main board function module in the electronic device, it can be used for:
[0155] Obtain the signature data corresponding to the first installation package;
[0156] When it is determined that the signature data meets the authentication conditions based on the key data of the electronic device, run the first main board function module in the electronic device.
[0157] Optionally, when the processor 302 runs the first main board function module in the electronic device, it can be used for:
[0158] Obtain the verification information corresponding to the first main board function module;
[0159] When it is determined that the verification information matches the target verification information, run the first main board function module in the electronic device.
[0160] Optionally, the processor 302 can obtain the verification information corresponding to the first main board function module in at least one of the following ways:
[0161] Obtain the verification information corresponding to the first main board function module carried by the first installation package;
[0162] Obtain the verification information of the first main board function module from other electronic devices.
[0163] Optionally, the processor 302 can also be used for:
[0164] Obtain a second installation package corresponding to the target virtual device, and the second installation package carries the second main board function module to be installed;
[0165] Compare the first version information of the first main board function module and the second version information of the second main board function module;
[0166] When the first main board function module and the second main board function module meet the replacement conditions, replace the first main board function module in the target storage space with the second main board function module.
[0167] Optionally, the first main board function module and the second main board function module meeting the replacement conditions include at least one of the following:
[0168] The release time of the second main board function module is after that of the first main board function module;
[0169] The performance parameters of the second main board function module are superior to those of the first main board function module.
[0170] Optionally, the processor 302 can also execute at least one of the following:
[0171] Send the device information of the target virtual device to the operating system of the electronic device through the target interface to create the target virtual device in the operating system, where the target interface is the interface for power management and device configuration in the operating system;
[0172] Add the device information of the target virtual device to the registry of the operating system to create the target virtual device in the operating system.
[0173] For the electronic device in this embodiment, its working principle can refer to the relevant steps of the data writing method provided in the foregoing embodiment, which will not be elaborated here.
[0174] It should be noted that the various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other.
[0175] For the convenience of description, when describing the above system or device, it is divided into various modules or units according to functions for description. Of course, when implementing this application, the functions of each unit can be realized in the same or multiple software and / or hardware.
[0176] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0177] Finally, it should also be noted that in this text, relational terms such as first, second, third, and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0178] The above are only the preferred embodiments of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A data writing method, comprising: Obtaining a first installation package corresponding to the target virtual device, wherein the first installation package carries a first mainboard function module to be installed; Executing the first installation package to install a target driver corresponding to the target virtual device; The target driver is used to write the first mainboard function module into the target storage space to run the first mainboard function module in the electronic device.
2. The method according to claim 1, wherein using the target driver to write the first mainboard function module into the target storage space comprises: Using the target driver to write the first mainboard function module into a memory module of the electronic device; The first mainboard function module of the memory module is written into the target storage space by using the distribution module of the electronic device.
3. The method according to claim 2, wherein the using the distribution module of the electronic device to write the first mainboard function module of the memory module into the target storage space comprises: Obtaining storage location information of the first mainboard functional module from the first installation package; The first mainboard function module of the memory module is written into the target storage space according to the storage location information by utilizing the distribution module of the electronic device.
4. The method according to claim 1, wherein the step of running the first mainboard function module in the electronic device comprises: Obtaining signature data corresponding to the first installation package; When it is determined that the signature data meets the authentication condition based on the key data of the electronic device, the first mainboard function module is run in the electronic device.
5. The method according to claim 1, wherein the step of running the first mainboard function module in the electronic device comprises: Obtaining verification information corresponding to the first mainboard functional module; When it is determined that the verification information matches the target verification information, the first mainboard function module is run in the electronic device.
6. The method according to claim 5, wherein obtaining the verification information corresponding to the first mainboard functional module comprises at least one of the following: Obtaining verification information corresponding to the first mainboard function module carried by the first installation package; Obtain verification information of the first mainboard functional module from other electronic devices.
7. The method according to claim 1, further comprising: Obtaining a second installation package corresponding to the target virtual device, wherein the second installation package carries a second mainboard function module to be installed; Comparing first version information of the first mainboard functional module and second version information of the second mainboard functional module; When the first mainboard function module and the second mainboard function module meet a replacement condition, the first mainboard function module in the target storage space is replaced by the second mainboard function module.
8. The method according to claim 7, wherein the first mainboard function module and the second mainboard function module meet a replacement condition, including at least one of the following: The release time of the second mainboard function module is later than that of the first mainboard function module; The performance parameters of the second mainboard functional module are better than the performance parameters of the first mainboard functional module.
9. The method according to claim 1, further comprising at least one of the following: Sending device information of the target virtual device to the operating system of the electronic device through a target interface to create the target virtual device in the operating system, wherein the target interface is an interface in the operating system for power management and device configuration; The device information of the target virtual device is added in a registry of the operating system to create the target virtual device in the operating system.
10. An electronic device comprising: Memory, for storing computer instructions; A processor is used to execute the computer instructions to implement the following method: Obtaining a first installation package corresponding to the target virtual device, wherein the first installation package carries a first mainboard function module to be installed; Executing the first installation package to install a target driver corresponding to the target virtual device; The target driver is used to write the first mainboard function module into the target storage space to run the first mainboard function module in the electronic device.