CN112181516A - Application software execution method and computing device - Google Patents

Application software execution method and computing device Download PDF

Info

Publication number
CN112181516A
CN112181516A CN202011017015.0A CN202011017015A CN112181516A CN 112181516 A CN112181516 A CN 112181516A CN 202011017015 A CN202011017015 A CN 202011017015A CN 112181516 A CN112181516 A CN 112181516A
Authority
CN
China
Prior art keywords
application
application software
application window
bus
service
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.)
Pending
Application number
CN202011017015.0A
Other languages
Chinese (zh)
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.)
Wuhan Deepin Technology Co ltd
Original Assignee
Wuhan Deepin 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 Wuhan Deepin Technology Co ltd filed Critical Wuhan Deepin Technology Co ltd
Priority to CN202011017015.0A priority Critical patent/CN112181516A/en
Publication of CN112181516A publication Critical patent/CN112181516A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

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

Abstract

The invention discloses an execution method of application software, wherein the application software is suitable for being executed in an operating system, and the method comprises the following steps: responding to a request of a user for creating an application window of application software, and creating a process; inquiring whether a service corresponding to the application software exists in a bus provided by the operating system; if the service does not exist, creating an application window object of the application software, and registering the service and the created application window object with the bus; and if the service exists, acquiring an application window object of the registered application software from the bus according to the service, calling a function of the application window object to create an application window of the application software, and terminating the process.

Description

