CN111913707B - Multiplexing method and device for running process - Google Patents

Multiplexing method and device for running process Download PDF

Info

Publication number
CN111913707B
CN111913707B CN202010783885.2A CN202010783885A CN111913707B CN 111913707 B CN111913707 B CN 111913707B CN 202010783885 A CN202010783885 A CN 202010783885A CN 111913707 B CN111913707 B CN 111913707B
Authority
CN
China
Prior art keywords
applet
running process
running
occupied
memory space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010783885.2A
Other languages
Chinese (zh)
Other versions
CN111913707A (en
Inventor
苗景磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Lianshang Network Technology Co Ltd
Original Assignee
Shanghai Lianshang Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Lianshang Network Technology Co Ltd filed Critical Shanghai Lianshang Network Technology Co Ltd
Priority to CN202010783885.2A priority Critical patent/CN111913707B/en
Publication of CN111913707A publication Critical patent/CN111913707A/en
Application granted granted Critical
Publication of CN111913707B publication Critical patent/CN111913707B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a multiplexing method and device for running processes, and relates to the technical field of applet running. The specific embodiment comprises the following steps: and under the condition that the started first applet exists in the host application, responding to the starting instruction of the second applet of the host application, and if the memory space occupied by the running process of the second applet is within the residual occupied space corresponding to the running process, multiplexing the running process of the first applet to run the second applet. According to the method and the device, under the condition that one applet is started, whether the started applet is influenced by the operation of the other applet in the same process can be judged, and under the condition that the operation is not influenced, the processes of the applet are multiplexed, so that the system operation cost can be saved, and the mutual influence on the operation among the applets possibly caused by multiplexing can be avoided.

Description

Multiplexing method and device for running process
Technical Field
The present application relates to the field of computer technologies, and in particular, to the field of applet operation technologies, and in particular, to a method and an apparatus for multiplexing an operation process.
Background
With the development of internet technology, more and more users start using applications installed on terminals such as mobile phones and use applets hosting the applications. The applet can be hosted by applications commonly used by the user, so that the user can open the applet in these applications directly by a simple operation while using the applications.
In the prior art, a plurality of applets can be opened in the same application, and accordingly, each applet corresponds to one process so as to realize the running of the applet.
Disclosure of Invention
A multiplexing method, apparatus, electronic device and storage medium for running processes are provided.
According to a first aspect, there is provided a method for multiplexing running processes, applied to a terminal, the terminal being installed with a host application, the method comprising: under the condition that a first applet started in a host application exists, responding to a starting instruction of a second applet of the host application, and judging the relation between the memory space required to be occupied by the operation of the second applet and the residual occupied space corresponding to the operation process of the first applet; and if the memory space occupied by the operation of the second applet is within the residual occupied space corresponding to the operation process, multiplexing the operation process of the first applet to operate the second applet.
According to a second aspect, there is provided a multiplexing device for running processes, applied to a terminal, the terminal being installed with a host application, the device comprising: the judging unit is configured to judge the relation between the memory space required to be occupied by the operation of the second applet and the residual occupied space corresponding to the operation process of the first applet in response to acquiring the starting instruction of the second applet of the host application when the first applet started in the host application exists; and the multiplexing unit is configured to multiplex the running process of the first applet to run the second applet if the memory space required to be occupied by the running process of the second applet is within the residual occupied space corresponding to the running process.
According to a third aspect, there is provided an electronic device comprising: one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method as in any of the embodiments of the multiplexing method of running processes.
According to a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method as any of the embodiments of the multiplexing method of running processes.
According to the scheme of the application, under the condition that one applet is started, whether the other applet operates in the same process or not can be judged, and under the condition that the started applet is not influenced, the processes of the applet are multiplexed, so that the system operation cost can be saved, and the interaction of the applets to operation, which is possibly caused by multiplexing, can be avoided.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings, in which:
FIG. 1 is an exemplary system architecture diagram in which some embodiments of the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a multiplexing method of a running process according to the present application;
FIG. 3 is a flow chart of yet another embodiment of a multiplexing method of a running process according to the present application;
FIG. 4a is a flow chart of yet another embodiment of a multiplexing method of a running process according to the present application;
FIG. 4b is a flow chart of yet another embodiment of a multiplexing method of a running process according to the present application;
FIG. 5 is a schematic diagram of one embodiment of a multiplexing device according to the running process of the present application;
Fig. 6 is a block diagram of an electronic device for implementing a multiplexing method of running processes of embodiments of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of a multiplexing method of running processes or multiplexing apparatus of running processes of the present application may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as video-type applications, live applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with display screens, including but not limited to smartphones, tablets, electronic book readers, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The server 105 may be a server providing various services, such as a background server providing support for the terminal devices 101, 102, 103. The background server may analyze and process data such as the running frame request of the terminal, and feed back a processing result (e.g., running frame data of the applet to be started) to the terminal device.
It should be noted that, the method for multiplexing the running process provided in the embodiment of the present application may be executed by the terminal devices 101, 102, 103, and accordingly, the multiplexing device for the running process may be provided in the terminal devices 101, 102, 103.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a multiplexing method of running processes according to the present application is shown. The method is applied to the terminal, and the terminal is provided with the host application. The multiplexing method of the running process comprises the following steps:
in step 201, when the host application has the first applet started, in response to obtaining a start instruction of the second applet of the host application, a relationship between a memory space required to be occupied by the operation of the second applet and a remaining occupiable space corresponding to the operation process of the first applet is determined.
In this embodiment, an executing body (for example, a terminal device shown in fig. 1) on which the method for multiplexing an running process runs may determine, in response to obtaining a start instruction of a second applet of the host application, a relationship between a memory space required to be occupied by running the second applet and a remaining available space corresponding to the running process of the first applet, that is, compare the two. The step is performed if the host application has a first applet already started, i.e. the first applet is running, e.g. in use by the user, i.e. the first applet is running in the foreground, or it may be that the first applet is running in the background.
The manner of acquiring the start instruction may be various, for example, the start instruction may be generated by the execution subject in response to detecting a start operation of the user on the displayed second applet. In addition, the start instruction may be generated by an applet other than the second applet of the host application or by another host application of the terminal.
In practice, each process (such as a applet process) in the operating system of the terminal may be configured with a limit value of the memory space occupied by the process running, for example 50Mb, and the space occupied by the whole process running must not exceed the limit value. If at least one running process of the applet is run in one process, the corresponding memory space is occupied, namely the occupied memory space. The difference between the limit value and the occupied memory space is the residual occupied space.
The executing body may determine, in various manners, a relationship between a memory space occupied by the running of the second applet and a remaining available space corresponding to the running process of the first applet. For example, the executing body may determine whether the memory space occupied by the second applet required for running is within the remaining space, or the executing body may determine whether the memory space occupied by the second applet required for running is outside the remaining space.
The execution body may determine the memory space occupied by the second applet for running in various manners. For example, the executing body may determine the number of pages, for example, 3 pages, in the second applet, and obtain a target value, for example, 5Mb, of the memory space to be occupied, which is preset for each page. The execution body may determine that the memory space occupied by the second applet is 15Mb based on the number of pages and the target value.
Specifically, the execution body may determine the size of the memory space required for running the second applet, and determine whether the size is less than or equal to the value of the remaining available space.
Step 202, if the memory space occupied by the running process of the second applet is within the remaining occupied space corresponding to the running process, the running process of the first applet is multiplexed to run the second applet.
In this embodiment, if the result of the determination by the execution body is that the memory space occupied by the running process of the second applet is within the remaining available space corresponding to the running process of the first applet, or the memory space occupied by the running process of the second applet is not outside the remaining available space corresponding to the running process of the first applet, the running process of the first applet may be multiplexed to run the second applet.
In the method provided by the embodiment of the application, under the condition that one applet is started, whether the started applet is influenced by the operation of the other applet in the same process can be judged, and under the condition that the operation is not influenced, the processes of the applet are multiplexed, so that the system operation cost can be saved, and the interaction between the applets possibly caused by multiplexing can be avoided.
In some optional implementations of the present embodiment, the method further includes: and if the memory space occupied by the second applet for running is not within the residual occupied space corresponding to the running process, loading another running process except the running process, and calling the other running process to run the second applet.
In these alternative implementations, the execution body may load another running process other than the running process and call the another running process to run the second applet if the determination result is no. Thus, the first applet and the second applet run with different processes, respectively.
These implementations may operate different processes on the first applet and the second applet, respectively, in the event that it is determined that process multiplexing between the two applets may affect operation of the two applets, thereby avoiding interaction between the two applets.
In some optional implementations of the present embodiment, the method may further include: loading a preset running process in response to acquiring a starting instruction of a host application; and calling a preset running process to run the first applet in response to the acquisition of a starting instruction of the first applet of the host application.
In these alternative implementations, the execution body may preload a preset running process for later invocation when the applet is started up, when a start instruction of the host application is acquired. If the execution body obtains a start instruction of a first applet of a host application, the execution body may call the loaded running process to run the first applet.
The start instruction for the host application may be generated by the execution subject in response to detecting a start operation of the user for the displayed host application. In addition, the starting instruction can be generated by other host applications of the terminal.
The start instruction for the first applet of the host application may be generated by the execution body in response to detecting a start operation of the user's identification of the displayed first applet. The start instruction may be generated by an applet other than the first applet of the host application or by another host application of the terminal.
The implementation modes can preload the running process under the condition of starting the host application, thereby preparing for the running of the subsequent applet and improving the starting efficiency of the applet.
In some optional application scenarios of these implementations, invoking the preset running process to run the first applet in these implementations may include: acquiring configuration information of a first applet, wherein the configuration information comprises an operation framework version and/or applet type information; and calling a preset running process to run the first applet based on the configuration information.
In these optional application scenarios, the execution subject may obtain configuration information of the first applet. And calling a preset running process to run the first applet based on the configuration information.
In practice, if the configuration information includes an execution framework on which the applet is to run, the execution body may acquire the execution framework from the server in the case where a start instruction for the first applet is acquired. The running framework is also called the basic running framework of the applet, and is also called the base library. Different versions of the runtime framework exist. The applet type information may refer to various preset types of applets, for example, may be a game type or other types other than a game, such as a shopping type.
The application scenes can call the running process and run the first applet based on the configuration information of the first applet, so that the configuration matched with the first applet can be found, and the first applet can be smoothly run by utilizing the configuration.
In some optional cases of these application scenarios, in response to obtaining the start instruction of the second applet for the host application in step 201, determining a relationship between the memory space required for running the second applet and the remaining available space corresponding to the running process of the first applet may include: responding to the acquired starting instruction of the second applet applied to the host, judging whether the configuration information of the second applet is matched with the configuration information of the first applet; if the second applet is matched with the configuration information of the first applet, judging the relation between the memory space occupied by the operation of the second applet and the residual occupied space corresponding to the operation process of the first applet.
In these optional cases, the execution body may determine whether the configuration information of the second applet matches the configuration information of the first applet in response to acquiring the start instruction for the second applet. And judging the relation between the memory space occupied by the operation of the second applet and the residual occupied space under the condition that the judging result is matched. In practice, this scheme may be performed with the number of first applets that have been started being one.
The processes may not be reusable between different types of applets, such as between game type applets and other types of applets. That is, if one of the type of the second applet and the type of the first applet is a game type and the other is another type, the configuration information of the second applet and the first applet does not match. In addition, there is a problem of mismatch between different versions of the applet's runtime frameworks. Specifically, if the running frame version of the first applet is higher than the running frame version of the second applet, the second applet is not matched with the configuration information of the first applet, and if the running frame version of the second applet is higher than the running frame version of the first applet, the execution body may run the second applet by using the configuration information of the first applet, and the second applet is matched with the configuration information of the first applet.
The execution subject in these cases multiplexes the running process of the first applet to run the second applet in the case where it is determined that the second applet can employ the configuration information of the first applet. Thereby, it can be further ensured that the multiplex running process can realize a smooth running of the respective applet, in particular the second applet.
Optionally, the method may further include: if the second applet is not matched with the configuration information of the first applet, loading another running process except the running process, and calling the other running process to run the second applet.
Specifically, in the case that the determination result is not matched, the execution body may load another running process and call the other running process to run the second applet.
Under the condition that the configuration information of the first applet and the configuration information of the second applet are not matched, the application scenes can call another operation process to operate the second applet, so that the problem that the second applet fails to operate due to multiplexing is avoided.
In some optional cases of these application scenarios, in response to obtaining the start instruction of the second applet for the host application in step 201, determining a relationship between the memory space required for running the second applet and the remaining available space corresponding to the running process of the first applet may include: in the case that the number of the started first applets is at least two, responding to the starting instruction of the second applets of the host application, and judging whether target first applets with configuration information matched with the second applets exist in the first applets; if so, judging whether the memory space occupied by the operation of the second applet is within the residual occupied space corresponding to the operation process of the first applet; and the running process of the multiplexed first applet in step 202 running the second applet may comprise: the running process of the first applet of the multiplexing object runs the second applet.
In these cases, the execution subject may determine whether or not there is a first applet whose configuration information matches that of the second applet, that is, the target first applet, among the respective first applets in the case where the number of first applets that have been currently started is at least two. If there is a first applet whose configuration information matches that of the second applet, the execution body may execute the process of determining whether the memory space occupied by the second applet is within the remaining space, and multiplexing the running process of the target first applet to run the second applet. If the first applet with the configuration information matched with the second applet does not exist, the execution main body can load another operation process except the operation process and call the other operation process to operate the second applet.
The execution subject in these cases can select, in the case where the number of currently running applets is at least two, the first applet whose configuration information is the configuration information that can be utilized by the second applet among the respective running applets, so that the implementation of multiplexing can be ensured.
In some optional application scenarios of these implementations, after loading the preset running process, the method further includes: loading an operation environment of an operation process; and after the first applet is run by calling the preset running process, the method further comprises: associating an identification of the first applet with the operating environment; and after multiplexing the running process of the first applet to run the second applet, the method further comprises: the identity of the second applet is associated with the operating environment.
In these optional application scenarios, if the execution body invokes (including multiplexes) the running process to run a certain applet, the execution body associates the identifier of the applet with the running environment of the running process, that is, establishes an association relationship. Specifically, various information such as service information of a service provided by the server to the terminal, connection information with the server, and the like may be included in the operation environment herein.
The application scenes can enable all the applets calling the same running process to be associated with the running environment of the running process, so that the multiplexing condition of each running process can be indicated.
With continued reference to fig. 3, fig. 3 is a further flowchart of an application scenario of the multiplexing method of the running process according to the present embodiment.
With further reference to fig. 4a, a flow 400 of yet another embodiment of a multiplexing method of running processes is shown. The process 400 includes the steps of:
in step 401, when the host application has the first applet started, in response to obtaining a start instruction of the second applet of the host application, a relationship between a memory space required to be occupied by the operation of the second applet and a remaining occupiable space corresponding to the operation process of the first applet is determined.
In this embodiment, an executing body (for example, a terminal device shown in fig. 1) on which the method for multiplexing an running process runs may determine, in response to obtaining a start instruction of a second applet of the host application, a relationship between a memory space required to be occupied by running the second applet and a remaining available space corresponding to the running process of the first applet, that is, compare the two.
Step 402, if the memory space occupied by the running process of the second applet is within the remaining occupied space corresponding to the running process, the running process of the first applet is multiplexed to run the second applet.
In this embodiment, if the result of the determination by the execution body is that the memory space occupied by the running process of the second applet is within the remaining available space corresponding to the running process of the first applet, or the memory space occupied by the running process of the second applet is not outside the remaining available space corresponding to the running process of the first applet, the running process of the first applet may be multiplexed to run the second applet.
Step 403, in response to obtaining an exit instruction for any applet started in the host application, determining whether the running process of the any applet is a multiplexed running process.
In this embodiment, if the execution body obtains an exit instruction for any applet running in the host application, it determines whether the running process of the applet is a multiplexed running process.
Step 404, if the running process of the arbitrary applet is a multiplexed running process, releasing the memory space corresponding to the arbitrary applet from the memory space occupied by the running process of the arbitrary applet.
In this embodiment, if the result of the present determination is yes, the executing body may only release the memory space corresponding to the running applet.
In the case of multiplexing the running processes, if there is an applet exit, the embodiment may only release the memory space occupied by running the applet, thereby avoiding the situation that other applets are exited by mistake.
In some optional implementations of the present embodiment, the method further includes: and if the running process of any small program is not the multiplexed running process, releasing the memory space occupied by the running process of any small program.
In these alternative implementations, if the running process of any applet is not a multiplexed running process, the execution body may release all the memory space occupied by the running process of the applet and recover the running process, and in addition, may recover the running environment of the running process.
The implementation methods can release all the memory space occupied by the running process and recover the running process under the condition that the running process is not the multiplexed running process, thereby realizing the release of the memory space and avoiding the invalid occupation of the memory.
In some optional implementations of this embodiment, the identification of the arbitrary applet is associated with a running environment of a running process of the arbitrary applet; the method further comprises the following steps: and if the running process of the arbitrary applet is the multiplexed running process, releasing the association relation between the identification of the arbitrary applet and the running environment of the running process of the arbitrary applet.
In these alternative implementations, in response to obtaining the exit instruction for the arbitrary applet, the execution body may release the association relationship between the identifier of the applet and the running environment of the running process of the applet in the case where the running process of the applet is a multiplexed running process.
The implementation modes can be used for identifying the exiting applet and releasing the association relation between the exiting applet and the running environment, so that the accuracy of the association relation between the identification of the running applet and the running environment is ensured.
With continued reference to fig. 4b, fig. 4b is a further flowchart of an application scenario of the multiplexing method of the running process according to the present embodiment.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present application provides an embodiment of a multiplexing device for running a process, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the embodiment of the device may further include the same or corresponding features or effects as the embodiment of the method shown in fig. 2, except for the features described below. The device can be applied to various electronic equipment.
As shown in fig. 5, the multiplexing device 500 of the running process of the present embodiment includes: a judging unit 501 and a multiplexing unit 502. The device is applied to a terminal, the terminal is provided with a host application, and the device comprises: a judging unit 501 configured to judge, in response to obtaining a start instruction of a second applet of the host application in the case where the first applet has been started, a relationship between a memory space required to be occupied by the operation of the second applet and a remaining occupiable space corresponding to an operation process of the first applet; the multiplexing unit 502 is configured to multiplex the running process of the first applet to run the second applet if the memory space required for running the second applet is within the remaining available space corresponding to the running process.
In this embodiment, the specific processing and the technical effects of the judging unit 501 and the multiplexing unit 502 of the multiplexing device 500 running the process may refer to the description related to the step 201 and the step 202 in the corresponding embodiment of fig. 2, and are not repeated here.
In some optional implementations of this embodiment, the apparatus further includes: the first another adjusting unit is configured to load another operation process except the operation process and call the other operation process to operate the second applet if the memory space occupied by the operation of the second applet is not within the residual occupied space corresponding to the operation process.
In some optional implementations of this embodiment, the apparatus further includes: the process loading unit is configured to load a preset running process in response to acquiring a starting instruction of the host application; the calling unit is configured to call a preset running process to run the first applet in response to acquiring a starting instruction of the first applet of the host application.
In some optional implementations of this embodiment, the calling unit is further configured to execute calling the preset running process to run the first applet as follows: acquiring configuration information of a first applet, wherein the configuration information comprises an operation framework version and/or applet type information; and calling a preset running process to run the first applet based on the configuration information.
In some optional implementations of this embodiment, the determining unit is further configured to perform, in response to obtaining a start instruction for the second applet of the host application, determining a relationship between a memory space required to be occupied by the operation of the second applet and a remaining available space corresponding to an operation process of the first applet, in a manner that: responding to the acquired starting instruction of the second applet applied to the host, judging whether the configuration information of the second applet is matched with the configuration information of the first applet; if the second applet is matched with the configuration information of the first applet, judging the relation between the memory space occupied by the operation of the second applet and the residual occupied space corresponding to the operation process of the first applet.
In some optional implementations of this embodiment, the apparatus further includes: and the second another adjusting unit is configured to load another running process except the running process and call the other running process to run the second applet if the second applet is not matched with the configuration information of the first applet.
In some optional implementations of this embodiment, the determining unit is further configured to perform, in response to obtaining a start instruction for the second applet of the host application, determining a relationship between a memory space required to be occupied by the operation of the second applet and a remaining available space corresponding to an operation process of the first applet, in a manner that: in the case that the number of the started first applets is at least two, responding to the starting instruction of the second applets of the host application, and judging whether target first applets with configuration information matched with the second applets exist in the first applets; if so, judging whether the memory space occupied by the operation of the second applet is within the residual occupied space corresponding to the operation process of the first applet; and a multiplexing unit further configured to execute the operation process of multiplexing the first applet to operate the second applet as follows: the running process of the first applet of the multiplexing object runs the second applet.
In some optional implementations of this embodiment, the apparatus further includes: the environment loading unit is configured to load the running environment of the running process after loading the preset running process; the apparatus further comprises: the first association unit is configured to associate the identification of the first applet with the running environment after calling a preset running process to run the first applet; the apparatus further comprises: and a second association unit configured to associate the identification of the second applet with the execution environment after multiplexing the execution process of the first applet to execute the second applet.
In some optional implementations of this embodiment, the apparatus further includes: an exit unit configured to determine whether an execution process of any applet started in the host application is a multiplexed execution process in response to acquisition of an exit instruction for the any applet; the first releasing unit is configured to release the memory space corresponding to the arbitrary applet from the memory space occupied by the running process of the arbitrary applet if the running process of the arbitrary applet is a multiplexed running process.
In some optional implementations of this embodiment, the apparatus further includes: and the second release unit is configured to release the memory space occupied by the running process of any small program if the running process of any small program is not the multiplexed running process.
In some optional implementations of this embodiment, the identification of the arbitrary applet is associated with a running environment of a running process of the arbitrary applet; the apparatus further comprises: and a de-association unit configured to de-associate an identifier of the arbitrary applet with an execution environment of the execution process of the arbitrary applet if the execution process of the arbitrary applet is a multiplexed execution process.
According to embodiments of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 6, a block diagram of an electronic device of a multiplexing method of running processes according to an embodiment of the present application is shown. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 6, the electronic device includes: one or more processors 601, memory 602, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 601 is illustrated in fig. 6.
Memory 602 is a non-transitory computer-readable storage medium provided herein. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the multiplexing method of the running process provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the multiplexing method of the running process provided by the present application.
The memory 602 is used as a non-transitory computer readable storage medium, and may be used to store a non-transitory software program, a non-transitory computer executable program, and modules, such as program instructions/modules (e.g., the determining unit 501 and the multiplexing unit 502 shown in fig. 5) corresponding to the multiplexing method of the running process in the embodiment of the present application. The processor 601 executes various functional applications of the server and data processing, i.e., implements the multiplexing method of the running processes in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 602.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the multiplex electronic device running the process, and the like. In addition, the memory 602 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 602 may optionally include memory located remotely from processor 601, which may be connected to the multiplexed electronic device running the process via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device that runs the multiplexing method of the process may further include: an input device 603 and an output device 604. The processor 601, memory 602, input device 603 and output device 604 may be connected by a bus or otherwise, for example in fig. 6.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the multiplexed electronic device running the process, such as a touch screen, keypad, mouse, trackpad, touchpad, pointer stick, one or more mouse buttons, trackball, joystick, and the like. The output means 604 may include a display device, auxiliary lighting means (e.g., LEDs), tactile feedback means (e.g., vibration motors), and the like. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The described units may also be provided in a processor, for example, described as: a processor comprises a judging unit 501 and a multiplexing unit 502. The names of these units do not limit the unit itself in some cases, for example, the multiplexing unit may also be described as "a unit that multiplexes the running process of the first applet to run the second applet if the memory space required for running the second applet is within the remaining available space corresponding to the running process".
As another aspect, the present application also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: under the condition that a first applet started in a host application exists, responding to a starting instruction of a second applet of the host application, and judging the relation between the memory space required to be occupied by the operation of the second applet and the residual occupied space corresponding to the operation process of the first applet; and if the memory space occupied by the operation of the second applet is within the residual occupied space corresponding to the operation process, multiplexing the operation process of the first applet to operate the second applet.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the invention referred to in this application is not limited to the specific combinations of features described above, but it is intended to cover other embodiments in which any combination of features described above or equivalents thereof is possible without departing from the spirit of the invention. Such as the above-described features and technical features having similar functions (but not limited to) disclosed in the present application are replaced with each other.

Claims (12)

1. A multiplexing method of running processes, applied to a terminal, the terminal being installed with a host application, the method comprising:
under the condition that the first applet started up exists in the host application, responding to the starting instruction of the second applet of the host application, and judging the relation between the memory space required to be occupied by the operation of the second applet and the residual occupied space corresponding to the operation process of the first applet;
if the memory space occupied by the running process of the second applet is within the residual occupied space corresponding to the running process, the running process of the first applet is multiplexed to run the second applet;
And if the memory space occupied by the running of the second applet is not within the residual occupied space corresponding to the running process, loading another running process except the running process, and calling the another running process to run the second applet.
2. The method of claim 1, wherein the method further comprises:
loading a preset running process in response to acquiring a starting instruction of the host application;
and in response to acquiring a starting instruction of the first applet of the host application, calling the preset running process to run the first applet.
3. The method of claim 2, wherein the invoking the preset running process to run the first applet comprises:
acquiring configuration information of the first applet, wherein the configuration information comprises an operation framework version and/or applet type information;
and calling the preset running process to run the first applet based on the configuration information.
4. The method of claim 3, wherein determining, in response to obtaining a start instruction for a second applet of the host application, a relationship between a memory space required for operation of the second applet and a remaining occupiable space corresponding to an operation process of the first applet comprises:
Responding to a starting instruction of a second applet applied to the host, and judging whether the second applet is matched with configuration information of the first applet or not;
and if the second applet is matched with the configuration information of the first applet, judging the relation between the memory space required to be occupied by the operation of the second applet and the residual occupied space corresponding to the operation process of the first applet.
5. The method of claim 4, wherein the method further comprises:
and if the second applet is not matched with the configuration information of the first applet, loading another running process except the running process, and calling the another running process to run the second applet.
6. The method of claim 3, wherein determining, in response to obtaining a start instruction for a second applet of the host application, a relationship between a memory space required for operation of the second applet and a remaining occupiable space corresponding to an operation process of the first applet comprises:
in the case that the number of the started first applets is at least two, responding to the starting instruction of the second applet applied to the host, and judging whether target first applets with configuration information matched with the second applet exist in the first applets;
If so, judging whether the memory space occupied by the running process of the second applet is within the residual occupied space corresponding to the running process of the first applet; and
the multiplexing the running process of the first applet to run the second applet includes:
and multiplexing the running process of the target first applet to run the second applet.
7. The method of claim 2, wherein after the loading of the pre-set running process, the method further comprises: loading the running environment of the running process; and
after the first applet is run by the calling the preset running process, the method further comprises:
associating an identification of the first applet with the runtime environment; and
after the running process of the first applet has run the second applet, the method further comprises:
an identification of the second applet is associated with the runtime environment.
8. The method of claim 1, wherein the method further comprises:
in response to obtaining an exit instruction of any applet started in the host application, judging whether the running process of the any applet is a multiplexed running process;
And if the running process of the arbitrary applet is the multiplexed running process, releasing the memory space corresponding to the arbitrary applet from the memory space occupied by the running process of the arbitrary applet.
9. The method of claim 8, wherein the method further comprises:
and if the running process of the arbitrary applet is not the multiplexed running process, releasing the memory space occupied by the running process of the arbitrary applet.
10. The method of claim 8, wherein the identification of the arbitrary applet is associated with a running environment of a running process of the arbitrary applet; and
the method further comprises the steps of:
and if the running process of the arbitrary applet is the multiplexed running process, releasing the association relationship between the identification of the arbitrary applet and the running environment of the running process of the arbitrary applet.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-10.
12. A computer readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-10.
CN202010783885.2A 2020-08-06 2020-08-06 Multiplexing method and device for running process Active CN111913707B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010783885.2A CN111913707B (en) 2020-08-06 2020-08-06 Multiplexing method and device for running process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010783885.2A CN111913707B (en) 2020-08-06 2020-08-06 Multiplexing method and device for running process

Publications (2)

Publication Number Publication Date
CN111913707A CN111913707A (en) 2020-11-10
CN111913707B true CN111913707B (en) 2024-02-20

Family

ID=73286552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010783885.2A Active CN111913707B (en) 2020-08-06 2020-08-06 Multiplexing method and device for running process

Country Status (1)

Country Link
CN (1) CN111913707B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113495889B (en) * 2021-07-07 2024-03-15 浙江大华技术股份有限公司 Distributed object storage method and device, electronic equipment and storage medium
CN116263718A (en) * 2021-12-13 2023-06-16 北京有竹居网络技术有限公司 Process management method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6513158B1 (en) * 1999-11-15 2003-01-28 Espial Group Inc. Method and apparatus for running multiple java applications simultaneously
WO2015120708A1 (en) * 2014-02-14 2015-08-20 贝壳网际(北京)安全技术有限公司 Application management method and apparatus
CN110083399A (en) * 2019-03-04 2019-08-02 上海连尚网络科技有限公司 Small routine operation method, computer equipment and storage medium
CN110865855A (en) * 2019-11-18 2020-03-06 百度在线网络技术(北京)有限公司 Applet processing method and related device
CN111078376A (en) * 2019-11-05 2020-04-28 华为技术有限公司 Process management method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6513158B1 (en) * 1999-11-15 2003-01-28 Espial Group Inc. Method and apparatus for running multiple java applications simultaneously
WO2015120708A1 (en) * 2014-02-14 2015-08-20 贝壳网际(北京)安全技术有限公司 Application management method and apparatus
CN110083399A (en) * 2019-03-04 2019-08-02 上海连尚网络科技有限公司 Small routine operation method, computer equipment and storage medium
CN111078376A (en) * 2019-11-05 2020-04-28 华为技术有限公司 Process management method and device
CN110865855A (en) * 2019-11-18 2020-03-06 百度在线网络技术(北京)有限公司 Applet processing method and related device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
操作系统中的进程、线程与Java的多线程;虎治勤;;数字技术与应用(第10期);全文 *
查看UAC虚拟进程 实时监控Windows 7运行程序;无敌;;网络与信息(第12期);全文 *

Also Published As

Publication number Publication date
CN111913707A (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN111586128B (en) Method, device, equipment and storage medium for acquiring applet data
US9021507B2 (en) Dynamic use of data across multiple programs
CN111767090A (en) Method and device for starting small program, electronic equipment and storage medium
CN111666546B (en) Application login method and device
CN109308241B (en) Method and device for monitoring starting process of application program, terminal equipment and storage medium
CN112187581B (en) Service information processing method, device, equipment and computer storage medium
CN111475259B (en) Applet loading method and device and electronic equipment
CN111913707B (en) Multiplexing method and device for running process
CN110007936B (en) Data processing method and device
CN114138439A (en) Task scheduling method and device, electronic equipment and storage medium
CN110574006B (en) System and method for automatically synchronizing responses and conditions on a device
CN111615171B (en) Access method and device of wireless local area network
CN107959845B (en) Image data transmission method and device, client device and head-mounted display equipment
WO2023169193A1 (en) Method and device for generating smart contract
CN110069185B (en) Method and apparatus for co-running hosted applications
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN108984238B (en) Gesture processing method and device of application program and electronic equipment
CN113535020B (en) Method, apparatus, device, medium and product for generating application icons
CN111399928A (en) Application program starting method and device, electronic equipment and readable storage medium
CN111506499B (en) Method and device for detecting availability of parameters in applet and electronic equipment
CN111124523A (en) Method and apparatus for initializing applications
CN111522599B (en) Method and device for transmitting information
CN113312131B (en) Method and device for generating and operating marking tool
CN113535187B (en) Service online method, service updating method and service providing method
CN113535533B (en) Method, apparatus, device and storage medium for testing code

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant