Mode determination method and device of electronic equipment, electronic equipment and storage medium

By acquiring and preprocessing hardware data in electronic devices, determining the model using the mode of quantized compression processing, and automatically adjusting the operating mode, it solves the problem that users find it difficult to determine suitable working modes based on usage, and improves equipment performance and user experience.

CN119248099APending Publication Date: 2025-01-03HEFEI LCFC INFORMATION TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411346666.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

When users use electronic devices, it is difficult for users to automatically determine the appropriate working mode based on the current usage, resulting in insufficient battery life and poor performance, affecting the user experience.

Method used

By acquiring the current hardware data of the electronic device, pre-processing and inputting it into a pre-trained mode determination model deployed on the embedded control chip, the mode determination result is obtained by using the quantitative compression process, and the operating mode of the device is automatically adjusted.

Benefits of technology

It realizes adaptive adjustment of the working mode of electronic equipment, improves the working performance and user experience of the equipment, and reduces the user's needs for manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248099A_ABST
    Figure CN119248099A_ABST
Patent Text Reader

Abstract

The invention provides a mode determination method and device of electronic equipment, the electronic equipment and a storage medium, the electronic equipment comprises an embedded control chip EC, and the method comprises the following steps: obtaining current hardware data of the electronic equipment; preprocessing the current hardware data to obtain target hardware data; inputting the target hardware data into a first mode determination model deployed in an EC to obtain a mode determination result for the electronic equipment; wherein the first mode determination model is obtained by performing quantitative compression processing on a pre-trained second mode determination model; the mode determination result is used for operation of the electronic equipment. Self-adaptive adjustment of the working mode of the electronic equipment can be realized, and the working performance of the electronic equipment and the use experience of a user are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for determining a mode of an electronic device, an electronic device, and a storage medium. Background Art

[0002] When users use electronic devices such as laptops in different scenarios, they have different requirements for their working modes. For example, when working, users need longer battery life; when playing games, they need better performance. However, in actual use, users often realize that they need to turn on power saving mode or performance mode only when they find that the battery life is insufficient or the performance is poor, which greatly affects the user experience. In addition, users do not have a single requirement in many work scenarios. Therefore, how to automatically determine the appropriate working mode based on the user's current use of the electronic device has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The present application provides a method and device for determining a mode of an electronic device, an electronic device, and a storage medium to at least solve the above technical problems existing in the prior art.

[0004] According to a first aspect of the present application, a mode determination method of an electronic device is provided, wherein the electronic device includes an embedded control chip EC, and the method includes:

[0005] Obtain current hardware data of the electronic device;

[0006] Preprocessing the current hardware data to obtain target hardware data;

[0007] The target hardware data is input into a first mode determination model deployed in an EC to obtain a mode determination result for the electronic device; wherein the first mode determination model is obtained by quantizing and compressing a pre-trained second mode determination model; and the mode determination result is used for operation of the electronic device.

[0008] In one possible implementation, before inputting the target hardware data into a first mode determination model deployed in the EC to obtain a mode determination result for the electronic device, the method further includes:

[0009] Performing quantization and compression processing on the pre-trained second mode determination model to obtain a first mode determination model;

[0010] Converting the model format of the first mode determination model to obtain a first mode determination model in a target format;

[0011] A first schema determination model of the target format is deployed in the EC.

[0012] In one possible implementation, the step of deploying the first mode determination model of the target format in the EC includes:

[0013] Migrating the first mode determination model of the target format into EC;

[0014] Obtaining source code of a first mode determination model;

[0015] Determine the target code from the source code of the model determined in the first mode based on the configuration information of the EC;

[0016] Based on the target code and the first schema determination model of the target format migrated to the EC, the first schema determination model of the target format is deployed in the EC.

[0017] In one possible implementation, the first mode determination model of the target format based on the target code and the first mode determination model of the target format migrated to the EC, deploying the first mode determination model of the target format in the EC, comprises:

[0018] Based on the target code, converting the first mode determination model migrated to the target format of the EC into a model object;

[0019] generating an operation object for determining the model for the first mode;