Application software execution method and computing device
Technical Field
The present invention relates to the field of operating system technologies, and in particular, to an execution method of application software and a computing device.
Background
Application software (Application) is a collection of various programming languages that a user can use, and applications that are programmed in various programming languages. The application software can meet the application requirements of different fields and different problems, so the application software is more and more widely used.
Currently, in the process of using application software, a user may open the same application software many times. The essence of starting the application software each time is to create one process, when the application software is started for many times, multiple processes are created, the multiple processes often occupy larger memory resources, and the multiple processes run continuously, so that the memory resource overhead of the device is too large, the device is jammed, the application software is jammed, and the user experience is seriously influenced.
For this reason, an execution method of application software is needed to solve the problems in the above technical solutions.
Disclosure of Invention
To this end, the present invention provides a method of execution of application software in an attempt to solve, or at least alleviate, the problems presented above.
According to an aspect of the present invention, there is provided a method of executing application software adapted to be executed in an operating system, the method comprising:
responding to a request of a user for creating an application window of application software, and creating a process;
inquiring whether a service corresponding to the application software exists in a bus provided by the operating system;
if the service does not exist, creating an application window object of the application software, and registering the service and the created application window object with the bus; and
and if the service exists, acquiring an application window object of the registered application software from the bus according to the service, calling a function of the application window object to create an application window of the application software, and terminating the process.
Optionally, the step of creating an application window object and registering the service and the created application window object with the bus comprises:
selecting a bus of a type corresponding to the service;
naming the service, registering the named service with the selected bus;
creating an application window object of the application software in the process, and naming the application window object of the application software; and
registering the named application window object of the application software with the bus in association with the registered service.
Optionally, the registering the named application window object of the application software with the bus includes:
binding the named application window object of the application software to an adapter;
registering an application window object of the application software with a bus through the adapter.
Optionally, the function of acquiring the application window object from the bus and calling the application window object of the application software includes:
acquiring an application window object of the application software from the bus based on the service name, the object name and the bus type;
and calling a function of an application window object of the application software through the adapter.
Optionally, the method further comprises:
and recording the number of application windows of the application software in the process.
Optionally, the number of application window creations of the application software in the process is recorded by means of reference counting, and 1 is added to the number of application window creations of the application software.
Optionally, the method further comprises:
in response to a request of a user to close an application window of the application software, closing the application window of the application software in the process;
the number of application window creations of the application software is reduced by 1.
Optionally, the method further comprises:
and judging whether the application window creation quantity of the application software in the process is 0 or not, and if so, terminating the process.
Optionally, the application windows of a plurality of said application software can communicate with each other and said processes communicate with each other via a message bus system.
According to an aspect of the present invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of processing page content as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the method as described above.
According to the technical scheme of the invention, an execution method of application software is provided, in the method, a process is created in response to a request of a user for creating an application window of the application software, whether a service corresponding to the application software exists or not is inquired in a bus provided by an operating system, if the service does not exist, an application window object of the application software is created, the service and the created application window object are registered in the bus, if the service exists, the registered application window object of the application software is acquired from the bus according to the service, a function of the application window object is called to create the application window of the application software, and the process is terminated. That is, when there is a service corresponding to the application software in the bus provided by the operating system, the application window object of the registered application software is acquired from the bus according to the service, the function of the application window object is called to create the application window of the application software, only one process is continuously operated in the process of starting the same application software for many times, the application windows of the application software are all created in the process, and other processes are terminated after responding to a request of creating the application window by a user. Therefore, the invention can realize that only one process continuously runs when a user requests to open the same application software for multiple times, namely, the memory resources are continuously occupied by a plurality of processes in the prior art, and the memory resources are converted into the memory resources continuously occupied by only one process, thereby greatly reducing the occupation of the resources, improving the utilization rate of the resources, effectively relieving the conditions of equipment blockage and application software blockage, and improving the user experience.
Secondly, by judging the number of application windows established in the process, when the number is 0, a continuously running process is closed, and resources of the continuously running process are guaranteed to be timely recovered, so that resources occupied by the continuously running process are timely released, and the resource utilization rate is further improved.
In addition, in the scheme of the invention, the communication between a plurality of application windows of the same application software is converted into the communication between a plurality of threads in one process from the inter-process communication, so that the communication between the application windows of the application software is simplified.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 shows a flow diagram of a method 200 of execution of application software according to one embodiment of the invention;
FIG. 3 illustrates a flow diagram of a method 300 of registering a service and an application window object of a created application software with a bus according to one embodiment of the invention;
FIG. 4 shows a flow diagram of a method 400 for execution of the full application software according to one embodiment of the invention; and
FIG. 5 is a diagram illustrating the number of processes corresponding to multiple times the same application is opened, according to one embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
At present, in the process of using application software, a user may start the same application software for multiple times, the essence of starting the application software each time is to create one process, an operating system may respond to a request of the user to create the application software for multiple times, multiple processes are often occupied by large memory resources, and the continuous operation of multiple processes makes the memory resource overhead of equipment too large, which is prone to the occurrence of situations such as equipment jamming and application software jamming, and thus, user experience is seriously affected. In addition, the sharing of data among the processes is difficult to realize, so that the communication among application windows of application software started by different processes is difficult to realize.
When the bus provided by the operating system has the service corresponding to the application software, the application window object of the registered application software is acquired from the bus according to the service, the function of the application window object is called to create the application window of the application software, only one process continuously runs in the process of starting the same application software for multiple times, the application windows of the application software are all created in the process, and other processes are terminated after responding to a request of a user for creating the application windows.
Specifically, in response to a request from a user to create an application window of application software, a process is created, whether or not a service corresponding to the application software exists is inquired in a bus provided by an operating system, if no service exists, the process is a continuously running process, then the operating system creates an application window object for the application software, and registers the service and the created application window object with the bus, if the service exists, the created process is other processes, the operating system acquires the application window object of the registered application software from the bus according to the service, and calls the function of the application window object to realize the creation of the application window of the application software in the resident process and to terminate the other processes, therefore, resources occupied by other processes are released, the time occupied by the resources is reduced, the resource utilization rate is improved, and application windows of all application software are created in the resident processes.
That is to say, when a user requests to open the same application software for multiple times, the multiple processes in the prior art continuously operate, and the process is converted into the process continuously operating, that is, the multiple processes in the prior art continuously occupy the memory resource, and the process is converted into the process continuously occupying the memory resource, so that the occupation of the resource is greatly reduced, the resource utilization rate is improved, the situations of equipment blockage and application software blockage can be effectively relieved, and the user experience is improved.
The execution method of the application software provided by the invention is executed in an operating system, and in one embodiment, the operating system of the invention can be installed in a computing device, so that the execution method of the application software of the invention can be executed in the operating system. FIG. 1 shows a block diagram of a computing device 100, according to one embodiment of the invention. A block diagram of a computing device 100 as shown in fig. 1, in a basic configuration 102, the computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing, including but not limited to: a microprocessor (μ P), a microcontroller (μ C), a Digital Signal Processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some embodiments, application 122 may be arranged to operate with program data 124 on an operating system. The program data 124 comprises instructions, and in the computing device 100 according to the invention the program data 124 comprises instructions for performing the method 200 of constructing the active power distribution network planning model.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
Computing device 100 may be implemented as a server, such as a file server, a database server, an application server, a WEB server, etc., or as part of a small-form factor portable (or mobile) electronic device, such as a cellular telephone, a Personal Digital Assistant (PDA), a personal media player device, a wireless WEB-watch device, a personal headset device, an application specific device, or a hybrid device that include any of the above functions. Computing device 100 may also be implemented as a personal computer including both desktop and notebook computer configurations. In some embodiments, the operating system 120 of the computing device 100 is configured to perform an execution method 200 of application software in accordance with the present invention.
FIG. 2 shows a flow diagram of a method 200 for execution of application software according to one embodiment of the invention. The method 200 is suitable for execution in an operating system 120 of a computing device 100, such as the computing device 200 described previously.
According to one embodiment, the temporary process described in the following of the present disclosure is a process that is terminated in response to a request from a user to create an application window of application software, that is, the temporary process is a process that is terminated after a program is run. The resident process described in the following content of the scheme is a continuously running process, application windows of application software to be created by the temporary process are all created in the resident process, and the resident process is terminated only when all the created application windows are closed, so that a plurality of processes occupy resources and only one process occupies the resources. Wherein the temporary process and a resident process communicate through a message Bus system D-Bus.
It should be noted that the application software corresponds to a service, and a service includes a plurality of objects, which correspond to a plurality of functions.
When the service corresponding to the application software does not register the service with the bus, the operating system 120 creates a process in response to a request from a user to create an application window of the application software, where the created process is a resident process, registers the service corresponding to the application software with the bus in the resident process, and registers an object of the application window of the application software created in the resident process with the bus. When the service corresponding to the application software registers the service with the bus, the operating system 120 responds to the request of the user for creating the application window of the application software, creates a process, the created process is a temporary process, obtains the application window object of the registered application software from the bus in the temporary process according to the service registered by the resident process with the bus, calls the function of the application window object, realizes the creation of the application window of the application software in the resident process, and terminates the temporary process. Wherein, the temporary process and the resident process communicate through a message Bus system D-Bus.
The service, as described herein, is an application type, the service runs in the background, and the service may typically provide some functionality locally to the user or over a network to support other applications. Wherein the application is part of the application software.
As shown in fig. 2, the execution method 200 of the application software starts in step S210. In step S210, a process is created in response to a request from a user to create an application window of application software. The application window is an interface which pops up when the application software is started.
Subsequently, in step S220, it is queried in the bus provided by the operating system 120 whether a service corresponding to the application software exists.
Thereafter, in step S230, if there is no service, an application window object of the application software is created, and the service and the created application window object are registered with the bus. An application window object here is an application window instance.
FIG. 3 is a flow diagram of a method 300 for an operating system 120 to register services and created application window objects of application software with a bus in a resident process. When there is no service in the bus provided by the operating system 120, the flow shown in fig. 3 is executed. As shown in FIG. 3, a method 300 for the operating system 120 to register a service and an application window object for a created application software with the bus in a resident process begins at step S310.
In step S310, a bus of a type corresponding to the service is selected. Since the bus is mainly divided into session bus (session bus) and system bus (system bus), and the communication between a resident process and a temporary process is realized through the message bus system in this embodiment, in one embodiment, the selected bus type is the session bus. The dialog bus may be: SPI, I2C, USB, RS232, and the like.
After the bus type is selected, the named service is registered with the selected bus for service naming in step S320. In an embodiment of the present invention, the service may be named in a self-defined manner, and the subsequent temporary process may also obtain the service from the bus by using the self-defined service name, which is not particularly limited in the present invention.
Registering the named service with the selected bus specifically includes: the operating system 120 calls the sessionBus () function of the bus to obtain the bus object, defines the service name, and calls the registerService () function of the bus object to register the named service with the bus after defining the service name.
Subsequently, in step S330, an application window object of the application software is created in the process, named for the application window object of the application software.
The application window object may be named in a self-defined manner, or may be named in another manner, as long as the temporary process uses the same object name as that used in registration when acquiring the application window object from the bus, which is not limited in the present invention.
After the application window object of the application software is created in the resident process and the service is successfully registered with the bus, the application window object of the named application software is registered with the bus in association with the registered service in step S340. Specifically, firstly, the service registered with the bus is obtained, and the named application window object is related and bound to the adapter according to the registered service, so that the subsequent temporary process obtains the application window object of the application software registered with the bus and calls the function of the application window object of the application software registered with the bus. Then, the bus registerebject () function is called, and the application window object of the application software is registered with the bus by the registerebject () function.
After the resident process registers the service and the application window object of the application software with the bus, in step S240, if the service exists, the resident process acquires the application window object of the registered application software from the bus according to the service, calls a function of the application window object to create an application window of the application software, and terminates the process.
Specifically, the method comprises the following steps: based on the service name and the application window object name defined in the steps S320 and S330 and the bus type selected in the step S310, the application window object of the application software is acquired from the bus, the createspubwindow () function of the application window object of the application software is called through the adapter, and based on the createspubwindow () function of the called application window object, a function return value is obtained, after the function return value is returned, the creation of the application window of the application software in the resident process is realized, and the temporary process is terminated.
The function return value is used for judging the time for terminating the temporary process, and the temporary process can be terminated as long as the function return value is returned no matter whether the function return value is correct or not, so that the temporary process is terminated after the temporary process responds to a request of a user for creating an application window of application software, memory resources occupied by the temporary process are released in time, and the resource utilization rate of the computing equipment 100 is improved. For example, if the return value of the object function is wrong, the type of the error is returned, and corresponding processing is performed according to requirements, and if the return value of the object function is wrong, the application window which is created by the user request is not created, and the temporary process is terminated. If the return value of the object function is effective, processing meeting the requirement is carried out according to the content of the return value, if the return value of the object function is effective, an application window which is created by a user request is created, and the temporary process is terminated.
The temporary process realizes the creation of the application window of the new application software in the resident process by calling the createsubsWindow () function of the application window object. At this time, a plurality of application windows may exist in the resident process, and the plurality of application windows may communicate with each other, that is, data exchange between the plurality of application windows is enabled.
It should be noted that the application window created for the first time in the resident process is the same as the application window created in the resident process by the object function of the temporary process access application window, and there is no difference.
According to the steps, when the bus provided by the operating system has the service corresponding to the application software, the application window object of the registered application software is acquired from the bus according to the service, the function of the application window object is called to create the application window of the application software, only one process (namely a resident process) continuously runs in the process of starting the same application software for many times, the application window of the application software is created in the process, and other processes (namely temporary processes) are terminated after responding to a request of creating the application window by a user. Therefore, the invention can realize that only one process continuously runs when a user requests to open the same application software for multiple times, namely, the memory resources are continuously occupied by a plurality of processes in the prior art, and the memory resources are converted into the memory resources continuously occupied by only one process, thereby greatly reducing the occupation of the resources, improving the utilization rate of the resources, effectively relieving the conditions of equipment blockage and application software blockage, and improving the user experience.
After creating the application windows of the application software in the resident process, the operating system 120 may record the number of the application windows of the created application software, may record the number of the created application windows in a reference counting manner, and may also record the number of the created application windows in other counting manners, which is not limited in the present invention.
When the temporary process responds to the request of the user for creating the application window by calling the function of the application window object of the application software registered by the resident process to the bus, the resident process creates an application window of the application software, and at the moment, the operating system adds 1 to the recorded number of the application windows of the created application software. If the operating system 120 monitors an event that the user closes the application window, in response to the event that the user closes the application window of the application software, the application window of the corresponding application software is closed in the resident process, and at this time, the number of the previously recorded application windows of the created application software is reduced by 1. It should be noted that, among the application windows created in the resident process, closing one or more application windows does not affect other application windows that are not closed.
In addition, in order to ensure that the resources occupied by the process are released in time, the resident system 120 may determine whether the application window creation number of the application software in the process is 0, if so, terminate the resident process, and timely recover the memory resources occupied by the resident process, and if not, then not terminate the resident process.
As can be seen from the above, in response to a request of a user to open the same application software for multiple times, multiple application windows are created in one resident process, and the application windows of the multiple application software in one resident process communicate with each other through a slot function mechanism, which is a signal function mechanism that the resident process registers an application window object of the application software with a bus, so that the communication between the application windows of the application software in the present invention is actually the communication between multiple threads under one process. That is, the data exchange between application windows of the application software in the present invention is the data exchange between threads.
Compared with the existing scheme, the method has the advantages that the application windows of the plurality of application software are created in response to the request of a user for opening the application software for a plurality of times, the essence of creating the application window of the application software for each time is to create one process, and after the application window of the application software is created for a plurality of times, a plurality of processes are created, so that the communication among the application windows of the application software is the communication among the processes, namely the data exchange among the processes. However, data exchange between processes is difficult to implement, and the data exchange between processes consumes a lot of memory resources.
However, in the invention, because a plurality of application windows of the application software are created in one resident process, the data exchange between the application windows of the application software is realized, and the data exchange between the threads is realized, so that the data exchange between the application windows of the application software is simple, the memory resources consumed by the data exchange between the application windows can be reduced, and the situations of equipment jam, application software jam and the like caused by overlarge expenditure of the memory resources of the equipment are effectively relieved.
Fig. 4 is a flowchart of a complete application software execution method 400 according to the present invention, and as shown in fig. 4, the application software execution method 400 starts at step S401.
In step S401, a process is created in response to a request from a user to create an application window of application software;
subsequently in step S402, it is queried in the bus provided by the operating system 120 whether a service corresponding to the application software in step S401 exists;
if the service does not exist, the process is a resident process, and a bus of a type corresponding to the service is selected in step S403;
subsequently, in step S404, for service naming, the named service is registered with the selected bus;
after the service is successfully registered with the bus in step S404, an application window object of the application software is created in the process and named for the application window object of the application software in step S405;
next in step S406, the application window object of the application software named in step S405 is registered with the bus in association with the registered service;
if the service exists, the process is a temporary process, in step S407, an application window object of the registered application software is acquired from the bus according to the service, and a function of the application window object is called to implement creation of an application window of the application software in the resident process, and the temporary process is terminated;
after creating the application windows of the application software in the resident process by step S407, recording the number of the application windows of the created application software in step S408, when the temporary process responds to the request of the user to create the application window by calling the function of the application window object of the application software which the resident process has registered with the bus, creating an application window of the application software in the resident process again, and similarly adding 1 to the number of the application windows of the recorded and created application software in step S408;
subsequently, in response to an event that the user closes the application window of the application software, in step S409, the application window of the corresponding application software is closed in the resident process;
next, in step S410, the number of application windows of the created application software recorded in step S408 is decremented by 1;
in step S411, it is determined whether the number of application windows created by the application software in the process is 0, and if not, the process returns to step S409, and if 0, the resident process is terminated in step S412.
Through the complete flow of fig. 4, when a user requests to open the same application software multiple times, the application window of the same application software is opened multiple times in one process. Fig. 5 is a diagram 500 illustrating the number of corresponding processes when the same application software is opened multiple times, in fig. 5, fig. 5b is a resident process, and fig. 5a, 5c, and 5d are three application windows created in the resident process. It can be known from the content shown in fig. 5 and the above-mentioned scheme that, when there is a service corresponding to the application software in the bus provided by the operating system, the application window object of the registered application software is obtained from the bus according to the service, and the function of the application window object is called to create the application window of the application software, so that only one process continuously runs in the process of starting the same application software for many times, that is, only one process continuously occupies resources, and therefore, the occupation and consumption of memory resources can be greatly reduced, and the situations of equipment blockage, application software blockage and the like can be effectively alleviated.
A9 the method according to any of A1 to 8, wherein the application windows of a plurality of said application software are able to communicate with each other and said processes communicate with each other via a message bus system.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the execution method of the application software of the present invention according to the instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (10)

