A process running method, device, computer equipment and storage medium
By calling the instrumentation test case in the operating system to configure the application ABI, the problem of being unable to start a 32-bit process in a 64-bit application is solved, and the flexible start of application processes with different processing bits is achieved.
Patent Information
- Application Number
- CN202110491556.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-06
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-05-06
AI Technical Summary
The existing operating system determines the number of bits of the application when installing the application, resulting in the inability to start the 32-bit process in a 64-bit application, limiting the startup of application processes with different processing bits.
By calling the pre -created pile test case created in the first process of the first processing digits, the target ABI parameter information that matches the application of the application of the binary interface (ABI) and the second processing digits, thereby starting the second processing digits The second process.
The application process of starting different processing bits in an application with a specific processing bit is realized, and the flexibility of the process startup is improved.
Smart Images

Figure CN113076263B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, apparatus, computer equipment and storage medium for running a process. Background Art
[0002] When installing an application, an operating system such as the Android system determines the processing bit number of the application binary interface (ABI) of the application, that is, whether the ABI of the application is 32-bit or 64-bit.
[0003] After the application is installed, the application can only use the ABI with a fixed number of processing bits to start the process of the corresponding processing bit number. For example, a 32-bit process cannot be started in a 64-bit application, resulting in the inability to use some small programs with different processing bit numbers in the application. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a method, apparatus, computer device, and storage medium for running a process.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for executing a process, including:
[0006] Based on the running first process of the first processing bit number, a pre-created instrumentation test case is called, and the application binary interface ABI indicated by the instrumentation test case is configured with target ABI parameter information matching the second processing bit number; based on the configured ABI, a second process of the second processing bit number is started.
[0007] In a possible implementation, the method further includes: declaring the instrumentation test case in an application configuration file corresponding to the first process, and creating the instrumentation test case.
[0008] In a possible implementation, configuring the application binary interface ABI indicated by the instrumentation test case to match the target ABI parameter information of the second processing bit number includes: configuring the ABI indicated by the instrumentation test case to be a target string for indicating that the processing bit number is the second processing bit number.
[0009] In one possible implementation, the target ABI parameter information that matches the second bit number of the application binary interface ABI configuration indicated by the instrumentation test case includes: determining the second bit number of the processing bit that is different from the first bit number of the processing bit based on the first bit number of the first process; and the target ABI parameter information that matches the second bit number of the ABI configuration indicated by the instrumentation test case.
[0010] In one possible implementation, a pre-created instrumentation test case is called based on a first process running a first processing bit number, and target ABI parameter information matching a second processing bit number is configured for an ABI indicated by the instrumentation test case, including: enabling a reflection mechanism in the first process, and modifying the initial ABI parameter information matching the first processing bit number indicated by the called instrumentation test case to the target ABI parameter information matching the second processing bit number.
[0011] In a possible implementation, a pre-created instrumentation test case is called based on a first process running a first processing bit number, and target ABI parameter information matching the second processing bit number is configured for an ABI indicated by the instrumentation test case, including: calling a target operating system function in the first process, calling the instrumentation test case through the target operating system function, and target ABI parameter information matching the second processing bit number is configured for an ABI indicated by the instrumentation test case.
[0012] In a possible implementation, starting the second process of the second processing bit number based on the configured ABI includes: calling the ABI to start the second process, and closing the first process.
[0013] In a possible implementation, after starting the second process of the second processing bit number, the method further includes: starting a target object in the second process, where the target object includes a target application of the first process and / or the second processing bit number.
[0014] In one possible implementation, launching the target object in the second process includes: when the target object includes user interface UI data, displaying prompt information for instructing the user to confirm whether to authorize launching the target object; and launching the target object in the second process in response to confirmation information fed back by the user based on the prompt information.
[0015] In a second aspect, an embodiment of the present disclosure further provides a process running device, including:
[0016] A configuration module is used to call a pre-created instrumentation test case based on a first process of a first processing bit number being run, and configure target ABI parameter information matching a second processing bit number for an application binary interface ABI indicated by the instrumentation test case;
[0017] A startup module is used to start the second process of the second processing bit number based on the configured ABI.
[0018] In a possible implementation, the device further includes: a creation module; the creation module is used to declare the instrumentation test case in an application configuration file corresponding to the first process, and create the instrumentation test case.
[0019] In a possible implementation, when configuring the target ABI parameter information that matches the second number of processing bits for the application binary interface ABI indicated by the instrumentation test case, the configuration module is specifically used to configure the ABI indicated by the instrumentation test case as a target string for indicating that the number of processing bits is the second number of processing bits.
[0020] In a possible implementation, when configuring the target ABI parameter information that matches the second number of processing bits for the application binary interface ABI indicated by the instrumentation test case, the configuration module is specifically used to determine the second number of processing bits that is different from the first number of processing bits based on the first number of processing bits of the first process; and configure the target ABI parameter information that matches the second number of processing bits for the ABI indicated by the instrumentation test case.
[0021] In one possible implementation, when a pre-created instrumentation test case is called based on a first process running a first processing bit number, and the ABI indicated by the instrumentation test case is configured with target ABI parameter information that matches the second processing bit number, the configuration module is specifically used to enable a reflection mechanism in the first process, and modify the initial ABI parameter information that matches the first processing bit number indicated by the called instrumentation test case to the target ABI parameter information that matches the second processing bit number.
[0022] In a possible implementation, when a pre-created instrumentation test case is called based on a first process running a first processing bit number, and target ABI parameter information matching the second processing bit number is configured for an ABI indicated by the instrumentation test case, the configuration module is specifically used to call a target operating system function in the first process, call the instrumentation test case through the target operating system function, and target ABI parameter information matching the second processing bit number is configured for an ABI indicated by the instrumentation test case.
[0023] In a possible implementation, when starting the second process of the second processing bit number based on the configured ABI, the startup module is specifically configured to call the ABI to start the second process and close the first process.
[0024] In a possible implementation, after starting the second process of the second processing bit number, the starting module is further used to start a target object in the second process, where the target object includes a target application of the first process and / or the second processing bit number.
[0025] In one possible implementation, when the target object is started in the second process, the start-up module is specifically used to display prompt information for instructing the user to confirm whether to authorize the start of the target object when the target object includes user interface UI data; and to start the target object in the second process in response to confirmation information fed back by the user based on the prompt information.
[0026] In a third aspect, an optional implementation of the present disclosure further provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions perform the steps of the above-mentioned first aspect, or any possible implementation of the first aspect.
[0027] In a fourth aspect, an optional implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.
[0028] For a description of the effects of the apparatus, computer device, and computer-readable storage medium for running the above process, please refer to the description of the method for running the above process, which will not be repeated here.
[0029] The process running method, apparatus, computer equipment and storage medium provided by the embodiments of the present disclosure call a pre-created instrumentation test case based on the running first process of the first processing bit number, and configure the target ABI parameter information matching the second processing bit number for the ABI indicated by the instrumentation test case. In this way, based on the configured ABI, i.e., the ABI of the second processing bit number, a second process of the second processing bit number can be started in the application of the first processing bit number, thereby realizing the starting of application processes of different processing bit numbers in the application of a specific processing bit number, thereby improving the flexibility of process starting.
[0030] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0032] Figure 1 A flowchart of a process running method provided by an embodiment of the present disclosure is shown;
[0033] Figure 2 A schematic diagram showing a device for running a process provided by an embodiment of the present disclosure is shown;
[0034] Figure 3 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0036] According to research, operating systems such as Android determine the processing bitness of the application's ABI when installing the application, that is, whether the application's ABI is 32-bit or 64-bit. For example, if the processing bitness of an application installed on the Android system is 64-bit, the application can only start a 64-bit process through the 64-bit ABI. In this case, it is impossible to start a 32-bit applet in the application.
[0037] Based on the above research, the present disclosure provides a method, apparatus, computer equipment and storage medium for process running, in which a pre-created instrumentation test case is called based on a first process of a first processing bit number being run, and target ABI parameter information matching a second processing bit number is configured for an ABI indicated by the instrumentation test case. Through the instrumentation test case, an ABI of a second processing bit number can be configured for an application of the first processing bit number. The application of the first processing bit number can start a second process of the second processing bit number based on the ABI of the second processing bit number, i.e., the configured ABI. Based on the second process, an application of the second processing bit number can be started in the application of the first processing bit number.
[0038] The raising and solving of the above problems are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0039] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0040] To facilitate understanding of the present embodiment, a method for executing a process disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the method for executing a process provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the method for executing a process may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0041] The stub test described in the embodiment of the present disclosure is, for example, a test case that is pre-created and can configure an ABI of a second processing bit number for an application of a first processing bit number.
[0042] Exemplarily, the instrumentation test case is declared in an application configuration file corresponding to the first process of the first processing bit number, and the instrumentation test case is created; for example, the instrumentation test case Instrumentation is declared in the application configuration file AndroidManifext.xml corresponding to the first process of the first processing bit number, and the execution code of the instrumentation test case Instrumentation is created to implement the function of configuring the ABI indicated by Instrumentation with the target ABI parameter information that matches the second processing bit number.
[0043] In addition, the first processing bit number and the second processing bit number described in the embodiments of the present disclosure are, for example, determined by the operating system for the application, and include, for example, 64 bits and 32 bits. The first processing bit number is different from the second processing bit number, for example, when the first processing bit number is 64 bits, the second processing bit number is 32 bits; when the first processing bit number is 32 bits, the second processing bit number is 64 bits. For ease of explanation, the embodiments of the present disclosure are described by taking the first processing bit number being 64 bits and the second processing bit number being 32 bits as an example.
[0044] The following describes the process running method provided by the embodiment of the present disclosure by taking a computer device as an example of an execution subject.
[0045] See also Figure 1 FIG. 1 is a flowchart of a process running method provided by an embodiment of the present disclosure, wherein the method includes steps S101 to S102, wherein:
[0046] S101: Based on a first process running with a first processing bit number, a pre-created instrumentation test case is called to configure target ABI parameter information matching a second processing bit number for an application binary interface ABI indicated by the instrumentation test case.
[0047] Specifically, when the instrumentation test case is called, the functions performed by the instrumentation test case include, for example: determining a second processing bit number different from the first processing bit number according to the first processing bit number of the first process; configuring target ABI parameter information matching the second processing bit number for the ABI indicated by the instrumentation test case. For example, if the processing bit number of the first process is 64 bits, then determining the second processing bit number is 32 bits, and configuring 32-bit target ABI parameter information for the ABI indicated by the instrumentation test case.
[0048] The target ABI parameter information for matching the second processing bit number for the ABI configuration indicated by the instrumentation test case includes, for example: configuring the ABI indicated by the instrumentation test case as a target string for indicating that the processing bit number is the second processing bit number. The target string includes, for example, an ABI string, and different ABI strings represent ABIs with different processing bit numbers, for example, the ABI string for a 64-bit ABI includes: arm64-v7a, and the ABI string for a 32-bit ABI includes: armeabi-v7a, etc.
[0049] Exemplarily, the ABI parameter abiOverride indicated by the instrumentation test case Instrumentation is passed in with a specified ABI string (eg, armeabi-v7a, arm64-v7a, etc.).
[0050] Based on the first process of the first processing bit number being run, calling the pre-created instrumentation test case, configuring the application binary interface ABI indicated by the instrumentation test case with target ABI parameter information matching the second processing bit number, for example, including but not limited to any of the following (1) and (2):
[0051] (1): The pre-created stub test case is called in the first process of the first processing bit number, and a reflection mechanism such as a reflection hook is started to modify the initial ABI parameter information matching the first processing bit number indicated by the called stub test case to the target ABI parameter information matching the second processing bit number.
[0052] Specifically, after the instrumentation test case is called in the first process, the instrumentation test case will configure the target ABI parameter information that matches the second processing bit for the ABI. However, when the instrumentation test case is called in the first process, the operating system, such as the Android system, will determine the initial ABI parameter information that matches the first processing bit for the ABI indicated by the instrumentation test case, intercept the initial ABI parameter information automatically configured by the operating system based on a reflection mechanism, such as a reflection hook, and then configure the target ABI parameter information determined by the instrumentation test case to the ABI indicated by the instrumentation test case.
[0053] (2): Call the target operating system function in the first process, and call the instrumentation test case through the target operating system function. The target operating system function includes, for example, a system tool in the operating system, such as app_process in the Android system.
[0054] Exemplarily, app_process is called in the first process, and a target command line is sent to app_process. app_process can control the Android system to call the pre-created instrumentation test case based on the target command line. Because app_process has higher operating permissions in the Android system, when the instrumentation test case is called in the Android system through app_process, the target ABI parameter information that matches the second processing bit number determined by the instrumentation test case can be directly configured to the ABI indicated by the instrumentation test case. The Android system will not generate initial ABI parameter information that matches the first processing bit number for the ABI indicated by the instrumentation test case.
[0055] In addition, in the process running method provided by the embodiment of the present disclosure, the timing of calling the instrumentation test case includes but is not limited to any one of the following (A) and (B):
[0056] (A): Call the stub test case when the application with the first processing bit number is started: During the startup of the application with the first processing bit number, the stub test case is called based on the first process of the first processing bit number running in the application, and the above-mentioned target ABI parameter information is configured; for example, when a user starts a 64-bit application M, the stub test case is called based on any 64-bit first process in M.
[0057] (B): Calling the stub test case during the normal operation of the application of the first processing bit number (that is, during the process of providing services): During the process of providing services by the application of the first processing bit number, in response to the user's triggering of the target application (such as the target applet), calling the stub test case from any running first process of the first processing bit number, and configuring the above-mentioned target ABI parameter information; for example, when a 64-bit application M is providing services to the user, the user triggers the target application a (for example, opening a 32-bit applet), in response to the user's triggering of a, calling the stub test case based on any 64-bit first process in M, and configuring the above-mentioned target ABI parameter information.
[0058] S102: Based on the configured ABI, start a second process of a second processing bit number.
[0059] Here, the configured ABI is called to start the second process, and the first process is closed during the startup of the second process. After the first process is closed, the second process is successfully started.
[0060] In order to ensure that the application functions in the application can be used normally, in another embodiment of the present disclosure, after starting the second process, the target object is started in the second process; wherein the target object, for example, includes the target application of the first process and / or the second process bit, and the target application, for example, includes a mini-program.
[0061] Specifically, for the situation of timing (A) of using the above-mentioned calling of the instrumentation test case, during the startup process of the application of the first processing bit number, the ABI of the second processing bit number is configured by calling the instrumentation test case, and then the second process is started based on the ABI of the second processing bit number, and the first process is closed during the startup of the second process, and then, the closed first process can be restarted in the successfully started second process; thereafter, during the application service process, if the user triggers the target application (for example, starts a small program of the second processing bit number), the target application can be started in the second process.
[0062] In this case, because the second process is started when the application is started, and the closed first process is restarted in the second program, the second process of the second processing bit is added to the application without the user's perception. When the user triggers the target application in the application, the target application can be started in the second process (for example, a small program of the second processing bit is started in the second process).
[0063] For example, during the startup of the 64-bit application M, the 32-bit ABI is configured, and the 32-bit second process is started based on the ABI. After the second process is successfully started, the closed 64-bit first process is restarted to ensure that the application functions running in the first process of the application M, such as page display, voice prompts, etc., can run normally. In addition, if the user triggers the target application, such as starting the 32-bit applet N, the applet N is started in the second process.
[0064] For the situation of timing (B) of using the above-mentioned calling stub test case, during the process of providing services by the application of the first processing bit number, if it is detected that the user has triggered the target application (for example, the target applet), the calling stub test case is triggered to configure the process of the ABI of the second processing bit number. After the ABI of the second processing bit number is configured, the second process is started based on the ABI of the second processing bit number. Similarly, the first process is closed during the startup process, and after the second process is successfully started, the target object (including the first process and the target application triggered by the user) is started again.
[0065] Exemplarily, during the service process of a 64-bit application M, a user triggers a 32-bit applet N, configures a 32-bit ABI through the above process, and starts a 32-bit second process based on the 32-bit ABI. After the second process is successfully started, the closed first process and the 32-bit applet N triggered by the user are started in the second process.
[0066] In another embodiment of the present disclosure, the above-mentioned target object (including the first process and the target application triggered by the user) may include user interface UI data (such as game interface data). Based on this, user authorization can be obtained before starting the target object in the second process (for example, the SYSTEM_ALERT_WINDOW permission needs to be applied for). Specifically, when the target object includes user interface UI data, prompt information is displayed to indicate whether the user confirms whether to authorize the start of the target object; in response to the confirmation information fed back by the user based on the prompt information, the target object is started in the second process.
[0067] In summary, the process running method provided by the present invention calls the expected instrumentation test case based on the running first process of the first processing bit number, configures the target ABI parameter information matching the second processing bit number for the ABI indicated by the instrumentation test case, wherein the second processing bit number is different from the first processing bit number; in this way, an ABI of the second processing bit number can be passed to the application of the first processing bit number, and the application of the first processing bit number can start a second process of the second processing bit number based on the ABI of the second processing bit number, that is, the configured ABI, so that the application of the first processing bit number includes a second process of the second processing bit number, and based on the second process, the application of the second processing bit number can be started in the application of the first processing bit number, thereby realizing the startup of processes of different processing bit numbers in an application of a specific processing bit number, thereby improving the flexibility of process startup.
[0068] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0069] Based on the same inventive concept, an embodiment of the present disclosure also provides a device for running a process corresponding to the method for running a process. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the method for running the process in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0070] Reference Figure 2 FIG. 2 is a schematic diagram of a process running device provided by an embodiment of the present disclosure, wherein the device includes: a configuration module 201 and a startup module 202; wherein:
[0071] Configuration module 201, configured to call a pre-created instrumentation test case based on a first process of a first processing bit number being run, and configure target ABI parameter information matching a second processing bit number for an application binary interface ABI indicated by the instrumentation test case;
[0072] The starting module 202 is used to start the second process of the second processing bit number based on the configured ABI.
[0073] In a possible implementation, the device further includes: a creation module; the creation module is used to declare the instrumentation test case in an application configuration file corresponding to the first process, and create the instrumentation test case.
[0074] In a possible implementation, when configuring the target ABI parameter information that matches the second number of processing bits for the application binary interface ABI indicated by the instrumentation test case, the configuration module is specifically used to configure the ABI indicated by the instrumentation test case as a target string for indicating that the number of processing bits is the second number of processing bits.
[0075] In a possible implementation, when configuring the target ABI parameter information that matches the second number of processing bits for the application binary interface ABI indicated by the instrumentation test case, the configuration module is specifically used to determine the second number of processing bits that is different from the first number of processing bits based on the first number of processing bits of the first process; and configure the target ABI parameter information that matches the second number of processing bits for the ABI indicated by the instrumentation test case.
[0076] In one possible implementation, when a pre-created instrumentation test case is called based on a first process running a first processing bit number, and the ABI indicated by the instrumentation test case is configured with target ABI parameter information that matches the second processing bit number, the configuration module is specifically used to enable a reflection mechanism in the first process, and modify the initial ABI parameter information that matches the first processing bit number indicated by the called instrumentation test case to the target ABI parameter information that matches the second processing bit number.
[0077] In a possible implementation, when a pre-created instrumentation test case is called based on a first process running a first processing bit number, and target ABI parameter information matching the second processing bit number is configured for an ABI indicated by the instrumentation test case, the configuration module is specifically used to call a target operating system function in the first process, call the instrumentation test case through the target operating system function, and target ABI parameter information matching the second processing bit number is configured for an ABI indicated by the instrumentation test case.
[0078] In a possible implementation, when starting the second process of the second processing bit number based on the configured ABI, the startup module is specifically configured to call the ABI to start the second process and close the first process.
[0079] In a possible implementation, after starting the second process of the second processing bit number, the starting module is further used to start a target object in the second process, where the target object includes a target application of the first process and / or the second processing bit number.
[0080] In one possible implementation, when the target object is started in the second process, the start-up module is specifically used to display prompt information for instructing the user to confirm whether to authorize the start of the target object when the target object includes user interface UI data; and to start the target object in the second process in response to confirmation information fed back by the user based on the prompt information.
[0081] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0082] The present disclosure also provides a computer device, such as Figure 3 FIG. 1 is a schematic diagram of a computer device structure provided in an embodiment of the present disclosure, including:
[0083] A processor 31 and a memory 32; the memory 32 stores machine-readable instructions executable by the processor 31, and the processor 31 is used to execute the machine-readable instructions stored in the memory 32. When the machine-readable instructions are executed by the processor 31, the processor 31 performs the following steps:
[0084] Based on the running first process of the first processing bit number, a pre-created instrumentation test case is called, and target ABI parameter information matching the second processing bit number is configured for the application binary interface ABI indicated by the instrumentation test case;
[0085] Based on the configured ABI, a second process of the second processing bit number is started.
[0086] The above-mentioned memory 32 includes internal memory 321 and external memory 322; the memory 321 here is also called internal memory, which is used to temporarily store the calculation data in the processor 31, as well as the data exchanged with the external memory 322 such as the hard disk. The processor 31 exchanges data with the external memory 322 through the internal memory 321.
[0087] The specific execution process of the above instructions can refer to the steps of the process running method described in the embodiment of the present disclosure, which will not be repeated here.
[0088] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the process operation method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0089] The present disclosure also provides a computer program product that carries a program code. The program code includes instructions that can be used to execute the steps of the process running method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0090] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0091] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0092] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0093] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0094] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0095] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for running a process, characterized in that: include: Based on the running first process of the first processing bit number, a pre-created instrumentation test case is called, and target ABI parameter information matching the second processing bit number is configured for the application binary interface ABI indicated by the instrumentation test case; Based on the configured ABI, start the second process of the second processing bit, The method of calling a pre-created instrumentation test case based on the first process of the first processing bit number being run and configuring target ABI parameter information matching the second processing bit number for the ABI indicated by the instrumentation test case includes: Determine, according to the first processing bit number of the first process, the second processing bit number that is different from the first processing bit number; and In the first process, a reflection mechanism is enabled to modify the initial ABI parameter information matching the first processing bit number indicated by the called stub test case to the target ABI parameter information matching the second processing bit number, After starting the second process of the second processing bit number, the method further includes: Initiate a target object in the second process, the target object including the first process and / or a target application of the second processing unit, The method of enabling the reflection mechanism in the first process and modifying the initial ABI parameter information that matches the first processing bit number indicated by the called stub test case to the target ABI parameter information that matches the second processing bit number includes: Intercepting the initial ABI parameter information automatically configured by the operating system based on the reflection mechanism; and The target ABI parameter information determined by the instrumentation test case is configured to the ABI indicated by the instrumentation test case.
2. The method according to claim 1, characterized in that: Also includes: The instrumentation test case is declared in an application configuration file corresponding to the first process, and the instrumentation test case is created.
3. The method according to claim 1, characterized in that The target ABI parameter information of the application binary interface ABI configuration indicated for the instrumentation test case and matching the second processing bit number includes: The ABI indicated by the instrumentation test case is configured as a target string for indicating that the number of processing bits is the second number of processing bits.
4. The method according to claim 1, characterized in that The starting the second process of the second processing bit number based on the configured ABI includes: The ABI is called to start the second process, and the first process is closed.
5. The method according to claim 1, characterized in that The starting the target object in the second process includes: In the case where the target object includes user interface UI data, displaying prompt information for instructing the user to confirm whether to authorize the activation of the target object; In response to confirmation information fed back by the user based on the prompt information, the target object is started in the second process.
6. A device for running a process, characterized in that: include: A configuration module is used to call a pre-created instrumentation test case based on a first process of a first processing bit number being run, and configure target ABI parameter information matching a second processing bit number for an application binary interface ABI indicated by the instrumentation test case; A startup module, used for starting the second process of the second processing bit number based on the configured ABI, Among them, the configuration module is configured as: Determine, according to the first processing bit number of the first process, the second processing bit number that is different from the first processing bit number; and In the first process, a reflection mechanism is enabled to modify the initial ABI parameter information matching the first processing bit number indicated by the called stub test case to the target ABI parameter information matching the second processing bit number, The startup module is further configured to: after starting the second process of the second processing bit number, start a target object in the second process, the target object including the first process and / or the target application of the second processing bit number, Wherein, the configuration module is further configured as: Intercepting the initial ABI parameter information automatically configured by the operating system based on the reflection mechanism; and The target ABI parameter information determined by the instrumentation test case is configured to the ABI indicated by the instrumentation test case.
7. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor executes the steps of the method for running a process as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program is executed by a computer device, the computer device executes the steps of the process execution method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Inter-architecture compatability module to allow code module of one architecture to use library module of another architecture
CN104951296A
File backup method and device and file restoration method and device
CN108038028A
Data collection method, device, apparatus and storage medium
CN109408346A