Detection method, device and device for detection

By detecting the target mark when the keyboard process is started, the problem in the prior art of being unable to accurately determine the reason for the keyboard process exiting is solved, and a more accurate detection result is achieved, especially eliminating the influence of the termination signal sent by the operating system.

CN115705273BActive Publication Date: 2025-09-09BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110951597.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-17
Publication Date
2025-09-09
Estimated Expiration
2041-08-17

AI Technical Summary

Technical Problem

The existing technology cannot accurately detect the reason why the keyboard process exits, especially cannot exclude the exit caused by the termination signal (such as sigquit) sent by the operating system, resulting in inaccurate detection.

Method used

When the keyboard process starts, it is checked whether it has a target tag. The target tag is added after the keyboard is called up and the remaining available memory is less than the threshold. The target tag is used to determine whether the keyboard process exits due to insufficient memory or in response to a termination signal.

Benefits of technology

Improves the accuracy of detecting keyboard process exit reasons, effectively eliminating exits caused by termination signals sent by the operating system, and ensures the accuracy of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115705273B_ABST
    Figure CN115705273B_ABST
Patent Text Reader

Abstract

The present application discloses a detection method, apparatus, and device for detecting a keyboard process. The method comprises: upon startup of a keyboard process, if the last exit reason of the keyboard process is not detected, detecting whether the keyboard process has a target tag. The target tag is added after the keyboard is activated and the remaining available memory of the keyboard process is less than a first preset threshold; if the keyboard process has the target tag, determining that the last exit reason of the keyboard process was insufficient memory. This embodiment improves the accuracy of detecting the keyboard process exit reason.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a detection method, device, and apparatus for detection. Background Art

[0002] The keyboard process can exit unexpectedly during operation, impacting the user experience. After an unexpected exit, attribution is required to facilitate targeted program optimization. Common causes of abnormal exits include program upgrades, system upgrades, device restarts, and out of memory (OOM).

[0003] In the prior art, a method of elimination can be used to determine that the keyboard process exited due to insufficient memory after eliminating detectable causes such as program upgrades, system upgrades, and device restarts. However, if the operating system (such as iOS) sends a termination signal (such as sigquit) when the keyboard is in the activated state, this will also cause the keyboard process to exit. To avoid abnormal keyboard use, this termination signal is usually not detected. Therefore, the prior art cannot rule out the possibility that the keyboard process exits in response to a termination signal (such as sigquit) issued by the operating system, resulting in inaccurate detection of the cause of the keyboard process exit. Summary of the Invention

[0004] The embodiments of the present application propose a detection method to solve the technical problem in the prior art of inaccurate detection of the reason for keyboard process exit.

[0005] In the first aspect, an embodiment of the present application provides a detection method, which includes: when a keyboard process is started, if the last exit reason of the keyboard process is an unknown reason, detecting whether the keyboard process has a target mark, and the target mark is added after the keyboard is called up and the remaining available memory of the keyboard process is less than a first preset threshold; if the keyboard process has the target mark, determining that the last exit reason of the keyboard process is insufficient memory.

[0006] In some embodiments, the method further includes: if the keyboard process does not carry the target mark, determining that the last exit reason of the keyboard process was exit in response to a termination signal, and the termination signal is issued by the operating system when it detects that the keyboard startup time is greater than a second preset threshold.

[0007] In some embodiments, the method further includes: after determining the reason why the keyboard process last exited, clearing the target flag.

[0008] In some embodiments, after clearing the target mark, the method further includes: calling up the keyboard and continuously obtaining the remaining available memory of the keyboard process; when the remaining available memory of the keyboard process is less than the first preset threshold, adding a target mark to the keyboard process; when the keyboard is folded normally, clearing the target mark.

[0009] In some embodiments, continuously obtaining the remaining available memory of the keyboard process includes: creating a timer and configuring a period of the timer; and periodically obtaining the remaining available memory of the keyboard process based on the timer.

[0010] In some embodiments, the method further includes: after determining the last exit reason of the keyboard process, reporting the exit reason detection data of the keyboard process to the server.