[0020] Based on the model structure of the first mode determination model, the model function of the first mode determination model is added to the operation object to obtain a function operation object;

[0021] Based on the model object and the function operation object, a first mode determination model in a target format is deployed in the EC.

[0022] In one possible implementation, the step of deploying the first mode determination model of the target format in the EC based on the model object and the function operation object includes:

[0023] Generate an interpreter object for a first mode determination model; the interpreter object includes a plurality of member functions;

[0024] The model object and the function operation object are encapsulated by the interpreter object, and a first member function among a plurality of member functions is called to allocate a preset memory space, so as to deploy the first mode determination model of the target format in the EC.

[0025] In one possible implementation, the interpreter object further includes a plurality of member variables; the step of inputting the target hardware data into a first mode determination model deployed in the EC to obtain a mode determination result for the electronic device includes:

[0026] storing the target hardware data into a target area in the preset memory space based on a first member variable among a plurality of member variables of the interpreter object;

[0027] Based on the target hardware data stored in the target area, calling a second member function of the plurality of member functions of the interpreter object to perform model reasoning of the first mode determination model;

[0028] Based on the result of the model inference and the second member variable among the plurality of member variables of the interpreter object, a mode determination result of the first mode determination model for the electronic device is obtained.

[0029] In one possible implementation manner, after obtaining the mode determination result for the electronic device, the method further includes:

[0030] Based on the mode determination result for the electronic device, the operation mode of the electronic device is adjusted to the operation mode corresponding to the mode determination result for operation.

[0031] According to a second aspect of the present application, a mode determination device of an electronic device is provided, wherein the electronic device includes an embedded control chip EC, and the device includes:

[0032] A first acquisition unit, used to acquire current hardware data of the electronic device;

[0033] A second acquisition unit, used for preprocessing the current hardware data to obtain target hardware data;

[0034] The third acquisition unit is used to input the target hardware data into the first mode determination model deployed in the EC to obtain a mode determination result for the electronic device; wherein the first mode determination model is obtained by quantizing and compressing the pre-trained second mode determination model; and the mode determination result is used for the electronic device to operate.

[0035] According to a third aspect of the present application, an electronic device is provided, including:

[0036] at least one processor; and

[0037] a memory communicatively connected to the at least one processor; wherein,

[0038] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present application.

[0039] According to a fourth aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method described in the present application.

[0040] In this application, the current hardware data of the electronic device is obtained; the current hardware data is preprocessed to obtain the target hardware data; the target hardware data is input into the first mode determination model deployed in the EC to obtain the mode determination result for the electronic device; wherein the first mode determination model is obtained by quantizing and compressing the pre-trained second mode determination model; the mode determination result is used for the operation of the electronic device. It can realize the adaptive adjustment of the working mode of the electronic device, improve the working performance of the electronic device and the user experience.

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

[0042] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein:

[0043] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0044] Figure 1 A schematic diagram of the implementation flow of a method for determining a mode of an electronic device according to an embodiment of the present application is shown;

[0045] Figure 2 A module schematic diagram showing a method for determining a mode of an electronic device according to an embodiment of the present application is shown;

[0046] Figure 3 A schematic diagram of a process for obtaining a mode determination result of an electronic device according to an embodiment of the present application is shown;

[0047] Figure 4 A schematic diagram showing the composition structure of a mode determination device of an electronic device according to an embodiment of the present application is shown;

[0048] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0049] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0050] The present application embodiment provides a method for determining a mode of an electronic device, wherein the electronic device includes an embedded control chip EC, such as Figure 1 As shown, the method includes:

[0051] S101: Acquire current hardware data of the electronic device.

[0052] In this step, Figure 2 The data processing module in performs data collection (acquisition of current hardware data) and data transmission operations. The electronic device is a device such as a laptop computer that includes an EC (Embedded Controller). The current hardware data of the electronic device includes the CPU (Central Processing Unit) data, GPU (Graphics Processing Unit) data, hard disk data, memory data, and operating temperature data of the electronic device. The current hardware data of the electronic device can be collected by the ADC (Analog-to-Digital Converter) module on the electronic device EC.

