Information processing method, information generation method, information processing device and electronic equipment
By pre-storing hardware configuration information in the embedded flash memory of electronic devices and using EC and Coreboot for hardware initialization and driver loading, the problem of excessive hardware resource utilization during electronic device startup is solved, enabling rapid configuration and more efficient hardware support.
Patent Information
- Application Number
- CN202511075511.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-14
AI Technical Summary
In existing technologies, electronic devices need to confirm multiple hardware configurations when starting up, which leads to excessive use of hardware resources and affects user experience.
By pre-storing hardware configuration information in the embedded flash memory of electronic devices, EC and Coreboot are used to initialize different hardware respectively, and load matching system-level drivers to achieve rapid hardware configuration and communication.
It reduces the hardware detection process, saves hardware resources, supports more types of hardware configurations, and improves the user experience.
Smart Images

Figure CN120950132A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing technology, and in particular to an information processing method, an information generation method, an information processing device, and an electronic device. Background Technology
[0002] Currently, electronic devices need to verify their hardware configuration and load the corresponding drivers during system startup. However, if an electronic device has multiple hardware configurations, additional hardware circuitry is required to adapt to these different configurations. This necessitates the use of additional CPU and general-purpose input / output interfaces, thus requiring more hardware resources and limiting the supported configurations. This excessive use of hardware resources negatively impacts the user experience. Summary of the Invention
[0003] This application provides a data processing method, an information generation method, a data processing device, and an electronic device.
[0004] On one hand, embodiments of this application provide an information processing method, including:
[0005] In response to the electronic device starting up, target information is retrieved from a first storage; the target information includes at least the hardware configuration of the electronic device;
[0006] Based on the target information, at least one target hardware to be deployed in the electronic device is determined, and the at least one target hardware is initialized.
[0007] Optionally, determining at least one target hardware deployed on the electronic device based on the target information, and initializing the target hardware, includes:
[0008] In response to the electronic device operating in the first stage, at least one first target hardware is initialized based on the first sub-information in the target information; the at least one first target hardware is connected to the controller of the electronic device;
[0009] In response to the electronic device operating in the second phase, at least one second target hardware is initialized based on the second sub-information in the target information; the at least one second target hardware is connected to the processor of the electronic device;
[0010] The second stage follows the first stage and is a hardware initialization stage. The first sub-information is different from the second sub-information, and the at least one first target hardware is different from the at least one second target hardware.
[0011] Optionally, the method further includes:
[0012] In response to the electronic device operating in the third stage, a matching system-level driver is loaded based on the target information to communicate with the at least one target hardware;
[0013] The third stage, following the second stage, is the system operation stage.
[0014] Optionally, loading a matching system-level driver based on the target information includes:
[0015] The first storage address of the control file and the performance release mode of the processor are determined; the control file is used to regulate at least one of the processor's power consumption, performance release mode, and device temperature.
[0016] Multiple control files are read from the target information based on the first storage address;
[0017] Load the target control file that matches the performance release mode.
[0018] Optionally, initializing at least one first target hardware based on the first sub-information in the target information includes:
[0019] Determine a second storage address; the second storage address is the storage location of the configuration data of the predefined first target hardware in the target information, and the at least one first target hardware includes at least one of a fan, a keyboard, and a gravity sensor;
[0020] Read the first configuration data from the target information based on the second storage address;
[0021] If the first configuration data representation indicates that the corresponding hardware exists, initialize the hardware.
[0022] Optionally, initializing at least one second target hardware based on the second sub-information in the target information includes:
[0023] A third storage address is determined for the at least one second target hardware; the third storage address is the storage location of the predefined configuration data of the second target hardware in the target information, and the at least one second target hardware includes at least one of a display module, memory, stylus, and fingerprint reader;
[0024] Read the second configuration data from the target information based on the third storage address;
[0025] If the second configuration data representation has corresponding hardware, initialize the hardware.
[0026] On the other hand, embodiments of this application also provide an information generation method, including:
[0027] Obtain the system logs contained in each electronic device, and determine the hardware configuration information recorded in the system logs;
[0028] The hardware configuration information recorded by the system is parsed to obtain target information, and the target information is stored in the first storage of the electronic device; wherein the number of times the target hardware corresponding to the target information is activated in the electronic device is greater than the number of times other hardware in the electronic device is activated.
[0029] Optionally, parsing the hardware configuration information recorded by the system to obtain the target information includes:
[0030] The hardware configuration information recorded in the system log is parsed to determine the hardware type corresponding to the hardware contained in each electronic device;
[0031] The hardware type corresponding to the hardware is predicted using the first target model to obtain the hardware type of the target hardware, and the hardware configuration information corresponding to the target hardware is determined.
[0032] The target information is determined based on the hardware configuration information corresponding to the target hardware.
[0033] This application also provides an information processing apparatus, including:
[0034] An acquisition module is configured to acquire target information from a first storage in response to the startup of an electronic device; the target information includes at least the hardware configuration of the electronic device;
[0035] A processing module is configured to determine at least one target hardware deployed in the electronic device based on the target information, and to initialize the target hardware.
[0036] On the other hand, embodiments of this application also provide an information processing apparatus, including at least one target hardware, a memory, and a processor. The memory stores an executable program and target information, and the processor executes the executable program to achieve the following:
[0037] In response to the startup of the electronic device, target information is acquired; the target information includes at least the hardware configuration of the electronic device;
[0038] Based on the target information, at least one target hardware to be deployed in the electronic device is determined, and the at least one target hardware is initialized. Attached Figure Description
[0039] Figure 1 This is a flowchart of an information processing method according to an embodiment of this application;
[0040] Figure 2 Examples of embodiments of this application Figure 1A flowchart of one embodiment of step S200;
[0041] Figure 3 This is another flowchart of the information processing method according to an embodiment of this application;
[0042] Figure 4 Examples of embodiments of this application Figure 3 A flowchart of one embodiment of step S300;
[0043] Figure 5 Examples of embodiments of this application Figure 2 A flowchart of one embodiment of step S210;
[0044] Figure 6 Examples of embodiments of this application Figure 2 A flowchart of one embodiment of step S220;
[0045] Figure 7 This is a flowchart of the information generation method according to an embodiment of this application;
[0046] Figure 8 Examples of embodiments of this application Figure 7 A flowchart of one embodiment of step S20;
[0047] Figure 9 This is a schematic diagram illustrating the hardware configuration pre-stored via E-Flash according to an embodiment of this application;
[0048] Figure 10 This is a schematic diagram illustrating another hardware configuration pre-stored via E-Flash, as described in this application embodiment.
[0049] Figure 11 This is a schematic diagram of the hardware configuration corresponding to the storage address in the E-Flash of this application embodiment;
[0050] Figure 12 This is a schematic diagram showing the bit positions and hardware configuration information corresponding to the storage addresses in the E-Flash of this application embodiment;
[0051] Figure 13 This is a structural block diagram of a data processing apparatus according to an embodiment of this application;
[0052] Figure 14 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0053] Various embodiments and features of this application are described herein with reference to the accompanying drawings.
[0054] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.
[0055] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0056] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.
[0057] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application.
[0058] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.
[0059] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.
[0060] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.
[0061] Figure 1 A flowchart of an information processing method according to an embodiment of this application is shown. An information processing method provided by an embodiment of this application, such as… Figure 1 As shown, it includes:
[0062] S100, in response to the electronic device starting up, target information is obtained from the first storage; the target information includes at least the hardware configuration of the electronic device;
[0063] The information processing method of this embodiment is applied to an electronic device, which can be a desktop computer, laptop computer, or other device with an operating system and memory. The electronic device is equipped with an embedded controller (EC), firmware (Coreboot), and an operating system. The EC is used for low-level hardware management and system control of the electronic device. Coreboot is used to perform hardware initialization when the electronic device is powered on and to transfer system control to the operating system. The electronic device also has a first storage, which can be embedded flash memory (E-Flash) and can be located in the EC chip. The first storage pre-stores target information, which includes at least the hardware configuration of the electronic device. The target information is the configuration information corresponding to the hardware that needs to run when the electronic device is initialized. The target information can be obtained by pre-setting the hardware configuration information of the electronic device according to its performance requirements. When the electronic device starts up, the target information can be obtained from the first storage, and the hardware configuration of the electronic device can be determined based on the target information. The hardware configuration of the electronic device can include the type, performance parameters, and model of the hardware device. For example, during the power-on process of an electronic device, the target information stored in the embedded flash memory E-Flash can be read first through EC, and the target information can be parsed to obtain the hardware configuration information of the electronic device, thereby determining the type, performance parameters and hardware model of the hardware device required by the electronic device.
[0064] S200, based on the target information, determine at least one target hardware deployed by the electronic device, and initialize the target hardware.
[0065] In this embodiment, the target hardware refers to the hardware required by the electronic device during operation. When the target hardware is pre-configured on the electronic device, the hardware configuration information corresponding to the target hardware can be determined based on its type, performance parameters, and model. This hardware configuration information is then stored in the first storage. The target hardware can be commonly used hardware devices in electronic devices, such as keyboards, sensors, display modules, and memory. After the electronic device starts up and retrieves the target information from the first storage, the hardware deployed on the electronic device is detected based on the target information. Hardware that matches the hardware configuration of the electronic device included in the target information is identified as the target hardware. After identifying the target hardware that matches the hardware configuration of the electronic device, the target hardware is initialized so that the electronic device can utilize the target hardware corresponding to the required functions during operation. For example, during the power-on process of the electronic device, the target information stored in the embedded flash memory (E-Flash) is read through the EC (Electronic Control Center) to determine the hardware configuration information of the electronic device. Hardware that matches the hardware configuration information is identified as the target hardware, and the target hardware is initialized.
[0066] This application, through the aforementioned method, obtains pre-configured hardware configuration information from the embedded E-Flash via EC during electronic device startup. It then uses this hardware configuration information to detect the hardware deployed in the electronic device, identifies the hardware compatible with the configuration information as the target hardware, and initializes the target hardware. By pre-storing the configuration information corresponding to the hardware required by the electronic device in E-Flash, this application allows the electronic device to directly obtain the hardware configuration information from E-Flash during startup, enabling rapid initialization of the required hardware. This eliminates the need for a hardware detection circuit to detect the hardware requiring initialization, saving hardware resources, supporting more types of hardware configurations, and improving the user experience.
[0067] In one embodiment of this application, such as Figure 2 As shown, the step of determining at least one target hardware deployed in the electronic device based on the target information, and initializing the target hardware, includes:
[0068] S210, in response to the electronic device operating in the first stage, at least one first target hardware is initialized based on the first sub-information in the target information; the at least one first target hardware is connected to the controller of the electronic device;
[0069] In this embodiment, at least one target hardware deployed on the electronic device is determined based on target information. During the initialization of the target hardware, in response to the electronic device operating in a first stage, at least one first target hardware is initialized based on the first sub-information in the target information. The first stage of the electronic device operation can be the EC initialization stage, where EC initialization is performed on the underlying hardware of the electronic device through EC. The first sub-information in the target information can be the configuration information corresponding to the hardware that needs to run during EC initialization; the first target hardware is hardware controlled by EC, and the first target hardware is connected to the controller of the electronic device, which can be an EC chip; the first target hardware may include a fan, a gravity sensor, or a keyboard; the first sub-information can be obtained by pre-setting the configuration information corresponding to the hardware connected to the EC chip according to the performance of the first target hardware. When the electronic device is powered on, the first sub-information in the target information is first determined. Based on the first sub-information, the hardware connected to the EC chip is detected, and the hardware that matches the hardware configuration included in the first sub-information is determined as the first target hardware. The first target hardware connected to the EC chip is then initialized through EC. For example, when an electronic device is powered on, the EC first reads the first sub-information of the target information stored in the embedded flash memory E-Flash, determines the hardware configuration information corresponding to the hardware connected to the EC chip, and determines that the hardware that matches the hardware configuration information is the fan, gravity sensor and keyboard. The EC then initializes the fan, gravity sensor and keyboard.
[0070] S220, in response to the electronic device operating in the second phase, at least one second target hardware is initialized based on the second sub-information in the target information; the at least one second target hardware is connected to the processor of the electronic device;
[0071] The second stage follows the first stage and is a hardware initialization stage. The first sub-information is different from the second sub-information, and the at least one first target hardware is different from the at least one second target hardware.
[0072] In this embodiment, after the initialization corresponding to the first stage of the electronic device is completed, in response to the electronic device running in the second stage, at least one second target hardware is initialized based on the second sub-information in the target information. The second stage, following the first stage, can be a hardware initialization stage, where the core hardware of the electronic device can be initialized via Coreboot. The second sub-information in the target information can be the configuration information corresponding to the hardware that needs to run during hardware initialization; the second target hardware is hardware controlled via Coreboot, connected to the processor of the electronic device, which can be a central processing unit (CPU); the second target hardware may include a display module, memory, a stylus, and a fingerprint reader; the second sub-information can be obtained by pre-setting the configuration information corresponding to the hardware connected to the processor, based on the performance of the second target hardware. After the electronic device is powered on and EC initialization is completed, the second sub-information in the target information is determined. Based on the second sub-information, the hardware connected to the processor is detected, and hardware that matches the hardware configuration included in the second sub-information is identified as the second target hardware. The second target hardware connected to the processor is then initialized via Coreboot. For example, when an electronic device is powered on, it is first initialized through EC, then the second sub-information of the target information is read to determine the hardware configuration information corresponding to the hardware connected to the processor, and the hardware that matches the hardware configuration information is determined to be the display module, memory, stylus and fingerprint reader. The display module, memory, stylus and fingerprint reader are initialized through Coreboot.
[0073] In one embodiment of this application, such as Figure 3 As shown, the method further includes:
[0074] S300, in response to the electronic device operating in the third stage, based on the target information, load a matching system-level driver to communicate with the at least one target hardware;
[0075] The third stage, following the second stage, is the system operation stage.
[0076] In this embodiment, after the electronic device starts up and completes the initialization corresponding to the first stage and the initialization corresponding to the second stage, in response to the electronic device running in the third stage, a matching system-level driver is loaded based on the target information to communicate with at least one target hardware. The third stage follows the second stage and is the system operation stage. During the system operation stage, the system-level driver can communicate with the initialized target hardware to control the functions of the target hardware. After the electronic device completes the initialization of the first target hardware through EC in the first stage and the initialization of the second target hardware through Coreboot in the second stage, it can load the matching system-level driver in the third stage according to the configuration information corresponding to the first and second target hardware included in the target information. The system-level driver communicates with the first and second target hardware to control their functions. For example, when the electronic device is powered on, the fan, gravity sensor, and keyboard are first initialized through EC; then the display module, memory, stylus, and fingerprint reader are initialized through Coreboot; then the ChromeOS operating system driver is loaded to communicate with the fan, gravity sensor, keyboard, display module, memory, stylus, and fingerprint reader, thereby controlling the functions of these hardware components.
[0077] In one embodiment of this application, such as Figure 4 As shown, loading the matching system-level driver based on the target information includes:
[0078] S310, determine the first storage address of the control file and the performance release mode of the processor; the control file is used to regulate at least one of the processor's power consumption, performance release mode, and device temperature;
[0079] S320, read multiple control files from the target information based on the first storage address;
[0080] S330, Load the target control file that matches the performance release mode.
[0081] In this embodiment, during the loading of the matching system-level driver based on the target information, the first storage address of the control file and the processor's performance release mode are first determined. The control file can be a DPTF (Dynamic Platform and Thermal Framework) control file, which regulates at least one of the processor's power consumption, performance release mode, and device temperature. During the loading of the system-level driver, the first storage address of the control file is determined. The first storage address is the storage location of the predefined configuration data of the control file in the target information. Specifically, the first storage address can be the storage location of the configuration data of the control file stored in E-Flash. When configuring hardware information for the control file in advance, the hardware configuration information corresponding to the control file can be stored in E-Flash, and corresponding configuration data can be predefined for the control file. There can be multiple control files, each with a different configuration state in the electronic device. Corresponding configuration data can be predefined for each control file, representing the configuration state of the control file in the electronic device. The configuration data is stored in the corresponding first storage address in E-Flash. For example, different performance releases can be pre-configured for the CPU via DPTF, namely 6W performance release and 15W performance release. The predefined configuration data for DPTF using the 6W CPU performance release is 0, and the DPTF configuration data 0 is stored in the bit position of storage address 0x0FFFFB~0x0FFFFC. The predefined configuration data for DPTF using the 15W CPU performance release is 1, and the DPTF configuration data 1 is stored in the bit position of storage address 0x0FFFFB~0x0FFFFC.
[0082] During the loading of system-level drivers, when retrieving target information from E-Flash, the first memory address in E-Flash is located. Multiple control files are then read from the target information using this address. Specifically, when reading the hardware configuration of the control files, the memory address corresponding to each control file in E-Flash is determined. The table data for this memory address is traversed to determine the configuration information for each control file. Based on the configuration information of each control file, the control file matching the controller's performance release mode is identified as the target control file and loaded. This allows the system-level driver to control the processor according to the required performance release mode. For example, when loading a ChromeOS operating system driver, the configuration information corresponding to the DPTF is searched in the E-Flash table. The memory address of the DPTF configuration information is determined to be 0x0FFFFB to 0x0FFFFC. The table data at this address is traversed, and the position where Bit 2 = 1 is read. The corresponding DPTF defines a performance release of 15W for the CPU, which is compatible with the current ChromeOS operating system driver. Therefore, this DPTF control file is loaded.
[0083] In one embodiment of this application, such as Figure 5 As shown, the initialization of at least one first target hardware based on the first sub-information in the target information includes:
[0084] S2101, Determine the second storage address; the second storage address is the storage location of the configuration data of the predefined first target hardware in the target information, and the at least one first target hardware includes at least one of a fan, a keyboard, and a gravity sensor;
[0085] S2102, Read the first configuration data from the target information based on the second storage address;
[0086] S2103, if the first configuration data indicates that the corresponding hardware exists, initialize the hardware.
[0087] In this embodiment, during the initialization process via EC in the first stage of electronic device operation, a second storage address is first determined. This second storage address is the storage location of the predefined configuration data of the first target hardware within the target information. Specifically, the second storage address can be the storage location of the configuration data of the first target hardware stored in E-Flash. When configuring hardware information for the first target hardware in advance, the hardware configuration information corresponding to the first target hardware can be stored in E-Flash, and corresponding configuration data can be predefined for the first target hardware. This configuration data represents the configuration state of the first target hardware in the electronic device, and the configuration data is stored in the corresponding second storage address in E-Flash. For example, the configuration information of a fan can be stored in E-Flash, with the predefined configuration data for the fan being 1, and the fan configuration data 1 can be stored at bit 0 in storage addresses 0x0FFFFA to 0x0FFFFB.
[0088] During initialization via EC, when retrieving target information from E-Flash, the EC searches for a second storage address in E-Flash and reads first configuration data from the target information through this second storage address. This first configuration data can be the configuration data of the first target hardware. Specifically, when reading the hardware configuration of the first target hardware, the EC can determine the storage address corresponding to that hardware configuration in E-Flash, traverse the table data at that storage address, and then determine whether to initialize the hardware. After reading the configuration data of the first target hardware from the target information through the second storage address, if the first configuration data indicates the existence of the corresponding hardware, the EC can initialize that hardware. For example, during initialization, the EC can search for the hardware configurations corresponding to a fan, keyboard, and gravity sensor in the E-Flash table and determine whether the table data at the corresponding storage address indicates the existence of the corresponding hardware. Specifically, the EC determines that the storage address of the hardware configuration corresponding to the fan is 0x0FFFFA to 0x0FFFFB, traverses the table data at that address, and reads Bit 0 = 1, indicating the existence of the fan. The EC can then initialize the fan.
[0089] In one embodiment of this application, such as Figure 6 As shown, the initialization of at least one second target hardware based on the second sub-information in the target information includes:
[0090] S2201, determine the third storage address of the at least one second target hardware; the third storage address is the storage location of the predefined configuration data of the second target hardware in the target information, and the at least one second target hardware includes at least one of a display module, memory, stylus, and fingerprint reader;
[0091] S2202, Read the second configuration data from the target information based on the third storage address;
[0092] S2203, if the second configuration data characterization has corresponding hardware, initialize the hardware.
[0093] In this embodiment, during the second stage of electronic device operation, during the initialization process via Coreboot, the third storage address is first determined as the storage location of the predefined configuration data of the second target hardware in the target information. Specifically, the third storage address can be the storage location of the configuration data of the second target hardware stored in E-Flash. When configuring hardware information for the second target hardware in advance, the hardware configuration information corresponding to the second target hardware can be stored in E-Flash, and corresponding configuration data can be predefined for the second target hardware. The configuration data represents the configuration state of the second target hardware in the electronic device, and the configuration data is stored in the corresponding third storage address in E-Flash. For example, the configuration information of the fingerprint reader is stored in E-Flash, the predefined configuration data for the fingerprint reader is 1, and the configuration data 1 of the fingerprint reader is stored at bit 5 in storage addresses 0x0FFFFA to 0x0FFFFB.
[0094] During the initialization process via Coreboot, when retrieving target information from E-Flash, Coreboot searches for a third storage address in E-Flash and reads second configuration data from the target information through this address. This second configuration data can be the configuration data of the second target hardware. Specifically, when reading the hardware configuration of the second target hardware, Coreboot can determine the storage address corresponding to that hardware configuration in E-Flash, traverse the table data at that storage address, and then determine whether to initialize the hardware. After Coreboot reads the configuration data of the second target hardware from the target information through the third storage address, if the second configuration data indicates the existence of the corresponding hardware, Coreboot can initialize that hardware. For example, during initialization, Coreboot can search for the hardware configurations corresponding to the display module, memory, stylus, and fingerprint reader in the E-Flash table and determine whether the table data at the corresponding storage address indicates the existence of the corresponding hardware. Specifically, Coreboot determines that the storage address of the hardware configuration corresponding to the fingerprint reader is 0x0FFFFA to 0x0FFFFB, traverses the table data at that address, and reads Bit 5 = 1, indicating the existence of the fingerprint reader. Coreboot can then initialize the fingerprint reader.
[0095] In a preferred embodiment of this application, such as Figure 9 and Figure 11As shown, the embedded flash memory (E-Flash) of the EC chip pre-stores the corresponding hardware configurations required by the electronic device. Specifically, 8 bytes of storage space can be used to store the hardware configurations. For example, 1 byte can be used to store the hardware configurations for different types of memory, supporting 256 types of memory; 1 byte can be used to store the hardware configurations for different types of storage, supporting 256 types of storage; 2 bytes can be used to store the hardware configurations corresponding to different functions, supporting 1 different functional configuration; the remaining 4 bytes are reserved for future new configuration requirements.
[0096] For a 1MB E-Flash storage space, such as Figure 10 As shown, EC codes can be stored in the range of storage address 0x000000 to 0x0FFFF8; the range of storage address 0x0FFFF8 to 0x100000 is used to store hardware configuration, and the space corresponding to this range of storage address is 8 bytes.
[0097] The memory address ranges 0x0FFFF8 to 0x100000 and 0x0FFFF8 to 0x0FFFF9 are used to store hardware configurations for different memory models, supporting up to 256 types of memory. The memory address ranges 0x0FFFF9 to 0x0FFFFA are used to store hardware configurations for different storage types, supporting up to 256 types of storage. The memory address ranges 0x0FFFFA to 0x0FFFFB are used to store hardware configurations corresponding to different functionalities. For example... Figure 12 As shown, in storage addresses 0x0FFFFA to 0x0FFFFB, bit 0 is used to define whether a fan is present; bit 1 is used to define whether a mobile network module (WWAN) is present; bit 2 is used to define whether a keyboard backlight (KBBL) is present; bit 3 is used to define whether a stylus is present; bit 4 is used to define whether a wear face camera (WFC) is present; bit 5 is used to define whether a fingerprint reader is present; bit 6 is used to define whether a touchscreen is present; and bit 7 is used to define whether an auxiliary HDMI Type A interface (SUB HDMI_A) is present.
[0098] The memory address range 0x0FFFFB to 0x0FFFFC is used to store hardware configurations for different modes or types. Bit 0 is used to define different amplifier (AMP) models. If the configuration data is 0, it defines the A-type AMP mainly used by the electronic device; if the configuration data is 1, it defines the B-type AMP used as an alternative. If other AMP models exist, they can be distinguished in subsequent bits. Bit 1 is used to define different audio codec models. If the configuration data is 0, it defines the A-type audio codec mainly used by the electronic device; if the configuration data is 1, it defines the B-type audio codec used as an alternative. If other audio codec models exist, they can be distinguished in subsequent bits. Bit 2 is used to define different performance modes of the DPTF. If the configuration data is 0, it defines a DPTF using 6W CPU performance release; if the configuration data is 1, it defines a DPTF using 15W CPU performance release. If other performance modes of the DPTF exist, they can be distinguished in subsequent bits. Bits 3 to 7 are reserved. The memory address range 0x0FFFFC to 0x100000 is reserved.
[0099] Figure 7 A flowchart of an information generation method according to an embodiment of this application is shown. An information generation method provided in this application embodiment, such as… Figure 7 As shown, it includes:
[0100] S10, obtain the system logs contained in each electronic device, and determine the hardware configuration information recorded in the system logs;
[0101] S20, the hardware configuration information recorded by the system is parsed to obtain target information, and the target information is stored in the first storage of the electronic device; wherein, the number of times the target hardware corresponding to the target information is activated in the electronic device is greater than the number of times other hardware in the electronic device is activated.
[0102] The information generation method in this embodiment is applied to the cloud. Before the electronic device leaves the factory, the hardware required by the electronic device is deployed. In this embodiment, the system logs contained in each electronic device are first obtained through the cloud, and the hardware configuration information recorded in the system logs is determined. The system logs contained in each electronic device can be historical system logs of various commonly used electronic devices, and the hardware configuration information recorded in the system logs can be the hardware configuration information corresponding to the hardware that various types of electronic devices have run.
[0103] After obtaining the hardware configuration information corresponding to various hardware components from the historical system logs of each electronic device, the hardware configuration information recorded by the system is parsed to determine the activation frequency of each hardware component during the historical use of multiple electronic devices. Hardware components with high activation frequency during historical use can be identified as target hardware. Target hardware can be commonly used hardware devices in electronic devices such as fans, gravity sensors, display modules, and memory. Based on the type, performance parameters, and model of the target hardware, the target information corresponding to the target hardware can be determined and stored in the first storage of the electronic device. The first storage can be the embedded flash memory (E-Flash) in the EC chip. The target information is the configuration information corresponding to the hardware that needs to run during the initialization of the electronic device. When the electronic device is started and initialized, the target information can be retrieved from the first storage, and the hardware configuration of the electronic device can be determined based on the target information, thereby initializing the target hardware required by the electronic device.
[0104] This application obtains system logs from multiple electronic devices using the aforementioned method, parses the hardware configuration information recorded in the system, determines the activation frequency of each hardware component during the historical usage of the multiple electronic devices, identifies the hardware with the highest activation frequency during historical usage as target hardware, and stores the hardware configuration information of the target hardware in the E-Flash of the electronic device. This allows the electronic device to retrieve the pre-configured hardware configuration information from the E-Flash via EC during startup and initialize the target hardware. By parsing the historical system logs of multiple electronic devices, this application pre-sets the configuration information corresponding to the hardware required by the electronic devices, and pre-stores the configuration information of the required hardware in the E-Flash. This allows the electronic devices to directly retrieve the hardware configuration information from the E-Flash during startup, quickly initializing the required hardware, saving hardware resources, and improving the user experience.
[0105] In one embodiment of this application, such as Figure 8 As shown, parsing the hardware configuration information recorded by the system to obtain the target information includes:
[0106] S21, parse the hardware configuration information recorded in the system log to determine the hardware type corresponding to the hardware contained in each electronic device;
[0107] S22, using the first target model, predict the hardware type corresponding to the hardware to obtain the hardware type of the target hardware, and determine the hardware configuration information corresponding to the target hardware;
[0108] S23, determine the target information based on the hardware configuration information corresponding to the target hardware.
[0109] In this embodiment, during the parsing of the hardware configuration information recorded by the system, the hardware configuration information recorded in the system log is first parsed to determine the hardware type corresponding to the hardware contained in each electronic device. The system log records the usage of multiple types of hardware devices used by multiple electronic devices. Parsing the hardware configuration information recorded in the system log can identify the hardware types corresponding to hardware with different usage counts in multiple electronic devices. For example, commonly used hardware in electronic devices may include fans, gravity sensors, display modules, and memory, etc.
[0110] After determining the hardware types corresponding to the hardware contained in each electronic device, the first target model is used to predict the hardware type of each hardware component, thus obtaining the target hardware type. The first target model can be a decision tree model. It uses machine learning to calculate and analyze the data related to the hardware types of each hardware component, and based on information about the historical usage frequency of each type of hardware in the electronic device, it obtains the hardware type corresponding to the target hardware required by the electronic device. Since the target hardware is frequently used in the electronic device, its hardware configuration can be pre-set in the electronic device's primary storage, allowing EC, Coreboot, and the operating system to quickly initialize the target hardware when the electronic device boots up.
[0111] For example, predicting target hardware using a decision tree model can be done through the following steps: First, nodes in the decision tree model represent hardware features, with each node corresponding to a type of hardware. After testing the features of the nodes, the activation status of the hardware can be determined. Based on the overall hardware configuration of the electronic device, the hardware dataset corresponding to each type of hardware included in the electronic device is determined. The hardware dataset is recursively divided into multiple hardware configuration subsets, each representing the specific hardware configuration of the corresponding hardware. A hardware feature is selected for each segmentation. During each segmentation, the decision tree selects the hardware feature that maximizes information gain. Information gain measures the purity improvement brought by the hardware feature when segmenting the hardware dataset, which can improve the accuracy of hardware dataset segmentation.
[0112] To determine whether a piece of hardware in an electronic device is enabled, the hardware dataset contains the features "the hardware is listed in Device Manager" and "there are related records in the system log." These two features are used to determine whether the hardware configuration exists. Information gain can be calculated using the following steps: First, calculate the total entropy of the hardware dataset. Total entropy measures the uncertainty or disorder of the category distribution of the entire hardware dataset before it is partitioned based on any features. Assuming 60% of the data indicates the hardware is enabled and 40% indicates the hardware is disabled: `text{Entropy}(S)=-(0.6\log_2(0.6)+0.4\log_2(0.4))`. Then, segment the data in the hardware dataset according to the feature "the hardware is listed in Device Manager" and calculate the entropy of the segmented data. For example, if the feature segmentation results in two subsets with entropies of 0.3 and 0.5 respectively, and proportions of 70% and 30% respectively: `text{Entropy}(S,A)=0.7×0.3+0.3×0.5`; the entropy of each subset represents the degree of uncertainty or disorder in the category of the data in each subset after the dataset is segmented according to the corresponding feature. Calculate the information gain: `text{Information Gain}(S,A)=\text{Entropy}(S)-\text{Entropy}(S,A)`. After obtaining the entropy and proportion of each subset, a weighted average of the entropy and proportion of each subset can be calculated to obtain the total entropy of the hardware dataset. The existence of the corresponding hardware is then determined based on the total entropy. This segmentation process continues until all types of hardware contained in the electronic device are traversed, reaching the maximum tree depth, and determining whether the hardware configuration corresponding to each type of hardware contained in the electronic device exists.
[0113] This application also provides an information processing apparatus corresponding to the information processing method. Since the principle of the information processing apparatus in this application is similar to the above-mentioned processing method, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be described again.
[0114] Figure 13 This application provides a schematic diagram of the structure of an information processing apparatus according to an embodiment, which specifically includes:
[0115] An acquisition module is configured to acquire target information from a first storage in response to the startup of an electronic device; the target information includes at least the hardware configuration of the electronic device;
[0116] A processing module is configured to determine at least one target hardware deployed in the electronic device based on the target information, and to initialize the target hardware.
[0117] In one embodiment of this application, the processing module is further configured as follows:
[0118] In response to the electronic device operating in the first stage, at least one first target hardware is initialized based on the first sub-information in the target information; the at least one first target hardware is connected to the controller of the electronic device;
[0119] In response to the electronic device operating in the second phase, at least one second target hardware is initialized based on the second sub-information in the target information; the at least one second target hardware is connected to the processor of the electronic device;
[0120] The second stage follows the first stage and is a hardware initialization stage. The first sub-information is different from the second sub-information, and the at least one first target hardware is different from the at least one second target hardware.
[0121] In one embodiment of this application, the processing module is further configured as follows:
[0122] In response to the electronic device operating in the third stage, a matching system-level driver is loaded based on the target information to communicate with the at least one target hardware;
[0123] The third stage, following the second stage, is the system operation stage.
[0124] In one embodiment of this application, the acquisition module is further configured as follows:
[0125] The first storage address of the control file and the performance release mode of the processor are determined; the control file is used to regulate at least one of the processor's power consumption, performance release mode, and device temperature.
[0126] Multiple control files are read from the target information based on the first storage address;
[0127] Load the target control file that matches the performance release mode.
[0128] In one embodiment of this application, the processing module is further configured as follows:
[0129] Determine a second storage address; the second storage address is the storage location of the configuration data of the predefined first target hardware in the target information, and the at least one first target hardware includes at least one of a fan, a keyboard, and a gravity sensor;
[0130] Read the first configuration data from the target information based on the second storage address;
[0131] If the first configuration data representation indicates that the corresponding hardware exists, initialize the hardware.
[0132] In one embodiment of this application, the processing module is further configured as follows:
[0133] A third storage address is determined for the at least one second target hardware; the third storage address is the storage location of the predefined configuration data of the second target hardware in the target information, and the at least one second target hardware includes at least one of a display module, memory, stylus, and fingerprint reader;
[0134] Read the second configuration data from the target information based on the third storage address;
[0135] If the second configuration data representation has corresponding hardware, initialize the hardware.
[0136] like Figure 14 As shown, this embodiment also provides an electronic device, including at least one target hardware, a memory, and a processor. The memory stores an executable program and target information, and the processor executes the executable program to achieve the following:
[0137] In response to the startup of the electronic device, target information is acquired; the target information includes at least the hardware configuration of the electronic device;
[0138] Based on the target information, at least one target hardware to be deployed in the electronic device is determined, and the at least one target hardware is initialized.
[0139] The foregoing has described in detail several embodiments of this application, but this application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications based on the concept of this application, and all such variations and modifications should fall within the scope of protection claimed in this application.
Claims
1. An information processing method, comprising: In response to the electronic device starting up, the target information is retrieved from the first storage; The target information includes at least the hardware configuration of the electronic device; Based on the target information, at least one target hardware to be deployed in the electronic device is determined, and the at least one target hardware is initialized.
2. The information processing method according to claim 1, wherein determining at least one target hardware deployed in the electronic device based on the target information, and initializing the target hardware, comprises: In response to the electronic device operating in the first stage, at least one first target hardware is initialized based on the first sub-information in the target information; The at least one first target hardware is connected to the controller of the electronic device; In response to the electronic device operating in the second phase, at least one second target hardware is initialized based on the second sub-information in the target information; The at least one second target hardware is connected to the processor of the electronic device; The second stage follows the first stage and is a hardware initialization stage. The first sub-information is different from the second sub-information, and the at least one first target hardware is different from the at least one second target hardware.
3. The information processing method according to claim 2, further comprising: In response to the electronic device operating in the third stage, a matching system-level driver is loaded based on the target information to communicate with the at least one target hardware; The third stage, following the second stage, is the system operation stage.
4. The information processing method according to claim 3, wherein loading a matching system-level driver based on the target information comprises: Determine the first storage address of the control file and the performance release mode of the processor; The control file is used to regulate at least one of the processor's power consumption, performance release mode, and device temperature; Multiple control files are read from the target information based on the first storage address; Load the target control file that matches the performance release mode.
5. The information processing method according to claim 2, wherein initializing at least one first target hardware based on the first sub-information in the target information comprises: Determine the second storage address; The second storage address is the storage location of the predefined configuration data of the first target hardware in the target information, and the at least one first target hardware includes at least one of a fan, a keyboard, and a gravity sensor; Read the first configuration data from the target information based on the second storage address; If the first configuration data representation indicates that the corresponding hardware exists, initialize the hardware.
6. The information processing method according to claim 2, wherein initializing at least one second target hardware based on the second sub-information in the target information comprises: Determine the third storage address of the at least one second target hardware; The third storage address is the storage location of the predefined configuration data of the second target hardware in the target information, and the at least one second target hardware includes at least one of a display module, memory, stylus, and fingerprint reader; Read the second configuration data from the target information based on the third storage address; If the second configuration data representation has corresponding hardware, initialize the hardware.
7. An information generation method, comprising: Obtain the system logs contained in each electronic device, and determine the hardware configuration information recorded in the system logs; The hardware configuration information recorded by the system is parsed to obtain target information, and the target information is stored in the first storage of the electronic device; wherein the number of times the target hardware corresponding to the target information is activated in the electronic device is greater than the number of times other hardware in the electronic device is activated.
8. The information generation method according to claim 7, wherein parsing the hardware configuration information recorded by the system to obtain the target information includes: The hardware configuration information recorded in the system log is parsed to determine the hardware type corresponding to the hardware contained in each electronic device; The hardware type corresponding to the hardware is predicted using the first target model to obtain the hardware type of the target hardware, and the hardware configuration information corresponding to the target hardware is determined. The target information is determined based on the hardware configuration information corresponding to the target hardware.
9. An information processing apparatus, comprising: The acquisition module is used to acquire target information from the first storage in response to the start of the electronic device; The target information includes at least the hardware configuration of the electronic device; A processing module is configured to determine at least one target hardware deployed in the electronic device based on the target information, and to initialize the target hardware.
10. An electronic device comprising at least one target hardware, a memory, and a processor, wherein the memory stores an executable program and target information, and the processor executes the executable program to perform: In response to the startup of the electronic device, target information is acquired; the target information includes at least the hardware configuration of the electronic device; Based on the target information, at least one target hardware to be deployed in the electronic device is determined, and the at least one target hardware is initialized.