[0011] In some embodiments, when the keyboard process is started, if the last exit reason of the keyboard process is not detected, the keyboard process is detected whether it has a target tag, including: when the keyboard process is started, detecting whether the last exit reason of the keyboard process is at least one of the following: application upgrade, operating system upgrade, device restart, normal keyboard folding, and regular system crash not caused by insufficient memory; if not, detecting whether the keyboard process has a target tag.

[0012] In the second aspect, an embodiment of the present application provides a detection device, which includes: a detection unit, which is configured to detect whether the keyboard process has a target mark when the keyboard process is started, if the last exit reason of the keyboard process is an unknown reason, and the target mark is added after the keyboard is called up and the remaining available memory of the keyboard process is less than a first preset threshold; a first determination unit, which is configured to determine that the last exit reason of the keyboard process is insufficient memory if the keyboard process has the target mark.

[0013] In some embodiments, the above-mentioned device also includes: a second determination unit, which, if the above-mentioned keyboard process does not carry the above-mentioned target mark, determines that the last exit reason of the above-mentioned keyboard process was exit in response to a termination signal, and the above-mentioned termination signal is issued by the operating system when it detects that the keyboard call-up time is greater than a second preset threshold.

[0014] In some embodiments, the above-mentioned device further includes a clearing unit configured to: clear the local target mark after determining the reason why the keyboard process last exited.

[0015] In some embodiments, the above-mentioned device also includes a mark processing unit, which is configured to: call up the keyboard and continuously obtain the remaining available memory of the above-mentioned keyboard process; add a target mark when the remaining available memory of the above-mentioned keyboard process is less than the above-mentioned first preset threshold; and clear the above-mentioned target mark when the above-mentioned keyboard is normally folded.

[0016] In some embodiments, the marking processing unit is further configured to: create a timer and configure a period of the timer; and periodically obtain the remaining available memory of the keyboard process based on the timer.

[0017] In some embodiments, the apparatus further comprises: a reporting unit configured to report the exit reason detection data of the keyboard process to the server after determining the last exit reason of the keyboard process.

[0018] In some embodiments, the above-mentioned detection unit is further configured to: when the keyboard process is started, detect whether the last exit reason of the above-mentioned keyboard process is at least one of the following: application upgrade, operating system upgrade, device restart, normal keyboard folding, and regular system crash not caused by insufficient memory; if not, detect whether the above-mentioned keyboard process has a target tag.

[0019] In a third aspect, an embodiment of the present application provides a device for detection, comprising a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the method described in the first aspect above.

[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.

[0021] The detection method, device and device for detection provided by the embodiments of the present application can detect whether the keyboard process has a target tag if the last exit reason of the keyboard process is not detected when the keyboard process is started, so that when it is detected that the keyboard process has a target tag, its last exit reason is determined to be insufficient memory. Since the target tag is added after the keyboard is called up and the remaining available memory of the keyboard process is less than the first preset threshold, the termination signal (such as sigquit) is only issued when the keyboard is called up, and does not affect the addition or elimination of the target tag. Therefore, the target tag can effectively eliminate the situation where the keyboard process exits due to responding to the termination signal (such as sigquit) issued by the operating system (such as iOS), thereby improving the accuracy of the detection of the reason for the keyboard process exit. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0023] Figure 1 is a flow chart of an embodiment of a detection method according to the present application;

[0024] Figure 2 is a flow chart of another embodiment of the detection method according to the present application;

[0025] Figure 3 is a schematic structural diagram of an embodiment of a detection device according to the present application;

[0026] Figure 4 is a schematic structural diagram of a device for detection according to the present application;

[0027] Figure 5 It is a schematic diagram of the structure of the server in some embodiments of the present application. DETAILED DESCRIPTION

[0028] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.

[0029] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0030] Please refer to Figure 1 , which shows a process 100 according to an embodiment of the detection method of the present application. The above detection method can be run on various electronic devices, including but not limited to: servers, smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, car computers, desktop computers, set-top boxes, smart TVs, wearable devices, etc.

[0031] The input method application mentioned in the embodiment of the present application may refer to an input method client, which can support multiple input methods. Among them, the input method can be a coding method adopted to input various symbols into electronic devices such as computers and mobile phones, and the user can use the input method application to conveniently input the required characters or strings into the electronic device. It should be noted that in the embodiment of the present application, in addition to supporting common Chinese input methods (such as pinyin input method, Wubi input method, Zhuyin input method, voice input method, handwriting input method, etc.), the input method can also support input methods of other languages ​​(such as English input method, Japanese Hiragana input method, Korean input method, etc.), and no limitation is made to the input method and the language type of the input method.

