CN110609751B - Terminal equipment control method and device, terminal equipment and computer readable storage medium - Google Patents
Terminal equipment control method and device, terminal equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN110609751B CN110609751B CN201810613999.5A CN201810613999A CN110609751B CN 110609751 B CN110609751 B CN 110609751B CN 201810613999 A CN201810613999 A CN 201810613999A CN 110609751 B CN110609751 B CN 110609751B
- Authority
- CN
- China
- Prior art keywords
- target
- application program
- message
- application
- framework
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 111
- 230000006870 function Effects 0.000 claims abstract description 101
- 238000004590 computer program Methods 0.000 claims abstract description 21
- 238000009434 installation Methods 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 abstract description 4
- 230000003068 static effect Effects 0.000 description 18
- 238000009877 rendering Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 5
- 238000010276 construction Methods 0.000 description 4
- 244000035744 Hura crepitans Species 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000002955 isolation Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/543—Local
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
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 provides a terminal equipment control method and device, terminal equipment and a computer readable storage medium, wherein the method comprises the steps of obtaining first registration information of a target application program, wherein the first registration information is used for registering and receiving a target message of the target application program; recording the target application program in a first receiving queue for receiving the target message according to the first registration information; acquiring second registration information of the target function module according to the first registration information, wherein the second registration information is used for registering and receiving the target message by the target function module; and recording the target function module in a second receiving queue for receiving the target message according to the second registration information. The terminal device of the present invention has a processor and a memory, and the processor implements the terminal device control method described above when executing a computer program. The computer readable storage medium of the present invention has stored thereon a computer program for implementing the above method. The present invention provides a mechanism for implementing message transmission and distribution under an application framework.
Description
Technical Field
The invention relates to the field of control of electronic equipment, in particular to a method for realizing control of terminal equipment and a device for realizing the method, and also relates to the terminal equipment for realizing the method and a computer readable storage medium.
Background
Terminal devices such as smart phones and tablet computers are electronic devices most frequently used in daily life, and people like to install various application programs on the smart electronic devices and simultaneously run a large number of application programs on the terminal devices. Because the application program often needs to receive the messages sent by other application programs when running, the operating system of the terminal device often sets a set of mechanism to enable the application program to receive the messages sent by another application program.
For example, after the user sets the alarm, the alarm's application will ring in a set manner at the set time. However, if the time set by the user is updated, the alarm application needs to determine the moment of ringing according to the updated time, and thus the alarm application needs to receive the message of the time update.
Taking the android system as an example, since the application program of the alarm clock needs to receive the time updated message, the alarm clock application program needs to register in the message management component of the operating system to state that the alarm clock application program needs to receive the time updated message, and typically, the registration operation is performed by the alarm clock application program sending registration information to the operating system. And after the operating system receives the registration information sent by the alarm clock, adding the alarm clock application program into a receiving queue of the time update message.
When the user updates the system time, the time management process of the system sends a time update message to the operating system, the operating system searches a receiving queue corresponding to the time update message from the message management component, and sends the time update message to an application program in the queue, for example, sends the time update message to an alarm clock application program. After the alarm clock application program receives the time update message, the current recorded time is updated by using the updated time, so that the time recorded by the alarm clock application program is synchronous with the time of the system. It can be seen that the application running under the operating system is to implement the message receiving by registering in the message management component of the operating system, and the message sending of the multiple application under the operating system is also to implement the message distributing by the message management component.
In addition, since the application program often includes a plurality of functional modules, in order for each functional module to be able to timely receive a message sent by another application program, each functional module may send registration information to the message management component, and the message management component assigns a unique ID to each functional module that sends registration information, so that after receiving the message, the message management component sends the message to each receiver in the message receiving queue. Thus, each recipient in the message receiving queue may be an application or a function module in an application, that is, an application may have multiple recipients, and different recipients may be multiple different function modules under the application.
However, for an application running on an application framework, how to implement messaging under the application framework is a problem that needs to be solved during the running process of the target application framework, since the application can often only act as a message receiver to receive messages sent by the application framework.
Disclosure of Invention
A first object of the present invention is to provide a terminal device control method for realizing message reception between a plurality of applications under an application framework.
A second object of the present invention is to provide a terminal device control apparatus that realizes message reception registration of an application under an application framework.
A third object of the present invention is to provide a terminal device capable of implementing the above terminal device control method.
A fourth object of the present invention is to provide a computer readable storage medium capable of implementing the above terminal device control method when read and executed by a processor.
In order to achieve the first object, the present invention provides a terminal device control method, including: acquiring first registration information of a target application program, wherein the first registration information is used for registering and receiving a target message by the target application program; recording the target application program in a first receiving queue for receiving the target message according to the first registration information; acquiring second registration information of the target function module according to the first registration information, wherein the second registration information is used for registering and receiving the target message by the target function module; and recording the target function module in a second receiving queue for receiving the target message according to the second registration information.
As can be seen from the above solution, when the target application needs to receive a certain message, the target application is recorded in the first receiving queue according to the first registration information of the target application, and the target function module under the target application, which needs to receive the target message, is recorded in the second receiving queue. After the application program framework receives the messages sent by other application programs, the application program framework can search the target application program through the first receiving queue, and the target function module is searched through the second receiving queue, so that the received target message is sent to the target function module, and message receiving of the application program and the function module under the application program framework is realized.
Preferably, the acquiring the first registration information of the target application program includes: and acquiring the configuration file of the target application program, acquiring the description information in the configuration file, and acquiring the first registration information from the description information.
Therefore, after the configuration file of the target application program is downloaded, the configuration file is analyzed, the description information in the configuration file is acquired, and the first registration information is acquired from the description information, so that the static registration of the message receiving of the target application program can be realized.
The control method of the terminal equipment provided by the invention can also be that third registration information sent by the target functional module is received, and the third registration information is used for registering and receiving the target message by the target functional module; recording the target function module in a third receiving queue for receiving the target message according to the third registration information; according to the third registration information, fourth registration information is sent to the application program framework, and the fourth registration information is used for registering and receiving target information of the target application program; the application framework records the target application that sent the fourth registration information in a fourth receive queue that receives the target message.
According to the scheme, in the running process of the application program, if the target functional module needs to temporarily receive messages sent by other application programs, third registration information can be sent to the target application program in a dynamic registration mode, and after the target application program receives the third registration information, fourth registration information is sent to an application program framework, so that dynamic registration of message receiving is achieved.
Preferably, the first cancellation information sent by the target function module is received, and the first cancellation information is used for canceling the receiving target message; removing the target function module from the third receiving queue according to the first cancellation information; according to the first cancellation information, sending second cancellation information to the application program framework, wherein the second cancellation information is used for canceling the receiving target message; the application framework removes the target application from the fourth receive queue.
It can be seen that after the target application program or the target function module does not need to receive the target message, the target application program or the target function module can be removed from the receiving queue of the target message by actively sending the cancellation information. Thus, the message is very convenient to receive and cancel, and the actual requirements of the target application program or the target functional module are met.
Further, after receiving the fourth registration information sent by the target application program, the application program framework judges whether the target application program is already recorded in the fourth receiving queue, if so, the fourth registration information received currently is shielded.
It can be seen that if the target application is already recorded in the fourth receive queue, the application framework does not receive the fourth registration information sent by the target application, that is, each application appears once in one receive queue, and each functional module under the application cannot appear as a separate receiver in the receive queue, so that management of each application by the application framework is facilitated.
The control method of the terminal equipment provided by the invention can also be that the target message is received, a first receiving queue corresponding to the target message is searched, and the target message is sent to a target application program in the first receiving queue; after receiving the target message, the target application program judges whether a second receiving queue corresponding to the target message exists, if so, the target application program sends the target message to a target functional module in the second receiving queue.
According to the scheme, after the application program framework receives the message sent by one application program, the target application program for receiving the target message is searched through the first receiving queue, and then the target application program searches the target function module for receiving the target message from the second receiving queue and sends the target message to the target function module, so that the distribution of the target message is realized.
Preferably, the sending the target message to the target application in the first receive queue includes: and judging whether the target application program is in an active state, if so, sending a target message to the target application program, otherwise, waiting for the target application program to enter the active state, and sending the target message to the target application program.
It can be seen that the target message is only sent to the target application program after the target application program enters the active state, so that the target application program can receive the target message, and the success of sending the target message is ensured.
In order to achieve the second object, the present invention provides a terminal device control apparatus, including a first registration information obtaining module, configured to obtain first registration information of a target application, where the first registration information is used for registering and receiving a target message by the target application; the first recording module is used for recording the target application program in a first receiving queue for receiving the target message according to the first registration information; the second registration information acquisition module is used for acquiring second registration information of the target functional module according to the first registration information, wherein the second registration information is used for registering and receiving the target message by the target functional module; and the second recording module is used for recording the target function module in a second receiving queue for receiving the target message according to the second registration information.
To achieve the third object, the present invention provides a terminal device including a processor for implementing each step of the above terminal device control method when executing a computer program stored in a memory.
In order to achieve the fourth object, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described terminal device control method.
Drawings
Fig. 1 is a flow chart of static registration information of an embodiment of a terminal device control method of the present invention.
Fig. 2 is a flowchart of dynamic registration information of an embodiment of a terminal device control method of the present invention.
Fig. 3 is a flow chart of a dynamic cancellation message of an embodiment of the terminal device control method of the present invention.
Fig. 4 is a flow chart of message distribution of an embodiment of the terminal device control method of the present invention.
Fig. 5 is a block diagram showing the construction of a first embodiment of the terminal device control apparatus of the present invention.
Fig. 6 is a block diagram showing the construction of a second embodiment of the terminal device control apparatus of the present invention.
Fig. 7 is a block diagram showing the construction of a third embodiment of the terminal device control apparatus of the present invention.
Fig. 8 is a block diagram showing the construction of a fourth embodiment of the terminal device control apparatus of the present invention.
Fig. 9 is a block diagram of an embodiment of a terminal device of the present invention.
The invention is further described below with reference to the drawings and examples.
Detailed Description
The terminal equipment control method is applied to terminal equipment such as a smart phone or a tablet computer and is used for sending and distributing messages in application programs running under an application program framework. The terminal device control device of the invention operates on the terminal device and is used for realizing the terminal device control method.
Because the existing application program directly runs on the operating system of the terminal device, for example, when a user needs to run a certain application program, the installation package of the application program needs to be downloaded first, and the operating system analyzes the installation package. However, since the data amount of the existing installation package of the application is very large, the installation package of the application is downloaded for a long time and the installation time is also long.
For this purpose, an application framework is set on the terminal device of this embodiment to support the running of the application. For example, the application framework is software running on the operating system of the terminal device, on which the application framework runs, and on which an existing application can also run. It will be appreciated that the application framework, as well as existing generic applications, are running directly on the operating system and are supported by the operating system. Therefore, in this embodiment, the application framework may be downloaded and installed on the terminal device in advance, or may be installed on the terminal device together with the operating system.
In the running process of the application program framework, the application program framework is similar to a common application program in that the application program framework can directly use resources and services provided by an operating system, for example, when the application program framework runs, various interfaces provided by the operating system can be called according to requirements, native controls of the operating system are used, messages, broadcasting and the like can be received from the operating system, and messages can be sent to the application program and the like through the operating system.
In order to avoid the problem that a user needs to wait for a long time in the process of downloading an installation package and installing an existing application program, the application program running on the application program framework needs to download a configuration file of the application program before starting, and after the configuration file is downloaded to a terminal device, the application program framework analyzes the configuration file, so that the application program running on the application program framework is supported to run by the application program framework.
Typically, a signature module and a source file module are included in a configuration file of an application running on an application framework, wherein the signature module includes a key file that has been signed and encrypted. The source file module comprises public resources, components, page catalogs, project configuration files and the like, and the configuration files comprise various modules and configuration information required by a developer to define projects for the application program.
The common resources include data such as icons of the application programs, special fonts used by the application programs or specific background pictures, welcome video, audio of the application programs, and the like. Components common to applications, such as components that need to be used by multiple pages or code segments, may also be provided as a common resource in a common resource library of the configuration file.
The page directory includes information of each page in the application program, namely, a folder structure of the application program, for example, includes information of names of each page, paths of the pages and the like, and further includes description information of each page, for example, specific layout information of the page, components required to be called in a rendering process, and if a certain page has special rendering requirements, the page directory page can record the information of the page. The page directory also describes execution logic between pages, such as a skip relationship, a call relationship, and the like between a plurality of pages.
The project configuration files include descriptions of the application, such as interfaces that claim to be invoked, messages that claim to be received by the application, claims that may be invoked by other applications, etc., although custom components may be provided in the project configuration files if the application is provided with custom components.
The application framework is provided with an operation support module, a sandbox model module, a message processing module and an application management module, and a plurality of application programs can be operated on the application framework. It should be noted that, in the running process, an application running on the application framework generally does not directly use the resources or services provided by the operating system, but mainly uses the resources and services provided by the application framework.
The operation support module of the application framework is used for supporting the operation of the application program running on the application framework, and when the application program runs on the application framework, the operation support module starts and provides the service required in the application program running process. The specific structure of the operation support module will be described in detail below.
The sandbox model module provides a sandbox model required by operation for application programs running on the application program framework, so that authority isolation and data isolation among different application programs are realized, for example, authority management of each application program is provided, data of each application program are isolated, and improper acquisition of data of another application program by one application program is avoided. For example, the sandboxed model module may set and record the rights that each application can acquire and the rights that are not allowed to acquire, and set a data sharing and calling mechanism between applications, through which data of each application is managed.
The message processing module is used for managing the activities of receiving and sending messages of each application program on the application program framework, including message receiving registration, message distribution and message sending management. For example, the application program needs to receive a certain message, a request instruction for requesting to receive the message can be sent to the application program framework, the message processing module will create a receiving queue of the message, and the application program is added to the receiving queue of the message, so as to realize the registration of the message receiving of the application program.
Preferably, an application running on the application framework may register and receive messages statically or dynamically. The application program static registration receiving message is to declare that a certain message needs to be received in the configuration file of the application program, and the message processing module adds the application program to the receiving queue of the message according to the declaration. The dynamic registration of the application program to receive the message is to temporarily receive a certain message in the running process of the application program, send a registration request for temporarily receiving a certain message to the application program framework, and temporarily add the application program framework into a receiving queue of the message according to the request by the message processing module.
Of course, the message processing module also needs to manage the application program that dynamically registers the received message, for example, when the application program does not need to receive the message any more, the application program sends out the logoff information, and the message processing module removes the dynamically registered application program from the receiving queue of the message.
If the application framework receives a message, the message processing module also needs to distribute the received message, for example, a first application on the application framework sends the message to a second application, the first application does not send the message directly to the second application, but the first application sends the message to the application framework, the message processing module finds the receive queue of the message, and sends the message to the applications in the receive queue. For example, the message queue includes a second application, the message processing module distributes the message to the second application.
The application management module is used for managing the running of each application program, for example, starting one application program according to the instruction of a user or closing one application program according to the instruction of the user. For example, when an application is put into a foreground operation or is put into a background operation, the application is put into an inactive state after the background operation time of the application is too long.
And, the user can directly run an application program which does not download the configuration file, for example, icons of a plurality of application programs are displayed on a main page of an application program framework, the application programs comprise an application program which has downloaded the configuration file and an application program which does not download the configuration file, the application management module can directly click on the icon of the application program which does not download the configuration file, the application management module can download the configuration file of the application program from the server, and analyze the configuration file to start running the application program. Of course, if the user needs to delete the configuration file of a certain application program, the application management module may also delete the configuration file of the application program.
Since the configuration file is downloaded before the application is run, rather than the installation package, the downloaded configuration file is parsed by the application framework. Therefore, in order to reduce the waiting time when the user downloads the configuration file, the data amount of the configuration file needs to be reduced, for example, the page information contained in the configuration file of the application program only includes the description information of the page of the application program, but does not include the complete data after rendering the page, and for the interface required to be invoked by the application program, the configuration file of the application program only gives the names and the calling rules of various interfaces required to be invoked by the application program, but does not provide a specific function for calling the interface. Thus, the amount of profile data for applications running on the application framework is small, typically below 1M. The terminal device can complete the downloading of the configuration file of the application program in a very short time.
After the configuration file of the application program is downloaded, the application program framework analyzes the configuration file and then runs the application program, for example, the running support module supports the running of the application program.
The operation support module is internally provided with a first JS engine, a rendering engine, a control management module, a bridging module, an interface management module, a third-party service module, an application framework and the like.
In the running process of the application program framework, resources provided by an operating system are required to be used, so that the running support module also needs to acquire the resources provided by the operating system, such as a native control and an interface provided by the operating system.
Since the configuration file of the application is downloaded by the terminal device, the application framework needs to acquire the downloaded configuration file from the operating system. Currently, most application configuration files are written in JS (Java Script) language, and a second JS engine is set in the operating system to compile the configuration files into a language that can be parsed by the application framework. Of course, the application framework may also directly obtain the configuration file from the operating system, and the first JS engine in the operation support module may parse the configuration file.
After the configuration file is parsed, the page of the generating application program needs to be rendered, for example, the rendering engine obtains the description information of the page in the configuration file, and the page is rendered according to the description information. Preferably, the configuration file of the application program contains basic setting information about the page, for example, information including a page background pattern, page font style information, icon position information, head portrait display position and the like, but does not contain the rendered data of the page, that is, the page information in the configuration file is not the rendered data of the page.
Further, the configuration file of the application program includes a plurality of components, operation logic, description information and the like, wherein the components of the configuration file are preset components according to the requirements of the application program framework, and the components have a corresponding relationship with the native controls of the operating system of the terminal device, that is, the names and the like of the native controls of the operating system corresponding to the components can be determined through the identification of the components. The running logic of the configuration file is used for determining the logic of the application program when running, such as the upper and lower level relationship between pages, namely the relationship of entering the next level page from a certain page or returning to the previous level page, and indicating the roles of different keys on the page, such as the logic relationship of jumping to the next page after clicking a certain key. The description information includes layout information, colors, fonts, resources, various declarations, and the like of the page.
Therefore, when the rendering engine renders the page of the application program, the running logic and the description information in the configuration file are required to be used, and the description information already gives information such as the layout, the style and the like of various icons, characters on the page, so that the rendering of a certain page can be realized according to the description information.
Preferably, the application framework uses the native controls provided by the operating system to generate the native page, so when rendering the page of the application, the native controls corresponding to the components in the configuration file are required to be acquired according to the corresponding relation between the components in the configuration file and the native controls, namely, the controls used for generating icons, windows or navigation bars in the operating system are acquired, and the native page of the application is generated based on the native controls in a rendering mode. Therefore, the control management module needs to acquire the mapping relation between the components and the native controls in the configuration file, acquire the native controls corresponding to the operating system according to the mapping relation, and use the native controls to realize the rendering of the pages according to the description information so as to acquire the native pages of the application program. It can be seen that the native pages are pages rendered based on the native control of the operating system, and the display effect of the pages is the same as that of the conventional application program, so that the user experience is ensured not to be changed.
Of course, the application framework also provides own controls, for example, the application framework includes built-in controls provided by the application framework, and when rendering the page of the generated application program, the built-in controls can be acquired for rendering, so that the control management module can acquire the required built-in controls from the application framework according to actual needs.
During the running of an application, the application may need to invoke various interfaces, such as using some interface provided by the operating system. The interface management module obtains the declaration of one interface of the operating system required by the application program according to the description information of the application program, determines the information such as the name or ID of the interface required to be called according to the declaration, and calls the interface from the operating system through the bridging module. Therefore, in the configuration file of the application program, only a certain interface needs to be declared to be called, and a specific function using the interface does not need to be provided, so that the data volume of the configuration file of the application program is reduced.
Of course, the application framework also provides a built-in interface, for example, the built-in interface is provided in the application framework, the application can also call the built-in interface, for example, which built-in interface needs to be called is stated in the description file, and the interface management module determines the built-in interface needs to be called according to the description file and provides the corresponding built-in interface for the application to use.
In addition, the application framework may also provide a third party service to the application, where the third party service is a service provided by an application running on the operating system, etc., for example, when the application running on the application framework needs to use a function of the application running on the operating system, the function may be used by the third party service module.
Typically, third party services provide specialized call interfaces within the application framework through which corresponding functions are used when the application needs to use the third party services. For example, a push module, a registration module, a payment module, a statistics module and the like are arranged in the third party service module, and an application program can realize the functions of push message receiving, account registration, payment, information statistics and the like through the modules. It will be appreciated that the push module registration module, the payment module, and the statistics module are call interfaces provided by the third party application to the application framework.
In addition, the application framework can provide various services for the application, for example, a page management module, a routing management module, an MVVM module and the like are further arranged in the application framework, and the page management module is used for realizing page management of the application, for example, realizing skip control of pages, opening and closing of pages and the like. And the page management module can realize the setting of the jump relation among a plurality of pages by acquiring the running logic in the configuration file of the application program, thereby determining the logic of the plurality of pages of the application program.
The route management module provides a route service for the application program, for example, when the application program needs to send a message to a specific node, the route management module provides a path for sending the message, and sends the information to the next node of the current terminal device according to the path. The MVVM module is used for realizing MVVM (Model-View-View-Model) functions, such as separating views from models in an application program.
The built-in control, built-in interface and various services provided in the application framework can be called by the application program, so that the configuration file of the application program does not need to provide codes for realizing the functions, and only needs to state that the function modules need to be called in the description file.
After the configuration file of the application program is downloaded, the application program framework analyzes the configuration file, firstly, signature information of the configuration file is obtained, namely, a key file in the configuration file is obtained, and the authenticity of the configuration file is verified by using the key file. After the configuration file passes the verification, the source file module in the configuration file is parsed.
For example, when an application is run, a project configuration file is first acquired, and various declaration information such as registration reception information, call information for setting the application, and the like is acquired. Meanwhile, rendering and generating a main page of the application program, wherein the description information of the main page is required to be acquired from a page catalog, components required to be used in the rendering process are determined, and the application program framework acquires corresponding native controls or built-in controls according to the components and renders and generates the main page by a rendering engine.
If the user performs an operation on the main page, for example, clicks a certain key or slides to form a preset track, a corresponding operation is performed according to the set running logic, for example, a certain interface is called or adjusted to another page, etc.
It can be seen that, just because the configuration file of the application program running on the application program framework only contains the description information of the plurality of components, the running logic and the pages, but does not provide the complete data of the rendered pages, the data volume of the configuration file can be greatly reduced. On the other hand, for interfaces and called services which need to be called in the running process of the application program, only the interfaces or services which need to be called are required to be declared in the configuration file, and specific functions or codes for realizing the services do not need to be provided, so that the data size of the configuration file is very small, the downloading speed is very high, the downloading of the configuration file can be completed in a very short time, the time spent by an application program framework in analyzing the configuration file is very short, and the running of the application program can be realized in a very short time.
In this way, compared with the traditional application program, the application program running under the application program framework can complete the downloading and analysis of the configuration file of the application program running under the application program framework in a very short time, so that for the application program not downloading the configuration file, as long as a user sends out an instruction for running the application program, the downloading and running of the configuration file can be completed instantaneously, and the application program can be opened instantaneously. In general, downloading and parsing of the configuration file of the application may be completed in the background, and the user only needs to click on an icon of the application, even if the configuration file of the application is not downloaded, and the user hardly needs to wait to open the main page of the application.
Because the displayed page is also rendered by the native control when the application program runs, and various interfaces are provided by the application program framework, the experience of the user using the application program is not affected.
However, under the operating system, the application framework is regarded as an application program, and the application program under the application framework is operated on the application framework, and because the application program under the application framework is not directly operated on the operating system, registration of message reception cannot be performed in the message management component, and thus, transmission and reception of messages cannot be realized through the message management component, a set of message transmission and reception mechanism under the application framework needs to be provided to realize transmission and reception of messages between different application programs under the application framework.
Therefore, the present invention mainly provides a mechanism for sending and receiving messages among a plurality of application programs under an application program framework, which comprises static registration information, dynamic registration information and dynamic cancellation information of the application programs under the application program framework, and also comprises a method for sending the messages by the application programs through the application program framework and distributing the messages by the application program framework.
The following describes the terminal device control method of the present invention with reference to fig. 1, and the method received in fig. 1 is a method for static registration information of a target application.
First, step S101 is executed to acquire a configuration file of a target application.
Since the application under the application framework is not required to be executed by downloading the installation package and installing it later, but is executed by downloading the configuration file and parsing the configuration file by the application framework, step S101 needs to acquire the configuration file of the application. The most common way to obtain the configuration file is to download the configuration file of the application program from a preset server, for example, when the user runs the target application program for the first time, the terminal device downloads the configuration file of the target application program.
The user may run the application framework on the terminal device and enter the main page of the application framework, and click a virtual key of "program list" under the main page of the application framework, and information of a plurality of applications will be displayed on the application list page of the application framework, including icons, names, preview information, summary information, and the like of the applications. Preferably, applications that have been downloaded will be displayed above the program list, while applications that have not been downloaded will be displayed below the list. More preferably, the application framework provides the functionality to search applications, such as displaying a search field at the top of a program listing page, where a user can enter keywords, such as the name, function, attribute, etc., of an application, and click on a search button, where search results will be displayed.
When the user wishes to use a certain application, he can click on an icon or name of the application, the terminal device receives an instruction to run the application, and starts to run the application. Of course, the user may issue an instruction to run the application program by other means, for example, by a voice control instruction or pressing a Home key, or may slide on the screen to form a pattern of a predetermined track, or the like.
After the application framework receives an instruction of clicking an icon of an application program sent by a user, firstly, whether a configuration file of the application program is downloaded needs to be judged, and if the configuration file is not downloaded, an instruction of downloading the configuration file of the application program needs to be sent to a server.
Since the application programs running under the application program framework are all running based on the configuration files, the request instruction sent by the application program framework is a request instruction sent to the server for downloading the configuration files of the application programs. After receiving the instruction of downloading the application program configuration file, which is sent by the terminal equipment, the server searches the application program configuration file and sends the application program configuration file to the terminal equipment.
At this time, the terminal device receives the data of the application configuration file transmitted by the server, and parses the configuration file under the application framework. Because the configuration file of the application program contains a plurality of components, basic setting information of pages of the application program, description information of the application program and the like, the components of the configuration file can correspond to the native controls of the terminal equipment operating system, namely one component corresponds to one or more native controls, analyzing the configuration file comprises determining the corresponding relation between the components and the native controls, and generating the native pages of the target application program by using the acquired native controls.
Of course, the configuration file is not necessarily obtained when the user clicks the icon of the target application program and starts to run the target application program, but may be obtained and the subsequent operation is performed after the target application program is run one or more times.
Then, step S102 is performed to acquire the description information in the configuration file.
After the configuration information of the application program is acquired, description information in the configuration file needs to be acquired, and typically, the description information includes information such as call information of the application program, whether a certain message needs to be received, and the like. Thus, after the configuration file is obtained, the application program parses the configuration file and obtains the description file in the configuration file according to the logic of the configuration file.
Next, step S103 is performed to acquire first registration information of the target application from the description information.
The description information includes information that the target application needs to receive messages sent by other target applications, and the information declares which messages the target application needs to receive, so the information is the first registration information in this embodiment.
Preferably, if the target application program includes a plurality of functional modules, for example, a plurality of processes will be generated when the target application program runs, each functional module may need to receive different messages respectively, the first registration information includes information of a plurality of messages that the target application program needs to receive, and the first registration information may not distinguish which functional module receives the messages respectively, and only record which messages need to be received.
Then, step S104 is performed, and the application framework records the target application program in the first receive queue.
The application framework may set up a message management process that records a plurality of message queues, each message queue corresponding to a message, e.g., a time updated message, a geographic location updated message, etc. After the application framework acquires the first registration information of the target application program, determining which messages the target application program needs to receive, and after determining the target message the target application program needs to receive, recording the application program into a first receiving queue of the corresponding target message.
Preferably, each application program has its own corresponding ID, and when the target application program is recorded in the first receive queue, the name, the category, or the ID of the target application program may be recorded in the first receive queue. It should be noted that, the first receiving queue is a queue recorded by a message management process under the application framework, and all members in the queue are target applications, not processes of the target applications. Preferably, if the target application needs to receive multiple messages, the message management process records the target application in a plurality of different message receiving queues, respectively.
Then, step S105 is performed to acquire second registration information from the first registration information.
Because there may be multiple functional modules in the target application, each functional module may receive the message separately, and each functional module will correspond to a process after running, preferably, each process has its own corresponding process number PID, which may be used as a unique identifier for each process.
After the first registration information is acquired, information that each process in the target application needs to receive the target message, which is the second registration information for the target function module, may be acquired from the description information. It will be appreciated that the second registration information is information for declaring which messages the target functional module in the target application needs to receive. In this embodiment, the target function module may be a process, and one process may receive multiple messages, and different processes may also receive the same message.
In addition, since the messages received by each process in the target application program are distributed by the target application program, the target application program needs to receive the messages required to be received by all processes under the target application program, that is, all the messages corresponding to the second registration information should be found in the first registration information of the target application program.
Finally, step S106 is executed to record the target function module in the second receive queue of the target application.
The target application may set up a message management process by which messages received by the target application are distributed, and the message management process records a plurality of message receive queues, such as a time-updated message receive queue, etc. In this embodiment, the receiving queues recorded in the message management process of the target application program are second receiving queues, each of which corresponds to a message, and each of the second receiving queues includes information of a plurality of target function modules that receive the message, such as process numbers, names, and other information of the target function modules. It will be appreciated that if a target function module needs to receive multiple messages, information such as a process number, a name, etc. of the target function module needs to be recorded in a second receiving queue of the corresponding multiple messages, respectively.
The above embodiment describes a static registration process of message reception, which is to actively acquire the description file of the target application program through the application program framework to record the message required to be received by each application program, and the target application program also records the message required to be received by each target functional module. The first receiving queue and the second receiving queue formed by the static registration mode cannot change in the running process of the target application program, namely the target application program cannot be removed from the first receiving queue in the running process of the target application program, and cannot be added into other receiving queues in the running process.
However, during the running process of the application program, some processes may need to temporarily receive some messages, for example, some process of the instant messaging application program only needs to receive the message of the location update in a short period of time, where the receiving registration of the message needs to be implemented by means of dynamic registration. The process of dynamically registering a received message is described below in connection with fig. 2.
First, step S201 is executed to receive third registration information sent by the target function module.
In the running process of the target application program, if a certain target function module needs to temporarily receive a certain message, the target function module sends third registration information to the target application program. In the embodiment of fig. 2, the third registration information is registration information sent by the target function module to the target application program for declaring that the target function module temporarily receives a certain message, and the third registration information needs to include information such as the name, type, or name of the sender of the target message that needs to be received.
It will be appreciated that the messages received by the dynamic registration method are all messages that the target function module does not receive by the static registration method, that is, the messages that need to be received are not recorded in the description file of the target application program. Preferably, the target function module may send the third registration information after the start-up and during the operation, or may send the third registration information immediately after the start-up of the target function module.
Then, step S202 is executed to record the target function module into the third receive queue of the target application.
The target application may set up a message management process that records a plurality of message receive queues, each message receive queue corresponding to a message. After receiving the third registration information sent by the target functional module, the target application program acquires information such as the name, the type or the sender of the message which is required to be received by the target, and records the target functional module in a corresponding message receiving queue. In the embodiment of fig. 2, the third receive queue is a queue in which the message management process of the target application records the messages that the target functional module needs to receive, such as which processes need to receive time updated messages, which processes need to receive geographic location updated messages, and so on.
Then, step S203 is executed, where the target application program sends fourth registration information to the application framework according to the third registration information sent by the target function module.
After the target function module sends the third registration information for requesting to receive the target message to the target application program, if the target application program is not registered to receive the target message, the target application program needs to send fourth registration information for requesting to receive the target message to the application program framework, and the fourth registration information is used for the target application program to declare that the target message needs to be temporarily received to the application program framework. The fourth registration information includes information such as the name and type of the target message that the target application needs to receive or the sender of the target message.
Finally, step S204 is executed, where the application framework records the target application program into the fourth receive queue of the application framework.
The application program framework sets a message management process, after the application program framework receives the fourth registration information sent by the target application program, the information such as the name, the type or the sender of the target message which the target application program needs to receive is determined, a fourth receiving queue of the target message corresponding to the fourth registration information is searched, and the target application program is recorded in the fourth receiving queue corresponding to the target message.
In the embodiment of fig. 2, the fourth receive queues are queues of the target application corresponding to each message recorded by the message management process of the application framework, so the message management process records a plurality of fourth receive queues, each of the fourth receive queues corresponding to one message, and members of each of the fourth receive queues are the target application. Of course, the fourth receiving queue may record information such as the name, ID, etc. of the target application program.
Because the target application running under the application framework is running by analyzing the configuration file, the target application can only receive the message through the unique message management process, and after the application framework receives the message, the message can only be distributed through the message management process of the target application, so in step S204, if the application framework receives the fourth registration information sent by the target application, it is still required to determine whether the target application already exists in the fourth receiving queue, and if the target application already exists in the fourth receiving queue, the target application will not be recorded again in the fourth receiving queue after shielding the fourth registration information currently received.
Note that, in step S204, the same target application is not allowed to register repeatedly in the receiving queue of the same message, regardless of whether the target application is registered in the fourth receiving queue of the application framework by means of static registration or dynamic registration.
Thus, if a process needs to temporarily receive a message, temporary, dynamic registration of message receipt can be achieved through the flow of fig. 2. Of course, if the process does not need to receive the target message any more, a statement may be issued to the target application by the logged-off program, and the process of logging off the receiving the target message is described below in connection with fig. 3.
First, step S301 is executed to receive the first cancellation information sent by the target function module.
When the target function module does not need to receive the target message any more, for example, when the process enters a certain state, the target function module exits the state, or after the target function module completes a certain operation, the target function module does not need to receive the target message any more, and at this time, the information of logging off to receive the target message, namely, the first logging-off information, needs to be sent to the target application program. The first cancellation information includes information such as the name, type, or sender of the target message that the target function module does not need to receive any more.
Then, step S302 is performed, where the target application removes the target function module from the third receive queue.
After the target application program receives the first cancellation information sent by the target functional module, the target functional module is determined to be unnecessary to receive the target message, and the target functional module is removed from the third receiving queue. Specifically, the message management process of the target application program acquires the information of the target message to be logged out from the first log-out information, then searches a third receiving queue corresponding to the target message, and removes the target function module from the third receiving queue, namely, deletes the information of the target function module. Thus, the target application program does not distribute the target message to the target function module after receiving the target message.
It should be noted that the target function removed in step S302 must be the target function recorded in the third receiving queue in step S202, that is, the target function that is dynamically logged off must be a process of receiving the target message through dynamic registration, and cannot be a process of receiving the target message through static registration.
Since the receiving of the target message is realized by the static registration mode, the target functional module is determined by the configuration file of the target application program to need to receive the target message, and therefore, the target functional module registered by the static registration mode cannot be removed from the third receiving queue. Preferably, when the message management process of the target application records each target function module in the third receiving queue, a flag is set to identify whether the target function module registers to receive the target message by means of static registration or receives the target message by means of dynamic registration, if the target function module is not allowed to be removed from the third receiving queue by the step of fig. 3 by means of static registration, and if the target function module is allowed to be removed from the third receiving queue by means of dynamic registration.
Next, step S303 is executed, where the target application sends second logout information to the application framework.
After the target application program receives the first cancellation information sent by the target functional module, the target functional module is indicated to no longer need to receive the target message, whether any target functional module exists in the third receiving queue is judged first, if no process needs to receive the target message, the second cancellation information is sent to the application program framework, and the target application program is declared to not need to receive the target message.
Finally, step S304 is performed, where the application framework will remove the target application from the fourth receive queue.
After the application framework receives the second cancellation information sent by the target application program, the target application program is determined to be unnecessary to receive the target message, and the target application program is removed from the fourth receiving queue. Specifically, the message management process of the application program framework acquires the information of the target message to be logged out from the second log-out information, searches a fourth receiving queue corresponding to the target message, and removes the target application program from the fourth receiving queue, namely, deletes the information of the target application program. Thus, the application framework does not distribute the target message to the target application after receiving the target message.
It should be noted that the target application removed in step S304 must be the target application recorded in the fourth receiving queue in step S204, that is, the target application that registers the receiving target message in a dynamic logout manner must be the target application that receives the target message through dynamic registration, and cannot be the target application that receives the target message through static registration.
It can be seen that the process of dynamically registering a received message is that the target function module actively transmits registration information to the target application program, and the target application program actively transmits registration information to the application program framework, unlike the static registration process.
The process of distributing a target message after it is received by an application framework is described below in connection with fig. 4.
First, step S401 is executed, where the application framework receives a target message sent by a certain application.
When a certain application running under the application framework needs to send a message, the application framework needs to send the message, for example, after receiving a time update instruction, the time setting application under the application framework needs to send a time update message to other application programs, and then send the time update message to the application framework.
Specifically, a message sent by an application is received by a message management process of an application framework, and the name or ID, etc. of the application that sent the message is determined, while the name, type, etc. of the received message is determined. Preferably, the message sent by the application may be a normal message, an ordered message, or a sticky message. If the message sent by the application program is a common message, the message needs to be sent to each application program in a receiving queue of the message, if the received message is an ordered message, the message needs to be sent according to a preset sequence, and after the last application program receives feedback that the ordered message has been received and is processed, the message can be sent to the next application program. If the received message is a sticky message, the message needs to be sent only when the received target application is in an active state, and if the target application is in an inactive state, the message is not sent.
After the application framework receives the target message, it needs to determine the type of the target message and send the target message according to the corresponding rule. Preferably, when the application program sends out the target message, a corresponding flag may be set at a preset flag bit of the target message, for declaring that the currently sent message is a message of that type.
Then, step S402 is performed, and the application framework searches the first receive queue corresponding to the target message.
After the application framework receives a target message, the message management process of the application framework searches the first receiving queue corresponding to the target message, preferably, the target message has a self name or ID, and each receiving queue also records the name or ID of the corresponding message, so that the first receiving queue corresponding to the target message is rapidly determined by traversing the information of each receiving queue.
Next, step S403 is executed to send a target message to the target application of the first receive queue.
After determining the first receiving queue corresponding to the target message, the message management process of the application program framework needs to send the target message received by the application program framework to the target application program in the first receiving queue. For example, if the received target message is a normal message, the target message is sent to each target application in the first receive queue, and the target message is sent to the target application regardless of whether the target application process is in an active state. Preferably, the target message may be sent to a plurality of target applications at the same time, and feedback information of the target applications need not be received.
If the target message is an ordered message, then the order of receipt of the plurality of applications receiving the target message needs to be determined. For example, the target message includes the sequence of the plurality of application programs for receiving the target message, and after the sequence is acquired, the target message is sequentially sent to the plurality of application programs according to the acquired sequence list. After the target message is sent to the first target application program, the feedback information of the first target application program needs to be received, for example, the feedback information of the target message is received, or the target message is processed correspondingly and the information of the processing result is received, and the target message is sent to the next target application program in the sequence list until all target application programs in the sequence list receive the target message.
If the target message is a sticky message, before sending the target message, it needs to determine that the target application program receiving the target message is in an active state, if the target application program is not in an active state, the target message is temporarily not sent to the target application program, and after waiting for a period of time, for example, 2 seconds, it is determined whether the target application program is in an active state, and the target message is not sent to the target application program until the target application program is in an active state. Of course, if the target application is in the inactive state for a long time, a condition for stopping sending the target message to the target application needs to be set, for example, the target application is always in the inactive state for a preset time, for example, 1 minute, or after a preset number of times of judgment, for example, 20 times later, the target application is still in the inactive state, the target message is not sent to the target application.
Then, step S404 is executed, and the target application program determines whether there is a second receiving queue for receiving the target message, if so, step S405 is executed, and if not, step S406 is executed.
After receiving the target message, the target application program first needs to determine whether the target message needs to be processed or needs to send the target message to a certain process. If a process under the target application needs to receive the target message, there is a second receive queue for receiving the target message, and thus, step S404 needs to determine whether there is a second receive queue for receiving the target message. Since the target message has its own name, ID, etc., the message management process of the target application can determine whether or not there is a second reception queue corresponding to the target message through the name, ID, etc. of the target message.
Step S405, sending a target message to the target function module in the second receive queue.
And if the second receiving queue corresponding to the target message exists, sending the target message to the target function module according to the type of the target message and the preset rule. For example, if the target message is a normal message, after each target function module in the second receive queue is acquired, the target message is sent to each target function module. If the target message is an ordered message, the target message needs to be sent to a plurality of target function modules in sequence according to a preset sequence, and if the target message is a sticky message, the target message is sent to the target function modules under the condition that the target function modules are required to be determined to be in an active state.
Step S406, the operation of target message matching is performed.
If the target message does not have the corresponding second receiving queue, the target application program needs to execute the operation corresponding to the target message according to the preset logic. For example, according to the operation logic preset in the description file, whether the target message is a message which does not need to be processed is judged, or the content of the target message is obtained, and the operation of the target message is executed.
Specifically, if the target message is a message of a setting item change, such as changing the current time, the target application needs to change the time of the target application according to the received target message. If the target message is a message for opening a certain page, after the target application program receives the target message, the page corresponding to the target message needs to be opened.
It can be seen that, the application program running under the application program framework can register and receive the target message through a static registration or dynamic registration mode, and after the target application program receives the target message, the target application program distributes the target message to the target function module, or the target application program processes the target message according to the preset business logic, so that the sending and distributing of the target message running under the application program framework are realized.
The embodiment of the present invention further provides a control device of a terminal device, referring to fig. 5, where the first embodiment of the control device includes a first registration information obtaining module 501, a first recording module 502, a second registration information obtaining module 503, and a second recording module 504.
The first registration information obtaining module 501 is configured to obtain first registration information of a target application program, for example, obtain description information of the target application program from a configuration file of the target application program, obtain first registration information of the target application program from the description information, and the first registration information is used to state that the target application program needs to register to receive a target message. Preferably, the first registration information includes a name, a type, an ID, or the like of the target message to be received.
The first recording module 502 is configured to record the target application program in a first receive queue for receiving the target message according to the received first registration information. In this embodiment, the first receive queues are queues of target applications that need to receive target messages, where each first receive queue corresponds to a target message, and one or more target applications may exist in one receive queue.
The second registration information obtaining module 503 is configured to obtain second registration information of the target function module according to the first registration information, where the second registration information is used for registering the target function module under the target application program to receive the target message. For example, the target application program then determines which processes in the target application program need to receive the target message based on the description information of the target application program.
The second recording module 504 is configured to record the target function module in a second receive queue for receiving the target message according to the second registration information. After the target application program receives the second registration information, the target function module which needs to receive the target message is recorded in a second receiving queue corresponding to the target message according to the second registration information so as to send the target message to the target function module.
The control device shown in fig. 5 is used for implementing static registration of the message, and the control device provided by the invention can also implement dynamic registration of the message. As shown in fig. 6, the present embodiment includes a third registration information receiving module 601, a third recording module 602, a fourth registration information transmitting module 603, and a fourth recording module 604.
The third registration information receiving module 601 is configured to receive third registration information sent by the target function module, where the third registration information is used for registering and receiving the target message by the target function module. For example, the target function module transmits the third registration information to the target application, and the target application receives the third registration information stating that the target function module transmitted receives the target message.
The third recording module 602 is configured to record the target function module in a third receive queue for receiving the target message according to the third registration information. The third receiving queue is a queue in which the target application program records the target function module that needs to receive the target message, and thus, the third recording module 602 adds the target function module that issued the registration information to the third receiving queue according to the third registration information.
The fourth registration information sending module 603 is configured to send fourth registration information to the application framework according to the third registration information, where the fourth registration information is used for registering the target application to receive the target message. After receiving the third registration information, the target application program sends fourth registration information of the target message to the application program framework for declaring that the target message needs to be received to the application program framework.
The fourth recording module 604 is configured to enable the application framework to record the target application that sends the fourth registration information in a fourth receive queue that receives the target message, so that the application framework sends the target message to the target application.
The present embodiment also provides a control device for message reception cancellation, as shown in fig. 7, and the present embodiment includes a first cancellation information receiving module 701, a first removing module 702, a second cancellation information sending module 703, and a second removing module 704.
The first cancellation information receiving module 701 is configured to receive first cancellation information sent by the target functional module, where the first cancellation information is used to cancel a receiving target message. If the target function does not need to dynamically receive the target message, the first cancellation information is sent to the target application to declare that the target message does not need to be received.
The first removing module 702 is configured to remove the target function module from the third receive queue according to the first cancellation information. After the target application program receives the first cancellation information, the target functional module is removed from the third receiving queue of the target application program, and after the target message is received, the target functional module is not sent to the target functional module.
The second cancellation information sending module 703 is configured to send, to the application framework, second cancellation information according to the first cancellation information, where the second cancellation information is used to cancel the reception target message. After the target application receives the first cancellation information sent by the target functional module and determines that no other target functional module is in the receiving queue of the target message, the second cancellation information is sent to the application framework to declare that the target message does not need to be received.
The second removal module 704 is configured to enable the application framework to remove the target application from the fourth receive queue. And after the application framework receives the second cancellation information of the target application program, determining that the target application program does not need to receive the target message, and removing the target application program from the fourth receiving queue.
The embodiment of the present invention also provides a control device for sending and distributing a target message, referring to fig. 8, where the embodiment includes a target message receiving module 801, a first searching module 802, a first sending module 803, a second searching module 804, and a second sending module 805.
The target message receiving module 801 is configured to receive a target message, for example, an application framework receives a target message sent by a certain application.
The first lookup module 802 is configured to lookup a first receive queue corresponding to the target message, for example, by a message management process of the application framework looking up the first receive queue corresponding to the target message by a name, an ID, etc. of the target message.
The first sending module 803 is configured to send a target message to a target application in the first receive queue. Specifically, the message management process sends the target message according to the type of the target message, if the target message is a common message, the target message is directly sent to the target application program, and if the target message is an ordered message, the target message is sequentially sent to a plurality of target application programs according to a preset sequence. If the target message is a sticky message, the target message needs to be sent while the target application is in an active state.
The second lookup module 804 is configured to, after the target application receives the target message, lookup a second receive queue corresponding to the target message. In this embodiment, the second receiving queue is a queue of receiving target messages recorded by the target application.
The second sending module 805 is configured to send the target message to the target functional module in the second receive queue after the target application finds the second receive queue. Preferably, the target message may be sent to the target function module according to a preset rule according to the type of the target message.
The embodiment of the present invention further provides a terminal device, as shown in fig. 9, for convenience of explanation, only the portion relevant to the embodiment of the present invention is shown, and specific technical details are not disclosed, please refer to the method portion of the embodiment of the present invention. The terminal equipment can be any terminal equipment including a mobile phone, a tablet personal computer, a personal digital assistant (English full name: personal Digital Assistant, english abbreviation: PDA) and the like.
Referring to fig. 9, the terminal device includes a processor 901, a memory 902, a power supply 903, and a computer program stored in the memory and executable on the processor. Wherein the processor 901 implements the steps in the respective information processing method embodiments described above, such as steps S101 to S106 shown in fig. 1, etc., when executing a computer program. In the alternative, the processor may implement the functions of the modules or units in the above-described embodiments of the apparatus when executing the computer program.
For example, a computer program may be split into one or more modules/units, which are stored in a memory and executed by a processor to perform the present invention. One or more of the modules/units described above may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program in the terminal device.
It will be appreciated by those skilled in the art that the architecture shown in fig. 9 is not limiting and may include more or fewer components than shown, or may combine certain components, or different arrangements of components, such as the terminal devices described above may also include input and output devices, network access devices, buses, etc.
The processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being a control center of the terminal device, and the various interfaces and lines being used to connect the various parts of the overall terminal device.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the terminal device by running or executing the computer programs and/or modules stored in the memory, and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
The modules/units integrated in the terminal device may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of each method embodiment described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
Claims (3)
1. A terminal device control method, characterized in that the method comprises:
running an application program framework on the terminal equipment, wherein the application program framework is software running on an operating system of the terminal equipment;
downloading a configuration file of the target application program;
the application framework parses the configuration file and starts the target application, which is supported by the application framework to run without an installation package;
acquiring first registration information of a target application program, including: acquiring a configuration file of the target application program, acquiring description information in the configuration file, and acquiring the first registration information from the description information;
receiving first registration information of a target application program through the application program framework, wherein the first registration information is used for registering and receiving target information of the target application program in the application program framework;
recording the target application program in a first receiving queue created by the application program framework and receiving the target message according to the first registration information;
receiving second registration information of a target function module of the target application program through a message management process of the target application program, wherein the second registration information is used for the target function module to register and receive the target message in the target application program;
Recording the target function module in a second receiving queue which is managed by the message management process and receives the target message according to the second registration information;
receiving a target message through the application program framework, searching a first receiving queue corresponding to the target message, and sending the target message to a target application program in the first receiving queue;
wherein sending the target message to a target application in the first receive queue comprises: judging whether the target application program is in an active state, if so, sending the target message to the target application program, otherwise, sending the target message to the target application program after waiting for the target application program to enter the active state;
after the target application program receives the target message, the target function module is judged to exist in a second receiving queue corresponding to the target message, and the target message is sent to the target function module.
2. A terminal device, characterized in that the terminal device comprises a processor for implementing the steps of the terminal device control method according to claim 1 when executing a computer program stored in a memory.
3. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program when executed by a processor performs the steps of the terminal device control method as claimed in claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810613999.5A CN110609751B (en) | 2018-06-14 | 2018-06-14 | Terminal equipment control method and device, terminal equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810613999.5A CN110609751B (en) | 2018-06-14 | 2018-06-14 | Terminal equipment control method and device, terminal equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110609751A CN110609751A (en) | 2019-12-24 |
CN110609751B true CN110609751B (en) | 2024-01-23 |
Family
ID=68887645
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810613999.5A Active CN110609751B (en) | 2018-06-14 | 2018-06-14 | Terminal equipment control method and device, terminal equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110609751B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013191904A (en) * | 2010-07-09 | 2013-09-26 | Panasonic Corp | Television receiver |
CN104169858A (en) * | 2013-12-03 | 2014-11-26 | 华为技术有限公司 | Method and device of using terminal device to identify user gestures |
CN106937258A (en) * | 2017-03-10 | 2017-07-07 | 广东欧珀移动通信有限公司 | A kind of control method of broadcast, device and mobile terminal |
CN107968881A (en) * | 2017-11-22 | 2018-04-27 | 珠海市魅族科技有限公司 | End-point device broadcast processing method and processing device, terminal device and storage medium |
-
2018
- 2018-06-14 CN CN201810613999.5A patent/CN110609751B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013191904A (en) * | 2010-07-09 | 2013-09-26 | Panasonic Corp | Television receiver |
CN104169858A (en) * | 2013-12-03 | 2014-11-26 | 华为技术有限公司 | Method and device of using terminal device to identify user gestures |
CN106937258A (en) * | 2017-03-10 | 2017-07-07 | 广东欧珀移动通信有限公司 | A kind of control method of broadcast, device and mobile terminal |
CN107968881A (en) * | 2017-11-22 | 2018-04-27 | 珠海市魅族科技有限公司 | End-point device broadcast processing method and processing device, terminal device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110609751A (en) | 2019-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110688232B (en) | Application program calling method, terminal equipment and computer readable storage medium | |
CN109391676B (en) | Terminal device control method, terminal device, and computer-readable storage medium | |
CN110990105B (en) | Interface display method and device, electronic equipment and storage medium | |
CN110990075B (en) | Method, device, equipment and storage medium for starting fast application | |
US20090132220A1 (en) | Method For Creating A Telecommunications Application | |
US20090129575A1 (en) | System And Computer Program Product For Creating A Telecommunications Application | |
CN111026491B (en) | Interface display method, device, electronic equipment, server and storage medium | |
WO2023093429A1 (en) | Micro-application running method and apparatus, and device, storage medium and program product | |
JPWO2003069470A1 (en) | Application creation system, creation device, creation method, application provision system, provision device, provision method, and application operation system, operation device, and operation method | |
CN109408136A (en) | Information processing method, device, storage medium and electronic equipment | |
CN111796860B (en) | Micro front end scheme implementation method and device | |
CN109618176B (en) | Processing method, equipment and storage medium for live broadcast service | |
CN110070593B (en) | Method, device, equipment and medium for displaying picture preview information | |
CN110727469B (en) | Terminal device control method and device, application program configuration file packaging method, terminal device and computer readable storage medium | |
CN111427622A (en) | Method and device for executing script codes in application program | |
CN114222003A (en) | Service calling method, system, device, equipment and storage medium | |
JP2014052927A (en) | Information processor, program and software execution control method | |
US7844978B2 (en) | Artifact management for an extensible runtime environment | |
CN110673827B (en) | Resource calling method and device based on android system and electronic equipment | |
CN110609751B (en) | Terminal equipment control method and device, terminal equipment and computer readable storage medium | |
CN111382039A (en) | Method, device, electronic equipment and storage medium for reporting user behavior event | |
CN110618874B (en) | Terminal equipment control method and device, terminal equipment and computer readable storage medium | |
CN110989987B (en) | Portal webpage generation method and device, client, server and storage medium | |
CN114995690A (en) | Document creation method, device, equipment and storage medium | |
CN114185845A (en) | File management method and device, computer equipment 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20240627 Address after: 430000, 14th floor, No. 181 Chunxiao Road, Wuhan Economic and Technological Development Zone, Hubei Province Patentee after: Wuhan Xingji Meizu Technology Co.,Ltd. Country or region after: China Address before: 519080 Meizu Science and Technology Building, Zhuhai City, Guangdong Province Patentee before: MEIZU TECHNOLOGY Co.,Ltd. Country or region before: China |