Data processing method, device, equipment, and program
By analyzing and repairing system code to address ANR issues from the operating system level, the method effectively prevents ANR occurrences and enhances stability and compatibility across diverse platforms.
Patent Information
- Application Number
- JP2024523972
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-07-13
- Filing Date
- 2023-04-25
- Publication Date
- 2024-11-13
- Estimated Expiration
- 2043-04-25
AI Technical Summary
Existing solutions for addressing Application Not Responding (ANR) issues in operating systems are limited to specific scenarios and do not effectively prevent recurring ANR occurrences across different environments, lacking versatility and stability.
A data processing method that collects field information of various ANR types, performs commonality analysis to identify failure points in the system code, and repairs the code to prevent ANR by operating the target application on the repaired system code, starting from the operating system level.
This approach reduces the probability of ANR occurrences, enhances system and application stability, and improves compatibility across various platforms, including cloud gaming environments.
Smart Images

Figure 2024541894000001_ABST
Abstract
Description
[Technical field]
[0001] TECHNICAL FIELD This application relates to the field of computers, and more particularly to data processing.
[0002] This application claims priority to a Chinese patent application filed with the China Patent Office on July 13, 2022, bearing application number 202210819928.7 and entitled "Data Processing Method, Apparatus, Device, and Storage Medium," the entire contents of which are incorporated herein by reference. [Background technology]
[0003] With the development of computer technology, some open source operating systems allow secondary development and customization of the operating system, and more and more interesting and practical functions are provided by the operating system, bringing people a convenient and speedy experience.
[0004] The operation of various application programs is supported in the operating system, and if the response sensitivity of the application program is not high enough, the phenomenon of ANR (Application Not Responding) may occur, and the existence of such an ANR phenomenon may affect the user experience. However, currently, most of the schemes for solving ANR are based on the analysis experience of others to position the ANR problem encountered by oneself and perform a specific analysis of the specific ANR problem. This is limited to specific scenarios such as the version of the operating system and the version of the application program, and it is not necessarily possible to ensure that ANR will not occur again due to other causes after solving the current ANR, and is not highly versatile. Summary of the Invention [Problem to be solved by the invention]
[0005] The embodiments of the present application provide a data processing method, device, equipment, storage medium, and program product that can effectively solve the unresponsiveness phenomenon of a target application from the operating system level, reduce the probability of any one type of unresponsiveness phenomenon occurring, and provide high versatility and improved overall stability. [Means for solving the problem]
[0006] In one aspect, embodiments of the present application provide a method of processing data, comprising: obtaining scene information of each type of unresponsiveness phenomenon among a plurality of types of unresponsiveness phenomena of a target application, wherein each type of unresponsiveness phenomenon occurs in a process of running the target application according to a system code of an operating system, and the scene information of each type of unresponsiveness phenomenon is used to describe an execution status of the system code when the corresponding unresponsiveness phenomenon occurs; A step of performing a commonality analysis on the on-site information of each type of unresponsive phenomenon, obtaining a commonality analysis result, and determining a fault point where the unresponsive phenomenon occurs from a system code based on the commonality analysis result, wherein the commonality analysis result includes common information in the on-site information of each type of unresponsive phenomenon; and repairing the system code based on the failure point, thereby operating the target application based on the repaired system code.
[0007] In one aspect, embodiments of the present application provide a data processing apparatus, comprising: An acquisition module used for acquiring on-site information of each type of unresponsiveness phenomenon among a plurality of types of unresponsiveness phenomena of a target application, wherein each type of unresponsiveness phenomenon occurs in a process of running the target application according to a system code of an operating system, and the on-site information of each type of unresponsiveness phenomenon is used for describing the execution status of the system code when the corresponding unresponsiveness phenomenon occurs; A processing module is used for performing a commonality analysis on the on-site information of each type of unresponsive phenomenon, obtaining a commonality analysis result, and determining a fault point where the unresponsive phenomenon occurs from a system code based on the commonality analysis result, wherein the commonality analysis result includes common information in the on-site information of each type of unresponsive phenomenon; The processing module is used for repairing the system code based on the failure point, and then running the target application based on the repaired system code.
[0008] Accordingly, an embodiment of the present application provides a computer device, including a processor, a memory, and a network interface, the processor is coupled to the memory and the network interface, the network interface is used for providing a network communication function, the memory is used for storing a computer program, and the processor is used for executing a data processing method in the embodiment of the present application by calling the computer program.
[0009] Accordingly, the embodiments of the present application provide a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium, which, when executed by a processor, performs the data processing method in the embodiments of the present application.
[0010] Accordingly, an embodiment of the present application provides a computer program product, which includes a computer program, or computer instructions, which, when executed by a processor, implements the data processing method of the embodiment of the present application. Effect of the Invention
[0011] In the embodiment of the present application, on-site information of multiple types of unresponsiveness phenomena of a target application can be acquired, and any one of the types of unresponsiveness phenomena may occur in the process of running the target application based on the system code of the operating system, and the corresponding on-site information can be used to describe the execution status of the system code when the unresponsiveness phenomenon occurs. By performing a commonality analysis on the acquired on-site information of each type of unresponsiveness phenomenon, the execution status of the system code can be analyzed from the operating system level, and common characteristics of the occurrence of each type of unresponsiveness phenomenon in the target application from the lowest layer can be found, and a commonality analysis result can be obtained. Furthermore, based on the commonality analysis result, a fault point at which the unresponsiveness phenomenon occurs in the system code can be determined, and the system code can be repaired based on the fault point. By running the target application based on the repaired system code, a situation in which the application unresponsiveness phenomenon (i.e., the unresponsiveness phenomenon of the target application) may occur can be prevented from the operating system side, and the occurrence of the application unresponsiveness phenomenon can be avoided to the greatest extent possible. As can be seen, this method starts from the operating system level and performs collection and commonality analysis on on-site information of each type of unresponsiveness phenomenon that actually occurs. In addition, based on the results of the analysis, the system code of the native operating system can be repaired to fundamentally solve the problem of application unresponsiveness in the operating system, making it highly versatile and reducing the situation in which any one type of unresponsiveness phenomenon occurs in the target application in the operating system, thereby effectively improving the stability of the system or application. [Brief description of the drawings]
[0012] [Figure 1a] FIG. 2 is a schematic diagram of application no-response classification provided by an embodiment of the present application; [Figure 1b] 2 is a schematic diagram of a process for triggering an application unresponsiveness phenomenon provided by an embodiment of the present application; [Figure 1c] 4 is a flowchart for initiating a service provided by an embodiment of the present application; [Figure 1d] FIG. 2 is a schematic diagram of the process in which the service-type unresponsive phenomenon occurs in an embodiment of the present application; [Figure 1e] FIG. 2 is a schematic diagram of the process in which the broadcast-type unresponsive phenomenon occurs provided by an embodiment of the present application; [Figure 1f] FIG. 2 is a schematic diagram of the process in which a content-providing no-response phenomenon occurs in an embodiment of the present application; [Figure 1g] FIG. 2 is a schematic diagram of the process in which the input distribution type no-response phenomenon occurs in the embodiment of the present application. [Figure 2a] FIG. 1 is an architecture diagram of a cloud gaming system provided by an embodiment of the present application. [Figure 2b] FIG. 2 is a schematic diagram presenting the unresponsive phenomenon in a cloud game provided by an embodiment of the present application. [Figure 2c] FIG. 1 is a schematic diagram of the lowest level interaction logic of a system in a server in a cloud gaming scene provided by an embodiment of the present application. [Figure 3a] 2 is a flowchart of a data processing method provided by an embodiment of the present application; [Figure 3b] 1 is a schematic diagram of on-site information of a no-response phenomenon occurring in a cloud gaming scene provided by an embodiment of the present application. [Figure 4] 4 is a flowchart of another data processing method provided by an embodiment of the present application; [Diagram 5] 4 is a flowchart of yet another data processing method provided by an embodiment of the present application. [Figure 6a] FIG. 1 is a schematic diagram of the call stack result of a parent process provided by an embodiment of the present application; [Figure 6b] FIG. 2 is a schematic diagram of a logic code of an objective function provided by an embodiment of the present application; [Figure 7] FIG. 2 is a structural schematic diagram of a data processing device provided by an embodiment of the present application; [Figure 8] FIG. 2 is a structural schematic diagram of a computer device provided by an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] In order to better understand the scheme of the embodiments of the present application, the following first introduces relevant terms and concepts that may be involved in the embodiments of the present application.
[0014] Operating system: The official English name is Operating System, abbreviated as OS. An operating system is a computer program that manages computer hardware and software resources. It is the most basic system software in a computer system. An operating system has functions such as processing machine management (e.g., process control and process synchronization), memory management (e.g., internal memory allocation and recovery, and address mapping), device management (e.g., file storage space management, and file read / write management), and file management (e.g., buffering management, and virtual device). There are many types of operating systems, such as the commonly seen Android (or called Android system), Linux (registered trademark), Windows, and IOS.
[0015] Kernel: The kernel is the core of the operating system. The kernel can convert input commands into machine language that computer hardware can understand, and the kernel can directly communicate with the hardware and inform the hardware of requests initiated by application programs. The functions of the kernel include, but are not limited to, process management, task scheduling, and internal memory management. Here, file management refers to the kernel using a file system to organize files and maintaining monitoring of file data storage, file status, and access settings through the file system. Process management refers to the kernel deciding which process in a multi-process environment should be given priority to the CPU (Central Processing Unit) and how long the time slice of the operation should be assigned. Internal memory management refers to the kernel being able to detect internal memory space and create or destroy internal memory to ensure that application programs are executed correctly.
[0016] Hard-coding: Refers to the application development practice of embedding data directly into the source code of a program or other executable object. Unlike retrieving data from an external source or generating data at run time, hard-coding can usually only be modified by editing the source code and recompiling the executable file. In computer programs or text editing, hard-coding refers to the method of replacing changeable variables with a single fixed value.
[0017] ANR: The official name in English is Application Not Responding, and in Chinese it is Application Not Responding (can be abbreviated as No response). ANR is a common phenomenon in operating systems (e.g. Android system), which may be a bug in the code for developers, but may cause a bad user experience for users. The operating system needs to complete some events within a certain time, and if there is no effective response after the specified time, or if the response time is too long, both of these may cause ANR. In general, a prompt box may pop up in the system interface to inform the object that the current application is not responding, and the object can choose to continue waiting or force close, which is a self-protection mechanism of the operating system. In addition, when an application is not responding, the process in which the application is not responding may be directly closed to prevent the prompt box from popping up to notify the object.
[0018] Target application: In this application, the target application refers to any application that runs on a computer device, such as an application program in a terminal or a service program in a server. According to the application installation method, the target application may be an installation-free application (e.g., an applet and a web page application (e.g., a shopping website)) or a third-party application program that is installed on a computer device. According to the application function, the target application may specifically be any one of a game application, an audio / video application, a social application, a shopping application, and the like.
[0019] A target application may be operated based on an environment provided by an operating system, and in the process of operating the target application based on the system code of the operating system, the target application may experience an unresponsive situation (i.e., ANR). In the embodiment of the present application, the ANR occurring in the target application may include several types of unresponsiveness phenomena, such as a service-type unresponsiveness phenomenon, a broadcast-type unresponsiveness phenomenon, a content-providing-type unresponsiveness phenomenon, and an input delivery-type unresponsiveness phenomenon. Taking the Android operating system as an example, the service-type unresponsiveness phenomenon refers to an unresponsiveness phenomenon triggered by a service not being completed within a predetermined duration (e.g., 20s) (Service Timeout), the broadcast-type unresponsiveness phenomenon refers to an unresponsiveness phenomenon triggered by a broadcast not being completed within a predetermined duration (e.g., 10s) (BroadcastQueue Timeout), the content-providing-type unresponsiveness phenomenon refers to an unresponsiveness phenomenon triggered by a content provider timing out after publishing (ContentProvider Timeout), and the input delivery-type unresponsiveness phenomenon refers to an unresponsiveness phenomenon triggered by an input event delivery timing out (InputDispatching Timeout). The above four types of ANR can be summarized in the application unresponsiveness classification diagram shown in Figure 1a. The process (or trigger mechanism) of each type of application unresponsiveness mentioned above will be introduced one by one below.
[0020] From the perspective of the system source code of the operating system, the triggering process of ANR can be specifically divided into three steps, including setting a duration threshold, releasing the triggering condition of application unresponsiveness (i.e., application unresponsiveness phenomenon, abbreviated as ANR), and triggering application unresponsiveness (i.e., ANR), as shown in FIG. 1b. By setting the duration threshold, it is possible to determine whether the duration of the actual processing of the corresponding event times out (i.e., the duration of the actual processing is greater than the set duration threshold). The duration threshold can be set according to the corresponding ANR, and the duration thresholds of different ANRs may be the same or different. If the timeout occurs, the ANR is triggered, and if the timeout does not occur, the ANR is not triggered and the triggering condition of ANR is released. Here, releasing the triggering condition of ANR refers to canceling the originally set duration threshold.
[0021] In the following, we will introduce the process of each type of ANR in detail. First, we will introduce some common concepts and terms related to the following application unresponsiveness phenomena:
[0022] A target application refers to any application program currently running on a computer device. The application process of a target application can interact with the lowest level processes (e.g., system service processes) of the operating system to complete the appropriate events.
[0023] The system service process is used to launch and manage the entire Java framework. All important services in the system can be started in the system service process, such as the component management service AMS (ActivityManagerService) and the window management service WMS (WindowManagerService). In the Android operating system, the system service process and the application process of the target application can be forked by the Zygote process (a process used to fork a new process, referred to here as the fork process). The following content specifically describes the system service process in the operating system as the execution entity.
[0024] The four components of the Android operating system are Activity, Service, BroadCast Receiver, and Content Provider. (1) Activity (component) is a visual interface that objects operate on and can provide objects with a window to complete operation commands. (2) Service (component) is an application component that can perform long-running operations in the background and has no object interface. Service components do not have graphical object interfaces because Services usually run in the background and generally do not need to interact with objects. Service components are usually used to provide background services to other components or to detect the operation status of other components. (3) BroadCast Receiver (BroadCast Receiver) can be used to filter and respond to external events that an application is interested in (e.g., an incoming phone call and when a data network is available). BroadCast Receivers can respond to the information they receive by launching an Activity or Service, or notify objects using the NotificationManager, such as a notification that plays a sound or a message that appears in the status bar. (4) A Content Provider provides a specified set of data from one application program to other application programs. Other applications can retrieve or save data from the Content Provider through the ContentResolver class. Specifically, a ContentProvider publishes data and can be invoked by combining a ContentResolver object with a Uri (Universal Resource Identifer).Here, Uri represents the address of the data operation, and each ContentProvider may have a unique address when it publishes data.
[0025] (1) Service-type unresponsiveness phenomenon.
[0026] The process of the occurrence of the service-type unresponsive phenomenon includes the steps of setting a service duration threshold in response to a service creation request sent by an application process of a target application; sending a service creation message to the service process, so that the service process notifies the service process to call one or more other processes to perform the service creation task based on the service creation message, and returning feedback information after the service is successfully created; and when the feedback information returned from the service process is not received within the service duration threshold, the service-type unresponsive phenomenon occurs.
[0027] The service creation request sent by the application process of the target application can be used to request the system to create services required by the target application, such as listening services and notification services. In a cloud gaming scenario, the listening service is, for example, a service that listens to whether a player's account is logged in, or a service that listens to whether a player is online. The system service process can set a service duration threshold in response to the service creation request initiated by the application process. The service duration threshold can be used to detect whether the service creation times out. For example, the duration threshold of the foreground service and the duration threshold of the background service are both 20s. The system service process can then send a service creation message to the service process, which can cause the service process to call one or more processes to perform a service creation task, and create a service required by the target application through the service creation task. The service process may be a pre-created service requested by a component management service in the system service process. Specifically, the main thread in the service process can call one or more other processes (i.e., processes different from the service process) to perform a service creation task. The one or more processes may include a process having a parent-child relationship, and the parent-child processes may share an address space. After the execution of the service creation task is completed, the main thread in the service process may send feedback information to the system service process, where the feedback information may be a notification message used to indicate that the service creation is completed. If the feedback information returned from the service process is not received within the service duration threshold, it means that the duration of the service creation task is equal to or greater than the service duration threshold, and a service timeout phenomenon occurs, and a service-type unresponsive phenomenon also occurs.Conversely, when feedback information returned from a service process is received within the service duration threshold, it means that the duration required for the service creation work is less than the service duration threshold, and the service-type non-response phenomenon does not occur.
[0028] The above content is exemplified by taking the ANR of the Android operating system as an example. A Service Timeout occurs during startService, and a Service may include two types of services: a foreground service with a timeout time (i.e., the service duration threshold) of 20s and a background service with a timeout time of 200s. In a target application, starting a Service can be achieved by calling one line of code of API startService. From the Android operating system level, the process is as shown in the simple flowchart of startService in Figure 1c below. The process of creating and starting a service is mainly completed by the component management service (AMS, ActivityManagerService) in the system service process. The AMS requests Zygote to create a Create Process to create a bearer service through socket (a type of communication method) communication, which includes requesting the creation of a thread (ActivityThread, i.e., the main thread). A service runs in a separate Create Process, and does not need to start a service process for local service operation, and the ActivityThread plays the role of the main thread of the application program. Then, Zygote creates a new process by copying the Zygote process by fork, and loads the resources related to the ActivityThread into the new process. AMS sends a service creation request to the ActivityThread in the newly created process by Binder (inter-process communication mechanism) communication. The ActivityThread starts and runs the service. Specifically, the ActivityThread may create a service (createservice) by calling the onCreate method.
[0029] As shown in FIG. 1d, when an application process (i.e., APP process) initiates a request for service creation (startService) (see step 1 in the drawing), a system service process (i.e., system_server process) in the system can receive the request by allocating one idle thread binder_1 (i.e., communication thread 1). Then, it sends a service timeout message SERVICE_TIMEOUT_MSG to the component manager ActivityManager to set the service duration threshold (see step 2 in the drawing). Then, binder_1 notifies binder_3 (i.e., communication thread 3) of the service process (i.e., service process) that it is ready to execute a processing task (scheduleCreateService to schedule and create a service) (see step 3 in the drawing). After receiving, binder_3 passes it to the main thread (i.e., main thread, which may correspond to the main thread ActivityThread in FIG. 1c) and adds the service creation event to the task queue of the main thread (i.e., sendMessage to send a message) (see step 4 in the drawing). Next, the main thread will perform a series of operations, specifically the service creation operation here, which may include the process of creating a service by the ActivityThread thread in Fig. 1c (see step 5 in the figure), and complete the initiation of the service life cycle (waitToFinish, waiting for completion). After completing the above operations, the main thread can report to the system_server process that the operations have been completed (i.e., the completion of the service creation operation serviceDoneExecuting).Next, the binder_2 thread (i.e., communication thread 2) in the system_server process can receive the message (see step 6 in the diagram) and if the service creation task is completed within the service duration threshold time, the ANR trigger condition can be removed and an ANR will not occur; otherwise, an ANR will occur.
[0030] (2) Broadcast type unresponsiveness phenomenon.
[0031] The process of the broadcast-type unresponsive phenomenon occurring includes the steps of setting a broadcast duration threshold in response to a broadcast transmission request initiated by an application process of a target application; sending a broadcast registration message to the broadcast receiving process, so that the broadcast receiving process notifies the broadcast receiving process to call one or more other processes to perform broadcast operations based on the broadcast registration message, and returning feedback information after the broadcast is completed; and when the feedback information returned from the broadcast receiving process is not received within the broadcast duration threshold, the broadcast-type unresponsive phenomenon occurs.
[0032] The broadcast mechanism is used for communication between processes / threads, and the broadcast can be divided into broadcast transmission and broadcast reception. The broadcast may include parallel broadcast and serial broadcast. Usually, the phenomenon of application unresponsiveness occurs in the scene of serial broadcast. Similar to the process in which the service-type ANR occurs, the system service process can set a broadcast duration threshold in response to a broadcast transmission request initiated by the application process of the target application. The application process of the target application is a process in which a broadcast sender is present. The system service process can send a broadcast registration message to the broadcast receiving process, so that the main thread in the broadcast receiving process can call one or more other processes to perform the broadcast operation. The one or more processes may include a process having a parent-child relationship, and the address space can be shared between the parent-child processes.
[0033] The broadcast receiving process is a process having a broadcast receiving side, and can be used to receive broadcast messages from other application programs or systems. The broadcasting task can specifically broadcast various types of events, such as a broadcast when a date change occurs and a broadcast when the system is started. In a cloud gaming scene, the broadcasting event can be, for example, a network switching broadcast and a network failure broadcast. Before performing the broadcasting task, a broadcast receiving queue can be created based on the broadcast registration message, and the received broadcasting events can be processed in order. After the processing of the broadcasting task is completed, the main thread can return feedback information, and the feedback information is a notification message used to indicate that the broadcasting task is completed. If the feedback information returned from the broadcast receiving process is not received within the broadcast duration threshold, the duration of the broadcasting task will be equal to or greater than the broadcast duration threshold, causing a broadcast timeout phenomenon, and further causing a broadcast-type no-response phenomenon. Conversely, if the feedback information returned from the broadcasting process is received within the broadcast duration threshold, the duration of the broadcasting task will be less than the broadcast duration threshold, meaning that no broadcast-type no-response phenomenon will occur.
[0034] Taking the ANR of the Android operating system as an example, the broadcast type ANR will be introduced in more detail. Specifically, the schematic diagram of the process of the broadcast type ANR occurring shown in FIG. 1e can also be referred to. When the application process of the target application initiates a broadcast transmission request (sendBroadcast) (see step 1 in the drawing), the system service process can receive the broadcast transmission request by allocating one idle thread binder_1 (i.e., communication thread 1). Then, it sends a broadcast timeout message BROADCAST_TIMEOUT_MSG to the component manager ActivityManager (sendMessage) and sets the broadcast duration threshold (see steps 2-3 in the drawing). Next, binder_1 notifies the binder_3 thread (i.e., communication thread 3) of the broadcast reception process (i.e., Receiver process) by a broadcast registration message that it is ready to perform processing work (see step 4 in the drawing). After receiving, binder_3 sends the message to the main thread (i.e., main thread) and adds the event to the task queue of the main thread (communication thread 3 sends the message to the main thread, sendMessage, see step 5 in the drawing).Then, the main thread can perform a series of tasks, here broadcast tasks, including initiating the life cycle of broadcast reception, and if it finds that the current process also has SP (SharedPreferences, a type of data storage method) writing a file, it waits for the SP data persistence task (i.e., the main thread sends a message to the queueing work cycle thread, sendMessage, see step 6 in the drawing), and the queued-work-looper thread needs to report to the system_server process that the broadcast task has already been completed (see step 7 in the drawing), or conversely, the main thread can directly report that the broadcast task has already been completed (i.e., finishReceiver). Then, the binder_2 thread (i.e., communication thread 2) in the system_server process can receive the message, and if all tasks are completed within the broadcast duration threshold time, the ANR trigger condition can be released and no ANR will occur (see step 8 in the drawing), otherwise, an ANR may occur.
[0035] (3) Content provision type unresponsiveness phenomenon.
[0036] The process of the occurrence of a content providing type unresponsive phenomenon includes the steps of: detecting the running status of a content providing process corresponding to a content providing object in response to a request to obtain a content providing object initiated by an application process of a target application; when the running status indicates that the content providing process is not running, creating a content providing process and invoking one or more other processes to notify the content providing process to install the content providing object, and returning feedback information after installing the content providing object, wherein an installation duration threshold is set for the content providing object; and when the feedback information returned from the content providing process within the installation duration threshold, a content providing type unresponsive phenomenon occurs.
[0037] The content providing object is used to realize the function of data sharing between different application programs. The content providing process is used to provide content data and realize the function of data sharing by installing and publishing the content providing object. The system service process can detect the running state of the content providing process in response to a request for obtaining the content providing object initiated by the application process of the target application. If the content providing process is not running, it means that the content providing process may not be created, and the content providing process can be created and started. After being created, the content providing process can register itself with the system service process and set a threshold for the duration of the installation. Then, the content providing process can be notified to perform the installation work of the content providing object, which can be specifically performed by invoking one or more other processes by the main thread in the content providing process. The one or more processes may include a process having a parent-child relationship, and the address space can be shared between the parent-child processes.
[0038] After the installation is completed, feedback information can be returned. The feedback information is a notification message used to indicate that the installation of the content providing object is completed, and can be used to issue a content providing object to return the content data provided by the acquired content providing object. In a cloud gaming scenario, the content providing object can be an address book in the system, and the provided content data can be the related data of the contacts in the address book. As can be understood, in a specific embodiment of the present application, with respect to the related data such as the address book, when the above embodiment of the present application is applied to a specific product or technology, the permission or consent of the object needs to be obtained, and the collection, use, and processing of the related data needs to comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0039] If feedback information returned from the content providing process is not received within the installation duration threshold, the duration required for the installation operation will be equal to or greater than the installation duration threshold, causing a content provision timeout phenomenon and further resulting in a content provision type unresponsive phenomenon. Conversely, if feedback information returned from the content providing process is received within the installation duration threshold, the duration required for the installation operation of the content providing object will be less than the installation duration threshold, meaning that a content provision type unresponsive phenomenon will not occur.
[0040] The content providing ANR is introduced in more detail by taking the ANR of the Android operating system as an example. Specifically, the schematic diagram of the process of broadcasting ANR shown in FIG. 1f can also be referred to. When the application thread of the target application initiates a request (getContentProvider) to obtain the content providing object ContentProvider (see step 1 in the figure), the system service process can receive the request to obtain ContentProvide by allocating one idle thread binder_1 (i.e., communication thread 1). If it detects that the ContentProvider has not yet started, it first forks a new process by Zygote (i.e., creates a new process by Zygote fork, see step 2 in the figure). The new ContentProvider process registers itself in the system (attachapplicationlocked), and the communication site binder_2 (i.e., communication thread 2) of the system_server process receives the registration message (see step 3 in the diagram), sends a publish timeout message CONTENT_PROVIDER_PUBLISH_TIMEOUT_MSG message of the content provider object to the ActivityManager inside the system_server process, and sets the installation duration threshold (see step 4 in the diagram). Next, binder_2 notifies the binder_4 thread (i.e., communication thread 4) of the provider process (i.e., the content provider process) that it is ready to perform processing work (binding the application program, bindApplication, see step 5 in the diagram). After receiving, binder_4 hands it over to the main thread (i.e., sends a message to the main thread, sendMessage, see step 6 in the diagram) and adds the event to the task queue.The main thread can then perform a series of operations, here an installation operation of a content provider object, and optionally may further include a publication operation of a content provider object. It then reports to the system_server process that the installation operation is already completed, and returns the content data of the retrieved content provider object (publishing the content provider object, publishContentProvider, see step 7 in the diagram). The binder_3 thread (i.e., communication thread 3) in the system_server process then receives the message and can release the ANR trigger condition if all operations are completed within the installation duration threshold, and no ANR will occur (see step 8 in the diagram), otherwise an ANR will occur.
[0041] (4) The phenomenon of no response to input event delivery.
[0042] The process of the input event delivery type unresponsive phenomenon includes the steps of adding the currently received input event to an input queue when an input event is received and waking up an input delivery thread, which is used to deliver each input event in the input queue to an application process of a target application in order for processing, and the step of causing the input event delivery type unresponsive phenomenon to occur when the application process of the target application processes another input event when the delivery priority of the currently received input event is reached.
[0043] Specifically, a thread in a system service process can listen to an input event notified from the lowest layer, and when an input event is received, it can add it to an input queue to wait for distribution processing. At the same time, an input distribution thread can be woken up to distribute the input event in the input queue, and a distribution start time can be set at this time. If the application process of the target application is still processing other input events when the distribution priority of the currently received input event is reached, for example, when the distribution time point of the currently received input event is reached, it means that the application process cannot process the currently received input event to be delivered, and an input event delivery type non-response phenomenon may occur. In a cloud game scene, the input event may specifically be an operation event in a game client terminal of an object, and the operation event cannot reach and be processed by a server that runs a cloud game in the manner of operation stream, and an ANR occurs.
[0044] In another implementation, if the application process of the target application is not processing other input events when the delivery priority of the currently received input event is reached, the currently received input event is delivered to the application process by the input delivery thread, so that the application process calls one or more other processes to process the currently received input event, and returns feedback information after the processing is completed. If the feedback information returned from the application process is not received within the processing duration threshold, the input event delivery type no-response phenomenon occurs.
[0045] When the currently received input event reaches a delivery priority and is determined to reach a delivery time point of the input event based on, for example, a delivery start time point and a processing duration threshold, the currently received input event can be delivered to an application process by an input delivery thread, specifically, to a target window of the application process. The application process can call one or more other processes to process the currently received input event, and return feedback information after the processing is completed. The feedback information is a notification message used to indicate that the input event is completed. Here, the one or more called processes may include a process having a parent-child relationship, and the address space can be shared between the parent-child processes.
[0046] If feedback information returned from an application process is not received within the threshold of processing duration and a new input event is received, this means that processing of the currently received input event does not end within the specified threshold of processing duration, and the next input event waits for processing of the currently received input event. This may cause an input event delivery type no-response phenomenon. Conversely, unless a new input event is received when processing the currently received input event, even if feedback information returned from an application process is not received within the threshold of processing duration or even if feedback information returned from an application process is received within the threshold of processing duration, the input event delivery type no-response phenomenon will not occur.
[0047] Taking the ANR of the Android operating system as an example, the input event delivery type ANR will be introduced in more detail. Specifically, the schematic diagram of the process of the input event delivery type ANR shown in Figure 1g can also be referred to. First, the InputReader thread (i.e., the input reading thread) listens to the input event announced from the lowest layer by the EventHub. Once the input event is received, it puts it into the mInBoundQueue queue (an input queue used to store input events to be delivered) and wakes up the InputDispatcher thread (see step 1 in the figure). The InputDispatcher thread starts the delivery of the input event and sets the delivery origin time. First, it detects whether there is an event being processed, and if not, it takes out the event at the top of the mInBoundQueue. Then it checks whether the window is ready, and if the window is ready, it moves the event to the outBoundQueue queue (an output queue used to store input events to be delivered to the target window). At this time, if the connection of the other terminal of the application pipeline is normal, the data is taken out of the outBoundQueue and put into the waitQueue queue (a wait queue, used to store input events that wait for processing of the target window) (see steps 2 to 4 in the drawing). Next, InputDispatcher sends a message to inform the target application that it is ready to perform processing work. At this time, the main thread of the target application (i.e., the main thread) receives the input event, and transfers the received input event layer by layer to the target window for processing, and when the above work is completed, it can send a message to report that the work is completed to the system_server process (i.e., send a completion signal, see step 7 in the drawing). Next, the system can remove the event from the waitQueue queue.When processing a time-consuming operation (such as a file operation) in the current input system, every subsequent input event can detect whether the previous input event has timed out, and if so, it is an ANR.
[0048] Based on the above introduction of the specific principles of ANR, and also from analyzing the source code (i.e., system code) of the operating system where ANR occurs, it is clear that in the ANR scenes of Service, BroadcastQueue, ContentProvider, Input, etc., application processes can all interact with the system_server process, and can also initiate requests with Zygote to create new processes (although some are not shown, it can be understood that the creation of new processes can all be realized by the Zygote process). These are all contents in the lowest level operating system.
[0049] In order to solve the ANR problem, the present application provides a scheme for solving the application unresponsiveness phenomenon by repairing the system code. Specifically, it is possible to collect on-site information of each type of unresponsiveness phenomenon of the target application, and based on the on-site information, it is possible to know the execution status of the system code when the unresponsiveness phenomenon occurs in the target application, and it is possible to determine the commonality analysis result by performing a commonality analysis on the collected on-site information of each type of unresponsiveness. The so-called commonality analysis refers to an analysis for searching for common elements, and based on the commonality analysis result obtained by the commonality analysis, it is possible to determine the fault point where the unresponsiveness phenomenon occurs in the system code of the operating system, and thereby repair the system code based on the fault point. In this way, if the target application is operated based on the repaired system code, it is possible to effectively reduce the occurrence probability of the unresponsiveness phenomenon and reduce the crash situation of the target application or the operating system due to the occurrence of the unresponsiveness phenomenon, which is advantageous for the stable operation of the system and the application. From the perspective of the lowest-level system, this scheme realizes a fundamental solution to the application unresponsiveness problem in the operating system by repairing the system code of the operating system at the level of the operating system. This is a fundamental solution method and has versatility.
[0050] It can be seen from the operating system level, by deeply studying the process of ANR generation in the operating system, knowing the trigger principle of ANR, and analyzing the lowest architectural logic when several types of ANR occur from the source code of the operating system, and changing the system call function, the architectural logic of ANR trigger in the operating system can be changed, which can fundamentally solve the ANR problem in the operating system, reduce the situation where the application program or the system crashes, and improve the compatibility and stability of the system and applications. Because the change is made to the native operating system and no hard coding is used, it is not strongly bound to a specific platform and can be applied to various scenes such as cloud games, terminals, and simulators, which has high scene versatility and can deal with multiple types of ANR to effectively avoid the problems of various ANRs.
[0051] It can be understood that the scheme can be applied to various scenarios where application unresponsiveness occurs, such as terminals, simulators, and cloud gaming scenarios. When applied to the cloud gaming scenario, it can solve the ANR problem in the cloud gaming scenario, improve the compatibility and stability of the cloud gaming platform, and improve the user experience. Here, the target application can be a cloud gaming application. The so-called cloud gaming refers to online gaming technology based on cloud computing technology.
[0052] Cloud computing technology belongs to cloud technology. The so-called cloud technology refers to a hosting technology that integrates a series of resources such as hardware, software, and network in a wide area network or a local area network to realize computing, storage, processing, and sharing of data. Here, cloud computing is a computing mode that distributes computing tasks to a resource pool composed of many computers, allowing various types of application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called a "cloud." From the user's perspective, resources in the "cloud" can be expanded infinitely, and can be obtained at any time, used as needed, expanded at any time, and paid for according to usage. As a cloud computing basic capability provider, a cloud computing resource pool (abbreviated as cloud platform, commonly referred to as IaaS (Infrastructure as a Service) platform can be established, in which multiple types of virtual resources are deployed and made available for selection and use by external clients. The cloud computing resource pool mainly includes computing equipment (which is a virtualization machine and includes an operating system), storage equipment, and network equipment. In this application, cloud computing technology may be adopted for the commonality analysis of on-site information.
[0053] In the cloud gaming scene, the game can be run on the cloud terminal server, and the rendering computing that is highly consumed in the game can be arranged on the cloud terminal server, and the screen and the sound can be transmitted to the player's game terminal through the network in the form of audio-video stream, and the user operation command can be transmitted to the cloud terminal server in the form of operation stream to perform the corresponding computing. Benefiting from the rapid development of current mobile communication technology, such as 5G (5th Generation Mobile Communication Technology, abbreviated as 5G), higher transmission bandwidth, and stronger parallel ability, the network delay can be shortened, and it also brings more development opportunities and more imagination room for cloud games.
[0054] The environment for running cloud games may be called a cloud gaming environment. In the cloud gaming environment, multiple operating systems can be run on one or more independent servers (e.g., servers adopting architectures such as ARM / x86) by a method of running a system container, and related images can be transmitted to a remote receiving program for processing by a method of video stream. Here, the ARM architecture is a processor architecture with a reduced instruction set of 32-bit / 64-bit, and the x86 architecture is a computer language instruction set executed by a microprocessor. A container refers to a type of virtualization at the operating system level, and the container can be used to bear an operating system. It can realize that multiple operating systems (i.e., a server operating system and a device operating system) share the same kernel in kernel mode and maintain the independence of multiple operating systems from each other in user mode through an isolation mechanism (e.g., namespace). The server operating system here refers to a general-purpose operating system in a server, such as the Linux operating system and the Android operating system, and the device operating system refers to an operating system in a container, such as the Android (registered trademark) operating system and the IOS operating system.
[0055] Accordingly, the system container refers to a kind of container instance, which can operate based on a server operating system (e.g., a Linux operating system). For example, the system container may be an Android container that operates on a Linux operating system, and what the Android container loads is Android mirroring, which is a file storage format, and mirroring can merge multiple files into one mirror file to facilitate the distribution and use of files. It should be understood that the system container referred to in the embodiments of the present application is not limited to the Android container, and for example, when the IOS operating system supports open source research and development, the system container may also be an IOS container, etc. As can be seen, in the cloud gaming environment proposed by the embodiments of the present application, by deploying many system containers in one independent server, the powerful CPU (Central Processing Unit) and GPU (Graphics Processing Unit) capabilities of the server side can be fully utilized to realize high parallel execution of system operations, and the operating speed of the cloud game can be improved.
[0056] The cloud gaming environment may be supported by providing the devices in the cloud gaming system with appropriate operating resources. As shown in FIG. 2a, the cloud gaming system may include at least one edge server 11, a plurality of game client terminals 12, and at least one analysis server 13. Here, the edge server is a server that runs a cloud game. At least one system container may be deployed in each edge server shown in FIG. 2a, and one or more game APPs (Applications, application programs) may be installed in the system container, and these game APPs can run one or more cloud games. In this way, the cloud game can be run by the system container. Each system container may be connected to at least one game client terminal 12, so that the game screen and sound of the cloud game can be transmitted to the connected game client terminal 12. In addition, when an ANR occurs during the process of the edge server 11 running the cloud game, a prompt can be displayed on the game client terminal 12, as shown in FIG. 2b.
[0057] The analysis server 13 is a server used for analyzing the occurrence of the unresponsiveness phenomenon in an application. In the process of running a cloud game application in a system container in at least one edge server 11, there may be different types of unresponsiveness phenomena occurring in the application in one or more edge servers. At this time, the analysis server 13 collects on-site information occurring when at least two types of unresponsiveness phenomena occur in a certain cloud game application in the edge server 11, and performs a commonality analysis on the on-site information of each type of unresponsiveness phenomenon, and can find out a common fault point where the unresponsiveness phenomenon occurs based on the result of the commonality analysis. The system code of the operating system is repaired according to the common fault point, and the cloud game application is operated based on the repaired system code to solve the problem of application unresponsiveness. In another embodiment, the above work may be performed by one target edge server, that is, any one edge server of the at least one edge server 11 can obtain on-site information of multiple types of unresponsiveness phenomena, and can solve and avoid the application unresponsiveness phenomenon by repairing the system code of the operating system based on the same principle.
[0058] It is necessary to explain that the edge server and the analysis server may be independent physical servers, server clusters or distributed systems composed of multiple physical servers, and may further be cloud servers that provide basic cloud computing services such as, but not limited to, cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0059] The game client terminal 12 may be a terminal device providing basic capabilities such as streaming media playback capabilities, human-computer interaction capabilities, and communication capabilities, or may be an application program running on the terminal device. Here, the terminal device includes, but is not limited to, devices such as mobile phones, computers, smart voice interaction devices, smart home appliances, in-vehicle terminals, and aircraft, and the present application is not limited thereto. It can be understood that FIG. 2a is only for illustrative purposes of the system architecture of the cloud gaming system, and does not limit the specific architecture of the cloud gaming system. For example, in another embodiment, the cloud gaming system may further include a background server used for scheduling, etc.
[0060] Based on the above-mentioned cloud gaming environment and cloud gaming system, for the cloud games deployed on one side of the server, the lowest layer can be based on containerization technology, system and kernel technology. Based on this, in combination with aspects such as audio-video technology, network optimization and computing resource management, a suitable cloud gaming platform (which can provide operating environment and services for cloud games) can be created, and multiple types of cloud games can be operated on the cloud gaming platform. In the following, the lowest layer of the cloud game is based on the Android native operating system and the Linux kernel as an example to exemplify the relevant interaction logic at the system level in the operation process of the cloud game. As shown in FIG. 2c, the interaction logic of the lowest layer of the system in the server specifically relates to the interaction between the system container, the Linux kernel and the hardware provided by the server.
[0061] In the process of the system container running the cloud game, the system container or the game APP in the system container can send an operation request to the operating system, and the operating system interacts with the Linux kernel therein, and the Linux kernel receives the operation request. Based on the operation request, the Linux kernel can call relevant hardware (such as one or more types of a central processor, a graphics processor, and an internal memory, etc.) to complete the operation corresponding to the operation request. After the hardware completes the execution according to the operation request, the Linux kernel can return the operation result corresponding to the operation request to the system container. For example, when the operation request is a rendering request, a graphics processor (GPU, Graphics Processing Unit) provided by the server can be called according to the rendering request, a rendering event corresponding to the rendering request can be executed to obtain a game screen whose rendering has been completed, and the Linux kernel can return the game screen whose rendering has been completed. In one implementation, a coding module in the system container can be further called to perform an image compression process on the returned game screen, and a compressed image can be obtained. In the process of image compression, the Linux kernel calls the lowest level hardware resources to perform coding, obtains coding data (i.e., compressed image), and returns the compressed image to the operating system via the Linux kernel. After obtaining the coding data, the compressed image can be transmitted to the game client terminal in the form of a video stream.
[0062] The lowest layer of cloud gaming is also based on the operating system, and since ANR is a common phenomenon in operating systems, the process of running cloud gaming may also encounter ANR issues, which can be resolved by adopting the scheme mentioned above to fix the system code and resolve the application unresponsiveness phenomenon.
[0063] Based on the scheme of repairing system code to solve application unresponsiveness phenomenon mentioned above, the present application provides a data processing method. The data processing method may be executed by a computer device, and the computer device may be a terminal or a server. When the target application is a cloud game application, the computer device here may be, for example, any analysis server 13 in the cloud game system shown in FIG. 2a. Of course, the data processing method may be jointly executed by a terminal and a server, and is not limited thereto. For ease of understanding, the data processing method is described below by taking the data processing method executed by a computer device as an example.
[0064] As can be understood, the terminal may be a mobile phone, a computer, a smart voice interaction device, a smart home appliance, an in-vehicle terminal, an aircraft, and other devices, and the present application is not limited thereto. The server may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, and may further be a cloud server providing basic cloud computing services such as, but not limited to, cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0065] Referring to FIG. 3a, FIG. 3a is a flowchart of a data processing method provided in an embodiment of the present application, which may include the following S301 to S303.
[0066] S301: Obtain on-site information of each type of unresponsive phenomenon among a plurality of types of unresponsive phenomena of a target application.
[0067] Multiple types of unresponsiveness phenomena of a target application refer to at least two types of unresponsiveness phenomena of a target application, for example, at least two of the service-type unresponsiveness phenomenon, broadcast-type unresponsiveness phenomenon, content provision-type unresponsiveness phenomenon, and input event delivery-type unresponsiveness phenomenon introduced above.
[0068] Any one of the unresponsive phenomena occurs in the process of running a target application according to the system code of the operating system. The unresponsive phenomenon of the target application refers to the phenomenon that the target application program does not respond, specifically, some events cannot get an effective response within a certain time, or the response time is too long. For convenience of description, the unresponsive phenomenon of the target application can be abbreviated to application unresponsiveness (ANR), or ANR phenomenon.
[0069] An operating system (OS) is used to control and manage the hardware and software resources of the entire computer system, and to provide a convenient interface and environment for objects and other software by rationally organizing and scheduling computer work and resource allocation. Categories of operating systems include, but are not limited to, Android operating system, Windows operating system, Linux operating system, iOS operating system, etc.
[0070] The operating system can provide an operating environment for an application program, and the application program can complete some events by calling a function provided by the operating system (i.e., a system call). Therefore, running a target application based on the system code of the operating system refers to being able to call the system code of the operating system in the process of running the target application. In this process, the target application may become unresponsive. For example, when calling the system code of the Android operating system to run the target application, the unresponsive phenomenon occurs because the creation of a listening service required for the target application is not completed within a predetermined time. The target application refers to any application running on a computer device. For example, it is an application running on a terminal or a service program running on a server. The target application may specifically be any one of a game application, an audio / video application, a social application, and a shopping application. Taking a cloud game scene as an example, the target application may refer to a cloud game application or a cloud game service program deployed in a system container of a server.
[0071] The unresponsiveness phenomenon of the target application may occur in different scenarios, and the unresponsiveness phenomenon occurring in one type of scenario may correspond to one type of unresponsiveness phenomenon. Taking the Android operating system as an example, the unresponsiveness phenomenon may occur in the following scenarios: (1) Service Timeout: specifically includes a foreground service timeout and a background service timeout, for example, the execution of a foreground service does not complete within 20 seconds. (2) Broadcast Timeout: specifically includes a foreground broadcast timeout and a background broadcast timeout, for example, the execution of a foreground broadcast does not complete within 10 seconds. (3) Content Provider Timeout: for example, the unresponsiveness phenomenon occurs when a content provider times out for 10 seconds after publishing. (4) Input Dispatching Timeout: includes key and touch events, specifically includes a key dispatch timeout and a touch event dispatch timeout, for example, the duration of key dispatch is 5 seconds by default, and if exceeded, the unresponsiveness phenomenon may occur.
[0072] When various types of unresponsiveness events occur, on-site information can be automatically generated and collected, and each type of unresponsiveness event can correspond to one type of on-site information. The on-site information of each type of unresponsiveness event can be used to describe the execution status of the system code when the corresponding unresponsiveness event occurs.
[0073] The on-site information of the unresponsive phenomenon refers to the relevant information captured by the operating system when the unresponsive phenomenon occurs. The on-site information can be used to describe the execution status of the system code of the operating system when the unresponsive phenomenon of the type occurs. The execution status of the system code is, for example, the step at which the system code is executed to cause the unresponsive phenomenon, and in which process or thread the response of the event times out. As is clear from the process of ANR occurrence introduced in the above-mentioned FIG. 1d-FIG. 1g, when ANR occurs, a large number of processes will be running, for example, the process running in the service-type ANR has a system service process, a service process, and other processes not shown. Therefore, the on-site information may include relevant information of the process running in the system code, for example, the process identifier of the process. Optionally, the on-site information may include, but is not limited to, the time of occurrence of ANR, a trace file used to record the stack of each thread of the process before and after the occurrence of ANR, the type of ANR, and information of each process when ANR occurs (for example, process number, process name, process execution start time, and end time). Each type of no-response site information may be recorded in an associated log, and when specifically analyzed, all or part of the site information may be obtained for further analysis.
[0074] Exemplarily, taking a cloud game scene as an example, the scene of application unresponsiveness in one cloud game may be shown in FIG. 3b. Here, docker exec -it b23 sh b2343985639e represents entering a container whose container name is b2343985639e to search for a location of a configuration file corresponding to mirroring. ps -ef | grep Sgame represents finding and displaying processes containing the sgame keyword in a container whose container name is b2343985639e. As shown in FIG. 3b, the scene information obtained in the cloud game platform where the application unresponsiveness phenomenon occurs includes process information of each process (only a part of which is displayed) in the container. As an example, the information on the first line displayed includes the process ID (PID, Process Identification) 1910 of the process, the ID of the parent process of the process (PPID, Parent Process Identification) 110, the resource percentage used by the CPU of 16, the system startup time of 12:54:18, the CPU usage time of 00:03:15, and the process name "com.ten.tmgp.sgame", etc.
[0075] By collecting on-site information of various types of unresponsiveness phenomena, the execution status of the system code of the operating system when various types of unresponsiveness phenomena occur can be obtained. In this way, it is advantageous to effectively avoid the application unresponsiveness phenomenon in the operating system by subsequently analyzing the common characteristics of the occurrence of these unresponsiveness phenomena. For details, please refer to the introduction of S302 and S303.
[0076] S302: Perform commonality analysis on the field information of various types of unresponsive phenomena to obtain commonality analysis results, and determine the fault points where the unresponsive phenomena occur from the system code based on the commonality analysis results.
[0077] Commonality analysis refers to an analysis method for finding common characteristics. Here, performing commonality analysis on the on-site information of each type of unresponsive phenomenon means finding common characteristics that cause each type of unresponsive phenomenon and obtaining a commonality analysis result. The commonality analysis result includes common information in the on-site information of each type of unresponsive phenomenon, for example, the same process number that is shared by all of the on-site information of each type of unresponsive phenomenon.
[0078] Based on the commonality analysis result, the fault points causing the unresponsiveness phenomenon can be determined from the system code, which are common fault points causing various types of unresponsiveness phenomena. The fault points can be fault codes causing various types of unresponsiveness phenomena in the system code, for example, all of which are unresponsiveness phenomena occurring when using system call functions. Through the fault points, the common causes causing the application unresponsiveness phenomenon can be further known, and thus the repair methods for the system code can be easily determined.
[0079] There are many causes of ANR occurrence, for example, ANR caused by deadlock, ANR caused by lack of I / O resources, and ANR caused by endless loop of main thread, etc. Therefore, if a specific analysis method for a specific ANR may be limited to a specific scene (for example, operating system version, application version, and terminal, etc.), the scheme for solving ANR may not be applicable when changing to another scene. Therefore, it is not highly versatile for each type of scene. The analysis mechanism provided in this scheme is a commonality analysis mechanism, which obtains a commonality analysis result by searching for common characteristics between the field information of each type of unresponsiveness phenomenon, and knows the fault point where each type of unresponsiveness phenomenon occurs based on the commonality analysis result. Furthermore, the subsequent repair process can eliminate any one of the multiple types of unresponsiveness phenomena of the target application, effectively reducing the occurrence probability of the application unresponsiveness phenomenon, and can have all versatility and stability in each type of scene.
[0080] S303: The system code is repaired based on the failure point, and the target application is operated based on the repaired system code.
[0081] Since the fault point is determined from the lowest-level system code, the system code of the operating system can be repaired based on the fault point to obtain the repaired system code. The repair process here may refer to a modification to the system code, and the repaired system code is the original system code optimized based on the fault point. When a target application is run based on the repaired system code, the repaired system code can be called in the process of running the target application. Since the system code optimizes the fault point at which the unresponsive phenomenon occurs, the unresponsive phenomenon can be effectively avoided in the process of running the application program.
[0082] In this way, the modification to the native operating system is realized by repairing the system code of the operating system. Since the modification is to the system code, the problem when multiple types of ANR occur can be solved in principle, so the operating system may be deployed on any device or platform. In this way, the scheme is not only applied to the cloud gaming platform to effectively solve the instability phenomenon caused by the occurrence of ANR in the cloud gaming platform and improve the stability of the cloud gaming platform, but also can be applied to actual terminals (e.g., mobile phones), simulator (e.g., Android simulator) products, and operating system platforms (e.g., other Android platforms), etc., which increases the versatility of the scenarios and effectively avoids various types of ANR phenomena.
[0083] The data processing scheme provided by the embodiment of the present application supports collecting on-site information of multiple types of unresponsiveness of a target application. The on-site information is used to describe the execution status of the system code when the unresponsiveness phenomenon occurs correspondingly, so that commonality analysis can be performed on the on-site information of multiple types of ANRs to analyze the execution status of the system code from the operating system level, and search for common characteristics at which each type of unresponsiveness phenomenon occurs from the lowest level to obtain a commonality analysis result. The fault point at which the unresponsiveness phenomenon occurs can be determined based on the commonality analysis result, and the system code of the operating system can be repaired based on the fault point, and the target application can be operated based on the repaired system code. In this way, in the process of operating the target application, the system operation after repair can prevent the situation where the unresponsiveness phenomenon may occur from the operating system side, and can very well deal with most ANR scenarios and avoid most ANR problems. As can be seen, the scheme can fundamentally solve the ANR problem in the operating system from the lowest level system code of the operating system, is highly versatile, and can reduce the situation where any one type of unresponsiveness phenomenon occurs in the operating system or the target application, thereby effectively improving the stability of the system or application. When applied to a cloud gaming platform, it can improve the compatibility and stability of the cloud gaming platform and improve the gaming experience of players.
[0084] Please refer to FIG. 4, which is a flowchart of another data processing method provided by an embodiment of the present application, which may include S401 to S406.
[0085] S401: Obtain on-site information of each type of unresponsive phenomenon among a plurality of types of unresponsive phenomena of a target application.
[0086] S402: A commonality analysis is performed on the field information of each type of non-response phenomenon to obtain a commonality analysis result.
[0087] In one embodiment, the system code includes a plurality of processes and code segments executed by each of the processes, and the on-site information of any one type of unresponsiveness event includes a process identifier of each process running in the system code when the corresponding unresponsiveness event occurs.
[0088] The system code may have multiple processes, where a process is one execution step of a program, and becomes a process when an executable program runs. The process can execute code in an operating environment. The system code includes code segments executed by individual processes of the multiple processes, and the code segments are parts of system code executed by the processes in the system code. Specifically, when the system code is compiled and then run, the system code can be run as multiple process instances, and each process instance runs a corresponding code segment.
[0089] The unresponsiveness phenomenon occurs during the process of running a target application, and the operation of the target application may call a system code of an operating system. Each process included in the system code can be run to execute a corresponding code segment. Therefore, the local information may include a process identifier corresponding to the process to be run. The process identifier is information used to mark a process, and the process identifier may be a process name, a keyword of a process name, etc.
[0090] Based on the above, the commonality analysis may be performed based on the process identifiers included in the site information. An optional implementation form of S402 may be as follows: For any of the site information of each type of unresponsive phenomenon, traverse each process identifier in any of the site information, search for the currently traversed process identifier in each of the site information other than any of the site information, and if the currently traversed process identifier is found, add the currently traversed process identifier to the commonality analysis result, and if the currently traversed process identifier is not found, continue to traverse each process identifier in any of the site information.
[0091] Any on-site information refers to any one of the on-site information of the unresponsive phenomenon of each type obtained. Since each process identifier in any on-site information can be traversed, in the process of traversal, for the currently traversed process identifier, a currently traversed process identifier can be found in the on-site information of the other unresponsive phenomenon. The currently traversed process identifier is the process identifier traversed in any on-site information. When the currently traversed process identifier is found, it means that the same process identifier as the currently traversed process identifier exists in the other on-site information. The process corresponding to the process identifier operates in the same way when other unresponsive phenomena occur, and the currently traversed process identifier found is a common process identifier for each type of unresponsive phenomenon, and the currently traversed process identifier can be added to the commonality analysis result. When the currently traversed process identifier is not found, it means that the same process identifier as the currently traversed process identifier does not exist in the other on-site information, and further, each other process identifier in any one of the unresponsive scene information can be continued to be traversed.
[0092] For example, the acquired on-site information of the multiple types of unresponsive phenomena includes on-site information of four types of unresponsive phenomena, which are respectively a on-site information of the A type unresponsive phenomenon, b on-site information of the B type unresponsive phenomenon, c on-site information of the C type unresponsive phenomenon, and d on-site information of the D type unresponsive phenomenon. Assuming that the process identifier included in the on-site information is a process name, the process name game in the a on-site information is currently traversed, and can be searched in the b on-site information, the c on-site information, and the d on-site information. If the process name is found in all of the b on-site information, the c on-site information, and the d on-site information, the found process name can be added to the analysis result. As can be understood, the specific implementation form of the above commonality analysis is a kind of selectable manner, and other manners can be adopted to perform the commonality analysis, for example, the commonality analysis can be performed based on threads, but is not limited here.
[0093] As can be seen, by taking the traversed process identifier in the on-site information of any one kind of unresponsive phenomenon as a criterion and searching for the same process identifier in each of the other on-site information, it is possible to realize the analysis of the common characteristics in the system code. Usually, the process identifier is a simple expression, such as a number or a simple character, and when searching for the same process identifier efficiently, the efficiency of the commonality analysis can be improved.
[0094] In one implementation, the commonality analysis result includes a process identifier common to the field information of each type of no-response phenomenon. Based on this, the method of determining the fault point from the system code based on the commonality analysis result can adopt the implementation forms of S403 to S405 below. Here, the common process identifier can be realized by adopting the selectable implementation form of S402 introduced above, or can adopt other methods.
[0095] S403: Determine M target processes based on the respective process identifiers in the commonality analysis result.
[0096] Since the process identifiers are used to mark the processes, all the processes corresponding to the individual process identifiers in the commonality analysis result can be determined as target processes, thereby obtaining M target processes, where M is a positive integer greater than 1, and the value of M is equal to the number of process identifiers in the commonality analysis result. For example, since the commonality analysis result includes two process identifiers, process1 and process2, the process corresponding to process1 and the process corresponding to process2 can both be set as target processes. In this way, two target processes can be determined based on the two process identifiers in the commonality analysis result.
[0097] S404: Determine an association relationship between each of the M target processes, and obtain a code segment executed by each target process from the system code.
[0098] The association relationship between each of the target processes can be used to describe a hierarchical relationship between at least two of the M target processes. The association relationship includes, but is not limited to, a parent-child relationship, a sibling relationship, etc. An association relationship can exist between one process and one or more other processes, for example, process process1 is a parent process of process2, but process1 is also a child process of process4, i.e., process1 and process2 are in a parent-child relationship, and process1 and process4 are also in a parent-child relationship, but the role played by process process1 in the parent-child relationship is different.
[0099] In one embodiment, the M target processes include a first process and a second process, i.e., two target processes. The first process and the second process are common processes when each type of unresponsive phenomenon occurs, and specifically refer to the processes that can all operate before the unresponsive phenomenon occurs.
[0100] A specific implementation of determining the association relationship between each of the M target processes may include the following: from on-site information of each type of unresponsive phenomenon, obtain attribute information of a first process and attribute information of a second process, the attribute information of any process includes a process number of any process and a process number of a process that calls any process, and if the attribute information of the second process includes the process number of the first process or if the attribute information of the first process includes the process number of the second process, it is determined that the association relationship between the first process and the second process is a parent-child relationship.
[0101] The on-site information of any one type of unresponsive phenomenon may include attribute information corresponding to a process that operates in the system code when the unresponsive phenomenon of that type occurs. From the on-site information of each type of unresponsive phenomenon, attribute information of a process (i.e., a target process) corresponding to a process identifier in the commonality analysis result can be obtained. Here, the target process includes a first process and a second process, and the attribute information of the process obtained from the on-site information specifically includes the attribute information of the first process and the attribute information of the second process. The attribute information of a process is information used to describe the characteristics of a process, and the attribute information of any process includes the process number of the process and the process number of a process that calls any process. For example, if any process is process A and process B calls process A, the attribute information of process A can include the process number of process A (i.e., the process number of any process) and the process number of process B (i.e., the process number of the process that calls any process). The attribute information allows one to know the process number of the process itself and which process specifically calls the current process. A process identification (PID) may be a unique identification number assigned to a process by an operating system when the process is created, and the process number may be represented by a natural number, e.g., 123 and 605, or a binary number, e.g., 001 and 010, where the representation of the process number is not limited.
[0102] The attribute information of the first process includes a process number of the first process and a process number of the process that calls the first process, and the attribute information of the second process includes a process number of the second process and a process number of the process that calls the second process. Then, the attribute information of any one of the processes can be selected and analyzed, specifically including the following several situations:
[0103] (1) When the attribute information of the second process includes the process number of the first process, it means that the process number of the process that calls the second process in the attribute information of the second process is the process number of the first process. That is, the second process is called by the first process, or the first process calls the second process. In this case, it can be determined that the association relationship between the first process and the second process is a parent-child relationship, and the first process is the parent process of the second process and the second process is the child process of the first process.
[0104] (2) When the attribute information of a first process includes the process number of a second process, it means that the process number of the process that calls the first process in the attribute information of the first process is the process number of the second process. That is, the first process is called by the second process, or the second process calls the first process. In this case, it can also be determined that the association relationship between the first process and the second process is a parent-child relationship, and the first process is a child process of the second process, and the second process is a parent process of the first process.
[0105] For example, as shown in FIG. 3b above, for the scene of cloud game ANR, the scene will occur in all kinds of non-response, and scene information will be collected. Therefore, the commonality analysis result may include the relevant contents of the process shown in FIG. 3b. As can be seen from FIG. 3b, the operating system has two sgame processes at the same time, which are a process with process number 1910 and a process with process number 4697, respectively. Based on the process numbers, it can be found that the parent process number of the second process (i.e., the process with process number 4697) is 1910, that is, the first sgame process. As can be seen, there is a parent-child relationship between the two processes, and the second process is a child process of the first process, and the first process is a child process of the process with process number 110.
[0106] (3) If the attribute information of the second process does not include the process number of the first process, and the attribute information of the first process does not include the process number of the second process, it means that the process that calls the second process is not the first process but another process, and the process that calls the first process is also not the second process but another process. In this case, it can be determined that the association relationship between the first process and the second process is not a parent-child relationship but another relationship, for example, a sibling relationship, that is, the first process and the second process are all child processes of the same process. For example, the first process with process number 1910 and the second process with process number 4906 are both sgame processes. However, assuming that the parent process numbers of the first process and the second process are both 110, that is, the first process and the second process are all child processes of the process with process number 110. It can be determined that these two processes are siblings.
[0107] As can be seen, the process number of the process itself, which is included in the attribute information of the process, and the process number of the process that calls the process, allow the relationship between the process numbers of other processes to be determined, thereby making it very easy to determine the association relationships between processes.
[0108] When a process runs, it can execute the corresponding code segment in the system code, so that the code segment executed by each target process can be obtained from the system code. Since there are M target processes, specifically, M code segments can be obtained, and then the fault point where the unresponsive phenomenon occurs can be easily determined from each code segment. Specifically, see S405 below.
[0109] S405: Based on the association relationship, determine the fault point at which the unresponsive phenomenon occurs from the obtained M code segments.
[0110] Each code segment among the M code segments is executed by a corresponding process among the M processes. According to the association relationship between each process among the M target processes, a failure point at which the unresponsive phenomenon occurs can be determined from the obtained M code segments. The failure point may be a code statement or a piece of code in a code segment among the M code segments. Since the code segments can all be executed when each type of unresponsive phenomenon occurs, the failure point is a common failure point for each type of unresponsive phenomenon, and due to the existence of the failure point, any one type of unresponsive phenomenon may all be triggered. The specific unresponsive phenomenon that is triggered can be determined in combination with other information, for example, the event type executed by the process, for example, when the process executes an input delivery event, it can be determined that it is an ANR of input delivery timeout.
[0111] In the above steps S403-S405, the target process can be determined according to the process identifier included in the commonality analysis result, the association relationship between each target process can be determined, the code segment executed by each target process can be obtained from the system code, and the fault point where the unresponsive phenomenon occurs can be analyzed and obtained based on the association relationship and the obtained code segment. This method starts from the system code of the lowest operating system, performs a commonality analysis for each type of unresponsive phenomenon, and then uses the commonality analysis result to determine the system code that is all executed when each type of unresponsive phenomenon occurs, to determine the fault point from the system code, and further, the common cause of ANR can be determined from the system level, thereby fundamentally repairing and solving the ANR problem.
[0112] S406: The system code is repaired based on the failure point, and the target application is operated based on the repaired system code.
[0113] The scheme provided by the embodiment of the present application can perform commonality analysis on the acquired on-site information of multiple types of unresponsiveness phenomena to find common processes (e.g., processes corresponding to a common process identifier) that operate when the unresponsiveness phenomenon occurs in the target application. These common processes can be further analyzed as target processes, specifically by reverting to the system code of the operating system and determining the failure point where the unresponsiveness phenomenon occurs based on the association relationship and the code segment executed by the target process. The failure point is specifically determined from the code segment executed by the target process, and thus the root cause of the application unresponsiveness phenomenon can be determined from the lowest layer of the system, thereby fundamentally solving the problem of application unresponsiveness. After repairing the system code based on the failure point, the repaired system code can effectively reduce the situation where the unresponsiveness phenomenon occurs in the operation process of the target application, and improve the application operation and the overall stability of the system.
[0114] Please refer to FIG. 5, which is a flowchart of yet another data processing method provided by an embodiment of the present application, which may include S501 to S507.
[0115] S501: Obtain on-site information of each type of unresponsive phenomenon among a plurality of types of unresponsive phenomena of a target application.
[0116] S502: A commonality analysis is performed on the field information of each type of non-response phenomenon to obtain a commonality analysis result.
[0117] S503: Determine M target processes based on the respective process identifiers in the commonality analysis result.
[0118] S504: Determine an association relationship between each of the M target processes, and obtain a code segment executed by each target process from a system code.
[0119] S505: Based on the association relationship, determine the fault point at which the unresponsive phenomenon occurs from the obtained M code segments.
[0120] In one embodiment, the M target processes include a first process and a second process, and the association relationship between the first process and the second process is a parent-child relationship, where the first process is a parent process of the second process, and the second process is a child process of the first process. The association relationship between the first process and the second process can be determined based on the process number included in the attribute information of the process, as introduced in the above embodiment.
[0121] Based on the contents introduced based on the relevant parts of the corresponding embodiment of FIG. 4, a specific implementation of S505 may include the following contents: Based on the parent-child relationship, determine the code segment executed by the acquired first process as a reference code segment, and determine a first code statement from the reference code segment. The first code statement refers to a code statement executed by the first process before the unresponsive phenomenon occurs, and when the first code statement is a statement used to realize a function call operation, the call stack of the first process is obtained along with the first code statement in the code segment executed by the first process. The call stack includes various functions called by the first process, and when there is a target function that has failed to be called in the call stack, determine the logic code of the target function from the reference code segment, and determine the fault point at which the unresponsive phenomenon occurs from the logic code of the target function based on the code segment executed by the second process.
[0122] The code segment executed by the first process contains a large number of code statements, and before the time when the unresponsive phenomenon occurs, the first process may execute some code statements in the code segment and stop executing. The second process is based on the same principle. Since there is a parent-child relationship between the first process and the second process, and the first process is considered to be the parent process, and the code executed by it may contain code that creates the second process, the code segment executed by the first process can be determined as a reference code segment and analyzed. The reference code segment is a code segment used as an analysis standard. The first code statement can be determined from the reference code segment, and the first code statement is a code statement executed by the first process before the unresponsive phenomenon occurs. The first code statement can be judged to determine whether it satisfies the analysis condition, and further analysis can be performed. Specifically, the following is the procedure.
[0123] (1) When the first code statement is a statement used to realize a function call operation, the call stack of the first process can be obtained by analyzing the call stack of the first process along the first code statement in the code segment executed by the first process.
[0124] According to the first code statement, a related executable program or system command can be called to realize a function call operation. Exemplarily, the first code executed by the first process as a parent process may be specifically a statement to execute Runtime.getRuntime().exec("xxx.exe"). Here, Runtime.getRuntime().exec() is used to call an external executable program or system command. Runtime.getRuntime() returns a Runtime object of a current application program, and the exec() method of the object instructs to create a child process, execute a specified executable program (here, an executable program whose name is "xxx.exe", where "xxx.exe" represents the name of the program to be executed), and return an instance of a Process object corresponding to the child process, and the execution of the child process can be controlled or information of the child process can be obtained through Process.
[0125] The last code statement executed by the parent process before the ANR occurs is the first code statement, and the first code statement can be further analyzed. In the code segment executed by the first process, the call stack of the first process can be obtained by analyzing the first code statement, and the call stack includes various functions called by the first process. The analysis of the call stack can be performed by adopting a corresponding debug tool based on the type of the code segment executed by the first process. For example, if the code segment executed by the first process is a Java code, printStackTrace (a debug tool that prints the location and cause of an error in the program on the command line) can be used, and if the code segment executed by the first process is a Native C code, strace (a debug tool that blocks and records the system calls executed by the process and the signals received by the process) can be used. All of these debug tools can be obtained by analyzing the call stack of the corresponding process. The call stack may be understood as a kind of mechanism by which an interpreter (e.g. a JavaScript interpreter in a browser) tracks the execution flow of functions, allowing it to know which functions are being executed and which functions are called in the function body being executed.
[0126] In the following, the occurrence of ANR in a cloud game scene is taken as an example. Based on the on-site information of ANR in a cloud game platform, the analysis determines that the operating system has two sgame processes at the same time, and the two processes are in a parent-child relationship. The debug tool captures the on-site call stack, and the call stack determines that the parent process executes the statement Runtime.getRuntime().exec() (i.e., executes the first code statement) before ANR. Along with Runtime.getRuntime().exec(), the call stack of the parent process is found to be as shown in FIG. 6a. Specifically, the Runtime class calls the exec method, creates a ProcessBuilder class through the exec method, and creates a ProcessImpl class through the ProcessBuilder.start() method. Then, the start() method is used to create a Unix process, and a Unix process object is created through new Unixprocess. Furthermore, a new process is forked based on the Unix process object, and the new process executes a program code different from the Unix process to obtain UnixProcess_md.c. Then, a new process is forked based on the UNIX process, and a program code different from the UNIX process is executed, and finally, the startChild function is called. The above is the call stack of the parent process, and the startChild function of the last function call in the call stack of the parent process is the approximate location where the program error occurs.
[0127] If there is a target function that fails to be called in the call stack, it means that an error occurs in the code segment executed by the first process. The location where the error occurs is the location of the target function. For example, the function calls in the call stack of the parent process shown in FIG. 6a above are only displayed up to the startChild function. This means that the program crashes when the first process executes the startChild function is called. Therefore, the target function can be further analyzed. The logic code of the target function is determined from the code segment executed by the first process, and the logic code is a part of the code in the code segment executed by the first process. Based on the code segment executed by the second process, the fault point where the no-response phenomenon occurs is determined from the logic code corresponding to the target function. At this time, the fault point is specifically a code statement in the logic code corresponding to the target function.
[0128] (2) When the first code statement is not a statement used to realize a function call operation, for example, when the first code statement is another code statement, the code statements related to the first code statement can be analyzed based on the execution status of the first code statement.
[0129] As can be seen, by analyzing the code segments executed by processes having a parent-child relationship, specifically, by analyzing the call stack of the first process of the parent process, the actual execution status of the code segment by the parent process can be roughly known, so that the specific location of the failure point where the unresponsive phenomenon occurs can be determined from the logic code of the target function whose execution has crashed based on the actual execution status, and the location range can be further narrowed.
[0130] In one implementation, the logic code of the objective function includes a process creation statement, which is used to create a child process, and the child process created by the process creation statement and the corresponding parent process share the same address space.
[0131] Exemplarily, based on the target function in the call stack of the parent process in FIG. 6a, the logic code of the target function shown in FIG. 6b is provided, where a process creation statement is included. The target function is the startChild function obtained by analyzing based on the call stack of the parent process in FIG. 6a, and the specific logic of the startChild function shown in FIG. 6b is that if START_CHILD uses vfork(if START_CHILD_USE_VFORK), then a process can be created by the process creation statement Volatile pid_t resultPid = vfork(). The interpretation of adopting this method is as follows: By separating the call to vfork into one single startChild function, it is possible to ensure that the child stack is prevented from destroying the parent stack, as recommended by the gcc warning. Here, the gcc warning is specifically that the variable "foo" may be destroyed by "longjmp" or "vfork", where foo represents a variable of data, function, or command, and longjmp is a kind of jump method. Here, vfork is a system call in Linux (registered trademark) that shares the address space of the parent and child processes for the process it creates. That is, the same address space is shared between the child process created by the system call vfork and its corresponding parent process. In this way, the child process runs entirely in the address space of the parent process, and if the child process modifies a variable, it can directly affect the parent process.
[0132] For a first process and a second process having a parent-child relationship, the second process is a child process of the first process, i.e., the first process is the parent process and the second process is the child process. The first process can create the second process by executing a process creation statement in a goal function, and thus the first and second processes share the same address space, where the address space is the collection of all available resources, and where the shared address space may be a physical address space or a virtual address space.
[0133] An implementation of determining a fault point at which the unresponsive phenomenon occurs from the logic code of the objective function based on a code segment executed by the second process may include the following: determining a second code statement from the code segment executed by the second process, and determining a target resource that the second process needs to read based on the second code statement when the second code statement is a statement used to realize a data read operation; determining a process creation statement in the logic code of the objective function as a fault point at which the unresponsive phenomenon occurs when the first process has the target resource, where the second process is a child process of the first process; when the first process has the target resource, the second process is blocked, and the unresponsive phenomenon is triggered when the duration for which the second process is blocked is greater than a duration threshold.
[0134] First, a second code statement can be determined from the code segment executed by the second process. The second code statement refers to a code statement executed by the second process before the occurrence of the no-response phenomenon. Before the occurrence of ANR, the second process may execute multiple code statements in the corresponding code segment, and some code statements may not be suitable for analysis by adopting the subsequent analysis method. Therefore, the second code statement can be judged to determine whether the code statement meets the analysis condition. Specifically, the method is as follows:
[0135] (1) When the second code statement is a statement used to realize a data read operation, it means that the second code statement meets the analysis condition and can be further analyzed. When the second code statement executes the data read operation, it may lock the read data, that is, other processes cannot access the data, and the target resource required for the second process to execute the data read operation can be determined. The statement of the data read operation may be, for example, a code statement that reads a file resource, and for example, the second process reads / proc / self / fd by executing the readdir() function. Here, readdir() is always used to traverse files in a folder, and / proc / self / fd represents a file descriptor in the current process directory.
[0136] The target resource required for the second process to execute the data read operation may be available resources in the address space, for example, hardware resources such as CPU and internal memory. If the first process has the target resource, it means that the first process has the target resource required for the second process to read data. Since the address space between the first process and the second process is shared, the second process becomes blocked and waits for the release of the target resource by the first process. When the duration of the second process being blocked is greater than the duration threshold, for example, the duration of the second process being blocked is 10s, the duration threshold is 8s, and the duration of the blocking is greater than the duration threshold, the unresponsive phenomenon may occur. Based on the above analysis, this is caused by the process creation manner, so the process creation statement in the logic code of the objective function can be determined as the failure point where the unresponsive phenomenon occurs. Conversely, if the first process does not have the target resource, it means that the second process can use the target resource, and then the unresponsive phenomenon will not occur.
[0137] (2) When the second code sentence is not a sentence used to realize a data reading operation, other contents can be analyzed based on the specific content indicated by the second code sentence.
[0138] As can be seen, the analysis of the objective function is realized in combination with the code segment executed by the second process. For the code segment executed by the second process, there exists a statement of a data read operation, so that when the first process has the target resource required for the data read operation, the address space between the two processes is shared, which triggers the unresponsive phenomenon of the target application. Based on this logic, it can be determined that the occurrence of the unresponsive phenomenon is caused by the process creation statement in the logic code of the objective function, and further, it can be determined as a fault point.
[0139] Based on the above introduction of the method for determining the fault point where the no-response phenomenon occurs, it can be clarified that the fault point includes the target function of the code segment executed by the first process, specifically, the process creation statement in the target function. Therefore, the implementation of the target function in the operating system can be modified. In one embodiment, the method for repairing the system code based on the fault point can adopt the contents introduced in the following S506 to S507.
[0140] S506: A goal statement to be used in creating a child process is determined.
[0141] The target statement for creating a child process is a different code statement from the process creation statement, and has the same function as the process creation statement, i.e., they can all create child processes, but the child process created by the target statement and the corresponding parent process use different address spaces independently. The corresponding parent process is the process that calls the child process created by the target statement, and the address space between the child process and the corresponding parent process is not shared. In this way, when the child process performs a data read operation, the first process does not have the required target resource and is in an independent address space, which can effectively avoid the application unresponsive phenomenon.
[0142] In one embodiment, a function field is included in the process creation statement, and a first system call function is stored in the function field, and the process creation statement creates a child process by the first system call function. The function field included in the process creation statement can store the first system call function, and the first system call function may be provided by the operating system. In the system code of the operating system, the process creation statement can create a child process by the first system call function. For example, as in the above process creation statement Volatile pid_t resultPid = vfork(), where the function field is resultPid and vfork() is the first system call function.
[0143] Based on the above, the specific implementation of S506 includes the steps of modifying a first system call function in a function field in a process creation statement to a second system call function to obtain a target statement used for creating a child process, where the target statement includes the steps of creating a child process by the second system call function.
[0144] The second system call function is a system call function different from the first system call function, and is also provided by the operating system. In the second system call function, the address space between the child process created by the second system call function and the corresponding parent process are mutually independent. Since the system call function is a kind of kernel function provided by the operating system, the modification to the system call function is a modification performed from the kernel level. In this way, the ANR problem in the operating system can be solved from the system kernel level, the compatibility and stability of the platform can be improved, and the ANR phenomenon can be effectively prevented and avoided.
[0145] S507: Repair the system code by replacing the process creation statement with a target statement in the system code.
[0146] After the target statement is determined, the process creation statement in the original system code can be replaced with the target statement. In this way, the first system call function is disabled and changed to a second system call function, and the system code repair can be realized from the kernel level, and in a situation where the first process is a parent process and the second process is a child process, the second process created by the target statement and the first process use different address spaces independently, so that when the target application is run based on the repaired system code, the target resource can be used smoothly to perform data read operations and no blocking occurs, thereby avoiding the occurrence of the unresponsive phenomenon.
[0147] For example, the process code creation statement Volatile pid_t resultPid = vfork() can be modified to the target statement Volatile pid_tresultPid = fork(), and if START_CHILD_USE_VFORK can be modified to if START_CHILD_USE_FORK, which will disable vfork() and change it to the fork() method.
[0148] As can be understood, in view of the integrity of the operating system, the modification to the process code creation statement in the target function may affect other parts of the code in the system code of the operating system other than the target function. Therefore, other contents of the system code can also be adaptively modified to meet the above specific repair contents. Through the above method, the system code can be repaired, and the repaired system code can be obtained, and the target application can be operated based on the repaired system code.
[0149] As can be seen, the repair content of the system code of the operating system is a customized modification content of the system code, and the modification content is related to the change of the system call of the kernel, and can prevent the situation where ANR may occur from the kernel side and the system side, and can realize the handling of most of the scenarios where ANR may occur. In addition, the modification content does not have a policy that is tightly bound to a specific platform, and has no hard-coded parts. Therefore, it can realize a loose coupling with the device or the platform itself. As a result, the operating system after repair can be applied in any scenario, such as cloud games, actual terminal devices, or simulators, and the like, and can effectively avoid the application unresponsive phenomenon and improve the stability and compatibility of the platform or device.
[0150] In one embodiment, a quality check may be performed on the system code after repairing the system code that has been customized and modified. The quality check includes code review and safety detection during the process of creating the system code. During the process of creating the code, safety check can be performed to find safety problems in the customized system code and ensure the safety of the system code after repairing. Code review, also called code recheck, refers to the operation of inspecting the conformity of the source code with the coding standard and the code quality by browsing the code. Code review can improve the code quality and find potential errors (bugs). Both the safety check and the code review can be performed using appropriate analysis tools. In this way, it can be ensured that the data of each item meets the expected situation, and the problem of application unresponsiveness can be solved under the premise of ensuring the compatibility and stability of the operating system.
[0151] By processing according to the above repair scheme, in the cloud game scene, in the test process of running the cloud game based on running the repaired code and in the actual online service process, no ANR situation will occur in the cloud game platform, so that the frequency of ANR occurrence can be reduced.As can be understood, the cloud game platform is an operating system, belongs to the system side, and can run many other game APPs and other APPs in the system, so there may be a small number of ANR phenomena, but the probability is extremely low.
[0152] The data processing scheme provided by the embodiment of the present application can obtain and collect on-site information of multiple types of unresponsiveness phenomena of target applications. Since the on-site information is used to describe the execution status of the system code when the unresponsiveness phenomenon occurs correspondingly, commonality analysis can be performed on the on-site information of multiple types of ANRs to analyze the execution status of the system code from the operating system level, and common characteristics of each type of unresponsiveness phenomenon can be found from the lowest layer to obtain a commonality analysis result. Here, the commonality analysis result includes a common process identifier, and a common number of target processes are determined based on the common process identifier, and the code segments executed by each target process are analyzed. Specifically, the call stack can be used to trace the execution status of the process of the code segment, and a more specific fault point can be determined based on the call stack and the execution logic of other code segments. In this process, various types of debugging tools can be used to trace and debug the problem to determine the fault point. Based on the fault point, customized changes can be made to the operating system, specifically, the system function called when creating the process can be modified from the kernel level. This effectively solves the problem of application unresponsiveness, and resolves the problem of application unresponsiveness in the operating system by repairing it at the system kernel level, thereby significantly improving compatibility and stability.
[0153] Referring to FIG. 7, FIG. 7 is a structural schematic diagram of a data processing device provided by an embodiment of the present application. The data processing device may be a computer program (including program code) running on a computer device, for example, the data processing device may be an application software, and the data processing device may be used to perform corresponding steps in the method provided by an embodiment of the present application. As shown in FIG. 7, the data processing device 700 may include at least one of an acquisition module 701 and a processing module 702.
[0154] The acquisition module 701 is used for acquiring scene information of each type of unresponsiveness phenomenon among multiple types of unresponsiveness phenomena of a target application, where each type of unresponsiveness phenomenon occurs in the process of running a target application according to a system code of an operating system, and the scene information of each type of unresponsiveness phenomenon is used for describing the execution status of the system code when the corresponding unresponsiveness phenomenon occurs.
[0155] The processing module 702 is used to perform a commonality analysis on the on-site information of each type of unresponsive phenomenon, obtain a commonality analysis result, and determine the fault point where the unresponsive phenomenon occurs from the system code according to the commonality analysis result, where the commonality analysis result includes common information in the on-site information of each type of unresponsive phenomenon.
[0156] The processing module 702 is used for repairing the system code based on the failure point, and then running the target application based on the repaired system code.
[0157] In one embodiment, the system code includes a plurality of processes and code segments executed by each process, and the scene information of any one of the types of unresponsiveness phenomena includes a process identifier of each process that runs in the system code when the corresponding unresponsiveness phenomenon occurs. The processing module 702 is specifically used for traversing each process identifier in any of the scene information of each type of unresponsiveness phenomenon, searching for a currently traversed process identifier in each of the scene information other than the any of the scene information, adding the currently traversed process identifier to the commonality analysis result when the currently traversed process identifier is found, and continuing to traverse each process identifier in any of the scene information when the currently traversed process identifier is not found.
[0158] In one embodiment, the commonality analysis result includes process identifiers common among the field information of each type of unresponsive phenomenon, and the processing module 702 is specifically used for determining M target processes based on each process identifier in the commonality analysis result, where the numerical value of M is equal to the number of process identifiers in the commonality analysis result; determining an association relationship between each target process among the M target processes, and obtaining a code segment executed by each target process from the system code; and determining a fault point where the unresponsive phenomenon occurs from the obtained M code segments based on the association relationship.
[0159] In one embodiment, the M target processes include a first process and a second process, and the processing module 702 is specifically used for obtaining attribute information of the first process and attribute information of the second process from the on-site information of each type of unresponsive phenomenon, where the attribute information of any process includes a process number of any process and a process number of a process that calls any process; and determining that the association relationship between the first process and the second process is a parent-child relationship if the attribute information of the second process includes the process number of the first process or if the attribute information of the first process includes the process number of the second process.
[0160] In one embodiment, the M target processes include a first process and a second process, and the association relationship between the first process and the second process is a parent-child relationship, where the first process is a parent process of the second process. The processing module 702 is specifically further used for: determining a code segment executed by the obtained first process as a reference code segment based on the parent-child relationship, and determining a first code statement from the reference code segment, where the first code statement refers to a code statement executed by the first process before the unresponsive phenomenon occurs; analyzing a call stack of the first process along with the first code statement in the code segment executed by the first process when the first code statement is a statement used to realize a function call operation, where the call stack includes various types of functions called by the first process; determining a logic code of the target function from the reference code segment when there is a target function that fails to be called in the call stack; and determining a fault point at which the unresponsive phenomenon occurs from the logic code of the target function based on the code segment executed by the second process.
[0161] In one embodiment, the logic code of the objective function includes a process creation statement, the process creation statement is a statement used to create a child process, and the child process created by the process creation statement and the corresponding parent process share the same address space. The processing module 702 is specifically used for: determining a second code statement from a code segment executed by the second process, the second code statement being a code statement executed by the second process before the unresponsive phenomenon occurs; determining a target resource required for the second process to execute the data read operation based on the second code statement when the second code statement is a statement used to realize a data read operation; and determining the process creation statement in the logic code of the objective function as a fault point at which the unresponsive phenomenon occurs when the first process has the target resource. Here, the second process is a child process of the first process, and when the first process has the target resource, the second process is blocked, and when the duration of the second process being blocked is greater than a duration threshold, the unresponsive phenomenon is triggered.
[0162] In one embodiment, the processing module 702 is specifically used for determining a target statement used to create a child process, where the child process created by the target statement and a corresponding parent process independently use different address spaces, and repairing the system code by employing the target statement in the system code to replace the process creation statement.
[0163] In one embodiment, the process creation statement includes a function field, and a first system call function is stored in the function field. The process creation statement creates a child process by the first system call function, and the processing module 702 is specifically used for modifying the first system call function in the function field of the process creation statement to a second system call function to obtain a target statement used for creating the child process, where the target statement creates the child process by the second system call function.
[0164] In one embodiment, the multiple types of unresponsiveness phenomena of the target application include a service-type unresponsiveness phenomenon, and the process of the occurrence of the service-type unresponsiveness phenomenon includes the steps of: setting a service duration threshold in response to a service creation request sent by an application process of the target application; sending a service creation message to the service process, so that the service process notifies the service process to call one or more other processes to perform the service creation task based on the service creation message, and returning feedback information after the service is successfully created; and the step of the service-type unresponsiveness phenomenon occurring when the feedback information returned from the service process within the service duration threshold is not received.
[0165] In one embodiment, the multiple types of unresponsiveness phenomena of the target application include a broadcast-type unresponsiveness phenomenon, and the process of the broadcast-type unresponsiveness phenomenon occurring includes the steps of: setting a broadcast duration threshold in response to a broadcast transmission request initiated by an application process of the target application; sending a broadcast registration message to the broadcast receiving process, so that the broadcast receiving process notifies the broadcast receiving process to call one or more other processes to perform broadcast operations based on the broadcast registration message, and returning feedback information after the broadcast is completed; and when the feedback information returned from the broadcast receiving process is not received within the broadcast duration threshold, the broadcast-type unresponsiveness phenomenon occurs.
[0166] In one embodiment, the multiple types of unresponsiveness phenomena of the target application include a content provision type unresponsiveness phenomenon, and the process of occurrence of the content provision type unresponsiveness phenomenon includes the steps of: detecting the startup status of a content provision process corresponding to the content provision object in response to a request to obtain a content provision object initiated by an application process of the target application; when the startup status indicates that the content provision process is not running, creating a content provision process and invoking one or more other processes to notify the content provision process to install the content provision object, and returning feedback information after installing the content provision object, wherein an installation duration threshold is set for the content provision object; and when the feedback information returned from the content provision process is not received within the installation duration threshold, a content provision type unresponsiveness phenomenon occurs.
[0167] In one embodiment, the multiple types of unresponsiveness phenomena of the target application include an input event delivery type unresponsiveness phenomenon, the process of the occurrence of the input event delivery type unresponsiveness phenomenon includes the steps of: when an input event is received, adding the currently received input event to an input queue and waking up an input delivery thread, the input delivery thread is used to deliver each input event in the input queue to the application process of the target application in order for processing; when the delivery priority of the currently received input event is reached, the application process of the target application processes another input event, and the input event delivery type unresponsiveness phenomenon occurs.
[0168] As can be understood, the functions of each functional module of the data processing device described in the embodiments of the present application can be specifically implemented based on the methods in the above method embodiments, and the specific implementation process can be referred to the relevant descriptions of the above method embodiments, so it will not be described in detail again here, and the description of the beneficial effects of adopting the same methods will not be described in detail again.
[0169] Referring to FIG. 8, FIG. 8 is a structural schematic diagram of a computer device provided by an embodiment of the present application. The computer device 800 may include an independent device (for example, one or more of a server, a node, and a terminal, etc.), or may include an internal component of an independent device (for example, a chip, a software module, or a hardware module, etc.). The computer device 800 may include at least one processor 801 and a communication interface 802, and further, optionally, the computer device 800 may further include at least one memory 803 and a bus 804. Here, the processor 801, the communication interface 802, and the memory 803 are coupled by the bus 804.
[0170] Here, the processor 801 is a module that performs arithmetic operations and / or logic operations, and may be one or a combination of multiple types of processing modules such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor unit (MPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), a coprocessor (which assists the central processor in completing corresponding processing and applications), and a microcontroller unit (MCU).
[0171] The communication interface 802 can be used to provide input or output of information to at least one processor, and / or can be used to receive data transmitted from the outside and / or transmit data to the outside, and can be, for example, a wired link interface including an Ethernet cable or the like, or a wireless link interface (such as Wi-Fi, Bluetooth, general-purpose wireless transmission, in-vehicle short-range communication technology, and other short-range wireless communication technology). The communication interface 802 can be a network interface.
[0172] The memory 803 is used to provide a storage space in which data such as an operating system and computer programs may be stored, and may be one or a combination of multiple types of memory such as random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or compact disc read-only memory (CD-ROM).
[0173] At least one processor 801 in the computing device 800 is used to invoke a computer program stored in at least one memory 803 and to execute the data processing methods described in the embodiments presented herein.
[0174] In one possible embodiment, the processor 801 in the computing device 800 is used to invoke a computer program stored in at least one memory 803 and to perform the following operations:
[0175] In one embodiment, the processor 801 specifically acquires field information of each type of unresponsiveness phenomenon among multiple types of unresponsiveness phenomena of a target application, where any one of the types of unresponsiveness phenomena occurs in the process of running the target application based on the system code of an operating system, and the field information of any one of the types of unresponsiveness phenomenon is used to describe the execution status of the system code when the corresponding unresponsiveness phenomenon occurs; performs a commonality analysis on the field information of each type of unresponsiveness phenomenon to obtain a commonality analysis result; and determines a fault point where the unresponsiveness phenomenon occurs in the system code based on the commonality analysis result; and repairs the system code based on the fault point, thereby running the target application based on the repaired system code, where the commonality analysis result includes common information in the field information of the above-mentioned each type of unresponsiveness phenomenon.
[0176] It should be understood that the computer device 800 described in the embodiment of the present application can execute the description of the data processing method in the above corresponding embodiment, and can also execute the description of the data processing device 700 in the above corresponding embodiment of FIG. 7, but will not be described in detail again here, and the description of the beneficial effects of the same method will not be described in detail again.
[0177] In addition, it should be further pointed out that an exemplary embodiment of the present application further provides a storage medium, in which a computer program of the above-mentioned data processing method is stored, and when one or more processors load and execute the computer program, the description of the data processing method in the embodiment can be realized, but will not be described in detail again here. The description of the beneficial effects of the same method will also not be described in detail again here. As can be understood, the program instructions may be deployed and executed in one or more computer devices that can communicate with each other.
[0178] The computer-readable storage medium may be the data processing device provided by any of the above-mentioned embodiments, or the internal storage unit of the computer device, such as the hard disk or internal memory of the computer device. The computer-readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, and a flash card, etc., arranged in the computer device. In addition, the computer-readable storage medium may further include both the internal storage unit and the external storage device of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has already been output or is to be output.
[0179] One aspect of the present application provides a computer program product, the computer program product including a computer program, the computer program being stored in a computer readable storage medium, a processor of a computing device reading the computer program from the computer readable storage medium, and the processor executing the computer program to cause the computing device to perform a method in an embodiment of the present application.
[0180] The steps in the methods of the embodiments of the present application may be rearranged, merged, or deleted according to practical needs.
[0181] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0182] The above disclosure is merely a part of the embodiments of the present application, and of course, it cannot be used to limit the scope of the claims of the present application. Those skilled in the art can understand the whole or part of the flow to realize the above embodiments, and the modification to the equivalent configuration made based on the claims of the present application still belongs to the scope of the invention.
Claims
1. 1. A data processing method implemented by a computing device, the method comprising: obtaining on-site information of each type of unresponsiveness phenomenon among a plurality of types of unresponsiveness phenomena of a target application, where each type of unresponsiveness phenomenon occurs in a process of running the target application according to a system code of an operating system, and the on-site information of each type of unresponsiveness phenomenon is used to describe an execution status of the system code when a corresponding unresponsiveness phenomenon occurs; A step of performing a commonality analysis on the on-site information of each type of unresponsive phenomenon, obtaining a commonality analysis result, and determining a fault point where the unresponsive phenomenon occurs from the system code based on the commonality analysis result, wherein the commonality analysis result includes common information in the on-site information of each type of unresponsive phenomenon; and repairing the system code based on the failure point, thereby operating the target application based on the repaired system code.
2. the system code includes a plurality of processes and a code segment executed by each of the processes, and the on-site information of any one of the types of unresponsiveness events includes a process identifier of each process running in the system code when a corresponding unresponsiveness event occurs; Conducting a commonality analysis on the on-site information of each type of non-response phenomenon and obtaining a commonality analysis result, A step of traversing each process identifier in any of the on-site information of the on-site information of each type of unresponsive phenomenon; searching for a currently traversed process identifier in each of the site records other than any of the site records; if the currently traversed process identifier is found, adding the currently traversed process identifier into a commonality analysis result; if the currently traversed process identifier is not found, continuing to traverse each process identifier in any of the site information.
3. The commonality analysis result includes a process identifier common to the on-site information of each type of the unresponsive phenomenon, and determining a fault point where the unresponsive phenomenon occurs from the system code based on the commonality analysis result, determining M target processes based on each process identifier in the commonality analysis result, where M is equal to a number of process identifiers in the commonality analysis result; determining an association relationship between each of the M target processes and obtaining a code segment executed by each of the target processes from the system code; The method according to claim 1 or 2, further comprising: determining a fault point at which an unresponsive phenomenon occurs from the obtained M code segments based on the association relationship.
4. The M target processes include a first process and a second process, and determining an association relationship between each of the M target processes includes: acquiring attribute information of the first process and attribute information of the second process from the on-site information of each type of unresponsive phenomenon, the attribute information of any one of the processes including a process number of any one of the processes and a process number of a process that calls any one of the processes; determining that the association relationship between the first process and the second process is a parent-child relationship if attribute information of the second process includes a process number of the first process or if attribute information of the first process includes a process number of the second process.
5. The M target processes include a first process and a second process, and an association relationship between the first process and the second process is a parent-child relationship, and the first process is a parent process of the second process; The step of determining a fault point where a non-response phenomenon occurs from the acquired M code segments based on the association relationship includes: determining a code segment executed by the obtained first process as a reference code segment based on the parent-child relationship, and determining a first code statement from the reference code segment, the first code statement being a code statement executed by the first process before a no-response phenomenon occurs; When the first code statement is a statement used to realize a function call operation, analyzing a call stack of the first process along the first code statement in a code segment executed by the first process to obtain the call stack, the call stack including each type of function called by the first process; 4. The method of claim 3, further comprising: if there is a failed target function in the call stack, determining a logic code of the target function from the reference code segment; and determining a fault point at which an unresponsiveness phenomenon occurs from the logic code of the target function based on the code segment executed by the second process.
6. The logic code of the target function includes a process creation statement, the process creation statement is a statement used to create a child process, and the child process created by the process creation statement and a corresponding parent process share the same address space; determining a fault point at which a non-response phenomenon occurs from a logic code of the objective function based on a code segment executed by the second process, determining a second code statement from a code segment executed by the second process, the second code statement referring to a code statement executed by the second process before an unresponsiveness event occurs; When the second code statement is a statement used to realize a data read operation, determining a target resource required for the second process to execute the data read operation based on the second code statement; determining a process creation statement in a logic code of the objective function as a fault point at which a no-response phenomenon occurs when the first process has the objective resource; 6. The method of claim 5, wherein the second process is a child process of the first process, the second process is blocked when the first process has the target resource, and an unresponsiveness phenomenon is triggered when the duration for which the second process is blocked is greater than a duration threshold.
7. repairing the system code based on the fault point, determining a target statement to be used to create a child process, the child process created by the target statement and a corresponding parent process independently using different address spaces; and repairing said system code by employing said target statement in said system code to replace said process creating statement.
8. The process creation statement includes a function field, and a first system call function is stored in the function field, and the process creation statement creates a child process by the first system call function; The step of determining a goal statement to be used in creating a child process comprises: modifying a first system call function in a function field in the process creation statement to a second system call function to obtain a target statement used to create a child process; The method of claim 7 , wherein the target statement creates a child process by means of the second system call function.
9. The plurality of types of unresponsiveness phenomena of the target application include a service-type unresponsiveness phenomenon, and the process of the service-type unresponsiveness phenomenon occurring is as follows: setting a service duration threshold in response to a service creation request sent by an application process of the target application; sending a service creation message to a service process, so that the service process notifies the service process to call one or more other processes to perform service creation tasks according to the service creation message, and returning feedback information after the service is successfully created; and wherein the service type non-responsiveness phenomenon occurs when no feedback information is received from the service process within a threshold of the duration of the service.
10. The multiple types of unresponsiveness of the target application include a broadcast type unresponsiveness, and the process of the broadcast type unresponsiveness occurring is as follows: setting a broadcast duration threshold in response to a broadcast transmission request initiated by an application process of the target application; sending a broadcast registration message to a broadcast receiving process, so that the broadcast receiving process notifies the broadcast receiving process to call one or more other processes to perform broadcasting tasks based on the broadcast registration message, and returns feedback information after the broadcast is completed; The method of claim 1 , further comprising: if feedback information is not received from the broadcast receiving process within a threshold of the duration of the broadcast, the broadcast type unresponsiveness phenomenon occurs.
11. The plurality of types of unresponsiveness phenomena of the target application include a content-providing type unresponsiveness phenomenon, and the process of the content-providing type unresponsiveness phenomenon occurring is as follows: detecting an execution state of a content providing process corresponding to a content providing object in response to a request for obtaining the content providing object initiated by an application process of a target application; if the running state indicates that the content providing process is not running, creating the content providing process and invoking one or more other processes to notify the content providing process to install the content providing object, and returning feedback information after installing the content providing object, wherein a duration threshold of one installation is set for the content providing object; The method of claim 1 , further comprising: if feedback information is not received from the content providing process within a threshold of the duration of the installation, the content providing type unresponsiveness phenomenon occurs.
12. The plurality of types of unresponsiveness phenomena of the target application include an input event delivery type unresponsiveness phenomenon, and the process of the input event delivery type unresponsiveness phenomenon occurring is as follows: when an input event is received, adding the currently received input event to an input queue and waking up an input delivery thread, the input delivery thread being used to deliver each input event in the input queue to an application process of the target application in order for processing; The method of claim 1, further comprising: when the delivery priority of the currently received input event is reached, the input event delivery type unresponsiveness phenomenon occurs when an application process of the target application processes another input event.
13. 1. A data processing device, comprising: An acquisition module used for acquiring on-site information of each type of unresponsiveness phenomenon among a plurality of types of unresponsiveness phenomena of a target application, where each type of unresponsiveness phenomenon occurs in a process of running the target application according to a system code of an operating system, and the on-site information of each type of unresponsiveness phenomenon is used for describing an execution status of the system code when a corresponding unresponsiveness phenomenon occurs; A processing module is used for performing a commonality analysis on the on-site information of each type of unresponsive phenomenon, obtaining a commonality analysis result, and determining a fault point where the unresponsive phenomenon occurs from the system code based on the commonality analysis result, wherein the commonality analysis result includes common information in the on-site information of each type of unresponsive phenomenon; The data processing device, wherein the processing module is used for repairing the system code based on the failure point, thereby operating the target application based on the repaired system code.
14. A computing device comprising a processor, a memory, and a network interface, A computer device, wherein the processor is coupled to the memory and the network interface, the network interface is used for providing a network communication function, the memory is used for storing a computer program, and the processor is used for executing the data processing method according to any one of claims 1 to 12 by calling the computer program.
15. A computer-readable storage medium having a computer program stored therein, the computer-readable storage medium executing the data processing method according to any one of claims 1 to 12 when the computer program is executed by a processor.
16. A computer program product comprising a computer program which, when run on a computer, causes the computer to carry out a data processing method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Operation stabilization method, operation stabilization program, and operation stabilization device for smartphone
JP2013142910A
Information processing system, log extraction method of information processing system, and log extraction program
JP2021182234A
Devices and Methods for Acquiring Abnormal Information
US20150128111A1
Computer-Based Systems Involving An Engine And Tools For Incident Prediction Using Machine Learning And Methods Of Use Thereof
US20220214935A1