1. A method of executing application software adapted to be executed in an operating system, the method comprising:
responding to a request of a user for creating an application window of application software, and creating a process;
inquiring whether a service corresponding to the application software exists in a bus provided by the operating system;
if the service does not exist, creating an application window object of the application software, and registering the service and the created application window object with the bus; and
and if the service exists, acquiring an application window object of the registered application software from the bus according to the service, calling a function of the application window object to create an application window of the application software, and terminating the process.
2. The method of claim 1, wherein the step of creating an application window object and registering the service and the created application window object with the bus comprises:
selecting a bus of a type corresponding to the service;
naming the service, registering the named service with the selected bus;
creating an application window object of the application software in the process, and naming the application window object of the application software; and
registering the named application window object of the application software with the bus in association with the registered service.
3. The method of claim 2, wherein said registering the named application window object of the application software with the bus comprises:
binding the named application window object of the application software to an adapter;
registering an application window object of the application software with a bus through the adapter.
4. The method of claim 2 or 3, wherein the fetching of an application window object from the bus and the calling of a function of an application window object of the application software comprises:
acquiring an application window object of the application software from the bus based on the service name, the object name and the bus type;
and calling a function of an application window object of the application software through the adapter.
5. The method of any of claims 1 to 4, further comprising:
and recording the number of application windows of the application software in the process.
6. The method of claim 5, wherein the number of application window creations of the application software in the process is recorded by means of reference counting, and 1 is added to the number of application window creations of the application software.
7. The method of claim 6, further comprising:
in response to a request of a user to close an application window of the application software, closing the application window of the application software in the process;
the number of application window creations of the application software is reduced by 1.
8. The method of any of claims 5-7, further comprising:
and judging whether the application window creation quantity of the application software in the process is 0 or not, and if so, terminating the process.
9. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-8.
10. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-8.
CN202011017015.0A 2020-09-24 2020-09-24 Application software execution method and computing device Pending CN112181516A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011017015.0A CN112181516A (en) 2020-09-24 2020-09-24 Application software execution method and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011017015.0A CN112181516A (en) 2020-09-24 2020-09-24 Application software execution method and computing device

