WO2021097626A1 - Touch screen firmware loading method and apparatus, electronic device, and storage medium - Google Patents

Touch screen firmware loading method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2021097626A1
WO2021097626A1 PCT/CN2019/119250 CN2019119250W WO2021097626A1 WO 2021097626 A1 WO2021097626 A1 WO 2021097626A1 CN 2019119250 W CN2019119250 W CN 2019119250W WO 2021097626 A1 WO2021097626 A1 WO 2021097626A1
Authority
WO
WIPO (PCT)
Prior art keywords
touch screen
firmware
mode
screen
working mode
Prior art date
Application number
PCT/CN2019/119250
Other languages
French (fr)
Chinese (zh)
Inventor
林进全
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201980099751.4A priority Critical patent/CN114286979A/en
Priority to PCT/CN2019/119250 priority patent/WO2021097626A1/en
Publication of WO2021097626A1 publication Critical patent/WO2021097626A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels

Definitions

  • This application relates to the technical field of electronic equipment, and more specifically, to a method, device, electronic equipment, and storage medium for loading firmware of a touch screen.
  • this application proposes a method, device, electronic device and storage medium for loading firmware of a touch screen to improve the above-mentioned problems.
  • an embodiment of the present application provides a method for loading touch screen firmware.
  • the method includes: detecting whether the working mode of the touch screen is switched; if the working mode of the touch screen is switched, obtaining the touch screen firmware corresponding to the current working mode as the waiting to be loaded Firmware, where different working modes of the touch screen correspond to different touch screen firmware; the acquired firmware to be loaded is loaded into the touch screen memory.
  • an embodiment of the present application provides a touch screen firmware loading device.
  • the device includes: a detection module for detecting whether the working mode of the touch screen is switched; and a firmware acquisition module, which is used for if the working mode of the touch screen is switched, Obtain the touch screen firmware corresponding to the current working mode as the firmware to be loaded, where different working modes of the touch screen correspond to different touch screen firmware; the loading module is used to load the firmware to be loaded into the touch screen memory.
  • an embodiment of the present application provides an electronic device, including: one or more processors;
  • System memory touch screen memory; one or more programs, wherein the one or more programs are stored in the system memory and configured to be executed by the one or more processors, the one or more programs
  • the configuration is used to perform the methods described above.
  • an embodiment of the present application provides a computer-readable storage medium having program code stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the above-mentioned method.
  • the touch screen firmware loading method, device, electronic device, and storage medium provided in the embodiments of the present application load the touch screen firmware according to the current working mode of the touch screen.
  • the working mode of the touch screen is switched, only the touch screen firmware of the current working mode is loaded into the touch screen memory, which improves the speed of loading the touch screen firmware into the touch screen memory.
  • Fig. 1 shows a flowchart of a method for loading firmware of a touch screen provided by an embodiment of the present application.
  • Fig. 2 shows a flowchart of a method for loading firmware of a touch screen according to another embodiment of the present application.
  • Fig. 3 shows a schematic diagram of a firmware file provided by an embodiment of the present application.
  • Fig. 4 shows another schematic diagram of a firmware file provided by an embodiment of the present application.
  • FIG. 5 shows a flowchart of a method for loading firmware of a touch screen provided by another embodiment of the present application.
  • FIG. 6 shows a functional module diagram of a device for loading firmware of a touch screen provided by an embodiment of the present application.
  • Fig. 7 shows a structural block diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 8 is a storage unit for storing or carrying program codes for implementing the method for loading firmware of a touch screen according to an embodiment of the present application.
  • Firmware is the software that is responsible for the most basic and low-level work of a system. It refers to the device "driver" stored inside the device. Through firmware, the operating system can implement the operation of a specific machine in accordance with the standard device driver. For example, for the touch screen of an electronic device, firmware can be loaded into the memory of the touch screen to drive the touch screen, so that various touch operations can be performed on the touch screen.
  • the touch screen memory is the memory of the touch screen system and is used to store data related to the operation of the touch screen.
  • the inventor further researched and found that there may be more than one working mode of the touch screen, for example, there may be a normal use mode of the user, a test mode for a developer to test the performance of the touch screen, a working mode corresponding to a bright screen, The working mode corresponding to the off screen, etc.
  • the touch screen firmware of different working modes is usually integrated together as a firmware file.
  • the firmware file is relatively large and takes too long to load.
  • the touch screen firmware of the electronic device actually uses different touch screen firmware. That is to say, in one working mode, the firmware file of the loaded touch screen includes the touch screen firmware of all working modes.
  • the inventor proposes the touch screen firmware loading method of the embodiment of the present application.
  • the touch screen firmware corresponding to the current working mode is loaded into the touch screen memory, which reduces the size of the firmware loaded into the touch screen memory. , Improve the loading speed.
  • the method, device, electronic equipment, and storage medium for loading the touch screen firmware provided in the embodiments of the present application will be described in detail below through specific embodiments.
  • FIG. 1 shows a method for loading firmware of a touch screen provided by an embodiment of the present application.
  • This method can be applied to the central processing unit of an electronic device.
  • the embodiment of the present application takes a mobile phone as an example for description. Specifically, the method includes:
  • Step S110 Detect whether the working mode of the touch screen is switched.
  • the touch screen responds differently to touch operations on the touch screen, and is driven by different touch screen firmware. Therefore, it can be detected whether the working mode of the touch screen has been switched.
  • Step S120 If the working mode of the touch screen is switched, obtain the touch screen firmware corresponding to the current working mode as the firmware to be loaded, where different working modes of the touch screen correspond to different touch screen firmware.
  • the touch screen firmware of the working mode is stored.
  • the touch screen firmware of the new working mode can be used to drive the touch screen. Therefore, after the working mode is switched, the touch screen firmware corresponding to the current working mode can be obtained, that is, the touch screen firmware of the switched working mode can be obtained.
  • the acquired touch screen firmware corresponding to the current working mode is defined as the firmware to be loaded.
  • Step S130 Load the firmware to be loaded into the touch screen memory.
  • the touch screen firmware of the current working mode is loaded into the touch screen memory, and the loaded touch screen firmware drives the touch screen to react to the touch operation in the current working mode.
  • Another embodiment of the present application provides a method for loading firmware of a touch screen.
  • the firmware files corresponding to different working modes are obtained by splitting the firmware files.
  • the method includes:
  • Step S210 Split the firmware file to obtain the touch screen firmware corresponding to different mode identifiers.
  • the electronic device can obtain the firmware file used to drive the touch screen and store the system memory.
  • the firmware file includes the firmware that drives all the working modes of the touch screen, that is, all the touch screen firmware corresponding to all the working modes of the touch screen are used as a firmware file Stored in system memory.
  • the system memory is electrically connected to the central processing unit, which is different from the touch screen memory.
  • the electronic device may obtain the firmware file from the server.
  • the firmware file for the upgraded version of the touch screen driver is obtained from the server; the electronic device may also obtain the firmware file from other electronic devices.
  • the firmware file can be split to obtain the touch screen firmware corresponding to each working mode.
  • different working modes correspond to different mode identifiers, that is, the mode identifiers correspond to the working modes one-to-one, and the mode identifier corresponding to the working mode indicates the identity of the working mode. Therefore, after the firmware is split, the touch screen firmware corresponding to different mode identifiers can be obtained.
  • the data of the touch screen firmware in the same working mode in the firmware file may be stored adjacently.
  • the way to split the firmware file can be to read from the beginning of the firmware file and obtain the size of the currently read touch screen firmware. During the reading process, it is detected whether the size of the read file is equal to the size of the currently read touch screen firmware.
  • the currently read touch screen firmware can be split from the firmware file to obtain a split touch screen firmware. And continue to read the remaining firmware files until the reading of the firmware files is completed.
  • Figure 3 shows the firmware file.
  • the touch screen firmware A starts from a1 to an end, and the touch screen firmware B starts from b1 to bn.
  • Read from the beginning of the firmware file that is, read from a1.
  • the file A is split from the firmware file to obtain the touch screen firmware A.
  • file B is split from the firmware file to obtain Touch screen firmware B.
  • the size of the touch screen firmware in each working mode can be determined according to the size of the firmware file and the number of working modes.
  • the size of the touch screen firmware of each working mode may be different.
  • the size of the touch screen firmware can be stored in the relevant field at the beginning of each touch screen firmware in the firmware file, and then in the process of reading the firmware file, it can be determined whether the size of the read file is equal to the touch screen being read The size of the firmware.
  • the touch screen firmware of each working mode may have a unique firmware identifier, and there may be a configuration file to store the correspondence between different firmware identifiers and the size of the touch screen firmware, and the data size corresponding to each firmware identifier Equal to the size of the touch screen firmware corresponding to the firmware identifier.
  • the firmware file the firmware identification of the touch screen firmware is stored in the relevant field at the beginning of each touch screen firmware. According to the firmware identification, the size of the touch screen firmware being read can be obtained, so that it can be determined whether the read file is equal to the normal reading. Take the size of the touch screen firmware.
  • the touch screen firmware corresponding to different mode identifiers can be obtained.
  • the data of the touch screen firmware is different in different working modes, and the firmware size of different touch screen firmware is different. Therefore, the corresponding relationship between the mode identification of different working modes and the size of the firmware can be set, and each mode identification The corresponding firmware size indicates the size of the touch screen firmware identified by the mode. Therefore, the mode identifier corresponding to each touch screen firmware can be determined according to the corresponding relationship between the mode identifier and the size of the firmware, and the size of each touch screen firmware that is separated.
  • each of the separated touch screen firmware includes a firmware identifier of the touch screen firmware.
  • a configuration file of the corresponding relationship between the firmware identification and the mode identification is stored. Therefore, the firmware identification of each touch screen firmware can be obtained, and the mode identification corresponding to each touch screen firmware can be determined according to the corresponding relationship between the firmware identification and the mode identification, so as to determine the touch screen firmware corresponding to each working mode.
  • the new firmware file when the firmware file is updated, the new firmware file needs to be split again. Therefore, it can also detect whether a new firmware file is obtained. If a new firmware file is obtained, the touch screen firmware corresponding to each mode identifier is re-determined according to the new firmware file.
  • the firmware file may be split again to obtain each of the split touch screen firmware. Then update the touch screen firmware corresponding to the mode mark.
  • not all of the touch screen firmware may be updated. Therefore, the corresponding relationship with the mode identification may be re-established only for the updated touch screen firmware.
  • the updated part in the new firmware file can be determined.
  • the updated part may belong to one touch screen firmware or multiple touch screen firmwares, and the touch screen firmware corresponding to the updated part can be separated from the new firmware file.
  • the touch screen firmware corresponding to the update part that is, the touch screen firmware to which the update part belongs.
  • the firmware data in the interval a4 to a5 is updated, and it can be determined that the firmware data in the interval a4 to a5 is the data of the touch screen firmware A, and then from the new firmware file, Split the touch screen firmware A, and establish a unique correspondence between the touch screen firmware A and the mode identification of the corresponding working mode.
  • the touch screen firmware that is not updated in the firmware file can no longer be split from the touch screen firmware.
  • the obtained touch screen firmware can be used to load into the touch screen memory in subsequent steps.
  • this step may no longer be executed, but the steps from step S220 to step S240 are executed cyclically.
  • Step S220 Detect whether the working mode of the touch screen is switched.
  • the mode switching trigger may be the user's triggering mode switching operation on the touch screen, such as the trigger switching from the use mode to the test mode; the mode switching trigger may also be received through a hardware interface electrically connected to the outside Switching operation, such as when it is detected that a test device is connected through the hardware interface, enter the test mode, when it is detected that the test device is unplugged from the hardware interface, exit the test mode and enter the use mode; the trigger of the mode switch can also be through The wireless data transmission receives the switching instruction; the mode switching method can also be that the electronic device has a physical control to receive the switching operation, such as switching on or off the screen through the power button of the electronic device.
  • the working mode is switched from the working mode under the bright screen to the working mode under the off screen
  • the electronic device is switched from the off screen to the bright screen
  • the working mode is switched from the working mode under the off screen to the working mode under the bright screen. mode.
  • the trigger of the specific mode switching is not limited in the embodiment of the present application.
  • whether the working mode is switched can be detected, and when the switching of the working mode is detected, the switched working mode can be obtained.
  • a broadcast may be sent to the broadcast management service, and the broadcast includes the switch event and the working mode after the switch. It can be determined whether the working mode of the touch screen is switched, and the working mode after the switching, according to whether the broadcasting manager receives the broadcasting of the mode switching.
  • the current working mode of the touch screen can be detected at a certain frequency. In each detection, it is determined whether the currently detected working mode is the same as the previously detected working mode. If the same, it means that there is no The work mode switch occurs; if they are not the same, it can be determined that the work mode of the touch screen is switched.
  • the touch screen of the electronic device changes from the non-working mode to the working mode, it is also determined that the working mode is switched. For example, after the electronic device is turned on from the off state, it enters the working mode after being turned on, and it is determined that the working mode of the touch screen is switched.
  • Step S230 If the working mode of the touch screen is switched, the touch screen firmware corresponding to the current working mode is acquired as the firmware to be loaded according to the corresponding relationship between the mode identifier and the firmware of the touch screen.
  • the different working modes of the touch screen correspond to different touch screen firmware.
  • the touch screen firmware corresponding to the mode identification of the current working mode can be obtained according to the corresponding relationship between the mode identification and the touch screen firmware, which is defined as the firmware to be loaded.
  • the mode identification M1 corresponds to the touch screen firmware m1
  • the mode identification M2 corresponds to the touch screen firmware m2
  • the mode identification of the current working mode is M1
  • the firmware m1 to be loaded can be determined.
  • the current working mode is the switched working mode.
  • the way of judging may be, if in the corresponding relationship between the mode identification and the touch screen firmware, it is judged whether there is a mode identification of the current working mode, and if so, it is judged that the current working mode corresponds to the touch screen firmware.
  • a prompt message that the current working mode is not supported may be displayed.
  • a firmware acquisition request may be initiated to the server for acquiring the touch screen firmware corresponding to the current working mode.
  • what the server returns may be a firmware file.
  • the firmware file includes the touch screen firmware corresponding to the current working mode, as well as touch screen firmware in other working modes, then the received firmware file is split to obtain the corresponding working modes After the touch screen firmware is installed, obtain the touch screen firmware corresponding to the current working mode.
  • the server may return the touch screen firmware corresponding to the requested current working mode. If the touch screen firmware returned by the server is received, the touch screen firmware corresponding to the current working mode may be obtained.
  • Step S240 Load the firmware to be loaded into the touch screen memory.
  • the central processing unit loads the firmware to be loaded into the touch screen memory.
  • the terminal system of the electronic device may load the firmware to be loaded into the touch screen memory.
  • the touch screen firmware stored in the touch screen memory is updated to the touch screen firmware of the current working mode.
  • the obtained firmware file is split to obtain the touch screen firmware corresponding to each working mode.
  • the touch screen firmware corresponding to the switched working mode can be obtained, and only the touch screen firmware of the switched working mode is loaded into the touch screen memory to increase the loading speed, thereby improving the response speed of the touch screen.
  • the working mode of the touch screen may include a working mode when the screen is on and a working mode when the screen is off.
  • the working mode under the bright screen is the feedback of the touch screen to the touch operation when the electronic device is in the on-screen state;
  • the working mode under the off screen is the feedback of the touch screen to the touch operation when the electronic device is in the off-screen state, such as when the screen is off Gesture wake-up function.
  • the method for loading the touch screen firmware specifically includes:
  • Step S310 Detect whether the on-off state of the touch screen is switched. If the on-off state of the touch screen is switched, it is determined that the working mode of the touch screen is switched.
  • the touch screen includes a working mode when the screen is on and a working mode when the screen is off. Then, it can be determined whether the working mode of the touch screen is switched according to the on and off state of the touch screen.
  • the touch screen is switched from bright screen to off screen, it is determined that the working mode is switched from bright screen working mode to off screen working mode; if the touch screen is switched from off screen to bright screen, it is determined that the working mode is switched from off screen working mode to off screen working mode. Bright screen working mode.
  • the electronic device needs to perform a touch screen performance test before leaving the factory, and may also need to perform a touch screen performance test during after-sales testing and maintenance.
  • the touch screen may also have a test mode for performance testing and The usage mode used by ordinary users.
  • the test mode can be divided into the test mode under the bright screen and the test mode under the off-screen state; the use mode can be divided into the use mode under the bright screen and the use mode under the off-screen.
  • detecting whether the working mode of the touch screen is switched may include, if a test trigger operation is received and the screen is currently in a bright screen state, determining that the working mode of the touch screen is switched to a test mode under bright screen. If the test trigger operation is received and the screen is currently in the off-screen state, it is determined that the working mode of the touch screen is switched to the off-screen test mode. If the test exit operation is received and the screen is currently in the bright screen state, it is determined that the working mode of the touch screen is switched to the use mode under the bright screen. If the test exit operation is received and the screen is currently in the off-screen state, it is determined that the working mode of the touch screen is switched to the off-screen use mode.
  • the test trigger operation is the operation of controlling the touch screen to enter the test mode
  • the test exit operation is the operation of controlling the touch screen to exit the test mode and enter the use mode.
  • the electronic device can receive the test trigger operation and the test exit operation through a hardware interface electrically connected to the outside, or can receive the test trigger operation and the test exit operation by receiving a wireless signal, so that it is no matter whether the screen is off or on. Status, can control the electronic device to switch between test mode and use mode.
  • the test trigger operation and the test exit operation of the electronic device need to be triggered by related controls when the screen is turned on, then detecting whether the working mode of the touch screen is switched, which may include, if the test trigger operation is received, entering the light Test mode under the screen, and before receiving the test exit operation, if the touch screen is switched to the off-screen state, it enters the test mode under the off-screen state, and if it is switched from the off-screen state to the on-screen state, it enters the test mode under the on-screen state ; If the test exit operation is received, it will enter the use mode under the bright screen, and before the test trigger operation is received, if the touch screen is switched to the off-screen state, it enters the off-screen use mode, if the off-screen state is switched to on Screen status, then enter the use mode under bright screen.
  • Step S320 If the working mode of the touch screen is switched, obtain the touch screen firmware corresponding to the current working mode as the firmware to be loaded.
  • the touch screen firmware in the working mode in the off state is obtained; if the touch screen has the off screen and switched to the on, then the touch screen firmware in the working mode in the on state is obtained.
  • the working mode of the touch screen includes the test mode and use mode under the bright screen, the test mode and use mode under the off screen, and if the current working mode is the test mode under the bright screen, obtain the touch screen firmware of the test mode under the bright screen; If the current working mode is the use mode under bright screen, then obtain the touch screen firmware of the use mode under bright screen; if the current work mode is the use mode under the off-screen use mode, obtain the touch screen firmware of the use mode under off-screen mode; if the current working mode For the test mode in the off-screen mode, obtain the touch screen firmware in the off-screen test mode.
  • Step S330 Load the firmware to be loaded into the touch screen memory.
  • the touch screen memory does not include flash memory
  • firmware needs to be loaded into the touch screen memory every time the screen is turned on, so that when firmware supporting all working modes of the touch screen is loaded into the touch screen memory, the screen lighting speed is affected.
  • the touch screen firmware is loaded into the touch screen memory according to the working mode, so as to avoid the influence on the screen lighting speed. If the touch screen memory includes flash memory, the firmware file in the flash memory can be directly read.
  • the touch screen memory of the electronic device includes flash memory; if there is no flash memory, the method of loading the touch screen firmware according to the switching of the working mode in the embodiment of the present application can be executed, for example, the detection of the touch screen can be executed. Whether the work mode is switched.
  • the detection of whether there is a flash memory may not be performed. If the electronic device stores a program that executes the method for loading firmware of the touch screen in the embodiment of this application, it is considered that the electronic device does not have flash memory, and it is divided into working modes. Load the touch screen firmware to the touch screen memory.
  • the touch screen when the touch screen is switched on and off, it can be determined that the working mode of the touch screen is switched, or a test trigger operation or a test exit operation is received, and it can also be determined that the working mode of the touch screen is switched. Obtain the touch screen firmware corresponding to the switched working mode and load it into the touch screen memory.
  • Step S340 If the touch screen is switched to the bright screen state, after loading the touch screen firmware of the current working mode into the touch screen memory, while the touch screen remains on, load the touch screen firmware of other working modes to the touch screen memory.
  • step S340 may be used as an optional step. Since the touch screen firmware needs to be written to the touch screen memory when the screen is on, the current working mode of the touch screen firmware is first loaded into the touch screen memory when the screen is on, so that the touch screen firmware loaded into the touch screen memory will not be too large and improve Bright screen response speed.
  • this step it is possible to obtain the touch screen firmware corresponding to the current working mode and load it into the touch screen memory only when it is detected that the touch screen is switched from off to on.
  • the working mode of the touch screen includes the use mode and the test mode under the bright screen, the use mode and the test mode under the off screen, it may be that when the working mode of the touch screen is switched to the test mode under the bright screen, the After the touch screen firmware corresponding to the test mode under the bright screen is loaded into the touch screen memory, it is more likely that the touch screen will switch from the test mode under the bright screen to the use mode under the bright screen while the touch screen remains on. , The touch screen firmware corresponding to the usage mode under the bright screen can be loaded to the touch screen memory.
  • the working mode is switched during the screen lighting process, since the touch screen firmware of the switched working mode has been loaded into the touch screen memory, there is no need to load the touch screen firmware corresponding to the switched working mode to the touch screen memory.
  • the touch screen firmware corresponding to the test mode under the off screen After being loaded into the touch screen memory, while the touch screen remains off, the touch screen firmware corresponding to the use mode under the off screen is loaded to the touch screen memory. Moreover, if the working mode is switched during the screen-off process, since the touch screen firmware of the switched working mode has been loaded into the touch screen memory, there is no need to load the touch screen firmware corresponding to the switched working mode to the touch screen memory.
  • the touch screen firmware corresponding to the current working mode is loaded into the touch screen memory, before other working modes are switched to, the touch screen firmware of other working modes is loaded in advance to improve the response speed of the touch screen in each working mode.
  • the embodiment of the present application also provides a touch screen firmware loading device 400.
  • the device 400 may include a detection module 410 for detecting whether the working mode of the touch screen is switched; and a firmware obtaining module 420 for obtaining the touch screen firmware corresponding to the current working mode as a standby if the working mode of the touch screen is switched.
  • Loading firmware where different working modes of the touch screen correspond to different touch screen firmware; the loading module 430 is used to load the firmware to be loaded into the touch screen memory.
  • different working modes may correspond to different mode identifiers.
  • the firmware obtaining module 420 may be used to obtain the touch screen firmware corresponding to the current working mode according to the corresponding relationship between the mode identifier and the touch screen firmware.
  • the device 400 further includes a splitting module, the splitting module may include a splitting unit that splits the firmware file, and a touch screen firmware acquisition unit for acquiring touch screen firmware corresponding to different mode identifiers.
  • the splitting unit may be used to read from the beginning of the firmware file, obtain the size of the currently read touch screen firmware, and detect whether the read file size is equal to the size of the currently read touch screen firmware If yes, split the currently read touch screen firmware from the firmware file, and continue to read the firmware file; if not, continue to read the firmware file.
  • the touch screen firmware obtaining unit may be used to determine the mode identification corresponding to each touch screen firmware according to the corresponding relationship between the mode identification and the size of the firmware, and the size of each touch screen firmware that is split.
  • the touch screen firmware obtaining unit may be used to obtain the firmware identification of each touch screen firmware that has been split; and determine the mode identification corresponding to each touch screen firmware according to the corresponding relationship between the firmware identification and the mode identification.
  • the split module can also be used to detect whether a new firmware file is obtained. If yes, determine the update part in the new firmware file; split the touch screen firmware corresponding to the update part from the new firmware file; establish a unique correspondence between the split touch screen firmware and the mode identifier.
  • the device may further include a judgment module for judging whether the touch screen firmware corresponding to the current working mode is stored; if so, the firmware obtaining module 420 obtains the touch screen firmware corresponding to the current working mode.
  • the device may also include a firmware download module, which is used to initiate a firmware acquisition request to the server if the touch screen firmware corresponding to the current working mode is not stored, for acquiring the touch screen firmware corresponding to the current working mode;
  • the firmware acquisition module 420 acquires the touch screen firmware corresponding to the current working mode.
  • the working mode of the touch screen may include a working mode when the screen is on and a working mode when the screen is off.
  • the detection module 410 may be used to detect whether the on-off state of the touch screen is switched; if the on-off state of the touch screen is switched, it is determined that the working mode of the touch screen is switched.
  • the loading module 430 may also be used to, if the touch screen is switched to the on-screen state, after loading the touch screen firmware of the current working mode into the touch screen memory, while the touch screen remains on, send the touch screen to the touch screen.
  • the memory loads the touch screen firmware of other working modes.
  • the working mode of the touch screen may include a use mode and a test mode when the screen is on, and a use mode and a test mode when the screen is off.
  • the detection module 410 can also be used to determine that if the test trigger operation is received and the screen is currently in the on-screen state, determine that the working mode of the touch screen is switched to the test mode under the on-screen; The working mode of the touch screen is switched to the test mode with the screen off; if the test exit operation is received and the screen is currently on, it is determined that the working mode of the touch screen is switched to the use mode with the bright screen; if the test exit operation is received And it is currently in the off-screen state, and it is determined that the working mode of the touch screen is switched to the off-screen use mode.
  • the loading module 430 may also be used to: when the working mode of the touch screen is switched to the test mode under the bright screen, after loading the touch screen firmware corresponding to the test mode under the bright screen to the touch screen memory, after While the touch screen remains on, load the touch screen firmware corresponding to the usage mode under the bright screen to the touch screen memory; when the working mode of the touch screen is switched to the test mode under the off-screen, the test mode under the off-screen is corresponding After the touch screen firmware of is loaded into the touch screen memory, while the touch screen remains off, the touch screen firmware corresponding to the use mode under the off screen is loaded to the touch screen memory.
  • the detection module of the device 400 may receive a test trigger operation and a test exit operation through a hardware interface electrically connected to the outside.
  • the device may further include a flash memory checking module, which is used to detect whether the touch screen memory of the electronic device includes flash memory. If not included, the detection module 410 detects whether the working mode of the touch screen is switched.
  • a flash memory checking module which is used to detect whether the touch screen memory of the electronic device includes flash memory. If not included, the detection module 410 detects whether the working mode of the touch screen is switched.
  • the touch screen firmware loading method, device, electronic device, and storage medium provided by the embodiments of the present application can increase the loading rate and use efficiency of the touch screen firmware, increase the system screen brightness speed, and improve user experience.
  • the method and device for loading the firmware of the touch screen provided by the embodiments of the present application are used when the touch screen memory does not include a flash memory, thereby saving the cost of the memory.
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software function modules.
  • Each module can be configured in different electronic devices, and can also be configured in the same electronic device, which is not limited in the embodiment of the present application.
  • the electronic device 500 may be a smart device such as a smart phone, a wearable device, an e-reader, a tablet computer, or a computer.
  • the electronic device may include one or more processors 510 (only one is shown in the figure), a memory 520, and one or more programs.
  • the memory may include a system memory and a touch screen memory.
  • the system memory is used to store system data of the electronic device and various files called by the system.
  • the one or more programs are stored in the system memory and configured It is executed by one or more processors 510.
  • the one or more programs are configured to execute the methods described in the foregoing embodiments.
  • the touch screen memory is used to store the touch screen operating system and the use files related to the touch screen, for example, it can store the touch screen firmware.
  • the processor 510 may include one or more processing cores.
  • the processor 510 uses various interfaces and lines to connect various parts of the entire electronic device 500, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 520, and calling data stored in the memory 520.
  • the processor 510 may adopt at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 510 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 510, but may be implemented by a communication chip alone.
  • the memory 520 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 520 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 520 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing each of the foregoing method embodiments, and the like.
  • the data storage area can also be the data created by the electronic device in use, etc.
  • FIG. 8 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable storage medium 600 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 600 has storage space for the program code 610 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
  • the program code 610 may be compressed in a suitable form, for example.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Disclosed are a touch screen firmware loading method and apparatus, an electronic device, and a storage medium, wherein same relate to the technical field of data processing. The method comprises: detecting whether a working mode of a touch screen is switched; if the working mode of the touch screen is switched, acquiring touch screen firmware corresponding to the current working mode to serve as firmware to be loaded, wherein different working modes of the touch screen correspond to different touch screen firmware; and loading, to a touch screen memory, the firmware to be loaded. The speed of loading touch screen firmware to a touch screen memory is increased.