[0032] The detection method in this embodiment may include the following steps:

[0033] Step 101: When the keyboard process is started, if the last exit reason of the keyboard process is not detected, then detect whether the keyboard process has a target tag.

[0034] In this embodiment, the subject executing the detection method (e.g., the electronic device described above) may have multiple applications (APPs) installed, such as input method applications, instant messaging applications, etc. These applications may have keyboard functions or may call keyboard functions. The keyboard functions may be run and implemented through a keyboard process.

[0035] In this embodiment, when the keyboard process is started, the above-mentioned execution entity can detect the last exit reason of the keyboard process. If it is not detected, it can further detect whether the keyboard process has a target tag. As an example, the detectable exit reasons may include but are not limited to application upgrades, operating system upgrades, device restarts, normal keyboard folding, regular system crashes not caused by insufficient memory, etc. When the keyboard process is started, the above-mentioned execution entity can check one by one whether the last exit reason of the keyboard process is at least one of the above-mentioned detectable exit reasons. If all the above-mentioned items have been ruled out, it can be considered that the last exit reason of the keyboard process has not been detected. At this time, it can be further detected whether the keyboard process has a target tag.

[0036] In this embodiment, the target tag can be a character such as a letter, a symbol, a number, or a character string consisting of one or more of the letters, symbols, and numbers. The specific representation method is not specifically limited here. The target tag can be added after the keyboard is called up and the remaining available memory of the keyboard process is less than the first preset threshold. Specifically, during the operation of the keyboard process, one or more keyboard calls and one or more keyboard retractions may occur. After the keyboard is called up, the above-mentioned execution entity can continuously obtain (such as real-time acquisition, or periodically) the remaining available memory of the keyboard process. When the remaining available memory is less than the first preset threshold (such as 3MB), it can be considered that the remaining available memory is insufficient, and a target tag can be added to the keyboard process. When the keyboard is normally retracted, the target tag can be cleared.

[0037] It should be noted that among the above detectable exit reasons, application upgrades, operating system upgrades, device restarts, and regular system crashes not caused by insufficient memory, in addition to normal keyboard retraction, can all be considered abnormal reasons. If the keyboard process is detected to have last exited due to an abnormal reason when it is started, the execution entity can directly report the keyboard process exit reason detection data to the server and will not perform the target marking step.

[0038] Step 102: If the keyboard process has a target tag, determine that the last exit reason of the keyboard process was insufficient memory.

[0039] In this embodiment, if the target marker is detected when the current keyboard process is started, it means that the keyboard was abnormally retracted during the previous keyboard process, and there was insufficient available memory during the previous keyboard process. Since reasons such as application upgrades, operating system upgrades, device restarts, normal keyboard retraction, and regular system crashes not caused by insufficient memory have been ruled out, it can be determined that the last reason for the keyboard process to exit was insufficient memory.

[0040] It is understandable that, if the last keyboard process exited due to reasons such as application upgrades, operating system upgrades, device restarts, normal keyboard closure, and regular system crashes not caused by insufficient memory, it can be known that the last keyboard process may have exited due to insufficient memory or in response to a termination signal (such as a sigquit signal). The termination signal can be issued by the operating system (such as iOS) when the keyboard is activated, and specifically, it can be issued when the operating system detects that the keyboard has been activated for longer than a second preset threshold.

[0041] Since the termination signal occurs when the keyboard is called up, if the last keyboard process exited in response to the termination signal, the target tag has not yet been added, so the target tag will not be detected when the keyboard process is started this time. In view of this, if the target tag is not detected when the keyboard process is started this time, it means that the last keyboard process exited in response to the termination signal, that is, the last reason for the keyboard process to exit was exiting in response to the termination signal.