Publications (1)

Publication Number Publication Date
CN112181516A true CN112181516A (en) 2021-01-05

Family

ID=73956620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011017015.0A Pending CN112181516A (en) 2020-09-24 2020-09-24 Application software execution method and computing device

Country Status (1)

Country Link
CN (1) CN112181516A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022416A (en) * 2022-04-20 2022-09-06 武汉众智数字技术有限公司 Method and system for adapting bus service of mobile terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1767530A (en) * 2004-10-29 2006-05-03 北京航空航天大学 Adapter
CN101610316A (en) * 2009-07-24 2009-12-23 中兴通讯股份有限公司 The startup methods, devices and systems of application program of mobile phone
CN105528257A (en) * 2016-01-08 2016-04-27 腾讯科技(深圳)有限公司 Single process data processing method and device
CN106293955A (en) * 2015-05-19 2017-01-04 中国石油化工股份有限公司 A kind of communication means between application process
CN110109739A (en) * 2019-04-25 2019-08-09 北京奇艺世纪科技有限公司 A kind of method for closing and device of multithread application

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1767530A (en) * 2004-10-29 2006-05-03 北京航空航天大学 Adapter
CN101610316A (en) * 2009-07-24 2009-12-23 中兴通讯股份有限公司 The startup methods, devices and systems of application program of mobile phone
CN106293955A (en) * 2015-05-19 2017-01-04 中国石油化工股份有限公司 A kind of communication means between application process
CN105528257A (en) * 2016-01-08 2016-04-27 腾讯科技(深圳)有限公司 Single process data processing method and device
CN110109739A (en) * 2019-04-25 2019-08-09 北京奇艺世纪科技有限公司 A kind of method for closing and device of multithread application

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022416A (en) * 2022-04-20 2022-09-06 武汉众智数字技术有限公司 Method and system for adapting bus service of mobile terminal
CN115022416B (en) * 2022-04-20 2023-07-14 武汉众智数字技术有限公司 Method and system for adapting bus service by mobile terminal