Description

触摸屏固件加载方法、装置、电子设备及存储介质Method, device, electronic equipment and storage medium for loading firmware of touch screen 技术领域Technical field
本申请涉及电子设备技术领域,更具体地,涉及一种触摸屏固件加载方法、装置、电子设备及存储介质。This application relates to the technical field of electronic equipment, and more specifically, to a method, device, electronic equipment, and storage medium for loading firmware of a touch screen.
背景技术Background technique
随着科技的发展,电子设备的功能不断增强,电子设备的触摸屏可支持的触摸操作越来越繁复,从而触摸屏的固件文件不断增大。过大的固件文件在从系统存储器加载到触摸屏存储器的过程中,耗费时间会加长,降低触摸屏的反应速度。With the development of science and technology, the functions of electronic devices are continuously enhanced, and the touch operations supported by the touch screen of the electronic device are becoming more and more complicated, so that the firmware files of the touch screen are continuously increasing. In the process of loading an oversized firmware file from the system memory to the touch screen memory, the time-consuming process will be lengthened and the response speed of the touch screen will be reduced.
发明内容Summary of the invention
鉴于上述问题,本申请提出了一种触摸屏固件加载方法、装置、电子设备及存储介质,以改善上述问题。In view of the above-mentioned problems, this application proposes a method, device, electronic device and storage medium for loading firmware of a touch screen to improve the above-mentioned problems.
第一方面,本申请实施例提供了一种触摸屏固件加载方法,所述方法包括:检测触摸屏的工作模式是否发生切换;若触摸屏的工作模式发生切换,获取对应当前工作模式的触摸屏固件作为待加载固件,其中,触摸屏的不同工作模式对应有不同的触摸屏固件;将获取到的待加载固件加载到触摸屏存储器。In the first aspect, an embodiment of the present application provides a method for loading touch screen firmware. The method includes: detecting whether the working mode of the touch screen is switched; if the working mode of the touch screen is switched, obtaining the touch screen firmware corresponding to the current working mode as the waiting to be loaded Firmware, where different working modes of the touch screen correspond to different touch screen firmware; the acquired firmware to be loaded is loaded into the touch screen memory.
第二方面,本申请实施例提供了一种触摸屏固件加载装置,所述装置包括:检测模块,用于检测触摸屏的工作模式是否发生切换;固件获取模块,用于若触摸屏的工作模式发生切换,获取对应当前工作模式的触摸屏固件作为待加载固件,其中,触摸屏的不同工作模式对应有不同的触摸屏固件;加载模块,用于将所述待加载固件加载到触摸屏存储器。In a second aspect, an embodiment of the present application provides a touch screen firmware loading device. The device includes: a detection module for detecting whether the working mode of the touch screen is switched; and a firmware acquisition module, which is used for if the working mode of the touch screen is switched, Obtain the touch screen firmware corresponding to the current working mode as the firmware to be loaded, where different working modes of the touch screen correspond to different touch screen firmware; the loading module is used to load the firmware to be loaded into the touch screen memory.
第三方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors;
系统存储器;触摸屏存储器;一个或多个程序,其中所述一个或多个程序被存储在所述系统存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述的方法。System memory; touch screen memory; one or more programs, wherein the one or more programs are stored in the system memory and configured to be executed by the one or more processors, the one or more programs The configuration is used to perform the methods described above.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having program code stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the above-mentioned method.
本申请实施例提供的触摸屏固件加载方法、装置、电子设备及存储介质,根据触摸屏的当前的工作模式进行触摸屏固件加载。在触摸屏的工作模式切换时,仅将当前工作模式的触摸屏固件加载到触摸屏存储器,提高了将触摸屏固件加载到触摸屏存储器的速度。The touch screen firmware loading method, device, electronic device, and storage medium provided in the embodiments of the present application load the touch screen firmware according to the current working mode of the touch screen. When the working mode of the touch screen is switched, only the touch screen firmware of the current working mode is loaded into the touch screen memory, which improves the speed of loading the touch screen firmware into the touch screen memory.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1示出了本申请一实施例提供的触摸屏固件加载方法的流程图。Fig. 1 shows a flowchart of a method for loading firmware of a touch screen provided by an embodiment of the present application.
图2示出了本申请另一实施例提供的触摸屏固件加载方法的流程图。Fig. 2 shows a flowchart of a method for loading firmware of a touch screen according to another embodiment of the present application.
图3示出了本申请实施例提供的固件文件的一种示意图。Fig. 3 shows a schematic diagram of a firmware file provided by an embodiment of the present application.
图4示出了本申请实施例提供的固件文件的另一种示意图。Fig. 4 shows another schematic diagram of a firmware file provided by an embodiment of the present application.
图5示出了本申请又一实施例提供的触摸屏固件加载方法的流程图。FIG. 5 shows a flowchart of a method for loading firmware of a touch screen provided by another embodiment of the present application.
图6示出了本申请实施例提供的触摸屏固件加载装置的功能模块图。FIG. 6 shows a functional module diagram of a device for loading firmware of a touch screen provided by an embodiment of the present application.
图7示出了本申请实施例提供的电子设备的结构框图。Fig. 7 shows a structural block diagram of an electronic device provided by an embodiment of the present application.
图8是本申请实施例的用于保存或者携带实现根据本申请实施例的触摸屏固件加载方法的程序代码的存储单元。Fig. 8 is a storage unit for storing or carrying program codes for implementing the method for loading firmware of a touch screen according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application.
固件是担任着一个系统最基础最底层工作的软件,是指设备内部保存的设备“驱动程序”,通过固件,操作系统才能按照标准的设备驱动实现特定机器的运行动作。例如,对于电子设备的触摸屏,可以通过在触摸屏存储器中加载固件,实现对触摸屏的驱动,从而可以在触摸屏进行各种触摸操作。该触摸屏存储器为触摸屏系统的存储器,用于存储与触摸屏操作相关的数据。Firmware is the software that is responsible for the most basic and low-level work of a system. It refers to the device "driver" stored inside the device. Through firmware, the operating system can implement the operation of a specific machine in accordance with the standard device driver. For example, for the touch screen of an electronic device, firmware can be loaded into the memory of the touch screen to drive the touch screen, so that various touch operations can be performed on the touch screen. The touch screen memory is the memory of the touch screen system and is used to store data related to the operation of the touch screen.
发明人发现,有些电子设备在亮屏时,触摸屏的反应比较滞后。例如,电 子设备的屏幕实际亮起的时间相对用户亮屏操作的时间存在较为明显的时间差,极大地影响用户体验。The inventor found that the response of the touch screen of some electronic devices lags behind when the screen is turned on. For example, there is a significant time difference between the time when the screen of an electronic device is actually turned on and the time for the user to turn on the screen, which greatly affects the user experience.
发明人通过对有些电子设备会出现亮屏滞后的问题进行研究后,发现,出现亮屏滞后的电子设备通常为触摸屏储存器没有自带闪存(flash)的存储器,这一类电子设备在每次屏幕亮屏时,都需要终端系统将固件加载到触摸屏存储器。而由于触摸屏可支持的功能较多,加载到触摸屏存储器的固件较大,而加载过程中的通信接口速率有限,加载时间过程,导致触摸屏亮屏滞后。After studying the problem of screen lag in some electronic devices, the inventor found that electronic devices with screen lagging are usually touch screen storage without flash memory. This type of electronic equipment When the screen is on, the terminal system needs to load the firmware to the touch screen memory. However, because the touch screen can support more functions, the firmware loaded into the touch screen memory is larger, and the communication interface rate during the loading process is limited, and the loading time process causes the touch screen to lag behind.
为了解决这一问题,发明人进一步研究发现,触摸屏的工作模式可能不止一种,例如在可能有用户正常使用的使用模式、有开发人员测试触摸屏性能的测试模式、有亮屏对应的工作模式、灭屏对应的工作模式等。不同的工作模式的触摸屏固件通常整合到一起作为一个固件文件,该固件文件较大,加载耗时过长。而电子设备的触摸屏在不同的工作模式下,实际使用到的触摸屏固件不同,也就是说,在一个工作模式下,加载的触摸屏的固件文件包括了所有工作模式的触摸屏固件。In order to solve this problem, the inventor further researched and found that there may be more than one working mode of the touch screen, for example, there may be a normal use mode of the user, a test mode for a developer to test the performance of the touch screen, a working mode corresponding to a bright screen, The working mode corresponding to the off screen, etc. The touch screen firmware of different working modes is usually integrated together as a firmware file. The firmware file is relatively large and takes too long to load. In different working modes, the touch screen firmware of the electronic device actually uses different touch screen firmware. That is to say, in one working mode, the firmware file of the loaded touch screen includes the touch screen firmware of all working modes.
因此,发明人提出了本申请实施例的触摸屏固件加载方法,在每次触摸屏的工作模式发生切换时,将对应当前工作模式的触摸屏固件加载到触摸屏存储器,降低了加载到触摸屏存储器的固件的大小,提高了加载速度。下面将通过具体实施例对本申请实施例提供的触摸屏固件加载方法、装置、电子设备及存储介质进行详细说明。Therefore, the inventor proposes the touch screen firmware loading method of the embodiment of the present application. When the working mode of the touch screen is switched, the touch screen firmware corresponding to the current working mode is loaded into the touch screen memory, which reduces the size of the firmware loaded into the touch screen memory. , Improve the loading speed. The method, device, electronic equipment, and storage medium for loading the touch screen firmware provided in the embodiments of the present application will be described in detail below through specific embodiments.
请参阅图1,示出了本申请实施例提供的触摸屏固件加载方法。该方法可以应用于电子设备的中央处理器,本申请实施例以手机为例进行说明。具体的,该方法包括:Please refer to FIG. 1, which shows a method for loading firmware of a touch screen provided by an embodiment of the present application. This method can be applied to the central processing unit of an electronic device. The embodiment of the present application takes a mobile phone as an example for description. Specifically, the method includes:
步骤S110:检测触摸屏的工作模式是否发生切换。Step S110: Detect whether the working mode of the touch screen is switched.
触摸屏在不同的工作模式下,对作用于触摸屏的触摸操作有不同的反应方式,通过不同的触摸屏固件进行驱动。因此,可以检测触摸屏的工作模式是否发生切换后。In different working modes, the touch screen responds differently to touch operations on the touch screen, and is driven by different touch screen firmware. Therefore, it can be detected whether the working mode of the touch screen has been switched.
步骤S120:若触摸屏的工作模式发生切换,获取对应当前工作模式的触摸屏固件作为待加载固件,其中,触摸屏的不同工作模式对应有不同的触摸屏固件。Step S120: If the working mode of the touch screen is switched, obtain the touch screen firmware corresponding to the current working mode as the firmware to be loaded, where different working modes of the touch screen correspond to different touch screen firmware.
在触摸屏存储器中,存储正在工作的工作模式的触摸屏固件。当工作模式 发生切换后,可以使用新的工作模式的触摸屏固件对触摸屏进行驱动。因此,在工作模式发生切换后,可以获取对应当前工作模式的触摸屏固件,即获取切换后的工作模式的触摸屏固件。在本申请实施例中,为了便于描述,定义获取到的对应当前工作模式的触摸屏固件为待加载固件。In the touch screen memory, the touch screen firmware of the working mode is stored. When the working mode is switched, the touch screen firmware of the new working mode can be used to drive the touch screen. Therefore, after the working mode is switched, the touch screen firmware corresponding to the current working mode can be obtained, that is, the touch screen firmware of the switched working mode can be obtained. In the embodiment of the present application, for ease of description, the acquired touch screen firmware corresponding to the current working mode is defined as the firmware to be loaded.
步骤S130:将所述待加载固件加载到触摸屏存储器。Step S130: Load the firmware to be loaded into the touch screen memory.
将当前工作模式的触摸屏固件加载到触摸屏存储器,通过该加载的触摸屏固件驱动触摸屏对当前工作模式下的触控操作进行反应。The touch screen firmware of the current working mode is loaded into the touch screen memory, and the loaded touch screen firmware drives the touch screen to react to the touch operation in the current working mode.
在本申请实施例中,由于在工作模式切换时,仅将当前工作模式的触摸屏固件加载到触摸屏存储器,不需要将支持触摸屏所有工作模式的固件文件加载到触摸屏存储器,降低了加载时间,提高了触摸屏的反应速度。In the embodiment of this application, since only the touch screen firmware of the current working mode is loaded into the touch screen memory when the working mode is switched, there is no need to load firmware files that support all working modes of the touch screen into the touch screen memory, which reduces the loading time and improves The response speed of the touch screen.
本申请另一实施例提供了一种触摸屏固件加载方法。在该实施例的触摸屏固件加载方法中,包括通过对固件文件的拆分获得对应不同工作模式的固件文件。具体的,请参见图2,该方法包括:Another embodiment of the present application provides a method for loading firmware of a touch screen. In the method for loading the firmware of the touch screen in this embodiment, the firmware files corresponding to different working modes are obtained by splitting the firmware files. Specifically, please refer to Figure 2. The method includes:
步骤S210:拆分固件文件,获得分别对应不同模式标识的触摸屏固件。Step S210: Split the firmware file to obtain the touch screen firmware corresponding to different mode identifiers.
电子设备可以获取到用于对触摸屏进行驱动的固件文件并存储系统存储器,该固件文件中包括了对触摸屏所有工作模式进行驱动的固件,即触摸屏的所有工作模式对应的所有触摸屏固件作为一个固件文件存储于系统存储器。其中,系统存储器与中央处理器电性连接,与触摸屏存储器不同。The electronic device can obtain the firmware file used to drive the touch screen and store the system memory. The firmware file includes the firmware that drives all the working modes of the touch screen, that is, all the touch screen firmware corresponding to all the working modes of the touch screen are used as a firmware file Stored in system memory. Among them, the system memory is electrically connected to the central processing unit, which is different from the touch screen memory.
电子设备获取固件文件的方式可以是,从服务器获取,例如在电子设备的系统升级时,从服务器获取到用于触摸屏驱动的升级版本的固件文件;电子设备也可以从其他电子设备获取固件文件。The electronic device may obtain the firmware file from the server. For example, when the electronic device is upgraded, the firmware file for the upgraded version of the touch screen driver is obtained from the server; the electronic device may also obtain the firmware file from other electronic devices.
电子设备获取到固件文件后,由于该固件文件中包括了各个工作模式的触摸屏固件,可以对该固件文件进行拆分,获取到对应各个工作模式的触摸屏固件。After the electronic device obtains the firmware file, since the firmware file includes the touch screen firmware of each working mode, the firmware file can be split to obtain the touch screen firmware corresponding to each working mode.
在本申请实施例中,不同工作模式对应不同的模式标识,即模式标识与工作模式一一对应,对应工作模式的模式标识表示该工作模式的身份。从而,在将固件拆分后,可以获得分别对应不同模式标识的触摸屏固件。In the embodiment of the present application, different working modes correspond to different mode identifiers, that is, the mode identifiers correspond to the working modes one-to-one, and the mode identifier corresponding to the working mode indicates the identity of the working mode. Therefore, after the firmware is split, the touch screen firmware corresponding to different mode identifiers can be obtained.
在本申请实施例中,固件文件中同一工作模式的触摸屏固件的数据可以相邻存储。对固件文件进行拆分的方式可以是,从固件文件的开始进行读取,并 获取当前读取的触摸屏固件的大小。在读取过程中,检测读取到的文件大小是否等于当前读取的触摸屏固件的大小。In the embodiment of the present application, the data of the touch screen firmware in the same working mode in the firmware file may be stored adjacently. The way to split the firmware file can be to read from the beginning of the firmware file and obtain the size of the currently read touch screen firmware. During the reading process, it is detected whether the size of the read file is equal to the size of the currently read touch screen firmware.
如果当前读取到的文件不等于当前读取的触摸屏固件的大小,则继续读取该固件文件,直到当前读取到的文件等于当前读取的触摸屏固件的大小。如果当前读取到的文件等于当前读取的触摸屏固件的大小,则可以将当前读取到的触摸屏固件从固件文件中拆分,获得拆分出的一个触摸屏固件。并继续对剩余的固件文件开始读取,直到完成对固件文件的读取。If the currently read file is not equal to the size of the currently read touch screen firmware, continue to read the firmware file until the currently read file is equal to the size of the currently read touch screen firmware. If the currently read file is equal to the size of the currently read touch screen firmware, the currently read touch screen firmware can be split from the firmware file to obtain a split touch screen firmware. And continue to read the remaining firmware files until the reading of the firmware files is completed.
例如图3表示了固件文件,固件文件中A、B为不同工作模式的,触摸屏固件A从a1开始至an结束,触摸屏固件B从b1开始至bn结束。从固件文件的开始进行读取,即从a1开始读取,在读取过程中,检测读取到的文件大小是否等于触摸屏固件A的大小。当读取到an时,可以检测到读取到的文件大小等于触摸屏固件A的大小,则将文件A从固件文件中拆分出来,获得触摸屏固件A。继续开始从b1开始读取剩余的固件文件,并且,当读取到bn时,可以检测到读取到的文件大小等于触摸屏固件B的大小,则将文件B从固件文件中拆分出来,获得触摸屏固件B。For example, Figure 3 shows the firmware file. In the firmware file, A and B are in different working modes. The touch screen firmware A starts from a1 to an end, and the touch screen firmware B starts from b1 to bn. Read from the beginning of the firmware file, that is, read from a1. During the reading process, it is detected whether the size of the read file is equal to the size of the touch screen firmware A. When an is read, it can be detected that the size of the read file is equal to the size of the touch screen firmware A, and then the file A is split from the firmware file to obtain the touch screen firmware A. Continue to read the remaining firmware files from b1, and when bn is read, it can be detected that the size of the read file is equal to the size of the touch screen firmware B, then file B is split from the firmware file to obtain Touch screen firmware B.
可选的,在第一种实施方式中,若不同工作模式的触摸屏固件的大小一致,则可以根据固件文件大小以及工作模式的数量,确定每个工作模式的触摸屏固件的大小。Optionally, in the first implementation manner, if the sizes of the touch screen firmware in different working modes are the same, the size of the touch screen firmware in each working mode can be determined according to the size of the firmware file and the number of working modes.
可选的,在第二种实施方式中,各个工作模式的触摸屏固件的大小可能不同。可以在固件文件中,每个触摸屏固件的开始部分的相关字段中存储该触摸屏固件的大小,则在对固件文件的读取过程中,可以确定读取到的文件大小是否等于正在读取的触摸屏固件的大小。Optionally, in the second implementation manner, the size of the touch screen firmware of each working mode may be different. The size of the touch screen firmware can be stored in the relevant field at the beginning of each touch screen firmware in the firmware file, and then in the process of reading the firmware file, it can be determined whether the size of the read file is equal to the touch screen being read The size of the firmware.
可选的,在第三种实施方式中,每个工作模式的触摸屏固件可以有唯一的固件标识,可以有配置文件存储不同固件标识与触摸屏固件大小的对应关系,每个固件标识对应的数据大小等于该固件标识对应的触摸屏固件的大小。在固件文件中,每个触摸屏固件的开始部分的相关字段中存储该触摸屏固件的固件标识,根据固件标识可以获得正在读取的触摸屏固件的大小,从而可以确定读取到的文件是否等于正常读取的触摸屏固件的大小。Optionally, in the third embodiment, the touch screen firmware of each working mode may have a unique firmware identifier, and there may be a configuration file to store the correspondence between different firmware identifiers and the size of the touch screen firmware, and the data size corresponding to each firmware identifier Equal to the size of the touch screen firmware corresponding to the firmware identifier. In the firmware file, the firmware identification of the touch screen firmware is stored in the relevant field at the beginning of each touch screen firmware. According to the firmware identification, the size of the touch screen firmware being read can be obtained, so that it can be determined whether the read file is equal to the normal reading. Take the size of the touch screen firmware.
另外,在本申请实施例中,拆分固件文件后,可以获得对应不同模式标识 的触摸屏固件。In addition, in the embodiment of the present application, after the firmware file is split, the touch screen firmware corresponding to different mode identifiers can be obtained.
在一种实施方式中,不同工作模式下,触摸屏固件的数据有不同,不同触摸屏固件的固件大小有不同,因此,可以设置有不同工作模式的模式标识与固件大小的对应关系,每个模式标识对应的固件大小,表示该模式标识的触摸屏固件的大小。从而,可以根据模式标识与固件大小的对应关系,以及拆分出的各个触摸屏固件的大小,确定各个触摸屏固件对应的模式标识。In one embodiment, the data of the touch screen firmware is different in different working modes, and the firmware size of different touch screen firmware is different. Therefore, the corresponding relationship between the mode identification of different working modes and the size of the firmware can be set, and each mode identification The corresponding firmware size indicates the size of the touch screen firmware identified by the mode. Therefore, the mode identifier corresponding to each touch screen firmware can be determined according to the corresponding relationship between the mode identifier and the size of the firmware, and the size of each touch screen firmware that is separated.
在另一种实施方式中,在拆分出的各个触摸屏固件中,包括触摸屏固件的固件标识。并且,存储有固件标识与模式标识对应关系的配置文件。因此,可以获取拆分出的各个触摸屏固件的固件标识,根据固件标识与模式标识的对应关系,确定各个触摸屏固件对应的模式标识,从而确定各个工作模式对应的触摸屏固件。In another embodiment, each of the separated touch screen firmware includes a firmware identifier of the touch screen firmware. In addition, a configuration file of the corresponding relationship between the firmware identification and the mode identification is stored. Therefore, the firmware identification of each touch screen firmware can be obtained, and the mode identification corresponding to each touch screen firmware can be determined according to the corresponding relationship between the firmware identification and the mode identification, so as to determine the touch screen firmware corresponding to each working mode.
在本申请实施例中,当固件文件更新,则需要重新对新的固件文件进行拆分。因此,还可以检测是否获取到新的固件文件。若获取到新的固件文件,根据该新的固件文件重新确定各个模式标识对应的触摸屏固件。In the embodiment of the present application, when the firmware file is updated, the new firmware file needs to be split again. Therefore, it can also detect whether a new firmware file is obtained. If a new firmware file is obtained, the touch screen firmware corresponding to each mode identifier is re-determined according to the new firmware file.
在一种实施方式中,在获取到新的固件文件时,可以再次对该固件文件进行拆分,获得拆分出的各个触摸屏固件。再更新模式标识对应的触摸屏固件。该实施方式的具体执行可以参见前述实施例,在此不再赘述。In an implementation manner, when a new firmware file is obtained, the firmware file may be split again to obtain each of the split touch screen firmware. Then update the touch screen firmware corresponding to the mode mark. For the specific implementation of this implementation manner, reference may be made to the foregoing embodiments, and details are not described herein again.
在另一种实施方式中,固件文件更新后,可能并非其中所有触摸屏固件都发生更新,因此,可以仅对发生更新的触摸屏固件重新建立与模式标识的对应关系。In another embodiment, after the firmware file is updated, not all of the touch screen firmware may be updated. Therefore, the corresponding relationship with the mode identification may be re-established only for the updated touch screen firmware.
具体的,在该实施方式中,可以确定所述新的固件文件中的更新部分。更新部分可能属于一个触摸屏固件,或多个触摸屏固件,可以从该新的固件文件中拆分出更新部分对应的触摸屏固件。更新部分对应的触摸屏固件,即更新部分所属的触摸屏固件。Specifically, in this embodiment, the updated part in the new firmware file can be determined. The updated part may belong to one touch screen firmware or multiple touch screen firmwares, and the touch screen firmware corresponding to the updated part can be separated from the new firmware file. The touch screen firmware corresponding to the update part, that is, the touch screen firmware to which the update part belongs.
再建立拆分出的触摸屏固件与模式标识的唯一对应关系,重新进行对应的模式标识与旧的触摸屏固件的对应关系被覆盖或取消。The only correspondence between the split touch screen firmware and the mode identification is established, and the correspondence between the corresponding mode identification and the old touch screen firmware is overwritten or cancelled.
例如图4所示,在新的固件文件中,a4至a5区间内的固件数据被更新,可以确定a4至a5区间的固件数据为触摸屏固件A的数据,则可以从该新的固件文件中,拆分出触摸屏固件A,将触摸屏固件A与对应的工作模式的模式标识建立唯一对应关系。固件文件中未更新的触摸屏固件,可以不用再从触摸屏固件中拆分。For example, as shown in Figure 4, in the new firmware file, the firmware data in the interval a4 to a5 is updated, and it can be determined that the firmware data in the interval a4 to a5 is the data of the touch screen firmware A, and then from the new firmware file, Split the touch screen firmware A, and establish a unique correspondence between the touch screen firmware A and the mode identification of the corresponding working mode. The touch screen firmware that is not updated in the firmware file can no longer be split from the touch screen firmware.
在本申请实施例中,固件文件拆分出各个触摸屏固件后,获得的触摸屏固 件可以用于后续步骤中向触摸屏存储器加载。在固件文件未发生更新的情况下,可以不再执行本步骤,而是循环执行步骤S220至步骤S240的步骤。In the embodiment of the present application, after the firmware file is split into each touch screen firmware, the obtained touch screen firmware can be used to load into the touch screen memory in subsequent steps. In the case that the firmware file has not been updated, this step may no longer be executed, but the steps from step S220 to step S240 are executed cyclically.
步骤S220:检测触摸屏的工作模式是否发生切换。Step S220: Detect whether the working mode of the touch screen is switched.
在本申请实施例中,模式切换的触发可以是,用户在触摸屏的触发模式切换操作,如触发由使用模式切换为测试模式;模式切换的触发也可以是,通过与外部电连接的硬件接口接收切换操作,如当检测到有测试设备通过硬件接口接入时,进入测试模式,当检测到测试设备从硬件接口拔出时,退出测试模式,进入使用模式;模式切换的触发也可以是,通过无线数据传输接收到切换指令;模式切换的方式还可以是,电子设备有实体控件接收到切换操作,如通过电子设备的电源键进行亮屏或灭屏的切换,当电子设备由亮屏切换为灭屏,则工作模式则由亮屏下的工作模式切换为灭屏下的工作模式,电子设备由灭屏切换为亮屏,工作模式则由灭屏下的工作模式切换为亮屏下的工作模式。具体模式切换的触发在本申请实施例中并不限定。In the embodiments of the present application, the mode switching trigger may be the user's triggering mode switching operation on the touch screen, such as the trigger switching from the use mode to the test mode; the mode switching trigger may also be received through a hardware interface electrically connected to the outside Switching operation, such as when it is detected that a test device is connected through the hardware interface, enter the test mode, when it is detected that the test device is unplugged from the hardware interface, exit the test mode and enter the use mode; the trigger of the mode switch can also be through The wireless data transmission receives the switching instruction; the mode switching method can also be that the electronic device has a physical control to receive the switching operation, such as switching on or off the screen through the power button of the electronic device. When the electronic device is switched from on to on When the screen is off, the working mode is switched from the working mode under the bright screen to the working mode under the off screen, the electronic device is switched from the off screen to the bright screen, and the working mode is switched from the working mode under the off screen to the working mode under the bright screen. mode. The trigger of the specific mode switching is not limited in the embodiment of the present application.
在本申请实施例中,可以对工作模式是否切换进行检测,并且,在检测到工作模式切换时,可以获得切换后的工作模式。In the embodiment of the present application, whether the working mode is switched can be detected, and when the switching of the working mode is detected, the switched working mode can be obtained.
具体检测方式在本申请实施例中并不限定。作为一种实施方式,可以是,每种模式切换触发时,可以发送广播到广播管理服务,该广播包括切换事件以及切换后的工作模式。可以根据广播管理器是否接收到模式切换的广播,确定触摸屏的工作模式是否发生切换,以及切换后的工作模式。The specific detection method is not limited in the embodiment of the present application. As an implementation manner, when each mode switch is triggered, a broadcast may be sent to the broadcast management service, and the broadcast includes the switch event and the working mode after the switch. It can be determined whether the working mode of the touch screen is switched, and the working mode after the switching, according to whether the broadcasting manager receives the broadcasting of the mode switching.
作为另一种实施方式,可以以一定频率检测触摸屏当前所处的工作模式,在每次检测时,判断当前检测到的工作模式与前一次检测到的工作模式是否相同,若相同,则表示没有发生工作模式切换;若不相同,则可以确定触摸屏的工作模式发生切换。As another implementation manner, the current working mode of the touch screen can be detected at a certain frequency. In each detection, it is determined whether the currently detected working mode is the same as the previously detected working mode. If the same, it means that there is no The work mode switch occurs; if they are not the same, it can be determined that the work mode of the touch screen is switched.
另外,在一些特殊情况下,若电子设备的触摸屏由无工作模式进入有工作模式的状态,则也判定为工作模式切换。例如,电子设备从关机状态开机后,进入到开机后的工作模式,判定为触摸屏的工作模式发生切换。In addition, in some special cases, if the touch screen of the electronic device changes from the non-working mode to the working mode, it is also determined that the working mode is switched. For example, after the electronic device is turned on from the off state, it enters the working mode after being turned on, and it is determined that the working mode of the touch screen is switched.
步骤S230:若触摸屏的工作模式发生切换,根据模式标识与触摸屏固件的对应关系,获取当前工作模式对应的触摸屏固件作为待加载固件。Step S230: If the working mode of the touch screen is switched, the touch screen firmware corresponding to the current working mode is acquired as the firmware to be loaded according to the corresponding relationship between the mode identifier and the firmware of the touch screen.
触摸屏的不同工作模式对应有不同的触摸屏固件。在确定模式发生切换并 确定当前的工作模式后,可以根据模式标识与触摸屏固件的对应关系,获得当前工作模式的模式标识所对应的触摸屏固件,定义为待加载固件。例如,在模式标识与触摸屏固件的对应关系中,模式标识M1对应触摸屏固件m1,模式标识M2对应触摸屏固件m2,而当前工作模式的模式标识为M1,则可以确定待加载固件m1。其中,可以理解的,该当前工作模式为切换后的工作模式。The different working modes of the touch screen correspond to different touch screen firmware. After determining the mode switch and determining the current working mode, the touch screen firmware corresponding to the mode identification of the current working mode can be obtained according to the corresponding relationship between the mode identification and the touch screen firmware, which is defined as the firmware to be loaded. For example, in the corresponding relationship between the mode identification and the touch screen firmware, the mode identification M1 corresponds to the touch screen firmware m1, the mode identification M2 corresponds to the touch screen firmware m2, and the mode identification of the current working mode is M1, the firmware m1 to be loaded can be determined. Among them, it can be understood that the current working mode is the switched working mode.
可选的,在本申请实施例中,为了确定是否存在当前工作模式对应的触摸屏固件,在获取当前工作模式对应的触摸屏固件之前,可以判断是否存储有当前工作模式对应的触摸屏固件。若有,可以获取对应当前工作模式的触摸屏固件。Optionally, in this embodiment of the application, in order to determine whether there is touch screen firmware corresponding to the current working mode, before acquiring the touch screen firmware corresponding to the current working mode, it can be determined whether the touch screen firmware corresponding to the current working mode is stored. If so, you can get the touch screen firmware corresponding to the current working mode.
其中,判断的方式可以是,若在模式标识与触摸屏固件的对应关系中,判断是否存在当前工作模式的模式标识,如存在,则判定当前工作模式对应有触摸屏固件。Wherein, the way of judging may be, if in the corresponding relationship between the mode identification and the touch screen firmware, it is judged whether there is a mode identification of the current working mode, and if so, it is judged that the current working mode corresponds to the touch screen firmware.
若未存储有当前工作模式对应的触摸屏固件,在一种实施方式中,可以显示不支持当前工作模式的提示信息。在另一种实施方式中,可以向服务器发起固件获取请求,用于获取当前工作模式对应的触摸屏固件。可选的,服务器返回的可以是固件文件,该固件文件中,包括当前工作模式对应的触摸屏固件,也包括其他工作模式的触摸屏固件,则对接收到的固件文件进行拆分获得对应各个工作模式的触摸屏固件后,再获取对应当前工作模式的触摸屏固件。可选的,服务器返回的也可以是请求的当前工作模式对应的触摸屏固件,则若接收到服务器返回的触摸屏固件,可以获取对应当前工作模式的触摸屏固件。If the touch screen firmware corresponding to the current working mode is not stored, in one embodiment, a prompt message that the current working mode is not supported may be displayed. In another implementation manner, a firmware acquisition request may be initiated to the server for acquiring the touch screen firmware corresponding to the current working mode. Optionally, what the server returns may be a firmware file. The firmware file includes the touch screen firmware corresponding to the current working mode, as well as touch screen firmware in other working modes, then the received firmware file is split to obtain the corresponding working modes After the touch screen firmware is installed, obtain the touch screen firmware corresponding to the current working mode. Optionally, the server may return the touch screen firmware corresponding to the requested current working mode. If the touch screen firmware returned by the server is received, the touch screen firmware corresponding to the current working mode may be obtained.
步骤S240:将所述待加载固件加载到触摸屏存储器。Step S240: Load the firmware to be loaded into the touch screen memory.
中央处理器将待加载固件加载到触摸屏存储器,具体的,可以由电子设备的终端系统将待加载固件加载到触摸屏存储器。触摸屏存储器存储的触摸屏固件更新为当前工作模式的触摸屏固件。The central processing unit loads the firmware to be loaded into the touch screen memory. Specifically, the terminal system of the electronic device may load the firmware to be loaded into the touch screen memory. The touch screen firmware stored in the touch screen memory is updated to the touch screen firmware of the current working mode.
在本申请实施例中,将获取到的固件文件进行拆分,获得对应各个工作模式的触摸屏固件。在电子设备的工作模式切换时,可以获取切换后的工作模式对应的触摸屏固件,仅将切换后工作模式的触摸屏固件加载到触摸屏存储器,提高加载速度,从而提高触摸屏的反应速度。In the embodiment of the present application, the obtained firmware file is split to obtain the touch screen firmware corresponding to each working mode. When the working mode of the electronic device is switched, the touch screen firmware corresponding to the switched working mode can be obtained, and only the touch screen firmware of the switched working mode is loaded into the touch screen memory to increase the loading speed, thereby improving the response speed of the touch screen.
本申请还提供了一实施例,本实施例中,举例说明在具体的工作模式切换下,电子设备的触摸屏固件加载方式。在该实施例中,触摸屏的工作模式可以包括亮屏下的工作模式以及灭屏下的工作模式。亮屏下的工作模式即电子设备处于亮屏状态时,触摸屏对触摸操作的反馈;灭屏下的工作模式,即电子设备 处于灭屏状态时,触摸屏对触摸操作的反馈,如灭屏时的手势唤醒功能。具体的,在该实施例中,触摸屏固件加载方法具体包括:This application also provides an embodiment. In this embodiment, an example is given to illustrate how the touch screen firmware of an electronic device is loaded in a specific work mode switch. In this embodiment, the working mode of the touch screen may include a working mode when the screen is on and a working mode when the screen is off. The working mode under the bright screen is the feedback of the touch screen to the touch operation when the electronic device is in the on-screen state; the working mode under the off screen is the feedback of the touch screen to the touch operation when the electronic device is in the off-screen state, such as when the screen is off Gesture wake-up function. Specifically, in this embodiment, the method for loading the touch screen firmware specifically includes:
步骤S310:检测触摸屏的亮灭状态是否发生切换。若所述触摸屏的亮灭状态发生切换,判定所述触摸屏的工作模式发生切换。Step S310: Detect whether the on-off state of the touch screen is switched. If the on-off state of the touch screen is switched, it is determined that the working mode of the touch screen is switched.
触摸屏包括亮屏下的工作模式以及灭屏下的工作模式,则可以根据触摸屏的亮灭状态确定触摸屏的工作模式是否发生切换。The touch screen includes a working mode when the screen is on and a working mode when the screen is off. Then, it can be determined whether the working mode of the touch screen is switched according to the on and off state of the touch screen.
若触摸屏由亮屏切换为灭屏,则确定工作模式由亮屏的工作模式切换为灭屏的工作模式;若触摸屏由灭屏切换为亮屏,则确定工作模式由灭屏的工作模式切换为亮屏的工作模式。If the touch screen is switched from bright screen to off screen, it is determined that the working mode is switched from bright screen working mode to off screen working mode; if the touch screen is switched from off screen to bright screen, it is determined that the working mode is switched from off screen working mode to off screen working mode. Bright screen working mode.
可选的,电子设备在出厂前需要进行触摸屏性能测试,在进行售后检测、维修过程中可能也需要进行触摸屏的性能测试,在本申请实施例中,触摸屏还可以有用于性能测试的测试模式以及用于普通用户使用的使用模式。另外,测试模式可以分为亮屏下的测试模式以及灭屏状态下的测试模式;使用模式可以分为亮屏下的使用模式以及灭屏下的使用模式。Optionally, the electronic device needs to perform a touch screen performance test before leaving the factory, and may also need to perform a touch screen performance test during after-sales testing and maintenance. In this embodiment of the application, the touch screen may also have a test mode for performance testing and The usage mode used by ordinary users. In addition, the test mode can be divided into the test mode under the bright screen and the test mode under the off-screen state; the use mode can be divided into the use mode under the bright screen and the use mode under the off-screen.
因此,在一种实施方式中,检测触摸屏的工作模式是否发生切换,可以包括,若接收到测试触发操作且当前为亮屏状态,确定所述触摸屏的工作模式切换为亮屏下的测试模式。若接收到测试触发操作且当前为灭屏状态,确定所述触摸屏的工作模式切换为灭屏下的测试模式。若接收到测试退出操作且当前为亮屏状态,确定所述触摸屏的工作模式切换为亮屏下的使用模式。若接收到测试退出操作且当前为灭屏状态,确定所述触摸屏的工作模式切换为灭屏下的使用模式。其中,测试触发操作为控制触摸屏进入测试模式的操作,测试退出操作为控制触摸屏退出测试模式,进入使用模式的操作。Therefore, in an embodiment, detecting whether the working mode of the touch screen is switched may include, if a test trigger operation is received and the screen is currently in a bright screen state, determining that the working mode of the touch screen is switched to a test mode under bright screen. If the test trigger operation is received and the screen is currently in the off-screen state, it is determined that the working mode of the touch screen is switched to the off-screen test mode. If the test exit operation is received and the screen is currently in the bright screen state, it is determined that the working mode of the touch screen is switched to the use mode under the bright screen. If the test exit operation is received and the screen is currently in the off-screen state, it is determined that the working mode of the touch screen is switched to the off-screen use mode. Among them, the test trigger operation is the operation of controlling the touch screen to enter the test mode, and the test exit operation is the operation of controlling the touch screen to exit the test mode and enter the use mode.
在该实施方式中,电子设备可以通过与外部电连接的硬件接口接收测试触发操作以及测试退出操作,或者可以通过接收无线信号接收测试触发操作以及测试退出操作,从而不管在灭屏状态还是亮屏状态,都可以控制电子设备在测试模式以及使用模式之间切换。In this embodiment, the electronic device can receive the test trigger operation and the test exit operation through a hardware interface electrically connected to the outside, or can receive the test trigger operation and the test exit operation by receiving a wireless signal, so that it is no matter whether the screen is off or on. Status, can control the electronic device to switch between test mode and use mode.
在另一种实施方式中,电子设备的测试触发操作以及测试退出操作需要在亮屏下通过相关控件触发,则检测触摸屏的工作模式是否发生切换,可以包括,若接收到测试触发操作,进入亮屏下的测试模式,并且在接收到测试退出操作之前,触摸屏若切换为灭屏状态,进入灭屏下的测试模式,若由灭屏状态切换为亮屏状态,则进入亮屏下的测试模式;若接收到测试退出操作,则进入亮屏下的使用模式,并且在接收到测试触发操作之前,触摸屏若切换为灭屏状态, 进入灭屏下的使用模式,若由灭屏状态切换为亮屏状态,则进入亮屏下的使用模式。In another embodiment, the test trigger operation and the test exit operation of the electronic device need to be triggered by related controls when the screen is turned on, then detecting whether the working mode of the touch screen is switched, which may include, if the test trigger operation is received, entering the light Test mode under the screen, and before receiving the test exit operation, if the touch screen is switched to the off-screen state, it enters the test mode under the off-screen state, and if it is switched from the off-screen state to the on-screen state, it enters the test mode under the on-screen state ; If the test exit operation is received, it will enter the use mode under the bright screen, and before the test trigger operation is received, if the touch screen is switched to the off-screen state, it enters the off-screen use mode, if the off-screen state is switched to on Screen status, then enter the use mode under bright screen.
步骤S320:若触摸屏的工作模式发生切换,获取对应当前工作模式的触摸屏固件作为待加载固件。Step S320: If the working mode of the touch screen is switched, obtain the touch screen firmware corresponding to the current working mode as the firmware to be loaded.
当触摸屏由亮屏切换为灭屏,则获取灭屏状态下工作模式的触摸屏固件;若触摸屏有灭屏切换为亮屏,则获取亮屏状态下工作模式的触摸屏固件。When the touch screen is switched from on to off, then the touch screen firmware in the working mode in the off state is obtained; if the touch screen has the off screen and switched to the on, then the touch screen firmware in the working mode in the on state is obtained.
若触摸屏的工作模式包括亮屏下的测试模式以及使用模式,灭屏下的测试模式以及使用模式,则若当前工作模式为亮屏下的测试模式,则获取亮屏下测试模式的触摸屏固件;若当前工作模式为亮屏下的使用模式,则获取亮屏下使用模式的触摸屏固件;若当前工作模式为灭屏下的使用模式,则获取灭屏下使用模式的触摸屏固件;若当前工作模式为灭屏下的测试模式,则获取灭屏下测试模式的触摸屏固件。If the working mode of the touch screen includes the test mode and use mode under the bright screen, the test mode and use mode under the off screen, and if the current working mode is the test mode under the bright screen, obtain the touch screen firmware of the test mode under the bright screen; If the current working mode is the use mode under bright screen, then obtain the touch screen firmware of the use mode under bright screen; if the current work mode is the use mode under the off-screen use mode, obtain the touch screen firmware of the use mode under off-screen mode; if the current working mode For the test mode in the off-screen mode, obtain the touch screen firmware in the off-screen test mode.
步骤S330:将待加载固件加载到触摸屏存储器。Step S330: Load the firmware to be loaded into the touch screen memory.
本步骤可以参见前述实施例对应的步骤,在此不再赘述。For this step, reference may be made to the steps corresponding to the foregoing embodiments, and details are not described herein again.
另外,可选的,由于在触摸屏存储器不包括闪存时,每次亮屏时需要向触摸屏存储器加载固件,从而存在将支持触摸屏所有工作模式的固件加载到触摸屏存储器时,影响亮屏速度。本申请实施例分工作模式将触摸屏固件加载到触摸屏存储器,以避免对亮屏速度的影响。而若触摸屏存储器包括闪存,则可以直接读取闪存中的固件文件。因此,在本申请实施例中,可以检测所述电子设备的触摸屏存储器是否包括闪存;若不存在闪存,则执行本申请实施例根据工作模式的切换加载触摸屏固件的方法,例如可以执行检测触摸屏的工作模式是否发生切换的步骤。In addition, optionally, since the touch screen memory does not include flash memory, firmware needs to be loaded into the touch screen memory every time the screen is turned on, so that when firmware supporting all working modes of the touch screen is loaded into the touch screen memory, the screen lighting speed is affected. In the embodiment of the present application, the touch screen firmware is loaded into the touch screen memory according to the working mode, so as to avoid the influence on the screen lighting speed. If the touch screen memory includes flash memory, the firmware file in the flash memory can be directly read. Therefore, in the embodiment of the present application, it can be detected whether the touch screen memory of the electronic device includes flash memory; if there is no flash memory, the method of loading the touch screen firmware according to the switching of the working mode in the embodiment of the present application can be executed, for example, the detection of the touch screen can be executed. Whether the work mode is switched.
当然,在本申请实施例中,也可以不进行是否有闪存的检测,若电子设备中存储有执行本申请实施例的触摸屏固件加载方法的程序,则认为该电子设备不存在闪存,分工作模式对触摸屏存储器进行触摸屏固件加载。Of course, in the embodiment of this application, the detection of whether there is a flash memory may not be performed. If the electronic device stores a program that executes the method for loading firmware of the touch screen in the embodiment of this application, it is considered that the electronic device does not have flash memory, and it is divided into working modes. Load the touch screen firmware to the touch screen memory.
在本申请实施例中,当触摸屏发生亮灭切换时,可以确定触摸屏的工作模式发生切换,或者接收到测试触发操作或测试退出操作,也可以确定触摸屏的工作模式发生切换。获取切换后的工作模式对应的触摸屏固件,加载到触摸屏存储器。In the embodiment of the present application, when the touch screen is switched on and off, it can be determined that the working mode of the touch screen is switched, or a test trigger operation or a test exit operation is received, and it can also be determined that the working mode of the touch screen is switched. Obtain the touch screen firmware corresponding to the switched working mode and load it into the touch screen memory.
步骤S340:若所述触摸屏切换到亮屏状态,将当前工作模式的触摸屏固件加载到触摸屏存储器后,在所述触摸屏保持亮屏的过程中,向所述触摸屏存储器加载其他工作模式的触摸屏固件。Step S340: If the touch screen is switched to the bright screen state, after loading the touch screen firmware of the current working mode into the touch screen memory, while the touch screen remains on, load the touch screen firmware of other working modes to the touch screen memory.
在本申请实施例中,步骤S340可以作为一个可选的步骤。由于在亮屏时,需要向触摸屏存储器中写入触摸屏固件,则在亮屏时,先将当前工作模式的触摸屏固件加载到触摸屏存储器,以使加载到触摸屏存储器的触摸屏固件不至于过大,提高亮屏反应速度。In this embodiment of the present application, step S340 may be used as an optional step. Since the touch screen firmware needs to be written to the touch screen memory when the screen is on, the current working mode of the touch screen firmware is first loaded into the touch screen memory when the screen is on, so that the touch screen firmware loaded into the touch screen memory will not be too large and improve Bright screen response speed.
在保持亮屏的过程中,当将当前工作模式的触摸屏固件加载完成后,可以继续加载其他工作模式的触摸屏固件,以使当触摸屏切换为其他工作模式后,可以不需要加载触摸屏固件,更快地提高触摸屏的处理速度。In the process of keeping the screen on, after loading the touch screen firmware in the current working mode, you can continue to load the touch screen firmware in other working modes, so that when the touch screen is switched to other working modes, there is no need to load the touch screen firmware, which is faster Improve the processing speed of the touch screen.
在该步骤选择执行的实施例中,可以仅在检测到触摸屏的由灭屏切换为亮屏时,获取对应当前工作模式的触摸屏固件加载到触摸屏存储器。In the embodiment where this step is selected and executed, it is possible to obtain the touch screen firmware corresponding to the current working mode and load it into the touch screen memory only when it is detected that the touch screen is switched from off to on.
可选的,若触摸屏的工作模式包括亮屏下的使用模式以及测试模式,灭屏下的使用模式以及测试模式,可以是,当所述触摸屏的工作模式切换为亮屏下的测试模式,将亮屏下的测试模式对应的触摸屏固件加载到所述触摸屏存储器后,在所述触摸屏保持亮屏的过程中,触摸屏由亮屏下的测试模式切换为亮屏下的使用模式的可能性较高,可以将亮屏下的使用模式对应的触摸屏固件向所述触摸屏存储器加载。并且,若在亮屏过程中发生工作模式的切换,由于被切换到的工作模式的触摸屏固件已经加载到触摸屏存储器,可以不必再向触摸屏存储器加载切换后的工作模式对应的触摸屏固件。Optionally, if the working mode of the touch screen includes the use mode and the test mode under the bright screen, the use mode and the test mode under the off screen, it may be that when the working mode of the touch screen is switched to the test mode under the bright screen, the After the touch screen firmware corresponding to the test mode under the bright screen is loaded into the touch screen memory, it is more likely that the touch screen will switch from the test mode under the bright screen to the use mode under the bright screen while the touch screen remains on. , The touch screen firmware corresponding to the usage mode under the bright screen can be loaded to the touch screen memory. In addition, if the working mode is switched during the screen lighting process, since the touch screen firmware of the switched working mode has been loaded into the touch screen memory, there is no need to load the touch screen firmware corresponding to the switched working mode to the touch screen memory.
当所述触摸屏的工作模式切换为灭屏下的测试模式,触摸屏由灭屏下的测试模式切换为灭屏下的使用模式的可能性较高,可以将灭屏下的测试模式对应的触摸屏固件加载到所述触摸屏存储器后,在所述触摸屏保持灭屏的过程中,将灭屏下的使用模式对应的触摸屏固件向所述触摸屏存储器加载。并且,若在灭屏过程中发生工作模式的切换,由于被切换到的工作模式的触摸屏固件已经加载到触摸屏存储器,可以不必再向触摸屏存储器加载切换后的工作模式对应的触摸屏固件。When the working mode of the touch screen is switched to the test mode with the screen off, there is a higher possibility that the touch screen will be switched from the test mode under the off screen to the use mode under the off screen. You can change the touch screen firmware corresponding to the test mode under the off screen After being loaded into the touch screen memory, while the touch screen remains off, the touch screen firmware corresponding to the use mode under the off screen is loaded to the touch screen memory. Moreover, if the working mode is switched during the screen-off process, since the touch screen firmware of the switched working mode has been loaded into the touch screen memory, there is no need to load the touch screen firmware corresponding to the switched working mode to the touch screen memory.
在当前工作模式对应的触摸屏固件加载到触摸屏存储器后,在其他工作模式被切换到以前,通过提前将其他工作模式的触摸屏固件加载,提高了各个工作模式下触摸屏的反应速度。After the touch screen firmware corresponding to the current working mode is loaded into the touch screen memory, before other working modes are switched to, the touch screen firmware of other working modes is loaded in advance to improve the response speed of the touch screen in each working mode.
本申请实施例还提供了一种触摸屏固件加载装置400。请参见图6,该装置400可以包括检测模块410,用于检测触摸屏的工作模式是否发生切换;固件获取模块420,用于若触摸屏的工作模式发生切换,获取对应当前工作模式的触摸屏固件作为待加载固件,其中,触摸屏的不同工作模式对应有不同的触摸屏固件;加载模块430,用于将待加载固件加载到触摸屏存储器。The embodiment of the present application also provides a touch screen firmware loading device 400. Referring to FIG. 6, the device 400 may include a detection module 410 for detecting whether the working mode of the touch screen is switched; and a firmware obtaining module 420 for obtaining the touch screen firmware corresponding to the current working mode as a standby if the working mode of the touch screen is switched. Loading firmware, where different working modes of the touch screen correspond to different touch screen firmware; the loading module 430 is used to load the firmware to be loaded into the touch screen memory.
可选的,在本申请是实施例中,不同工作模式可以对应不同的模式标识。固件获取模块420可以用于根据模式标识与触摸屏固件的对应关系,获取当前工作模式对应的触摸屏固件。Optionally, in the embodiment of this application, different working modes may correspond to different mode identifiers. The firmware obtaining module 420 may be used to obtain the touch screen firmware corresponding to the current working mode according to the corresponding relationship between the mode identifier and the touch screen firmware.
可选的,所述触摸屏的所有工作模式对应的所有触摸屏固件作为一个固件文件存储于系统存储器。所述装置400还包括拆分模块,该拆分模块可以包括拆分单元,拆分所述固件文件,触摸屏固件获取单元,用于获得分别对应不同模式标识的触摸屏固件。Optionally, all touch screen firmware corresponding to all working modes of the touch screen are stored in the system memory as a firmware file. The device 400 further includes a splitting module, the splitting module may include a splitting unit that splits the firmware file, and a touch screen firmware acquisition unit for acquiring touch screen firmware corresponding to different mode identifiers.
可选的,拆分单元可以用于从所述固件文件的开始进行读取,获取当前读取的触摸屏固件的大小,检测读取到的文件大小是否等于所述当前读取的触摸屏固件的大小;若是,将当前读取到的触摸屏固件从所述固件文件拆分,并继续开始读取所述固件文件;若否,继续读取所述固件文件。Optionally, the splitting unit may be used to read from the beginning of the firmware file, obtain the size of the currently read touch screen firmware, and detect whether the read file size is equal to the size of the currently read touch screen firmware If yes, split the currently read touch screen firmware from the firmware file, and continue to read the firmware file; if not, continue to read the firmware file.
可选的,触摸屏固件获取单元可以用于根据模式标识与固件大小的对应关系,以及拆分出的各个触摸屏固件的大小,确定各个触摸屏固件对应的模式标识。Optionally, the touch screen firmware obtaining unit may be used to determine the mode identification corresponding to each touch screen firmware according to the corresponding relationship between the mode identification and the size of the firmware, and the size of each touch screen firmware that is split.
可选的,触摸屏固件获取单元可以用于获取拆分出的各个触摸屏固件的固件标识;根据固件标识与模式标识的对应关系,确定各个触摸屏固件对应的模式标识。Optionally, the touch screen firmware obtaining unit may be used to obtain the firmware identification of each touch screen firmware that has been split; and determine the mode identification corresponding to each touch screen firmware according to the corresponding relationship between the firmware identification and the mode identification.
可选的,拆分模块还可以用于检测是否获取到新的固件文件。若是,确定所述新的固件文件中的更新部分;从所述新的固件文件中拆分出更新部分对应的触摸屏固件;建立拆分出的触摸屏固件与模式标识的唯一对应关系。Optionally, the split module can also be used to detect whether a new firmware file is obtained. If yes, determine the update part in the new firmware file; split the touch screen firmware corresponding to the update part from the new firmware file; establish a unique correspondence between the split touch screen firmware and the mode identifier.
可选的,该装置还可以包括判断模块,用于判断是否存储有当前工作模式对应的触摸屏固件;若有,固件获取模块420获取对应当前工作模式的触摸屏固件。Optionally, the device may further include a judgment module for judging whether the touch screen firmware corresponding to the current working mode is stored; if so, the firmware obtaining module 420 obtains the touch screen firmware corresponding to the current working mode.
可选的,该装置还可以包括固件下载模块,用于若未存储有当前工作模式对应的触摸屏固件,向服务器发起固件获取请求,用于获取当前工作模式对应的触摸屏固件;若接收到服务器返回的触摸屏固件,固件获取模块420获取对应当前工作模式的触摸屏固件。Optionally, the device may also include a firmware download module, which is used to initiate a firmware acquisition request to the server if the touch screen firmware corresponding to the current working mode is not stored, for acquiring the touch screen firmware corresponding to the current working mode; The firmware acquisition module 420 acquires the touch screen firmware corresponding to the current working mode.
可选的,触摸屏的工作模式可以包括亮屏下的工作模式以及灭屏下的工作模式。检测模块410可以用于检测触摸屏的亮灭状态是否发生切换;若所述触摸屏的亮灭状态发生切换,判定所述触摸屏的工作模式发生切换。Optionally, the working mode of the touch screen may include a working mode when the screen is on and a working mode when the screen is off. The detection module 410 may be used to detect whether the on-off state of the touch screen is switched; if the on-off state of the touch screen is switched, it is determined that the working mode of the touch screen is switched.
可选的,加载模块430还可以用于,若所述触摸屏切换到亮屏状态,将当前工作模式的触摸屏固件加载到触摸屏存储器后,在所述触摸屏保持亮屏的过 程中,向所述触摸屏存储器加载其他工作模式的触摸屏固件。Optionally, the loading module 430 may also be used to, if the touch screen is switched to the on-screen state, after loading the touch screen firmware of the current working mode into the touch screen memory, while the touch screen remains on, send the touch screen to the touch screen. The memory loads the touch screen firmware of other working modes.
可选的,触摸屏的工作模式可以包括亮屏下的使用模式以及测试模式,灭屏下的使用模式以及测试模式。检测模块410还可以用于若接收到测试触发操作且当前为亮屏状态,确定所述触摸屏的工作模式切换为亮屏下的测试模式;若接收到测试触发操作且当前为灭屏状态,确定所述触摸屏的工作模式切换为灭屏下的测试模式;若接收到测试退出操作且当前为亮屏状态,确定所述触摸屏的工作模式切换为亮屏下的使用模式;若接收到测试退出操作且当前为灭屏状态,确定所述触摸屏的工作模式切换为灭屏下的使用模式。Optionally, the working mode of the touch screen may include a use mode and a test mode when the screen is on, and a use mode and a test mode when the screen is off. The detection module 410 can also be used to determine that if the test trigger operation is received and the screen is currently in the on-screen state, determine that the working mode of the touch screen is switched to the test mode under the on-screen; The working mode of the touch screen is switched to the test mode with the screen off; if the test exit operation is received and the screen is currently on, it is determined that the working mode of the touch screen is switched to the use mode with the bright screen; if the test exit operation is received And it is currently in the off-screen state, and it is determined that the working mode of the touch screen is switched to the off-screen use mode.
可选的,加载模块430还可以用于,当所述触摸屏的工作模式切换为亮屏下的测试模式,将亮屏下的测试模式对应的触摸屏固件加载到所述触摸屏存储器后,在所述触摸屏保持亮屏的过程中,将亮屏下的使用模式对应的触摸屏固件向所述触摸屏存储器加载;当所述触摸屏的工作模式切换为灭屏下的测试模式,将灭屏下的测试模式对应的触摸屏固件加载到所述触摸屏存储器后,在所述触摸屏保持灭屏的过程中,将灭屏下的使用模式对应的触摸屏固件向所述触摸屏存储器加载。Optionally, the loading module 430 may also be used to: when the working mode of the touch screen is switched to the test mode under the bright screen, after loading the touch screen firmware corresponding to the test mode under the bright screen to the touch screen memory, after While the touch screen remains on, load the touch screen firmware corresponding to the usage mode under the bright screen to the touch screen memory; when the working mode of the touch screen is switched to the test mode under the off-screen, the test mode under the off-screen is corresponding After the touch screen firmware of is loaded into the touch screen memory, while the touch screen remains off, the touch screen firmware corresponding to the use mode under the off screen is loaded to the touch screen memory.
可选的,该装置400的检测模块可以通过与外部电连接的硬件接口接收测试触发操作以及测试退出操作。Optionally, the detection module of the device 400 may receive a test trigger operation and a test exit operation through a hardware interface electrically connected to the outside.
可选的,该装置还可以包括闪存检查模块,用于检测所述电子设备的触摸屏存储器是否包括闪存。若不包括,检测模块410检测触摸屏的工作模式是否发生切换。Optionally, the device may further include a flash memory checking module, which is used to detect whether the touch screen memory of the electronic device includes flash memory. If not included, the detection module 410 detects whether the working mode of the touch screen is switched.
本申请实施例提供的触摸屏固件加载方法、装置、电子设备及存储介质,可以提高触摸屏固件加载速率和使用效率,提高系统亮屏速度,提高用户体验。并且,在触摸屏存储器不包括闪存的情况下使用本申请实施例提供的触摸屏固件加载方法及装置,节省存储器的成本。The touch screen firmware loading method, device, electronic device, and storage medium provided by the embodiments of the present application can increase the loading rate and use efficiency of the touch screen firmware, increase the system screen brightness speed, and improve user experience. In addition, the method and device for loading the firmware of the touch screen provided by the embodiments of the present application are used when the touch screen memory does not include a flash memory, thereby saving the cost of the memory.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述的各个方法实施例之间可以相互参照;上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and concise description, the above-mentioned method embodiments can be referred to each other; for the specific working process of the above-described device and module, please refer to the corresponding process in the aforementioned method embodiment. , I won’t repeat it here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In the several embodiments provided in this application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软 件功能模块的形式实现。各个模块可以配置在不同的电子设备中,也可以配置在相同的电子设备中,本申请实施例并不限定。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software function modules. Each module can be configured in different electronic devices, and can also be configured in the same electronic device, which is not limited in the embodiment of the present application.
请参考图7,其示出了本申请实施例提供的一种电子设备500的结构框图。该电子设备500可以是智能手机、可穿戴设备、电子阅读器、平板电脑、计算机等智能设备。该电子设备可以包括一个或多个处理器510(图中仅示出一个),存储器520以及一个或多个程序。其中,存储器可以包括系统存储器以及触摸屏存储器,系统存储器用于存储电子设备的系统数据以及系统调用的各种文件等,所述一个或多个程序被存储在可以存储在系统存储器中,并被配置为由一个或多个处理器510执行。所述一个或多个程序配置用于执行前述实施例所描述的方法。触摸屏存储器用于存储触摸屏操作系统以及触摸屏相关的使用文件,例如可以存储触摸屏固件。Please refer to FIG. 7, which shows a structural block diagram of an electronic device 500 provided by an embodiment of the present application. The electronic device 500 may be a smart device such as a smart phone, a wearable device, an e-reader, a tablet computer, or a computer. The electronic device may include one or more processors 510 (only one is shown in the figure), a memory 520, and one or more programs. The memory may include a system memory and a touch screen memory. The system memory is used to store system data of the electronic device and various files called by the system. The one or more programs are stored in the system memory and configured It is executed by one or more processors 510. The one or more programs are configured to execute the methods described in the foregoing embodiments. The touch screen memory is used to store the touch screen operating system and the use files related to the touch screen, for example, it can store the touch screen firmware.
处理器510可以包括一个或者多个处理核。处理器510利用各种接口和线路连接整个电子设备500内的各个部分,通过运行或执行存储在存储器520内的指令、程序、代码集或指令集,以及调用存储在存储器520内的数据,执行电子设备500的各种功能和处理数据。可选地,处理器510可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器510可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器510中,单独通过一块通信芯片进行实现。The processor 510 may include one or more processing cores. The processor 510 uses various interfaces and lines to connect various parts of the entire electronic device 500, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 520, and calling data stored in the memory 520. Various functions and processing data of the electronic device 500. Optionally, the processor 510 may adopt at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A kind of hardware form to realize. The processor 510 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 510, but may be implemented by a communication chip alone.
存储器520可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器520可用于存储指令、程序、代码、代码集或指令集。存储器520可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令、用于实现上述各个方法实施例的指令等。存储数据区还可以电子设备在使用中所创建的数据等。The memory 520 may include random access memory (RAM) or read-only memory (Read-Only Memory). The memory 520 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 520 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing each of the foregoing method embodiments, and the like. The data storage area can also be the data created by the electronic device in use, etc.
请参考图8,其示出了本申请实施例提供的一种计算机可读存储介质 的结构框图。该计算机可读存储介质600中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to Fig. 8, which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable storage medium 600 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
计算机可读存储介质600可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质600包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质600具有执行上述方法中的任何方法步骤的程序代码610的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码610可以例如以适当形式进行压缩。The computer-readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 600 has storage space for the program code 610 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products. The program code 610 may be compressed in a suitable form, for example.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features thereof are equivalently replaced; these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种触摸屏固件加载方法,其特征在于,所述方法包括:A method for loading firmware of a touch screen, characterized in that the method includes:
    检测触摸屏的工作模式是否发生切换;Detect whether the working mode of the touch screen is switched;
    若触摸屏的工作模式发生切换,获取对应当前工作模式的触摸屏固件作为待加载固件,其中,触摸屏的不同工作模式对应有不同的触摸屏固件;If the working mode of the touch screen is switched, obtain the touch screen firmware corresponding to the current working mode as the firmware to be loaded, where different working modes of the touch screen correspond to different touch screen firmware;
    将所述待加载固件加载到触摸屏存储器。Loading the firmware to be loaded into the touch screen memory.
  2. 根据权利要求1所述的方法,其特征在于,不同工作模式对应不同的模式标识,所述获取对应当前工作模式的触摸屏固件,包括:The method according to claim 1, wherein different working modes correspond to different mode identifiers, and said obtaining the touch screen firmware corresponding to the current working mode comprises:
    根据模式标识与触摸屏固件的对应关系,获取当前工作模式对应的触摸屏固件。According to the corresponding relationship between the mode identifier and the touch screen firmware, the touch screen firmware corresponding to the current working mode is obtained.
  3. 根据权利要求2所述的方法,其特征在于,所述触摸屏的所有工作模式对应的所有触摸屏固件作为一个固件文件存储于系统存储器,所述获取对应当前工作模式的触摸屏固件之前,还包括:The method according to claim 2, wherein all touch screen firmware corresponding to all working modes of the touch screen are stored as a firmware file in the system memory, and before the acquiring the touch screen firmware corresponding to the current working mode, the method further comprises:
    拆分所述固件文件,获得分别对应不同模式标识的触摸屏固件。Split the firmware file to obtain touch screen firmware corresponding to different mode identifiers.
  4. 根据权利要求3所述的方法,其特征在于,所述拆分所述固件文件,包括:The method according to claim 3, wherein said splitting said firmware file comprises:
    从所述固件文件的开始进行读取,获取当前读取的触摸屏固件的大小,检测读取到的文件大小是否等于所述当前读取的触摸屏固件的大小;Read from the beginning of the firmware file, obtain the size of the currently read touch screen firmware, and detect whether the read file size is equal to the size of the currently read touch screen firmware;
    若是,将当前读取到的触摸屏固件从所述固件文件拆分,并继续开始读取所述固件文件;If yes, split the currently read touch screen firmware from the firmware file, and continue to read the firmware file;
    若否,继续读取所述固件文件。If not, continue to read the firmware file.
  5. 根据权利要求4所述的方法,其特征在于,所述获得分别对应不同模式标识的触摸屏固件,包括:The method according to claim 4, wherein said obtaining touch screen firmware corresponding to different mode identifiers respectively comprises:
    根据模式标识与固件大小的对应关系,以及拆分出的各个触摸屏固件的大小,确定各个触摸屏固件对应的模式标识。According to the corresponding relationship between the mode identifier and the size of the firmware, as well as the size of each touch screen firmware that is separated, the mode identifier corresponding to each touch screen firmware is determined.
  6. 根据权利要求4所述的方法,其特征在于,所述获得分别对应不同模式标识的触摸屏固件,包括:The method according to claim 4, wherein said obtaining touch screen firmware corresponding to different mode identifiers respectively comprises:
    获取拆分出的各个触摸屏固件的固件标识;Obtain the firmware identification of each touch screen firmware that has been split;
    根据固件标识与模式标识的对应关系,确定各个触摸屏固件对应的模式标识。According to the corresponding relationship between the firmware identification and the mode identification, the mode identification corresponding to each touch screen firmware is determined.
  7. 根据权利要求3-6任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 3-6, wherein the method further comprises:
    检测是否获取到新的固件文件;Check whether a new firmware file is obtained;
    若是,确定所述新的固件文件中的更新部分;If yes, determine the updated part of the new firmware file;
    从所述新的固件文件中拆分出更新部分对应的触摸屏固件;Separate the touch screen firmware corresponding to the updated part from the new firmware file;
    建立拆分出的触摸屏固件与模式标识的唯一对应关系。Establish a unique correspondence between the split touch screen firmware and the mode identification.
  8. 根据权利要求1所述的方法,其特征在于,所述获取对应当前工作模式的触摸屏固件之前,还包括:The method according to claim 1, wherein before said acquiring the touch screen firmware corresponding to the current working mode, the method further comprises:
    判断是否存储有当前工作模式对应的触摸屏固件;Determine whether the touch screen firmware corresponding to the current working mode is stored;
    若有,执行所述获取对应当前工作模式的触摸屏固件。If yes, execute the acquisition of the touch screen firmware corresponding to the current working mode.
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, wherein the method further comprises:
    若未存储有当前工作模式对应的触摸屏固件,向服务器发起固件获取请求,用于获取当前工作模式对应的触摸屏固件;If the touch screen firmware corresponding to the current working mode is not stored, initiate a firmware acquisition request to the server to obtain the touch screen firmware corresponding to the current working mode;
    若接收到服务器返回的触摸屏固件,执行所述获取对应当前工作模式的触摸屏固件的步骤。If the touch screen firmware returned by the server is received, the step of obtaining the touch screen firmware corresponding to the current working mode is executed.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述触摸屏的工作模式包括亮屏下的工作模式以及灭屏下的工作模式,所述检测触摸屏的工作模式是否发生切换,包括:The method according to any one of claims 1-9, wherein the working mode of the touch screen includes a working mode when the screen is on and a working mode when the screen is off, and the detecting whether the working mode of the touch screen is switched, include:
    检测触摸屏的亮灭状态是否发生切换;Detect whether the on-off state of the touch screen is switched;
    若所述触摸屏的亮灭状态发生切换,判定所述触摸屏的工作模式发生切换。If the on-off state of the touch screen is switched, it is determined that the working mode of the touch screen is switched.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-10, wherein the method further comprises:
    若所述触摸屏切换到亮屏状态,将当前工作模式的触摸屏固件加载到触摸屏存储器后,在所述触摸屏保持亮屏的过程中,向所述触摸屏存储器加载其他工作模式的触摸屏固件。If the touch screen is switched to the bright screen state, after loading the touch screen firmware of the current working mode into the touch screen memory, while the touch screen remains on, load the touch screen firmware of other working modes to the touch screen memory.
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述触摸屏的工作模式包括亮屏下的使用模式以及测试模式,灭屏下的使用模式以及测试模式,所述检测触摸屏的工作模式是否发生切换,包括:The method according to any one of claims 1-11, wherein the working mode of the touch screen includes a use mode and a test mode when the screen is on, a use mode and a test mode when the screen is off, and the detection of the touch screen Whether the working mode is switched, including:
    若接收到测试触发操作且当前为亮屏状态,确定所述触摸屏的工作模式切换为亮屏下的测试模式;If a test trigger operation is received and the screen is currently in a bright screen state, it is determined that the working mode of the touch screen is switched to the test mode under the bright screen;
    若接收到测试触发操作且当前为灭屏状态,确定所述触摸屏的工作模式切换为灭屏下的测试模式;If the test trigger operation is received and the screen is currently in the off-screen state, determining that the working mode of the touch screen is switched to the off-screen test mode;
    若接收到测试退出操作且当前为亮屏状态,确定所述触摸屏的工作模式切换为亮屏下的使用模式;If the test exit operation is received and the screen is currently in the bright screen state, it is determined that the working mode of the touch screen is switched to the use mode under bright screen;
    若接收到测试退出操作且当前为灭屏状态,确定所述触摸屏的工作模式切换为灭屏下的使用模式。If the test exit operation is received and the screen is currently in the off-screen state, it is determined that the working mode of the touch screen is switched to the off-screen use mode.
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-12, wherein the method further comprises:
    当所述触摸屏的工作模式切换为亮屏下的测试模式,将亮屏下的测试模式对应的触摸屏固件加载到所述触摸屏存储器后,在所述触摸屏保持亮屏的过程中,将亮屏下的使用模式对应的触摸屏固件向所述触摸屏存储器加载;When the working mode of the touch screen is switched to the test mode under the bright screen, after the touch screen firmware corresponding to the test mode under the bright screen is loaded into the touch screen memory, while the touch screen remains on, the bright screen will be switched off. Loading the touch screen firmware corresponding to the usage mode of the touch screen to the touch screen memory;
    当所述触摸屏的工作模式切换为灭屏下的测试模式,将灭屏下的测试模式对应的触摸屏固件加载到所述触摸屏存储器后,在所述触摸屏保持灭屏的过程中,将灭屏下的使用模式对应的触摸屏固件向所述触摸屏存储器加载。When the working mode of the touch screen is switched to the test mode with the screen off, after loading the touch screen firmware corresponding to the test mode in the off screen to the touch screen memory, while the touch screen remains off, the screen will be off The touch screen firmware corresponding to the usage mode of is loaded into the touch screen memory.
  14. 根据权利要求12或13所述的方法,其特征在于,通过与外部电连接的硬件接口接收测试触发操作以及测试退出操作。The method according to claim 12 or 13, wherein the test trigger operation and the test exit operation are received through a hardware interface electrically connected to the outside.
  15. 根据权利要求1-14任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-14, wherein the method further comprises:
    检测所述触摸屏存储器是否包括闪存;Detecting whether the touch screen memory includes flash memory;
    若否,执行所述检测触摸屏的工作模式是否发生切换的步骤。If not, execute the step of detecting whether the working mode of the touch screen is switched.
  16. 一种触摸屏固件加载装置,其特征在于,所述装置包括:A device for loading firmware of a touch screen, characterized in that the device comprises:
    检测模块,用于检测触摸屏的工作模式是否发生切换;The detection module is used to detect whether the working mode of the touch screen is switched;
    固件获取模块,用于若触摸屏的工作模式发生切换,获取对应当前工作模式的触摸屏固件作为待加载固件,其中,触摸屏的不同工作模式对应有不同的触摸屏固件;The firmware acquisition module is used to obtain the touch screen firmware corresponding to the current working mode as the firmware to be loaded if the working mode of the touch screen is switched, where different working modes of the touch screen correspond to different touch screen firmware;
    加载模块,用于将所述待加载固件加载到触摸屏存储器。The loading module is used to load the firmware to be loaded into the touch screen memory.
  17. 根据权利要求16所述的装置,其特征在于,不同工作模式对应不同的模式标识,所述固件获取模块用于根据模式标识与触摸屏固件的对应关系,获取当前工作模式对应的触摸屏固件。The device according to claim 16, wherein different working modes correspond to different mode identifiers, and the firmware obtaining module is configured to obtain the touch screen firmware corresponding to the current working mode according to the corresponding relationship between the mode identifier and the touch screen firmware.
  18. 根据权利要求17所述的装置,其特征在于,所述触摸屏的所有工作模式对应的所有触摸屏固件作为一个固件文件存储于系统存储器,所述装置还包括,拆分模块,用于拆分所述固件文件,获得分别对应不同模式标识的触摸屏固件。The device according to claim 17, wherein all touch screen firmware corresponding to all working modes of the touch screen are stored in the system memory as a firmware file, and the device further comprises a splitting module for splitting the Firmware file to obtain the touch screen firmware corresponding to different mode identifications.
  19. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    一个或多个处理器;One or more processors;
    系统存储器;System memory
    触摸屏存储器;Touch screen memory;
    一个或多个程序,其中所述一个或多个程序被存储在所述系统存储器中并 被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求1-15任一项所述的方法。One or more programs, wherein the one or more programs are stored in the system memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute The method of any one of 1-15 is required.
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-15任一项所述的方法。A computer-readable storage medium, wherein a program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the method according to any one of claims 1-15.
PCT/CN2019/119250 2019-11-18 2019-11-18 Touch screen firmware loading method and apparatus, electronic device, and storage medium WO2021097626A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980099751.4A CN114286979A (en) 2019-11-18 2019-11-18 Touch screen firmware loading method and device, electronic equipment and storage medium
PCT/CN2019/119250 WO2021097626A1 (en) 2019-11-18 2019-11-18 Touch screen firmware loading method and apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/119250 WO2021097626A1 (en) 2019-11-18 2019-11-18 Touch screen firmware loading method and apparatus, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021097626A1 true WO2021097626A1 (en) 2021-05-27