[0053] S102: Preprocess the current hardware data to obtain target hardware data.

[0054] In this step, the acquired current hardware data is preprocessed, specifically normalized, which can scale the size of all data to the same numerical range, eliminate the impact of different dimensions of different data, and provide a data basis for accurately obtaining the mode determination result of the electronic device.

[0055] S103: Input the target hardware data into a first mode determination model deployed in the EC to obtain a mode determination result for the electronic device; wherein the first mode determination model is obtained by quantizing and compressing a pre-trained second mode determination model; and the mode determination result is used for operation of the electronic device.

[0056] In this step, the first mode determination model is a pre-trained machine model, which is deployed in the EC of the electronic device. In the embodiment of the present application, the first mode determination model is a TFLite model, which has the advantage of fast operation speed and can achieve rapid acquisition of the electronic device mode determination result. The first mode determination model is deployed in the EC, and the current hardware data of the electronic device can be obtained in real time through the ADC module on the EC, and the first mode determination model is used to analyze the user's current usage environment based on the target hardware data obtained after processing the current hardware data, and automatically select and switch to the most suitable working mode. Without the user manually switching the working mode, the working mode of the electronic device can be adaptively adjusted, thereby improving the working performance of the electronic device and the user's experience.

[0057] This application is approved by Figure 2 The deep learning model processing module in the first mode is subjected to quantization compression, format conversion and model deployment operations. The first mode determines that the model is obtained by quantizing and compressing the second mode. In the related art, the model is usually quantized and compressed using an analog quantization method, in which all parameters are stored in a quantized form, but converted to floating-point calculations during reasoning. All or part of the reasoning operations of the model (such as convolution, matrix operation, batch normalization, residual connection) are performed using floating-point precision. This approach limits the improvement of the model running speed and increases the running time of the quantized neural network model. In the embodiment of the present application, a mixed precision quantization compression algorithm using only integers is adopted, so that the entire model calculation is performed only by integer multiplication, addition and displacement operations, without any floating-point operations or even integer division. That is, each layer in the second mode determination model (including convolution layer, batch normalization layer and residual connection layer) in the embodiment of the present application is statically quantized only by integer multiplication, addition and displacement operations, and no floating-point and integer division calculations are performed during the entire reasoning process to obtain the first mode determination model.

[0058] The reason why the (second mode determined) model is quantized and compressed is that the EC has a small storage space. If the model is too large, it cannot be deployed in the EC. Therefore, the (second mode determined) model is quantized and compressed to reduce the demand for computing and storage resources, reduce memory usage, and optimize memory usage. At the same time, it can improve computing efficiency, reduce power consumption, and not rely on high-performance computing power, so as to deploy deep learning models at the edge.

[0059] In the scheme shown in step S101 to step S103, the current hardware data of the electronic device is obtained; the current hardware data is preprocessed to obtain the target hardware data; the target hardware data is input into the first mode determination model deployed in the EC to obtain the mode determination result for the electronic device; wherein the first mode determination model is obtained by quantizing and compressing the pre-trained second mode determination model; the mode determination result is used for the operation of the electronic device. It can realize the adaptive adjustment of the working mode of the electronic device, improve the working performance of the electronic device and the user experience.

[0060] In an optional solution, before inputting the target hardware data into a first mode determination model deployed in the EC to obtain a mode determination result for the electronic device, the method further includes:

[0061] Performing quantization and compression processing on the pre-trained second mode determination model to obtain a first mode determination model;

[0062] Converting the model format of the first mode determination model to obtain a first mode determination model in a target format;

[0063] A first schema determination model of the target format is deployed in the EC.

[0064] In this application, the first mode determination model obtained by quantization compression is converted into a format that can be recognized by EC (i.e., can be used in EC) based on the command line tool of the Linux operating system, such as .cc format (i.e., array format of C language), and is used as the target format of the first mode determination model. The first mode determination model of the target format is deployed in EC. For the specific deployment process, please refer to the detailed description of the relevant parts below, which will not be repeated.