[0042] In some optional implementations of this embodiment, after determining the last exit reason of the keyboard process (such as after the last exit reason of the keyboard process has been detected when the keyboard process is started, and after detecting through the target mark that the last exit reason of the keyboard process is insufficient memory or exiting in response to a termination signal), the above-mentioned execution entity may also report the keyboard process exit reason detection data to the server. The above-mentioned exit reason detection data may include but is not limited to the last exit time of the keyboard process, the last running time, the last exit reason, etc. In addition, if the last exit reason of the keyboard process is insufficient memory, the exit reason detection data may include but is not limited to the size of the remaining available memory last obtained during the last process operation, etc. There is no specific limitation on the content of the exit reason detection data here.

[0043] In some optional implementations of this embodiment, the above-mentioned execution entity can also clear the target mark after determining the reason for the last exit of the above-mentioned keyboard process (such as after the last exit reason of the keyboard process has been detected when the keyboard process is started, or after detecting through the target mark that the last exit reason of the keyboard process is insufficient memory).

[0044] In some optional implementations of this embodiment, after clearing the target mark, the above-mentioned execution entity can call up the keyboard and continuously obtain the remaining available memory of the keyboard process, and add a target mark to the keyboard process when the remaining available memory of the keyboard process is less than a first preset threshold. In addition, the target mark can be cleared when the keyboard is normally folded. Among them, the above-mentioned execution entity can create a timer and configure the timer period (such as 0.2s), so as to periodically obtain the remaining available memory of the keyboard process based on the timer. Thus, after calling up the keyboard, the remaining available memory of the keyboard process can be continuously obtained.

[0045] The method provided by the above embodiment of the present application can detect whether the keyboard process has a target tag when the keyboard process is started, if the last exit reason of the keyboard process is not detected. In this way, if the keyboard process is detected to have a target tag, the last exit reason thereof is determined to be insufficient memory. Since the target tag is added after the keyboard is called up and the remaining available memory of the keyboard process is less than a first preset threshold, the termination signal (such as sigquit) is only issued when the keyboard is called up and does not affect the addition or elimination of the target tag. Therefore, the target tag can effectively eliminate the situation where the keyboard process exits due to responding to a termination signal (such as sigquit) issued by the operating system (such as iOS), thereby improving the accuracy of detecting the reason for the keyboard process exit.

[0046] Further references Figure 2 , which shows a process 200 of another embodiment of a detection method. The process 200 of the detection method includes the following steps:

[0047] Step 201: When the keyboard process is started, if the last exit reason of the keyboard process is not detected, then detect whether the keyboard process has a target tag.

[0048] Step 201 in this embodiment can be found in Figure 1 Step 101 of the corresponding embodiment will not be described again here.

[0049] In some optional implementations of this embodiment, when a keyboard process is started, the execution body of the detection method may first detect whether the keyboard process last exited due to at least one of the following: application upgrade, operating system upgrade, device restart, normal keyboard folding, or a regular system crash not caused by insufficient memory. If not, the execution body may detect whether the keyboard process has a target tag.

[0050] Step 202: If the keyboard process has a target tag, determine that the last exit reason of the keyboard process was insufficient memory.

[0051] Step 202 in this embodiment can be found in Figure 1 Step 103 of the corresponding embodiment will not be described again here.

[0052] In some optional implementations of this embodiment, if the last keyboard process exited due to reasons such as application upgrades, operating system upgrades, device restarts, normal keyboard folding, and regular system crashes not caused by insufficient memory, it can be known that the last keyboard process may have exited due to insufficient memory or in response to a termination signal (such as a sigquit signal). The termination signal can be issued by the operating system (such as iOS) when the keyboard is activated, and specifically, can be issued when the operating system detects that the keyboard activation time is greater than a second preset threshold.

[0053] Since the termination signal occurs when the keyboard is called up, if the last keyboard process exited in response to the termination signal, the target tag has not yet been added, so the target tag will not be detected when the keyboard process is started this time. In view of this, if the target tag is not detected when the keyboard process is started this time, it means that the last keyboard process exited in response to the termination signal, that is, the last reason for the keyboard process to exit was exiting in response to the termination signal.