Family

ID=75981112

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119250 WO2021097626A1 (en) 2019-11-18 2019-11-18 Touch screen firmware loading method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN114286979A (en)
WO (1) WO2021097626A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324867A (en) * 2007-06-16 2008-12-17 深圳市硅格半导体有限公司 Device and method for managing data based on semiconductor storage medium
CN102798464A (en) * 2012-09-07 2012-11-28 上海业和电子技术有限责任公司 Light illumination grade detection device and method
US20190042754A1 (en) * 2017-08-04 2019-02-07 Dell Products, L.P. Authenticating a boot path update
CN109542384A (en) * 2018-11-29 2019-03-29 广东美的制冷设备有限公司 Electric appliance and its screen driving method, device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324867A (en) * 2007-06-16 2008-12-17 深圳市硅格半导体有限公司 Device and method for managing data based on semiconductor storage medium
CN102798464A (en) * 2012-09-07 2012-11-28 上海业和电子技术有限责任公司 Light illumination grade detection device and method
US20190042754A1 (en) * 2017-08-04 2019-02-07 Dell Products, L.P. Authenticating a boot path update
CN109542384A (en) * 2018-11-29 2019-03-29 广东美的制冷设备有限公司 Electric appliance and its screen driving method, device

Also Published As

Publication number Publication date
CN114286979A (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN107832100B (en) APK plug-in loading method and terminal thereof
CN110784858B (en) Bluetooth device control method and device, electronic device and storage medium
CN110377141B (en) Application processing method and device, electronic equipment and storage medium
CN109791497B (en) Method, device and terminal for executing hot patch
CN106933593B (en) System switching method and device based on mobile terminal
CN111142711A (en) Firmware configuration method and device, storage medium and mobile terminal
CN104375854B (en) A kind of application updates method for down loading and user terminal
CN108121560A (en) Difference bag upgrade method, device, terminal and computer readable storage medium
CN102262555B (en) Method and device for loading different versions of JAVA three-party library
CN111258613B (en) Firmware upgrading method, device, electronic equipment and storage medium
CN114327606B (en) Configuration management method and device, electronic equipment and computer readable storage medium
JP2013025426A (en) Image output device and program therefor
CN111142900A (en) Program updating method and device and terminal equipment
US9928134B2 (en) Method and apparatus for repairing dynamic link library file
CN113138852A (en) Resource loading method and device, chip and electronic equipment
CN105278942B (en) Component management method and device
CN113412480B (en) Mounting processing method, mounting processing device, electronic equipment and computer readable storage medium
WO2021097626A1 (en) Touch screen firmware loading method and apparatus, electronic device, and storage medium
CN109901849B (en) Application program installation method and device, electronic equipment and storage medium
CN107015874B (en) Data transmission control method, device and terminal
CN111930391B (en) Application data processing method and device, server and user terminal
CN110177364B (en) Bluetooth device pairing connection method and device, storage medium and electronic device
CN113849195A (en) Application program loading method and device, storage medium and terminal
CN111897581A (en) Screen-off awakening method and device, storage medium and all-in-one machine equipment
CN109144446B (en) Image display method, image display device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19953218

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 31.10.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19953218

Country of ref document: EP

Kind code of ref document: A1