[0065] In an optional solution, the step of deploying the first mode determination model of the target format in the EC includes:

[0066] Migrating the first mode determination model of the target format into EC;

[0067] Obtaining source code of a first mode determination model;

[0068] Determine the target code from the source code of the model determined in the first mode based on the configuration information of the EC;

[0069] Based on the target code and the first schema determination model of the target format migrated to the EC, the first schema determination model of the target format is deployed in the EC.

[0070] In the present application, the first mode determination model of the target format is first migrated to the EC, that is, the first mode determination model of the target format is first ensured to be placed in the EC. The source code of the first mode determination model is read, and according to the configuration information of the EC, specifically according to the kernel version information of the EC, a library file (target code) matching the kernel version information of the EC is determined from the source code of the first mode determination model and deployed in the project file of the EC, so as to realize the deployment of the first mode determination model of the target format in the EC according to the library file. That is, the normal use of the first mode determination model in the EC is realized.

[0071] In an optional solution, the first mode determination model of the target format based on the target code and the first mode determination model of the target format migrated to the EC, deploying the first mode determination model of the target format in the EC, includes:

[0072] Based on the target code, converting the first mode determination model migrated to the target format of the EC into a model object;

[0073] generating an operation object for determining the model for the first mode;

[0074] Based on the model structure of the first mode determination model, the model function of the first mode determination model is added to the operation object to obtain a function operation object;

[0075] Based on the model object and the functional operation object, a first mode determination model in a target format is deployed in the EC.

[0076] In this application, reference Figure 3 As shown, the tflite::GetModel function in the target code is called to convert the first mode determination model in the target format into a model object. In order to ensure that the first mode determination model can be applied in EC, an operation object is created, specifically a tflite::MicroMutableOpResolver object. According to the model structure of the first mode determination model, the model function of the first mode determination model is added to the operation object. If the model structure of the first mode determination model includes a convolution layer, a pooling layer, etc., the convolution function and the pooling function are added to the operation object to obtain a functional operation object. It is equivalent to the model object in EC being the model itself, and the functional operation object in EC being the functional set of the model. Based on the model object and the functional operation object, the deployment of the first mode determination model in EC can be realized, which is simple and easy to implement.

[0077] In an optional solution, the first mode determination model of the target format is deployed in the EC based on the model object and the function operation object, including:

[0078] Generate an interpreter object for a first mode determination model; the interpreter object includes a plurality of member functions;

[0079] The model object and the function operation object are encapsulated by the interpreter object, and a first member function among a plurality of member functions is called to allocate a preset memory space, so as to deploy the first mode determination model of the target format in the EC.

[0080] In this application, reference Figure 3 As shown, an interpreter object for the first mode determination model is created, specifically a tflite::Microinterpreter object, which includes multiple member functions and can manage the reasoning process of the first mode determination model. The model object and the function operation object are encapsulated through the interpreter object, and the first member function of the interpreter object is called, specifically the AllocateTensor function allocates a preset memory space for the storage of input data (target hardware data), and initializes the parameters required for the operation of the first mode determination model. At this point, the deployment of the first mode determination model in the EC is realized, which provides a basis for realizing the adaptive adjustment of the working mode of the electronic device.

[0081] In an optional solution, the interpreter object further includes a plurality of member variables; the step of inputting the target hardware data into a first mode determination model deployed in the EC to obtain a mode determination result for the electronic device includes:

[0082] storing the target hardware data into a target area in the preset memory space based on a first member variable among a plurality of member variables of the interpreter object;

[0083] Based on the target hardware data stored in the target area, calling a second member function of the plurality of member functions of the interpreter object to perform model reasoning of the first mode determination model;

[0084] Based on the result of the model inference and the second member variable among the plurality of member variables of the interpreter object, a mode determination result of the first mode determination model for the electronic device is obtained.