[0054] In some optional implementations of this embodiment, after determining the last exit reason of the keyboard process (such as after the last exit reason of the keyboard process has been detected when the keyboard process is started, and after detecting through the target mark that the last exit reason of the keyboard process is insufficient memory or exiting in response to a termination signal), the above-mentioned execution entity may also report the keyboard process exit reason detection data to the server. The exit reason detection data may include but is not limited to the last exit time of the keyboard process, the last running time, the last exit reason, etc. In addition, if the last exit reason of the keyboard process is insufficient memory, the exit reason detection data may include but is not limited to the size of the remaining available memory last obtained during the last process operation, etc. There is no specific limitation on the content of the exit reason detection data here.

[0055] Step 203: Clear the target mark.

[0056] In this embodiment, the execution subject can clear the target tag after determining the last exit reason of the keyboard process (e.g., after the last exit reason of the keyboard process is detected when the keyboard process is started, or after detecting that the last exit reason of the keyboard process is insufficient memory through the target tag). In this way, the tag information during the last keyboard process operation can be eliminated to avoid interference with the current keyboard process operation.

[0057] Step 204: Start the keyboard and continue to obtain the remaining available memory of the keyboard process.

[0058] In this embodiment, the execution subject can call up the keyboard after clearing the target flag and continuously obtain the remaining available memory of the keyboard process. Taking the iOS operating system as an example, the iOS operating system provides a method for obtaining the remaining available memory of a process. The execution subject can obtain the remaining available memory of the keyboard process by calling this method.

[0059] In some optional implementations of this embodiment, the execution entity may create a timer and configure a timer period (e.g., 0.2s), thereby periodically obtaining the remaining available memory of the keyboard process based on the timer. Thus, after the keyboard is called up, the remaining available memory of the keyboard process may be continuously obtained.

[0060] Step 205: When the remaining available memory of the keyboard process is less than a first preset threshold, add a target mark to the keyboard process.

[0061] Step 206: When the keyboard is normally folded, clear the target mark.

[0062] By adding a target marker to the keyboard process when the remaining available memory in the keyboard process is less than a first preset threshold, and clearing the target marker when the keyboard is normally retracted, the insufficient memory condition of the keyboard process can be marked during the current operation of the keyboard process. This facilitates the detection of the reason for the keyboard process's exit the next time the keyboard process is started, and the keyboard process can be continuously monitored. Furthermore, monitoring the keyboard process in this way can help developers accurately locate the reason for the abnormal exit of the keyboard process, thereby making targeted improvements to keyboard-related programs to enhance the user experience.

[0063] Further references Figure 3 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a detection device, which is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0064] like Figure 3 As shown, the above-mentioned detection device 300 of this embodiment includes: a detection unit 301, which is configured to detect whether the above-mentioned keyboard process has a target mark when the keyboard process is started, if the last exit reason of the above-mentioned keyboard process is not detected, and the above-mentioned target mark is added after the keyboard is called up and the remaining available memory of the above-mentioned keyboard process is less than a first preset threshold; a first determination unit 302, which is configured to determine that the last exit reason of the above-mentioned keyboard process is insufficient memory if the above-mentioned keyboard process has the above-mentioned target mark.

[0065] In some optional implementations of this embodiment, the above-mentioned device also includes: a second determination unit, which determines that the last exit reason of the above-mentioned keyboard process was exit in response to a termination signal if the above-mentioned keyboard process does not carry the above-mentioned target mark, and the above-mentioned termination signal is issued by the operating system when it detects that the keyboard call-up time is greater than a second preset threshold.

[0066] In some optional implementations of this embodiment, the apparatus further includes a clearing unit configured to: clear the local target mark after determining the reason why the keyboard process last exited.

[0067] In some optional implementations of this embodiment, the above-mentioned device also includes a mark processing unit, which is configured to: call up the keyboard and continuously obtain the remaining available memory of the above-mentioned keyboard process; add a target mark when the remaining available memory of the above-mentioned keyboard process is less than the above-mentioned first preset threshold; and clear the above-mentioned target mark when the above-mentioned keyboard is normally folded.

[0068] In some optional implementations of this embodiment, the marking processing unit is further configured to: create a timer and configure a period of the timer; and periodically obtain the remaining available memory of the keyboard process based on the timer.

[0069] In some optional implementations of this embodiment, the apparatus further includes: a reporting unit configured to report exit reason detection data of the keyboard process to the server after determining the last exit reason of the keyboard process.