Similar Documents

Publication Publication Date Title
CN110413386A (en) Multiprocessing method, apparatus, terminal device and computer readable storage medium
CN111930283B (en) Message display method and computing device
CN114461404B (en) Process migration method, computing device and readable storage medium
CN111625367B (en) Method for dynamically adjusting read-write resources of file system
CN114416252A (en) Window display method and device, computing equipment and storage medium
CN112181516A (en) Application software execution method and computing device
CN111447178B (en) Access control method, system and computing device
CN114691226A (en) Multi-operating-system switching operation method, computing device and storage medium
CN113961086B (en) Shortcut key implementation method, computing device and storage medium
CN113791873B (en) Virtual machine creating method, computing device and storage medium
CN112711490B (en) Message processing method, computing device and storage medium
CN114721672A (en) Application installation method, computing device and storage medium
CN114510706A (en) Permission control method and device based on physical interface and computing equipment
CN114691549A (en) File writing method and device and computing equipment
CN113515388A (en) Process scheduling method and device, computing equipment and readable storage medium
CN114422502A (en) Resource downloading method, computing device and storage medium
CN114546678A (en) Method for copying and pasting data, computing equipment and readable storage medium
CN114338390B (en) Server configuration method, computing device and storage medium
CN112615965B (en) Communication number verification method and system and computing device
CN112307456A (en) Computer terminal protection method and device
CN113904962A (en) Resource access method and device and computing equipment
CN114880722A (en) Device mounting method, computing device and readable storage medium
CN115328404A (en) DMA access method and device supporting online data reorganization
CN113268587A (en) Document display method, computing device and readable storage medium
CN114020701A (en) Shortcut creating method, computing device and storage medium

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
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20210105

Assignee: Tongxin Software Technology Co.,Ltd.

Assignor: WUHAN DEEPIN TECHNOLOGY Co.,Ltd.

Contract record no.: X2021980010212

Denomination of invention: Execution method and computing equipment of application software

License type: Common License

Record date: 20210929

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210105