Process running method and device, storage medium and electronic equipment
By obtaining the target attributes of a process in the Android system and determining the running branch based on preset attributes, the problem of low flexibility caused by shared process attributes in the Android system is solved, and differentiated processing of processes and improvement of system efficiency are achieved.
Patent Information
- Application Number
- CN202410526324.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2025-10-28
AI Technical Summary
In the Android system, all processes share the same attributes, making it impossible to differentiate processes and resulting in low process flexibility.
By obtaining the target attributes of the process in the Android system, determining the running branch according to the preset attributes, and performing differential processing in the system kernel layer, the node and process record table of the system kernel layer are used to realize the reading and writing of attributes.
It enables differentiated processing between multiple processes, improving the flexibility of process execution and the efficiency of system operation.
Smart Images

Figure CN120848984A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a process execution method, apparatus, storage medium, and electronic device. Background Art
[0002] In existing technologies, the attribute mechanism of the Android system loads attributes from the system's attribute files into the system's shared memory during system startup, making them accessible to all processes within the system. This results in all processes using the same attributes, making it impossible to differentiate between individual processes and leading to relatively low process execution flexibility. Summary of the Invention
[0003] In view of this, the present disclosure provides a process execution method, apparatus, storage medium, and electronic device to achieve differentiated processing for each process and improve the flexibility of process execution.
[0004] According to a first aspect of the present disclosure, a process execution method is provided, the method comprising:
[0005] Obtain the target attributes of the process, wherein the process runs in an Android system.
[0006] In response to determining that the target attribute conforms to a preset attribute, the execution branch of the process is determined based on the preset attribute, wherein the preset attribute and the execution branch have a corresponding relationship.
[0007] The process runs in the Android system according to the specified running branch.
[0008] Optionally, the Android system includes an application layer, an application framework layer, a system runtime library layer, and a system kernel layer, and the target attribute is stored in the memory space corresponding to the process in the system kernel layer.
[0009] Optionally, the acquisition of the target attributes of the process includes:
[0010] In response to determining that the process obtains the target attribute at the system kernel layer, the target attribute is obtained directly.
[0011] Optionally, the acquisition of the target attributes of the process includes:
[0012] In response to determining that the process obtains the target attribute at the application layer, the application framework layer, or the system runtime layer, the target attribute is obtained through the first node provided by the system kernel layer.
[0013] Optionally, before obtaining the target attributes of the process, the method further includes:
[0014] In response to determining that the target attribute is to be written to the system kernel layer, the target attribute is directly written to the memory space corresponding to the process.
[0015] Optionally, before obtaining the target attributes of the process, the method further includes:
[0016] In response to determining that the target attribute is to be written at the application layer, the application framework layer, or the system runtime layer, the target attribute is written to the memory space corresponding to the process through a second node provided by the system kernel layer.
[0017] Optionally, a process record table exists in the system kernel layer;
[0018] The process record table includes multiple first processes in the Android system, and each first process has at least one attribute in its corresponding memory space.
[0019] According to a second aspect of the present disclosure, a process execution apparatus is provided, the apparatus comprising:
[0020] An acquisition unit is used to acquire the target attributes of a process, wherein the process runs in an Android system.
[0021] A determining unit is configured to, in response to determining that the target attribute conforms to a preset attribute, determine the running branch of the process based on the preset attribute, wherein the preset attribute and the running branch have a corresponding relationship;
[0022] A running unit is used to run the process in the Android system according to the running branch.
[0023] Optionally, the Android system includes an application layer, an application framework layer, a system runtime library layer, and a system kernel layer, and the target attribute is stored in the memory space corresponding to the process in the system kernel layer.
[0024] Optionally, the acquisition unit is specifically used for:
[0025] In response to determining that the process obtains the target attribute at the system kernel layer, the target attribute is obtained directly.
[0026] Optionally, the acquisition unit is specifically used for:
[0027] In response to determining that the process obtains the target attribute at the application layer, the application framework layer, or the system runtime layer, the target attribute is obtained through the first node provided by the system kernel layer.
[0028] Optionally, the device further includes:
[0029] The first writing unit is configured to, in response to determining that the target attribute is to be written to the system kernel layer, directly write the target attribute to the memory space corresponding to the process.
[0030] Optionally, the device further includes:
[0031] The second writing unit is configured to, in response to determining that the target attribute is to be written at the application layer, the application framework layer, or the system runtime layer, write the target attribute to the memory space corresponding to the process through a second node provided by the system kernel layer.
[0032] Optionally, a process record table exists in the system kernel layer, which includes multiple first processes in the Android system, and each first process has at least one attribute in its corresponding memory space.
[0033] According to a third aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of any of the methods described in the first aspect above.
[0034] According to a fourth aspect of the present disclosure, a process execution apparatus is provided, comprising:
[0035] processor;
[0036] Memory used to store processor-executable instructions;
[0037] The processor implements the steps of any of the methods described in the first aspect at runtime.
[0038] According to a fifth aspect of the present disclosure, a computer program product is provided that, when executed, implements the steps of any of the methods described in the first aspect above.
[0039] The technical solutions provided in this disclosure may have the following beneficial effects:
[0040] By obtaining the target attributes corresponding to each process, determining the running branch of the process based on the target attributes, and running the process according to the running branch, differentiated processing between multiple processes is achieved, improving the flexibility of process operation.
[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Attached Figure Description
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0043] Figure 1 This disclosure is a flowchart illustrating a process execution method according to an exemplary embodiment;
[0044] Figure 2 This disclosure illustrates a system architecture diagram according to an exemplary embodiment;
[0045] Figure 3 This disclosure is a block diagram of a process execution apparatus according to an exemplary embodiment;
[0046] Figure 4 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0047] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0048] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0049] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0050] The Android system contains many attributes used to record system settings or information exchange between processes. Each attribute has a name and a corresponding value, usually in key-value pair format. Android's built-in attribute mechanism loads attributes from system attribute files into shared system memory during system startup, making them accessible to all processes. Under this mechanism, Android cannot customize attributes for each process; in other words, all processes use the same attributes, making it impossible to differentiate between individual processes and resulting in relatively low process flexibility.
[0051] To achieve differentiated processing for different processes, a process whitelist can be set, and the execution branch of processes in the whitelist can be determined. However, if a process has multiple attributes, it will be recorded in multiple whitelists. During process execution, it is necessary to check the execution branch corresponding to each of the multiple whitelists one by one. This obviously consumes a lot of system resources and leads to low process execution efficiency.
[0052] To address the aforementioned problems, this disclosure provides a process execution method, implemented through an Android system, as shown in the flowchart below. Figure 1 As shown:
[0053] Step 102: Obtain the target attributes of the process, wherein the running environment of the process is the Android system.
[0054] First, when a process is running in the Android system, there are critical business nodes where branching decisions are needed. When the process reaches a critical business node, the Android system reads the process's current target attributes to determine the business logic being executed. It should be noted that these critical business nodes are set by the developers, and this disclosure does not restrict the data type of the target attributes. The data type of the target attributes can include bitmap, boolean, integer, and string data types, etc.
[0055] Step 104: In response to determining that the target attribute conforms to the preset attribute, the running branch of the process is determined according to the preset attribute, wherein the preset attribute and the running branch have a corresponding relationship.
[0056] After reading the target attributes of the process, the process compares these attributes with preset attributes. If the target attributes match the preset attributes, the process's execution branch is determined based on the correspondence between the preset attributes and execution branches. The comparison process can optionally perform logical operations on the attribute values of the target attributes. For example, logical operations can be used to determine if the eighth bit of a certain target attribute value is 1. If it is 1, the execution branch is determined to be the first execution branch; otherwise, the execution branch is determined to be the second execution branch.
[0057] It should be noted that the specific operations in the running branches of different processes can be different. For example, if process A has attribute 'a', its corresponding running branch specifies that the resource limit of the process is the first threshold. If process B has attribute 'a', the running branch of process B can specify that the resource limit of the process is the second threshold.
[0058] Step 106: Run the process in the Android system according to the running branch.
[0059] After determining the execution branch, the process is run in the Android system according to the business logic of that branch. For example, a execution branch corresponding to the TAG_UI attribute can be pre-set before the process runs. This execution branch allows the process to perform performance enhancement operations after entering that branch. During the execution of the process (e.g., the process that creates the UI), when the process reaches a critical business node, the target attribute of the process is obtained, and it is determined whether the preset TAG_UI attribute exists in the target attribute. If it exists, performance enhancement operations are performed on the process according to the preset execution branch, such as increasing the GPU frequency, thereby optimizing process performance and realizing differentiated processing of the process.
[0060] By obtaining the target attributes corresponding to each process, determining the running branch of the process based on the target attributes, and running the process according to the running branch, differentiated processing between multiple processes is achieved, improving the flexibility of process operation.
[0061] In one embodiment, the Android system includes an application layer, an application framework layer, a system runtime library layer, and a system kernel layer, wherein the target attribute is stored in the memory space corresponding to the process in the system kernel layer.
[0062] The Android system architecture can be divided into four layers from top to bottom: the application layer, the application framework layer, the system runtime library layer, and the system kernel layer, with the system kernel layer being the lowest layer. In some embodiments, each process can have a corresponding set of attributes, and the attribute set can contain at least one target attribute. The attribute set corresponding to each process can be stored in the memory space pointed to by ANDROID_OEM_DATA in the task_struct (process descriptor, which contains all the information required by a process) instance unique to each process in the system kernel layer, thereby isolating the attribute sets of multiple processes from each other and preventing them from interfering with each other.
[0063] By configuring process-level attributes for each process, different attribute values can be configured for different processes, and the system can accurately read the target attributes of the target process so that the system can perform differentiated processing on different processes.
[0064] In one embodiment, obtaining the target attribute of a process includes: in response to determining that the process obtains the target attribute at the system kernel layer, directly obtaining the target attribute.
[0065] Because the Android system architecture has a multi-layered framework, and each layer uses different programming languages, it's necessary to determine at which layer the target attributes of a process are being retrieved. As mentioned earlier, the target attributes of each process are stored in the corresponding memory space within the system kernel layer. If the target attributes are being read at the system kernel layer, they can be directly obtained through the API interface by calling a function. For example, by calling the process's API (Application Programming Interface) through a hook function, other modules in the system kernel layer can obtain the process's target attributes. In one embodiment, a process may have auxiliary processes. Modules or subsystems running these auxiliary processes can assist the main process by reading its target attributes from the main process in the system kernel layer, such as allocating memory space for the main process.
[0066] By setting an interface at the system kernel layer, other subsystems or modules in the system kernel layer can read the target attributes to realize the business functions of the subsystems or modules, thereby improving the accuracy and efficiency of other subsystems or modules in the system kernel layer in reading the target attributes.
[0067] In one embodiment, obtaining the target attribute of a process includes: in response to determining that the process obtains the target attribute at the application layer, the application framework layer, or the system runtime layer, obtaining the target attribute through a first node provided by the system kernel layer.
[0068] If you need to obtain target attributes at the application layer, application framework layer, or system runtime layer of the Android system, you need to read the target attributes stored in the system kernel layer through the first node. The first node is a node in the Linux system, which is equivalent to a folder. The first node connects the upper and lower layers of the Android system, allowing all layers of the system to obtain the target attributes of the process.
[0069] By setting a first node, the target attributes of the process can be obtained at all levels of the system, thereby improving the system's operating efficiency.
[0070] In one embodiment, before obtaining the target attribute of the process, the method further includes: in response to determining that the target attribute is to be written to the system kernel layer, directly writing the target attribute to the memory space corresponding to the process.
[0071] In some embodiments of this disclosure, the target attributes corresponding to each process can be written through various layers of the Android system. Therefore, when writing the target attributes to the memory space corresponding to each process in the system kernel layer, it is necessary to determine which layer of the Android system is being written to. If the target attributes are written to the system kernel layer, then the target attributes can be written to the memory space simply by calling the API interface.
[0072] By setting an interface at the system kernel layer, other subsystems or modules in the system kernel layer can write target attributes into the memory space, thereby improving the accuracy and efficiency of writing target attributes by other subsystems or modules in the system kernel layer.
[0073] In one embodiment, before obtaining the target attribute of the process, the method further includes: in response to determining that the target attribute is written to the application layer, the application framework layer, or the system runtime layer, writing the target attribute to the memory space corresponding to the process through a second node provided by the system kernel layer.
[0074] If the target attributes of a process are written at the application layer, application framework layer, or system runtime layer of the Android system, a second node is needed to write the target attributes to the memory space of the system kernel layer. The second node is a node found in Linux systems. Through the second node, the upper and lower layers of the Android system can be connected, allowing various layers of the architecture above the system kernel layer to write target attributes to the kernel layer. In one embodiment, the second node can be encapsulated in the libprocinfo function library, forming a C language function API interface for the system runtime layer to call when writing target attributes. In another embodiment, the second node can be encapsulated in the JNI of the Process class, forming a Java language function API interface for the application framework layer to call when writing target attributes.
[0075] By setting a second node, the target attributes of the process can be written at all levels of the system, thus improving the system's operating efficiency.
[0076] In one embodiment, a process record table exists in the system kernel layer. The process record table includes multiple first processes in the Android system, and each first process has at least one attribute in its corresponding memory space.
[0077] At the system kernel level, in addition to the first node and second node, there is also a third node. Through the third node, the process record table in the system kernel layer can be accessed. The process record table records the ID information and corresponding attribute information of each first process. A first process is a process that has at least one attribute in memory space. The attribute in memory space is the target attribute when it is retrieved and invoked. That is, when a process has a corresponding attribute, its ID information and its corresponding attribute information are recorded in the process record table; if a process does not have a corresponding attribute, its ID information is not recorded. Developers can access the process record table through the third node to manage the first processes in the process record table. In one embodiment, developers can test processes by calling the mitag node in the Linux system and read the attribute record table by reading the / proc / mitag_dump node.
[0078] By setting up a process log table, developers can improve the efficiency of managing multiple first processes that have process attributes.
[0079] In one embodiment, the architecture diagram of the Android system provided in this disclosure is as follows: Figure 2 As shown, the following will discuss... Figure 2 Further explanation is needed.
[0080] The system kernel layer sets up a memory space for each process, read nodes for upper-level system structures to read process attributes, write nodes for upper-level system structures to write process attributes, and management nodes for developers to read process attributes. Within the system kernel, different subsystems or modules can use hook functions to call API interfaces, thereby performing read and write operations on the process attributes stored in the memory space.
[0081] In the system runtime library and application architecture, attribute reading and attribute writing functions can be used to read and write attributes of the memory space corresponding to each process in the system kernel.
[0082] At the application layer, the process log table in the system kernel can be read through the management node. The process log table includes the ID information and attribute information of all processes with marked attributes, and the information in the process log table will also be updated synchronously when the life state of a process changes. For example, when a process with attribute information dies, the system will delete the information of that process from the process log table so that developers can manage processes according to the process log table.
[0083] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should know that this disclosure is not limited to the described order of actions, because according to this disclosure, some steps may be performed in other orders or simultaneously.
[0084] Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by this disclosure.
[0085] Corresponding to the aforementioned application function implementation method embodiments, this disclosure also provides embodiments of application function implementation apparatus and corresponding terminals.
[0086] Reference Figure 3 A block diagram of a process execution apparatus according to an exemplary embodiment shows that the apparatus may include:
[0087] The acquisition unit 302 is used to acquire the target attributes of the process, wherein the running environment of the process is the Android system;
[0088] The determining unit 304 is configured to determine the running branch of the process based on the preset attribute in response to determining that the target attribute conforms to the preset attribute, wherein the preset attribute and the running branch have a corresponding relationship;
[0089] Execution unit 306 is configured to run the process in the Android system according to the execution branch.
[0090] In one embodiment, the Android system includes an application layer, an application framework layer, a system runtime library layer, and a system kernel layer, wherein the target attribute is stored in the memory space corresponding to the process in the system kernel layer.
[0091] In one embodiment, the acquisition unit 302 is specifically used for:
[0092] In response to determining that the process obtains the target attribute at the system kernel layer, the target attribute is obtained directly.
[0093] In one embodiment, the acquisition unit 302 is specifically used for:
[0094] In response to determining that the process obtains the target attribute at the application layer, the application framework layer, or the system runtime layer, the target attribute is obtained through the first node provided by the system kernel layer.
[0095] In one embodiment, the device further includes:
[0096] The first writing unit is configured to, in response to determining that the target attribute is to be written to the system kernel layer, directly write the target attribute to the memory space corresponding to the process.
[0097] In one embodiment, the device further includes:
[0098] The second writing unit is configured to, in response to determining that the target attribute is to be written at the application layer, the application framework layer, or the system runtime layer, write the target attribute to the memory space corresponding to the process through a second node provided by the system kernel layer.
[0099] In one embodiment, a process record table exists in the system kernel layer. The process record table includes multiple first processes in the Android system, and each first process has at least one attribute in its corresponding memory space.
[0100] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0101] Accordingly, this disclosure provides an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to:
[0102] Obtain the target attributes of the process, wherein the process runs in an Android system.
[0103] In response to determining that the target attribute conforms to a preset attribute, the running branch of the process is determined based on the preset attribute, wherein there is a correspondence between the preset attribute and the running branch;
[0104] The process runs in the Android system according to the specified running branch.
[0105] Figure 4 This is a schematic diagram illustrating the structure of an electronic device 400 according to an exemplary embodiment. For example, device 400 may be a user device, specifically a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, wearable device such as smartwatch, smart glasses, smart bracelet, smart running shoes, etc.
[0106] Reference Figure 4 The device 400 may include one or more of the following components: a processing component 402, a memory 404, a power supply component 406, a multimedia component 408, an audio component 410, an input / output (I / O) interface 412, a sensor component 414, and a communication component 416.
[0107] Processing component 402 typically controls the overall operation of device 400, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.
[0108] Memory 404 is configured to store various types of data to support the operation of device 400. Examples of this data include instructions for any application or method operating on device 400, contact data, phonebook data, messages, pictures, videos, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0109] Power supply component 406 provides power to various components of device 400. Power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 400.
[0110] Multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera and / or a rear-facing camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0111] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
[0112] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0113] Sensor assembly 414 includes one or more sensors for providing status assessments of various aspects of device 400. For example, sensor assembly 414 can detect the on / off state of device 400, the relative positioning of components such as the aforementioned display and keypad of device 400, changes in the position of device 400 or a component of device 400, the presence or absence of user contact with device 400, the orientation or acceleration / deceleration of device 400, and temperature changes of device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0114] Communication component 416 is configured to facilitate wired or wireless communication between device 400 and other devices. Device 400 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G LTE, 5G NR, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the aforementioned communication component 416 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0115] In an exemplary embodiment, device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0116] In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as a memory 404 including instructions, which, when executed by a processor 420 of device 400, enables device 400 to perform a method for sending information, the method including:
[0117] Obtain the target attributes of the process, wherein the process runs in an Android system.
[0118] In response to determining that the target attribute conforms to a preset attribute, the running branch of the process is determined based on the preset attribute, wherein there is a correspondence between the preset attribute and the running branch;
[0119] The process runs in the Android system according to the specified running branch.
[0120] The non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0121] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0122] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A process execution method, characterized in that, The method includes: Obtain the target attributes of the process, wherein the process runs in an Android system. In response to determining that the target attribute conforms to a preset attribute, the running branch of the process is determined based on the preset attribute, wherein there is a correspondence between the preset attribute and the running branch; The process runs in the Android system according to the specified running branch.
2. The method according to claim 1, characterized in that, The Android system includes an application layer, an application framework layer, a system runtime library layer, and a system kernel layer. The target attributes are stored in the memory space corresponding to the process in the system kernel layer.
3. The method according to claim 2, characterized in that, The target attributes of the process to be acquired include: In response to determining that the process obtains the target attribute at the system kernel layer, the target attribute is obtained directly.
4. The method according to claim 2, characterized in that, The target attributes of the process to be acquired include: In response to determining that the process obtains the target attribute at the application layer, the application framework layer, or the system runtime layer, the target attribute is obtained through the first node provided by the system kernel layer.
5. The method according to claim 2, characterized in that, Before obtaining the target attributes of the process, the method further includes: In response to determining that the target attribute is to be written to the system kernel layer, the target attribute is directly written to the memory space corresponding to the process.
6. The method according to claim 2, characterized in that, Before obtaining the target attributes of the process, the method further includes: In response to determining that the target attribute is to be written at the application layer, the application framework layer, or the system runtime layer, the target attribute is written to the memory space corresponding to the process through a second node provided by the system kernel layer.
7. The method according to claim 2, characterized in that, The system kernel layer contains a process record table; The process record table includes multiple first processes in the Android system, and each first process has at least one attribute in its corresponding memory space.
8. A process execution device, characterized in that, The device includes: An acquisition unit is used to acquire the target attributes of a process, wherein the process runs in an Android system. A determining unit is configured to, in response to determining that the target attribute conforms to a preset attribute, determine the running branch of the process based on the preset attribute, wherein the preset attribute and the running branch have a corresponding relationship; A running unit is used to run the process in the Android system according to the running branch.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method described in any one of claims 1 to 7.
10. An electronic device, characterized in that, include: processor; a memory for storing processor-executable instructions; The processor performs the steps of implementing the method according to any one of claims 1 to 7.