[0070] In some optional implementations of this embodiment, the above-mentioned detection unit is further configured to: when the keyboard process is started, detect whether the last exit reason of the above-mentioned keyboard process is at least one of the following: application upgrade, operating system upgrade, device restart, normal keyboard folding, and regular system crash not caused by insufficient memory; if not, detect whether the above-mentioned keyboard process has a target tag.

[0071] The device provided by the above-mentioned embodiment of the present application can detect whether the keyboard process has a target tag when the keyboard process is started, if the last exit reason of the keyboard process is not detected, so that when the keyboard process is detected to have a target tag, the last exit reason is determined to be insufficient memory. Since the target tag is added after the keyboard is called up and the remaining available memory of the keyboard process is less than the first preset threshold, the termination signal (such as sigquit) is only issued when the keyboard is called up, which does not affect the addition or elimination of the target tag. Therefore, the target tag can effectively eliminate the situation where the keyboard process exits due to responding to the termination signal (such as sigquit) issued by the operating system (such as iOS), thereby improving the accuracy of the detection of the reason for the keyboard process exit.

[0072] Figure 4 FIG4 is a block diagram of an apparatus 400 for detecting a condition according to an exemplary embodiment. The apparatus 400 may be a smart terminal or a server. For example, the apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0073] Reference Figure 4 , apparatus 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .

[0074] Processing component 402 generally controls the overall operation of device 400, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the above-described method. In addition, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.

[0075] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0076] The power supply component 406 provides power to the various components of the device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 400.

[0077] The multimedia component 408 includes a screen that provides an output interface between the above-mentioned device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The above-mentioned touch sensors can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the above-mentioned touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.

[0078] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC) that is configured to receive external audio signals when the device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.

[0079] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.

[0080] The sensor assembly 414 includes one or more sensors for providing various aspects of the status assessment of the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of components, such as the display and keypad of the device 400. The sensor assembly 414 can also detect changes in the position of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400, and temperature changes of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0081] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0082] In an exemplary embodiment, the apparatus 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method.

[0083] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by the processor 420 of the apparatus 400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0084] Figure 5 : is a schematic diagram of the structure of the server in some embodiments of the present application. The server 500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 522 (for example, one or more processors) and memories 532, and one or more storage media 530 (for example, one or more mass storage devices) for storing application programs 542 or data 544. Among them, the memories 532 and the storage media 530 can be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 522 can be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the server 500.

[0085] The server 500 may also include one or more power supplies 526, one or more wired or wireless network interfaces 550, one or more input and output interfaces 558, one or more keyboards 556, and / or one or more operating systems 541, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0086] A non-temporary computer-readable storage medium, when the instructions in the above storage medium are executed by the processor of a device (smart terminal or server), enables the device to execute a detection method, the above method including: when a keyboard process is started, if the last exit reason of the keyboard process is not detected, then detecting whether the keyboard process has a target mark, the target mark is added after the keyboard is called up and the remaining available memory of the keyboard process is less than a first preset threshold; if the keyboard process has the target mark, determining that the last exit reason of the keyboard process is insufficient memory.

[0087] Optionally, the device is configured to execute the one or more programs including instructions for performing the following operations by one or more processors: if the keyboard process does not carry the target tag, determine that the last exit reason of the keyboard process was exit in response to a termination signal, and the termination signal is issued by the operating system when it detects that the keyboard call-up time is greater than a second preset threshold.

[0088] Optionally, the device is configured to execute the one or more programs by one or more processors, including instructions for performing the following operations: after determining the reason why the keyboard process last exited, clearing the target mark.

[0089] Optionally, the device is configured to have one or more processors execute the one or more programs including instructions for performing the following operations: calling up the keyboard and continuously obtaining the remaining available memory of the keyboard process; adding a target mark to the keyboard process when the remaining available memory of the keyboard process is less than the first preset threshold; and clearing the target mark when the keyboard is folded normally.

[0090] Optionally, continuously obtaining the remaining available memory of the keyboard process includes: creating a timer and configuring a period of the timer; and periodically obtaining the remaining available memory of the keyboard process based on the timer.

[0091] Optionally, the device is configured to execute the one or more programs including instructions for performing the following operations by one or more processors: after determining the last exit reason of the keyboard process, reporting the exit reason detection data of the keyboard process to the server.