[0085] In this application, after obtaining the target hardware data, refer to Figure 3As shown, based on the first member variable input of the interpreter object, the target hardware data is stored in the memory area pointed to by the variable (i.e., the target area in the preset memory space). After the target hardware data is stored in the target area, the second member function of the interpreter object is called, specifically the Invoke function to perform the reasoning of the first mode determination model. The second member variable output of the interpreter object is called to obtain the model reasoning result of the first mode determination model, wherein the model reasoning result includes the predicted probabilities of various working modes, and the working mode with the largest predicted probability in the model reasoning result is used as the mode determination result of the electronic device.

[0086] In an optional solution, after obtaining the mode determination result for the electronic device, the method further includes:

[0087] Based on the mode determination result for the electronic device, the operation mode of the electronic device is adjusted to the operation mode corresponding to the mode determination result for operation.

[0088] In the present application, after obtaining the mode determination result of the electronic device, the EC generates a control signal based on the mode determination result to adjust the current operation mode of the electronic device to the operation mode corresponding to the mode determination result. If the operation mode corresponding to the mode determination result is the power saving mode, the current operation mode of the electronic device is automatically adjusted to the power saving mode, which can adapt to various application scenarios of users and realize intelligent operation mode adjustment.

[0089] The present application also provides a mode determination device for an electronic device, wherein the electronic device includes an embedded control chip EC, such as Figure 4 As shown, the device comprises:

[0090] A first acquisition unit 401 is used to acquire current hardware data of the electronic device;

[0091] The second acquisition unit 402 is used to pre-process the current hardware data to obtain target hardware data;

[0092] The third acquisition unit 403 is used to input the target hardware data into the first mode determination model deployed in the EC to obtain a mode determination result for the electronic device; wherein the first mode determination model is obtained by quantizing and compressing a pre-trained second mode determination model; and the mode determination result is used for operation of the electronic device.

[0093] In an optional solution, the device further includes:

[0094] The deployment unit is used to perform quantization and compression processing on the pre-trained second mode determination model to obtain a first mode determination model; convert the model format of the first mode determination model to obtain a first mode determination model in a target format; and deploy the first mode determination model in the target format in the EC.

[0095] In an optional solution, the deployment unit is used to migrate the first mode determination model in the target format to the EC; obtain the source code of the first mode determination model; determine the target code from the source code of the first mode determination model based on the configuration information of the EC; and deploy the first mode determination model in the target format in the EC based on the target code and the first mode determination model in the target format migrated to the EC.

[0096] In an optional solution, the deployment unit is used to convert the first mode determination model of the target format migrated to EC into a model object based on the target code; generate an operation object for the first mode determination model; based on the model structure of the first mode determination model, add the model function of the first mode determination model to the operation object to obtain a functional operation object; based on the model object and the functional operation object, deploy the first mode determination model of the target format in EC.

[0097] In an optional scheme, the deployment unit is used to generate an interpreter object for the first mode determination model; the interpreter object includes multiple member functions; the model object and the function operation object are encapsulated by the interpreter object, and the first member function of the multiple member functions is called to allocate a preset memory space to deploy the first mode determination model in the target format in the EC.

[0098] In an optional scheme, the interpreter object also includes multiple member variables; the deployment unit is used to store the target hardware data in the target area in the preset memory space based on the first member variable among the multiple member variables of the interpreter object; based on the target hardware data stored in the target area, call the second member function among the multiple member functions of the interpreter object to perform model reasoning of the first mode determination model; based on the result of the model reasoning and the second member variable among the multiple member variables of the interpreter object, obtain the mode determination result of the first mode determination model for the electronic device.

[0099] In an optional solution, it also includes:

[0100] The adjustment unit is used to adjust the operation mode of the electronic device to the operation mode corresponding to the mode determination result based on the mode determination result for the electronic device.

[0101] It should be noted that the mode determination device of the electronic device in the embodiment of the present application solves the problem in accordance with a principle similar to that of the aforementioned mode determination method of the electronic device. Therefore, the implementation process, implementation principle and beneficial effects of the mode determination device of the electronic device can all be referred to the description of the implementation process, implementation principle and beneficial effects of the aforementioned method, and the repeated parts will not be repeated.