[0092] Optionally, when the keyboard process starts, if the last exit reason of the keyboard process is not detected, the keyboard process is detected whether it has a target mark, including: when the keyboard process starts, detecting whether the last exit reason of the keyboard process is at least one of the following: application upgrade, operating system upgrade, device restart, normal keyboard folding, and regular system crash not caused by insufficient memory; if not, detecting whether the keyboard process has a target mark.

[0093] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0094] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

[0095] The above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

[0096] The above is a detailed introduction to the detection method, device and device for detection provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A detection method, characterized in that: The method comprises: When the keyboard process is started, if the last exit reason of the keyboard process is not detected, then detecting whether the keyboard process has a target tag, the target tag is added when the keyboard is called up and the remaining available memory of the keyboard process is less than a first preset threshold; If the keyboard process has the target tag, determining that the last exit reason of the keyboard process was insufficient memory; If the keyboard process does not carry the target mark, it is determined that the last exit reason of the keyboard process was exit in response to a termination signal, and the termination signal is issued by the operating system when the keyboard is detected to be called up. Specifically, the termination signal is issued when the operating system detects that the keyboard is called up for a duration greater than a second preset threshold.

2. The method according to claim 1, characterized in that The method further comprises: After determining the reason why the keyboard process last exited, the target flag is cleared.

3. The method according to claim 2, characterized in that After clearing the target mark, the method further includes: Invoke the keyboard and continuously obtain the remaining available memory of the keyboard process; When the remaining available memory of the keyboard process is less than the first preset threshold, adding a target mark to the keyboard process; When the keyboard is normally retracted, the target mark is cleared.

4. The method according to claim 3, characterized in that The continuously obtaining the remaining available memory of the keyboard process includes: Create a timer and configure the period of the timer; Based on the timer, the remaining available memory of the keyboard process is periodically obtained.

5. The method according to claim 1, wherein The method further comprises: After determining the last exit reason of the keyboard process, the exit reason detection data of the keyboard process is reported to the server.

6. The method according to claim 1, characterized in that When the keyboard process is started, if the last exit reason of the keyboard process is not detected, then detecting whether the keyboard process has a target tag includes: When the keyboard process is started, detecting whether the last exit reason of the keyboard process is at least one of the following: application upgrade, operating system upgrade, device restart, normal keyboard folding, and regular system crash not caused by insufficient memory; If not, check whether the keyboard process has a target tag.

7. A detection device, characterized in that: The device comprises: a detection unit configured to, when a keyboard process is started, if a last exit reason of the keyboard process is not detected, detect whether the keyboard process has a target tag, wherein the target tag is added after the keyboard is called up and the remaining available memory of the keyboard process is less than a first preset threshold; A first determining unit is configured to determine that a reason for the last exit of the keyboard process is insufficient memory if the keyboard process has the target tag; The second determination unit determines, if the keyboard process does not carry the target mark, that the last exit reason of the keyboard process was exit in response to a termination signal, and the termination signal is issued by the operating system when the keyboard is detected to be called up. Specifically, the termination signal is issued when the operating system detects that the keyboard is called up for a duration greater than a second preset threshold.

8. The device according to claim 7, characterized in that The apparatus further comprises a cleaning unit configured to: After determining the last exit reason of the keyboard process, the local target flag is cleared.

9. The device according to claim 7, characterized in that The apparatus further includes a marking processing unit configured to: Invoke the keyboard and continuously obtain the remaining available memory of the keyboard process; When the remaining available memory of the keyboard process is less than the first preset threshold, adding a target mark; When the keyboard is normally retracted, the target mark is cleared.

10. The device according to claim 9, characterized in that The marking processing unit is further configured to: Create a timer and configure the period of the timer; Based on the timer, the remaining available memory of the keyboard process is periodically obtained.

11. The device according to claim 7, characterized in that The device further comprises: The reporting unit is configured to report the exit reason detection data of the keyboard process to the server after determining the last exit reason of the keyboard process.

12. A device for detecting, characterized in that: The invention comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and when the programs are executed by one or more processors, the steps of the method according to any one of claims 1 to 6 are implemented.

13. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Memory overflow management method and device, electronic equipment and storage medium

    CN111984401A