[0102] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0103] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0104] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0105] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0106] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as a mode determination method of an electronic device. For example, in some embodiments, the mode determination method of an electronic device may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the mode determination method of the electronic device described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the mode determination method of the electronic device by any other appropriate means (e.g., by means of firmware).

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

[0108] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

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

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

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

[0112] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0113] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0114] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0115] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for determining a mode of an electronic device, characterized in that: The electronic device comprises an embedded control chip EC, and the method comprises: Obtain current hardware data of the electronic device; Preprocessing the current hardware data to obtain target hardware data; The target hardware data is input into a first mode determination model deployed in an EC to obtain a mode determination result for the electronic device; wherein the first mode determination model is obtained by quantizing and compressing a pre-trained second mode determination model; and the mode determination result is used for operation of the electronic device.

2. The method according to claim 1, characterized in that Before inputting the target hardware data into a first mode determination model deployed in the EC to obtain a mode determination result for the electronic device, the method further includes: Performing quantization and compression processing on the pre-trained second mode determination model to obtain a first mode determination model; Converting the model format of the first mode determination model to obtain a first mode determination model in a target format; A first schema determination model of the target format is deployed in the EC.

3. The method according to claim 2, characterized in that The step of deploying the first mode determination model of the target format in the EC includes: Migrating the first mode determination model of the target format into EC; Obtaining source code of a first mode determination model; Determine the target code from the source code of the model determined in the first mode based on the configuration information of the EC; Based on the target code and the first schema determination model of the target format migrated to the EC, the first schema determination model of the target format is deployed in the EC.

4. The method according to claim 3, characterized in that The step of determining the first mode of the target format based on the target code and the first mode of the target format migrated to the EC, and deploying the first mode of the target format in the EC, comprises: Based on the target code, converting the first mode determination model migrated to the target format of the EC into a model object; generating an operation object for determining the model for the first mode; Based on the model structure of the first mode determination model, the model function of the first mode determination model is added to the operation object to obtain a function operation object; Based on the model object and the functional operation object, a first mode determination model in a target format is deployed in the EC.

5. The method according to claim 4, characterized in that The step of deploying the first mode determination model of the target format in the EC based on the model object and the function operation object includes: Generate an interpreter object for a first mode determination model; the interpreter object includes a plurality of member functions; The model object and the function operation object are encapsulated by the interpreter object, and a first member function among a plurality of member functions is called to allocate a preset memory space, so as to deploy the first mode determination model of the target format in the EC.

6. The method according to claim 5, characterized in that The interpreter object further includes a plurality of member variables; the inputting the target hardware data into a first mode determination model deployed in the EC to obtain a mode determination result for the electronic device includes: storing the target hardware data into a target area in the preset memory space based on a first member variable among a plurality of member variables of the interpreter object; Based on the target hardware data stored in the target area, calling a second member function of the plurality of member functions of the interpreter object to perform model reasoning of the first mode determination model; Based on the result of the model inference and the second member variable among the plurality of member variables of the interpreter object, a mode determination result of the first mode determination model for the electronic device is obtained.

7. The method according to any one of claims 1 to 6, characterized in that: After obtaining the mode determination result for the electronic device, the method further includes: Based on the mode determination result for the electronic device, the operation mode of the electronic device is adjusted to the operation mode corresponding to the mode determination result for operation.

8. A mode determination device for an electronic device, characterized in that: The electronic device comprises an embedded control chip EC, and the device comprises: A first acquisition unit, used to acquire current hardware data of the electronic device; A second acquisition unit, used for preprocessing the current hardware data to obtain target hardware data; The third acquisition unit is used to input the target hardware data into the first mode determination model deployed in the EC to obtain a mode determination result for the electronic device; wherein the first mode determination model is obtained by quantizing and compressing the pre-trained second mode determination model; and the mode determination result is used for the electronic device to operate.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Neural network compression method and device

    CN110188877A

  • Electronic apparatus and control method thereof

    CN112424799A

  • Method and device for realizing ultra-long standby of tablet computer and storage medium

    CN118519513A