[go: up one dir, main page]

CN111580892A - Method, device, terminal and storage medium for calling service component - Google Patents

Method, device, terminal and storage medium for calling service component Download PDF

Info

Publication number
CN111580892A
CN111580892A CN201910122130.5A CN201910122130A CN111580892A CN 111580892 A CN111580892 A CN 111580892A CN 201910122130 A CN201910122130 A CN 201910122130A CN 111580892 A CN111580892 A CN 111580892A
Authority
CN
China
Prior art keywords
component
interface
information
standard
mobile
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.)
Granted
Application number
CN201910122130.5A
Other languages
Chinese (zh)
Other versions
CN111580892B (en
Inventor
金涛
马一鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN201910122130.5A priority Critical patent/CN111580892B/en
Publication of CN111580892A publication Critical patent/CN111580892A/en
Application granted granted Critical
Publication of CN111580892B publication Critical patent/CN111580892B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented

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 disclosure provides a method, a device, a terminal and a storage medium for calling a service component, and relates to the technical field of computers. The method is applied to an application program of a terminal, wherein the application program comprises an upper layer application, a mobile component integration framework and a plurality of service components, and the method comprises the following steps: when the application program starts a target function, the upper layer application sends calling information of the target function to the mobile component integration framework; the mobile component integration framework receives the calling information, acquires a standard component interface corresponding to the target function based on the calling information, and acquires the implementation class of the standard component interface according to the standard component interface; and the mobile component integration framework calls the target service component for realizing the target function through the realization class of the standard component interface. The corresponding relation between the service component and the standard component interface is not required to be established, the component decoupling is realized, the program is clearer, and the risk is reduced.

Description

Method, device, terminal and storage medium for calling service component
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for calling a service component.
Background
In the Application of the mobile terminal, one App (computer Application program) often has a plurality of service components to realize different functions, and different apps have a plurality of service components with similar functions, so that when a developer develops a new App with similar functions, the developer can reuse the same service components in a function module transplanting manner to shorten the development period, and thus the new App can directly call the transplanted service components to realize similar functions.
In the prior art, when integrating function modules of multiple service components, a routing method is mostly adopted, a table is maintained in an APP, the integrated service components are registered in the table as non-standard components, a mapping relation between the non-standard components and standard component interface information is stored in the table, an upper application module sends a call instruction, the call instruction contains standard component information, a component manager finds corresponding non-standard components in the table according to the standard component information, obtains call information of the non-standard components, finds implementation classes of the non-standard components, creates examples of the non-standard components, and completes call implementation functions of the components.
In the technology, a table needs to be preset to store the mapping relationship between the interface information of the non-standard component and the interface information of the standard component, so that the calling of the non-standard component can be realized, and the service component and the standard component have a coupling relationship and have certain risks.
Disclosure of Invention
The disclosure provides a method, a device, a terminal and a storage medium for calling a service component, which are used for solving the problem that a coupling relation exists between a service component and a standard component interface.
According to a first aspect of the embodiments of the present disclosure, a method for calling a service component is provided, where the method is applied in an application program of a terminal, the application program includes an upper layer application, a mobile component integration framework, and a plurality of service components, and the method includes:
when the application program starts a target function, the upper layer application sends calling information of the target function to the mobile component integration framework;
the mobile component integration framework receives the calling information, acquires a standard component interface corresponding to the target function based on the calling information, and acquires the implementation class of the standard component interface according to the standard component interface;
and the mobile component integration framework calls the target service component for realizing the target function through the realization class of the standard component interface.
In one possible implementation manner, before the upper layer application sends the calling information of the target function to the mobile component integration framework, the method further includes:
the upper layer application determines the target function; and according to the target function, selecting the component information of the target business component from the component information of each business component, and extracting the calling information of the target function from the component information of the target business component.
In another possible implementation manner, before the upper layer application sends the calling information of the target function to the mobile component integration framework, the method further includes:
when the application program is started, the mobile assembly integration framework obtains the configuration file of each service assembly, analyzes the configuration file of each service assembly and obtains the assembly information of each service assembly;
the upper layer application sends an acquisition request for acquiring the component information of the business component to the mobile component integration framework;
after receiving the acquisition request, the mobile component integration framework sends the component information of each service component to the upper layer application;
and the upper layer application receives the component information of each business component.
In another possible implementation manner, the obtaining, by the mobile component integration framework, a standard component interface corresponding to the target function based on the call information includes:
and the mobile component integration framework analyzes the calling information to obtain the target function, and acquires the standard component interface corresponding to the target function from the corresponding relation between the function and the standard component interface according to the target function.
In another possible implementation manner, the obtaining, by the mobile component integration framework, the implementation class of the standard component interface according to the standard component interface includes:
traversing the implementation class in the application program by the mobile component integration framework, and determining whether the implementation class in the application program is the implementation class of the standard component interface;
and when the implementation class in the application program is the implementation class of the standard component interface, the mobile component integration framework acquires the implementation class of the standard component interface until traversal is finished.
In another possible implementation manner, the target function is displaying a menu view, and the implementation class is a standard component menu interface implementation class;
the mobile component integration framework calls the target service component for realizing the target function through the implementation class of the standard component interface, and the method comprises the following steps:
traversing the implementation class of the standard component menu interface by the mobile component integration framework, and transmitting menu information to the implementation class of the standard component menu interface;
the implementation class of the standard component menu interface receives the menu information and determines whether the current service component is a target service component according to the menu information;
for each business component, returning a menu view to the mobile component integration framework when the implementation class of the standard component menu interface determines that the business component is the target business component.
In another possible implementation manner, the target function is displaying a setting item list, and the implementation class is a standard component setting item interface implementation class;
the mobile component integration framework calls the target service component for realizing the target function through the implementation class of the standard component interface, and the method comprises the following steps:
traversing the implementation class of the standard component setting item interface by the mobile component integration framework, and transmitting component information to the implementation class of the standard component setting item interface;
the implementation class of the standard component setting item interface receives the component information and determines whether the current service component is a target service component or not according to the component information;
for each business component, when the implementation class of the standard component setting item interface determines that the business component is the target business component, returning a setting item list to the mobile component integration framework.
In another possible implementation manner, the method further includes:
for each business component, returning a negative response to the mobile component integration framework when the business component is not the target business component, the negative response indicating that the business component is not the target business component.
According to a second aspect of the embodiments of the present disclosure, there is provided a device for calling a service component, where the device is applied in an application program of a terminal, the application program includes an upper layer application, a mobile component integration framework, and a plurality of service components, and the device includes:
when the application program starts a target function, the upper layer application is used for sending calling information of the target function to the mobile component integration framework;
the mobile component integration framework is used for receiving the calling information, acquiring a standard component interface corresponding to the target function based on the calling information, and acquiring the implementation class of the standard component interface according to the standard component interface;
the mobile component integration framework is used for calling the target service component for realizing the target function through the realization class of the standard component interface.
In one possible implementation, the apparatus further includes:
the upper layer application is used for determining the target function; and according to the target function, selecting the component information of the target business component from the component information of each business component, and extracting the calling information of the target function from the component information of the target business component.
In another possible implementation manner, the apparatus further includes:
when the application program is started, the mobile component integration framework is used for acquiring the configuration file of each service component, analyzing the configuration file of each service component and acquiring the component information of each service component;
the upper layer application sends an acquisition request for acquiring the component information of the business component to the mobile component integration framework;
after receiving the acquisition request, the mobile component integration framework sends the component information of each service component to the upper layer application;
the upper layer application is used for receiving the component information of each business component.
In another possible implementation manner, the mobile component integration framework is configured to analyze the call information to obtain the target function, and obtain a standard component interface corresponding to the target function from a correspondence between a function and the standard component interface according to the target function.
In another possible implementation manner, the mobile component integration framework is configured to traverse an implementation class in the application program, and determine whether the implementation class in the application program is the implementation class of the standard component interface;
and when the implementation class in the application program is the implementation class of the standard component interface, the mobile component integration framework is used for acquiring the implementation class of the standard component interface until traversal is finished.
In another possible implementation manner, the target function is displaying a menu view, and the implementation class is a standard component menu interface implementation class;
the mobile component integration framework is used for traversing the implementation class of the standard component menu interface and transmitting menu information to the implementation class of the standard component menu interface;
the implementation class of the standard component menu interface is used for receiving the menu information and determining whether the current service component is a target service component or not according to the menu information;
for each business component, returning a menu view to the mobile component integration framework when the implementation class of the standard component menu interface determines that the business component is the target business component.
In another possible implementation manner, the target function is displaying a setting item list, and the implementation class is a standard component setting item interface implementation class;
the mobile component integration framework is used for traversing the implementation class of the standard component setting item interface and transmitting component information to the implementation class of the standard component setting item interface;
the implementation class of the standard component setting item interface is used for receiving the component information and determining whether the current service component is a target service component or not according to the component information;
for each business component, when the implementation class of the standard component setting item interface determines that the business component is the target business component, returning a setting item list to the mobile component integration framework.
In another possible implementation manner, the apparatus further includes:
for each business component, returning a negative response to the mobile component integration framework when the business component is not the target business component, the negative response indicating that the business component is not the target business component.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal, including:
at least one processor; and
at least one memory;
the at least one memory stores one or more programs configured for execution by the at least one processor, the one or more programs including instructions for performing the method of business component invocation of the first aspect described above.
According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, where the computer-readable storage medium is applied to the terminal, and at least one instruction, at least one program, a code set, or a set of instructions is stored in the computer-readable storage medium, where the instruction, the program, the code set, or the set of instructions is loaded and executed by a processor to implement the steps in the service component calling method according to the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
and receiving the calling information through the mobile component integration framework, acquiring a standard component interface corresponding to the target function based on the calling information, and then acquiring the implementation class through the interface to complete the calling of the target function. The corresponding relation between the service component and the standard component interface is not required to be established, the component decoupling is realized, the program is clearer, and the risk is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram illustrating an application scenario according to an exemplary embodiment of a portion of the present disclosure;
FIG. 2 is a schematic structural diagram illustrating a mobile component integration frame according to an exemplary embodiment of a portion of the present disclosure;
FIG. 3 is a flowchart illustrating a method for business component invocation according to an exemplary embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating a method of another business component invocation according to an exemplary embodiment of the present disclosure;
FIG. 5 is a flow diagram illustrating a business component discovery and loading according to an exemplary embodiment of the present disclosure;
FIG. 6 illustrates a flow diagram of menu and setting item integration according to an exemplary embodiment of the present disclosure;
FIG. 7 is a timing diagram illustrating an application acquisition component menu view according to an exemplary embodiment of the present disclosure;
FIG. 8 is a timing diagram illustrating an application program obtaining a list of component settings in accordance with an exemplary embodiment of the present disclosure;
FIG. 9 is a schematic diagram illustrating a discovery implementation class over an interface in accordance with an illustrative embodiment of the present disclosure;
FIG. 10 is a block diagram illustrating an apparatus for a business component invocation in accordance with an exemplary embodiment of the present disclosure;
fig. 11 is a block diagram illustrating a terminal according to an exemplary embodiment of a portion of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The present disclosure provides a method for calling a service component, which is applied in an application program of a terminal, and referring to fig. 1, the application program includes an upper layer application, a mobile component integration framework, and a plurality of service components.
The terminal may be any device having an application program, for example, the terminal may be a mobile phone, a tablet computer, an intelligent home device, or an intelligent wearable device, and the like, which are installed with the application program, and the terminal is not particularly limited in the embodiment of the present disclosure.
The application program may be any application program running in the terminal, for example, the application program may be system software, which implements basic functions of a system; the application program can also be application software which is obtained by programming through different programming languages and is used for meeting the application requirements of users in different fields and different problems, such as taxi taking software, group buying software, information software or game software. The application program is not particularly limited in the embodiments of the present disclosure.
In the disclosed embodiment, the application program comprises an upper layer application, a mobile component integration framework and a plurality of business components. The upper layer application is used for responding to service call and sending call information of a target function to the mobile component integration framework according to service requirements, and the upper layer application may be a front-end display interface of an App or a webpage with content.
In the embodiment of the present disclosure, as shown in fig. 2, an exemplary structure diagram of the mobile component integration framework includes a menu management module, an error management module, a setting item management module, a component management module, a standard component menu interface, and a standard component setting item interface. The menu management module is used for acquiring a standard component menu interface through the component management module when the calling information is the calling menu function; the error management module is used for collecting error log information in the running process; the setting item management module is used for acquiring a standard component setting item interface through the component management module when the calling information is a calling setting item list; the standard component menu interface is used for acquiring an implementation class for implementing the standard component menu interface; the standard component setting item interface is used for acquiring an implementation class which realizes the standard component setting item interface. The modules included in the mobile component integration framework are not particularly limited in the embodiments of the present disclosure.
The service component is a software unit which has a service attribute and can independently complete a certain service function, and includes a complete interface and processing logic for completing the service function, and includes a complete program framework inside, and the application program can realize the function of the component after integrating the service component, for example, the service component may be a bluetooth component, a positioning component, a map component, a shopping component, a taxi taking component, and the like, and the service component is not specifically limited in the embodiment of the present disclosure.
FIG. 3 is a flowchart illustrating a method for service component invocation according to an exemplary embodiment of the present disclosure.
In step 301, when the application starts the target function, the upper layer application sends calling information of the target function to the mobile component integration framework.
In step 302, the mobile component integration framework receives the call information, obtains a standard component interface corresponding to the target function based on the call information, and obtains an implementation class of the standard component interface according to the standard component interface.
In step 303, the mobile component integration framework calls a target service component for implementing the target function through the implementation class of the standard component interface.
In the embodiment of the disclosure, the calling information is received through the mobile component integration framework, the standard component interface corresponding to the target function is acquired based on the calling information, and then the implementation class is acquired through the interface to complete the calling of the target function. The corresponding relation between the service component and the standard component interface is not required to be established, the component decoupling is realized, the program is clearer, and the risk is reduced.
FIG. 4 is a flowchart illustrating another method for service component invocation according to an exemplary embodiment of the present disclosure.
In step 401, the application discovers the business component and loads the component information of the business component.
When the application program is started, the mobile assembly integration framework obtains the configuration file of each service assembly, analyzes the configuration file of each service assembly and obtains the assembly information of each service assembly. The upper layer application sends an acquisition request for acquiring the component information of the business component to the mobile component integration framework. And after receiving the acquisition request, the mobile component integration framework sends the component information of each service component to the upper layer application.
In the embodiment of the present disclosure, each service component provides component information in a self-declared manner, each service component is configured with a component configuration file recording component information of its own, and the component information includes: component name, component menu key, component menu icon, component setting item key, component setting item icon, and the like. When the application program is started, the mobile component integration framework scans the service components contained in the application program, acquires the configuration file of each service component, analyzes the configuration file of each service component to obtain the component information of each service component, and caches the component information of each service component in the component management module of the mobile component integration framework.
After the mobile component integration framework parses the component information of each business component, the component information of each business component can be sent to the upper layer application. In a possible implementation manner, after the mobile component integration framework obtains the component information of each service component through analysis, the component information of each service component can be directly collected and sent to the upper layer application, and the upper layer application receives the component information of each service component. The mobile assembly integration framework directly sends the assembly information of each service assembly to the upper application, so that transmission resources are reduced, and efficiency is improved. In another possible implementation manner, after the analysis is completed, the mobile component integration framework caches the component information of each service component obtained by the analysis in the component management module, and when the upper layer application requests to obtain the component information of each service component, the component information of each service component is sent to the upper layer application. Correspondingly, the step that the upper layer application needs to acquire the component information of each service component may be:
and the upper layer application sends a calling request to the mobile component integration framework, wherein the calling request is used for acquiring the component information of each business component. And the mobile component integration framework receives the call request, returns the cached component information of each service component to the upper layer application, and the upper layer application receives the component information of each service component. An exemplary flow diagram for service component discovery and loading may be found in fig. 5.
In step 402, when the application program starts the target function, the upper layer application determines calling information according to the target function.
This step can be realized by the following steps (1) to (3), including:
(1) when the application program starts the target function, the upper layer application determines the target function.
The target function may be acquiring a menu view of the target service component or acquiring a setting item list of the target service component, etc.
(2) The upper layer application selects the component information of the target business component from the component information of each business component according to the target function;
and the upper layer application determines a target business component for realizing the target function according to the target function, and selects component information of the target business component from the component information of each business component.
For example, the target function is to obtain a menu view of the positioning component, the target service component is the positioning component, and the upper layer application obtains component information of the positioning component. For another example, the target function is to obtain a setting item list of the payment component, the target service component is the payment component, and the upper layer application obtains component information of the payment component.
(3) The upper layer application extracts the calling information of the target function from the component information of the target business component.
The component information of the target business component comprises calling information of a plurality of functions of the target business component. The calling information may include one or more of a component name, a menu key, a setting item key, and the like of the target business component, and the specific content of the calling information is not particularly limited in the embodiment of the disclosure. When the target function is to acquire the menu view of the target service component, the calling information of the target function comprises a menu key; when the target function is to obtain the setting item list of the target service component, the calling information of the target function comprises a setting item key, or the calling information of the target function comprises a component name and a menu key of the target service component.
In step 403, the upper layer application sends calling information of the target function to the mobile component integration framework.
The upper layer application sends the calling information of the target function to the mobile component integrated framework, and in one possible implementation mode, when the target function is to acquire the menu view of the target service component, the calling information of the target function comprises a menu key; accordingly, the upper layer application sends the menu key to the mobile component integration framework. In another possible implementation manner, when the target function is to obtain a setting item list of the target service component, the calling information of the target function includes a setting item key, or the calling information of the target function includes a component name and a menu key of the target service component; correspondingly, the upper layer application sends the setting item key to the mobile component integrated framework; or the upper layer application sends the component name and the menu key of the target business component to the mobile component integration framework.
In step 404, the mobile component integration framework receives the calling information, and obtains the standard component interface corresponding to the target function based on the calling information.
And the mobile component integration framework receives the calling information sent by the upper application and analyzes the calling information to obtain the target function. And storing the corresponding relation between the functions and the standard component interfaces in the mobile component integrated framework. Correspondingly, the mobile component integration framework obtains the standard component interface corresponding to the target function from the corresponding relation between the function and the standard component interface according to the target function. In the embodiment of the present disclosure, the standard component interfaces are a general term, different functions correspond to different standard component interfaces, and the standard component interface corresponding to the function can be found from the corresponding relationship between the function and the standard component interface. The standard component interface may include a standard component menu interface corresponding to the display menu view, a standard component setting item interface corresponding to the display setting item list, a standard component payment interface corresponding to the payment function, and a standard component positioning interface corresponding to the positioning function, and the standard component interface is not particularly limited in the embodiment of the present disclosure.
In a possible implementation manner, if the target function is to display a menu view of the target service component, the calling information includes a menu key, and the mobile component integration framework acquires a standard component menu interface corresponding to the displayed menu view from a corresponding relationship between the function and the standard component interface.
In another possible implementation manner, if the target function is to display a setting item list of the target service component, the calling information includes a setting item key, or the calling information includes a component name and a menu key, and the mobile component integration frame acquires a standard component setting item interface corresponding to the display setting item list from a corresponding relationship between the function and the standard component interface.
In step 405, the mobile component integration framework obtains the implementation class of the standard component interface according to the standard component interface.
Traversing the implementation class in the application program by the mobile component integration framework, and determining whether the implementation class in the application program is the implementation class of the standard component interface; and when the implementation class in the application program is the implementation class of the standard component interface, the mobile component integration framework acquires the implementation class of the standard component interface until the traversal is finished.
When the implementation class to be detected is not the implementation class of the standard component interface, skipping the implementation class to be detected to judge the next implementation class; and when the implementation class to be detected is the implementation class of the standard component interface, the mobile component integration framework acquires the implementation class of the standard component interface until traversal is finished.
It should be noted that the mobile component integration framework may obtain the identifier of the implementation class of the standard component interface, add the identifier of the implementation class of the standard component interface to the standard component interface implementation class list, and the standard component interface implementation class list may be used to return to the requester requesting the standard component interface implementation class.
In step 406, the mobile component integration framework calls the target service component for implementing the target function through the implementation class of the standard component interface.
When the implementation classes of the standard component interface are all the implementation classes of the standard component menu interface, the step can be implemented by a first implementation mode; when the implementation classes of the standard component interface are all the implementation classes of the standard component setting item interface, this step may be implemented by the second implementation manner. It should be noted that the first implementation manner and the second implementation manner are only two exemplary manners in the disclosure, and the step may be implemented by different implementation manners according to different standard component interfaces, and the disclosure does not specifically limit this.
In a first implementation mode, a mobile component integrated framework traverses an implementation class of a standard component menu interface and transmits menu information to the implementation class of the standard component menu interface; the implementation class of the standard component menu interface receives menu information and determines whether the current service component is a target service component or not according to the menu information; for each business component, when the implementation class of the standard component menu interface determines that the business component is a target business component, a menu view is returned to the mobile component integration framework.
The menu information can be the menu key in the calling information, and the mobile component integration framework transmits the menu key to each implementation class of the standard component menu interface in a traversal mode. And the implementation class of the standard component menu interface receives a menu key and determines whether the current service component is the target service component or not according to the menu key. And for each service component, matching the menu key with the menu key of the service component after the implementation class of the standard menu interface of the service component receives the menu key, determining that the service component is the target service component when the menu key is successfully matched, and returning a menu view to the mobile component integrated frame at the moment.
In a second implementation mode, the mobile component integration framework traverses the implementation class of the standard component setting item interface and transmits component information to the implementation class of the standard component setting item interface; receiving component information by the implementation class of the standard component setting item interface, and determining whether the current service component is a target service component according to the component information; for each business component, when the implementation class of the standard component setup item interface determines that the business component is a target business component, a list of setup items is returned to the mobile component integration framework.
The component information may include a setting item key in the calling information, the mobile component integration framework transfers the setting item key into each implementation class of the standard component menu interface in a traversal manner, and the setting item key may also be replaced by a component name and a menu key. And the implementation class of the standard component setting item interface receives a setting item key and determines whether the current service component is the target service component or not according to the setting item key. And for each service component, after receiving the setting item key, the implementation class of the standard menu interface of the service component matches the setting item key with the setting item key of the service component, and when the setting item key is successfully matched, the implementation class of the standard menu interface of the service component determines that the service component is the target service component, and at the moment, returns a setting item list to the mobile component integration frame.
For better illustration of the above steps, reference may be made to fig. 6, where fig. 6 is a flow chart illustrating integration of menus and setting items according to an exemplary embodiment of the present disclosure. When the application program is started, the upper layer application sends an instruction for calling all component information to the mobile component integration framework to acquire all component information. When an application program needs to call a menu view of a certain component, an upper layer application sends calling information to a mobile component integrated framework, the calling information comprises a menu key of the component to be called, the mobile component integrated framework obtains all implementation classes of a standard component menu interface, after the mobile component integrated framework obtains all the implementation classes of the standard component menu interface, all the implementation classes of the standard component menu interface are traversed, and the mobile component integrated framework inputs the menu key into the implementation class of each standard component menu interface through methods provided by all the implementation classes of the standard component menu interface. And after receiving the menu key, the implementation class of the standard component menu interface judges whether the menu key is the menu key of the component, if so, returns to the menu view, and if not, returns to a negative response. And the mobile assembly integrated frame can obtain the menu view of the corresponding assembly according to the menu key. When an application program needs to call a setting item list of a certain component, the upper layer application sends calling information to the mobile component integrated framework, the calling information comprises a setting item key of the component to be called and can also be a name and a menu key of the component, the mobile component integrated framework obtains all implementation classes of a labeling component setting item interface, after the mobile component integrated framework obtains all implementation classes of a standard component setting item interface, all implementation classes of the standard component setting item interface are traversed, and the mobile component integrated framework inputs the component name and the menu key into the implementation classes of each standard component setting item interface through methods provided by all implementation classes of the standard component setting item interface. And after receiving the component name and the menu key, the implementation class of the standard component setting item interface judges whether the component name and the menu key are the component name and the menu key of the component, if so, returns a setting item list, and if not, returns a negative response. And the mobile assembly integration framework can obtain the setting item list of the corresponding assembly according to the assembly name and the menu key.
Illustratively, fig. 7 is a timing diagram illustrating a menu view of the above-described application acquisition component. After a user starts an application program, the application program discovers a service component and loads component information of the service component, the service component enters an upper layer application, the upper layer application sends a request for acquiring the component information to a mobile component integrated framework, the mobile component integrated framework sends a component information list to the upper layer application after receiving the request for acquiring the component information, the component information list comprises component information of a plurality of service components, when a menu view needs to be called, the upper layer application sends calling information to the mobile component integrated framework, the mobile component integrated framework receives the calling information, a standard component menu interface is acquired based on the calling information, all implementation classes of the standard component menu interface are acquired from the service component, the service component returns all implementation classes of the standard component menu interface, and the mobile component integrated framework traverses all implementation classes of the standard component menu interface, and acquiring the menu view of the corresponding component, and returning the menu view to the upper application.
Illustratively, fig. 8 is a sequence diagram illustrating the above-described application program acquisition component setting item list. After a user starts an application program, the application program discovers a service component and loads component information of the service component, the user operates the application program to enter a setting interface, an upper layer application sends a request for acquiring the component information to a mobile component integrated framework, the mobile component integrated framework sends a component information list to the upper layer application after receiving the request for acquiring the component information, the component information list comprises component information of a plurality of service components, when the setting item list is required to be called, the upper layer application sends calling information to the mobile component integrated framework, the mobile component integrated framework receives the calling information, acquires a standard component setting item interface based on the calling information, acquires all implementation classes of the standard component setting item interface from the service component, the service component returns all implementation classes of the standard component setting item interface, and the mobile component integrated framework traverses all implementation classes of the standard component setting item interface, and acquiring a setting item list of the corresponding component, and returning the setting item list to the upper-layer application.
It should be noted that, when the business component is not the target business component, the business component returns a negative response to the mobile component integration framework, and the negative response is used for indicating that the business component is not the target business component. The above-mentioned negative response can return negative information, negative identification or directly return a null character string, and the mobile component integration framework receives the returned negative information, negative response or null character string.
In the embodiment of the disclosure, the calling information is received through the mobile component integration framework, the standard component interface corresponding to the target function is acquired based on the calling information, and then the implementation class is acquired through the interface to complete the calling of the target function. The corresponding relation between the service component and the standard component interface is not required to be established, the component decoupling is realized, the program is clearer, and the risk is reduced.
Fig. 9 is a schematic diagram illustrating a discovery implementation class through an interface according to an exemplary embodiment of the present disclosure.
The initiator can be an upper-layer application, different modules of the same service component or other service components, the initiator requests the mobile component integration framework to query the implementation class of the relevant interface, and the mobile component integration framework queries the implementation class of the interface from the interface implementation party and returns the implementation class to the initiator. The upper layer application obtains the menu view and the setting item list in each service component through the mechanism of discovering the implementation class through the interface.
FIG. 10 is a block diagram illustrating an apparatus for a service component invocation according to an exemplary embodiment of the present disclosure. The device is applied to an application program of a terminal, and is used for solving the problem that a service component and a standard component interface have a coupling relation, the application program comprises an upper layer application 1001, a mobile component integration framework 1002 and a plurality of service components 1003, and the device comprises:
when the application starts the target function, the upper layer application 1001 is configured to send call information of the target function to the mobile component integration framework 1002;
the mobile component integration framework 1002 is configured to receive the call information, obtain a standard component interface corresponding to the target function based on the call information, and obtain an implementation class of the standard component interface according to the standard component interface;
the mobile component integration framework 1002 is configured to call a target service component 1003 that implements a target function through an implementation class of a standard component interface.
In one possible implementation, the apparatus further includes:
the upper layer application 1001 is used to determine a target function; according to the target function, the component information of the target business component 1003 is selected from the component information of each business component 1003, and the calling information of the target function is extracted from the component information of the target business component 1003.
In another possible implementation manner, the apparatus further includes:
when the application program is started, the mobile component integration framework 1002 is configured to obtain a configuration file of each service component 1003, and analyze the configuration file of each service component 1003 to obtain component information of each service component 1003;
the upper layer application 1001 is configured to send an acquisition request for acquiring component information of the business component 1003 to the mobile component integration framework 1002;
the mobile component integration framework 1002 is configured to send component information of each service component 1003 to the upper application 1001 after receiving the acquisition request;
the upper layer application 1001 is configured to receive component information of each business component 1003.
In another possible implementation manner, the mobile component integration framework 1002 is configured to parse the call information to obtain a target function, and obtain a standard component interface corresponding to the target function from a correspondence between the function and the standard component interface according to the target function.
In another possible implementation manner, the mobile component integration framework 1002 is configured to traverse an implementation class in an application program, and determine whether the implementation class in the application program is an implementation class of a standard component interface;
when the implementation class in the application is the implementation class of the standard component interface, the mobile component integration framework 1002 is configured to obtain the implementation class of the standard component interface until the traversal is completed.
In another possible implementation manner, the target function is displaying a menu view, and the implementation class is the implementation class of a standard component menu interface;
the mobile component integration framework 1002 is used for traversing the implementation classes of the standard component menu interfaces and transmitting menu information to the implementation classes of the standard component menu interfaces;
the implementation class of the standard component menu interface is used for receiving menu information and determining whether the current service component 1003 is a target service component according to the menu information;
for each business component 1003, when the implementation class of the standard component menu interface determines that the business component 1003 is a target business component, a menu view is returned to the mobile component integration framework.
In another possible implementation manner, the target function is to display a setting item list, and the implementation class is an implementation class of a standard component setting item interface;
the mobile component integration framework 1002 is used for traversing the implementation classes of the standard component setting item interfaces and transmitting component information to the implementation classes of the standard component setting item interfaces;
the implementation class of the standard component setting item interface is used for receiving component information and determining whether the current service component 1003 is a target service component according to the component information;
for each business component 1003, when the implementation class of the standard component setup item interface determines that the business component 1003 is a target business component, a list of setup items is returned to the mobile component integration framework.
In another possible implementation manner, the apparatus further includes:
for each business component 1003, returning a negative response to the mobile component integration framework 1002 when the business component 1003 is not the target business component 1003, the negative response indicating that the business component 1003 is not the target business component 1003.
And receiving the calling information through the mobile component integration framework, acquiring a standard component interface corresponding to the target function based on the calling information, and then acquiring the implementation class through the interface to complete the calling of the target function. The corresponding relation between the service component and the standard component interface is not required to be established, the component decoupling is realized, the program is clearer, and the risk is reduced.
Fig. 11 shows a block diagram of a terminal 1100 according to an exemplary embodiment of the present disclosure. The terminal 1100 may be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving Picture experts Group Audio Layer III, motion video experts compression standard Audio Layer 3), an MP4 player (Moving Picture experts Group Audio Layer IV, motion video experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 1100 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and so forth.
In general, terminal 1100 includes: a processor 1101 and a memory 1102.
Processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1101 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor, the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 1101 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 1102 may include one or more computer-readable storage media, which may be non-transitory. Memory 1102 can also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1102 is used to store at least one instruction for execution by processor 1101 to implement a method for business component invocation provided by method embodiments of the present disclosure.
In some embodiments, the terminal 1100 may further include: a peripheral interface 1103 and at least one peripheral. The processor 1101, memory 1102 and peripheral interface 1103 may be connected by a bus or signal lines. Various peripheral devices may be connected to the peripheral interface 1103 by buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1104, touch display screen 1105, camera 1106, audio circuitry 1107, positioning component 1108, and power supply 1109.
The peripheral interface 1103 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, memory 1102, and peripheral interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102 and the peripheral device interface 1103 may be implemented on separate chips or circuit boards, which is not limited by this embodiment.
The Radio Frequency circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1104 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1104 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1104 may communicate with other devices via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks.
The display screen 1105 is used to display a UI (user interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1105 is a touch display screen, the display screen 1105 also has the ability to capture touch signals on or over the surface of the display screen 1105. The touch signal may be input to the processor 1101 as a control signal for processing. At this point, the display screen 1105 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display 1105 may be one, providing the front panel of terminal 1100; in other embodiments, the display screens 1105 can be at least two, respectively disposed on different surfaces of the terminal 1100 or in a folded design; in still other embodiments, display 1105 can be a flexible display disposed on a curved surface or on a folded surface of terminal 1100. Even further, the display screen 1105 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display screen 1105 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
Camera assembly 1106 is used to capture images or video. Optionally, camera assembly 1106 includes a front camera and a rear camera. Generally, a front camera is disposed on a front panel of the apparatus, and a rear camera is disposed on a rear surface of the apparatus. In some embodiments, the number of the rear cameras is at least two, and each of the rear cameras is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (virtual reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1106 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 1107 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1101 for processing or inputting the electric signals to the radio frequency circuit 1104 to achieve voice communication. For stereo capture or noise reduction purposes, multiple microphones may be provided, each at a different location of terminal 1100. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1107 may also include a headphone jack.
Positioning component 1108 is used to locate the current geographic position of terminal 1100 for purposes of navigation or LBS (location based Service). The positioning component 1108 may be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 1109 is configured to provide power to various components within terminal 1100. The power supply 1109 may be alternating current, direct current, disposable or rechargeable. When the power supply 1109 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1100 can also include one or more sensors 1110. The one or more sensors 1110 include, but are not limited to: acceleration sensor 1111, gyro sensor 1112, pressure sensor 1113, fingerprint sensor 1114, optical sensor 1115, and proximity sensor 1116.
Acceleration sensor 1111 may detect acceleration levels in three coordinate axes of a coordinate system established with terminal 1100. For example, the acceleration sensor 1111 may be configured to detect components of the gravitational acceleration in three coordinate axes. The processor 1101 may control the touch display screen 1105 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1111. The acceleration sensor 1111 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1112 may detect a body direction and a rotation angle of the terminal 1100, and the gyro sensor 1112 may cooperate with the acceleration sensor 1111 to acquire a 3D motion of the user with respect to the terminal 1100. From the data collected by gyroscope sensor 1112, processor 1101 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensor 1113 may be disposed on a side bezel of terminal 1100 and/or on an underlying layer of touch display screen 1105. When the pressure sensor 1113 is disposed on the side frame of the terminal 1100, the holding signal of the terminal 1100 from the user can be detected, and the processor 1101 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1113. When the pressure sensor 1113 is disposed at the lower layer of the touch display screen 1105, the processor 1101 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1105. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1114 is configured to collect a fingerprint of the user, and the processor 1101 identifies the user according to the fingerprint collected by the fingerprint sensor 1114, or the fingerprint sensor 1114 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 1101 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. Fingerprint sensor 1114 may be disposed on the front, back, or side of terminal 1100. When a physical button or vendor Logo is provided on the terminal 1100, the fingerprint sensor 1114 may be integrated with the physical button or vendor Logo.
Optical sensor 1115 is used to collect ambient light intensity. In one embodiment, the processor 1101 may control the display brightness of the touch display screen 1105 based on the ambient light intensity collected by the optical sensor 1115. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1105 is turned down. In another embodiment, processor 1101 may also dynamically adjust the shooting parameters of camera assembly 1106 based on the ambient light intensity collected by optical sensor 1115.
Proximity sensor 1116, also referred to as a distance sensor, is typically disposed on a front panel of terminal 1100. Proximity sensor 1116 is used to capture the distance between the user and the front face of terminal 1100. In one embodiment, the touch display screen 1105 is controlled by the processor 1101 to switch from a bright screen state to a dark screen state when the proximity sensor 1116 detects that the distance between the user and the front face of the terminal 1100 is gradually decreasing; when the proximity sensor 1116 detects that the distance between the user and the front face of the terminal 1100 becomes gradually larger, the touch display screen 1105 is controlled by the processor 1101 to switch from a breath-screen state to a bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 11 does not constitute a limitation of terminal 1100, and may include more or fewer components than those shown, or may combine certain components, or may employ a different arrangement of components.
The disclosed embodiments also provide a computer-readable storage medium, where at least one instruction, at least one program, a code set, or a set of instructions is stored, and the instruction, the program, the code set, or the set of instructions is loaded and executed by a processor to implement the steps in the method for calling a service component of the foregoing embodiments.
It will be understood by those skilled in the art that all or part of the steps of the foregoing embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program implementing the method for invoking the service component may be stored in a computer-readable storage medium, which may be a read-only memory, a magnetic disk or an optical disk.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be described in detail here.
It is to be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (18)

1. A method for calling service components is applied to an application program of a terminal, wherein the application program comprises an upper application, a mobile component integration framework and a plurality of service components, and the method comprises the following steps:
when the application program starts a target function, the upper layer application sends calling information of the target function to the mobile component integration framework;
the mobile component integration framework receives the calling information, acquires a standard component interface corresponding to the target function based on the calling information, and acquires the implementation class of the standard component interface according to the standard component interface;
and the mobile component integration framework calls the target service component for realizing the target function through the realization class of the standard component interface.
2. The method of claim 1, wherein before the upper layer application sends the calling information of the target function to the mobile component integration framework, the method further comprises:
the upper layer application determines the target function; and according to the target function, selecting the component information of the target business component from the component information of each business component, and extracting the calling information of the target function from the component information of the target business component.
3. The method of claim 2, wherein before the upper layer application sends the calling information of the target function to the mobile component integration framework, the method further comprises:
when the application program is started, the mobile assembly integration framework obtains the configuration file of each service assembly, analyzes the configuration file of each service assembly and obtains the assembly information of each service assembly;
the upper layer application sends an acquisition request for acquiring the component information of the business component to the mobile component integration framework;
after receiving the acquisition request, the mobile component integration framework sends the component information of each service component to the upper layer application;
and the upper layer application receives the component information of each business component.
4. The method of claim 1, wherein the obtaining, by the mobile component integration framework, the standard component interface corresponding to the target function based on the call information comprises:
and the mobile component integration framework analyzes the calling information to obtain the target function, and acquires the standard component interface corresponding to the target function from the corresponding relation between the function and the standard component interface according to the target function.
5. The method of claim 1, wherein the mobile component integration framework obtains the implementation class of the standard component interface according to the standard component interface, comprising:
traversing the implementation class in the application program by the mobile component integration framework, and determining whether the implementation class in the application program is the implementation class of the standard component interface;
and when the implementation class in the application program is the implementation class of the standard component interface, the mobile component integration framework acquires the implementation class of the standard component interface until traversal is finished.
6. The method of claim 1, wherein the target function is displaying a menu view and the implementation class is an implementation class of a standard component menu interface;
the mobile component integration framework calls the target service component for realizing the target function through the implementation class of the standard component interface, and the method comprises the following steps:
traversing the implementation class of the standard component menu interface by the mobile component integration framework, and transmitting menu information to the implementation class of the standard component menu interface;
the implementation class of the standard component menu interface receives the menu information and determines whether the current service component is a target service component according to the menu information;
for each business component, returning a menu view to the mobile component integration framework when the implementation class of the standard component menu interface determines that the business component is the target business component.
7. The method of claim 1, wherein the target function is displaying a list of settings, and the implementation class is an implementation class of a standard component setting interface;
the mobile component integration framework calls the target service component for realizing the target function through the implementation class of the standard component interface, and the method comprises the following steps:
traversing the implementation class of the standard component setting item interface by the mobile component integration framework, and transmitting component information to the implementation class of the standard component setting item interface;
the implementation class of the standard component setting item interface receives the component information and determines whether the current service component is a target service component or not according to the component information;
for each business component, when the implementation class of the standard component setting item interface determines that the business component is the target business component, returning a setting item list to the mobile component integration framework.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
for each business component, returning a negative response to the mobile component integration framework when the business component is not the target business component, the negative response indicating that the business component is not the target business component.
9. An apparatus for calling a service component, wherein the apparatus is applied in an application program of a terminal, the application program comprises an upper application, a mobile component integration framework and a plurality of service components, and the apparatus comprises:
when the application program starts a target function, the upper layer application is used for sending calling information of the target function to the mobile component integration framework;
the mobile component integration framework is used for receiving the calling information, acquiring a standard component interface corresponding to the target function based on the calling information, and acquiring the implementation class of the standard component interface according to the standard component interface;
the mobile component integration framework is used for calling the target service component for realizing the target function through the realization class of the standard component interface.
10. The apparatus of claim 9, further comprising:
the upper layer application is used for determining the target function; and according to the target function, selecting the component information of the target business component from the component information of each business component, and extracting the calling information of the target function from the component information of the target business component.
11. The apparatus of claim 10, further comprising:
when the application program is started, the mobile component integration framework is used for acquiring the configuration file of each service component, analyzing the configuration file of each service component and acquiring the component information of each service component;
the upper layer application is used for sending an acquisition request for acquiring the component information of the business component to the mobile component integration framework;
the mobile component integration framework is used for sending the component information of each service component to the upper layer application after receiving the acquisition request;
the upper layer application is used for receiving the component information of each business component.
12. The apparatus according to claim 9, wherein the mobile component integration framework is configured to parse the call information to obtain the target function, and obtain a standard component interface corresponding to the target function from a correspondence between a function and the standard component interface according to the target function.
13. The apparatus of claim 9, wherein the mobile component integration framework is configured to traverse an implementation class in the application to determine whether the implementation class in the application is an implementation class of the standard component interface;
and when the implementation class in the application program is the implementation class of the standard component interface, the mobile component integration framework is used for acquiring the implementation class of the standard component interface until traversal is finished.
14. The apparatus of claim 9, wherein the target function is displaying a menu view, and the implementation class is an implementation class of a standard component menu interface;
the mobile component integration framework is used for traversing the implementation class of the standard component menu interface and transmitting menu information to the implementation class of the standard component menu interface;
the implementation class of the standard component menu interface is used for receiving the menu information and determining whether the current service component is a target service component or not according to the menu information;
for each business component, returning a menu view to the mobile component integration framework when the implementation class of the standard component menu interface determines that the business component is the target business component.
15. The apparatus of claim 9, wherein the target function is displaying a list of setup items, and the implementation class is an implementation class of a standard component setup item interface;
the mobile component integration framework is used for traversing the implementation class of the standard component setting item interface and transmitting component information to the implementation class of the standard component setting item interface;
the implementation class of the standard component setting item interface is used for receiving the component information and determining whether the current service component is a target service component or not according to the component information;
for each business component, when the implementation class of the standard component setting item interface determines that the business component is the target business component, returning a setting item list to the mobile component integration framework.
16. The apparatus of claim 14 or 15, further comprising:
for each business component, returning a negative response to the mobile component integration framework when the business component is not the target business component, the negative response indicating that the business component is not the target business component.
17. A terminal, characterized in that the terminal comprises:
at least one processor; and
at least one memory;
the at least one memory stores one or more programs configured for execution by the at least one processor, the one or more programs including instructions for performing the method of business component invocation of any of claims 1-8.
18. A computer-readable storage medium, applied to the terminal, having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, which are loaded and executed by a processor to implement the steps in the service component invocation method according to any one of claims 1-8.
CN201910122130.5A 2019-02-19 2019-02-19 Method, device, terminal and storage medium for calling service components Active CN111580892B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910122130.5A CN111580892B (en) 2019-02-19 2019-02-19 Method, device, terminal and storage medium for calling service components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910122130.5A CN111580892B (en) 2019-02-19 2019-02-19 Method, device, terminal and storage medium for calling service components

Publications (2)

Publication Number Publication Date
CN111580892A true CN111580892A (en) 2020-08-25
CN111580892B CN111580892B (en) 2023-09-19

Family

ID=72126019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910122130.5A Active CN111580892B (en) 2019-02-19 2019-02-19 Method, device, terminal and storage medium for calling service components

Country Status (1)

Country Link
CN (1) CN111580892B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559218A (en) * 2020-12-22 2021-03-26 北京自如信息科技有限公司 Service center bus assembly, service assembly registration method and calling method
CN114443130A (en) * 2020-11-06 2022-05-06 北京金山云网络技术有限公司 An application program porting method, device, device and storage medium
WO2024093409A1 (en) * 2022-11-02 2024-05-10 Tcl移动通信科技(宁波)有限公司 Service component calling method and apparatus, and computer device and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001331A (en) * 2006-01-09 2007-07-18 三星电子株式会社 Broadcast receiving device supplying non standard functions and method thereof
CN101729514A (en) * 2008-10-23 2010-06-09 华为技术有限公司 Method, device and system for implementing service call
CN102681854A (en) * 2012-05-18 2012-09-19 华为技术有限公司 Service execution method, server and computer system
CN103645919A (en) * 2013-12-18 2014-03-19 用友软件股份有限公司 Method for extending functions of management information system through plugins
US20150040099A1 (en) * 2013-07-31 2015-02-05 Sap Ag Extensible applications using a mobile application framework
CN104424002A (en) * 2013-09-10 2015-03-18 中国科学院声学研究所 Dynamic component loading method and system based on plug-in mechanism
CN104572054A (en) * 2013-10-22 2015-04-29 中国移动通信集团公司 Capability calling method and capability calling equipment
US20150261525A1 (en) * 2014-03-11 2015-09-17 Blue Wolf Group, LLC Analyzing components related to a software application in a software development environment
CN106406911A (en) * 2016-10-26 2017-02-15 国云科技股份有限公司 A Method for Functional Componentization of Computer Software System
CN107015873A (en) * 2017-01-23 2017-08-04 阿里巴巴集团控股有限公司 Call method, component interface device, electronic equipment and the App of App functional module
CN107798617A (en) * 2017-04-07 2018-03-13 平安科技(深圳)有限公司 Insurance business treating method and apparatus
CN107943484A (en) * 2017-11-30 2018-04-20 广州酷狗计算机科技有限公司 The method and apparatus for performing business function
CN108255545A (en) * 2016-12-28 2018-07-06 阿里巴巴集团控股有限公司 The funcall method, apparatus of inter-module and component based architecture system
CN108419089A (en) * 2018-02-08 2018-08-17 广州虎牙信息科技有限公司 Module data processing method, device, equipment and storage medium
CN108958730A (en) * 2017-08-23 2018-12-07 北京五八信息技术有限公司 Application component sharing method and device, terminal device and readable storage medium storing program for executing

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001331A (en) * 2006-01-09 2007-07-18 三星电子株式会社 Broadcast receiving device supplying non standard functions and method thereof
CN101729514A (en) * 2008-10-23 2010-06-09 华为技术有限公司 Method, device and system for implementing service call
CN102681854A (en) * 2012-05-18 2012-09-19 华为技术有限公司 Service execution method, server and computer system
US20150040099A1 (en) * 2013-07-31 2015-02-05 Sap Ag Extensible applications using a mobile application framework
CN104424002A (en) * 2013-09-10 2015-03-18 中国科学院声学研究所 Dynamic component loading method and system based on plug-in mechanism
CN104572054A (en) * 2013-10-22 2015-04-29 中国移动通信集团公司 Capability calling method and capability calling equipment
CN103645919A (en) * 2013-12-18 2014-03-19 用友软件股份有限公司 Method for extending functions of management information system through plugins
US20150261525A1 (en) * 2014-03-11 2015-09-17 Blue Wolf Group, LLC Analyzing components related to a software application in a software development environment
CN106406911A (en) * 2016-10-26 2017-02-15 国云科技股份有限公司 A Method for Functional Componentization of Computer Software System
CN108255545A (en) * 2016-12-28 2018-07-06 阿里巴巴集团控股有限公司 The funcall method, apparatus of inter-module and component based architecture system
CN107015873A (en) * 2017-01-23 2017-08-04 阿里巴巴集团控股有限公司 Call method, component interface device, electronic equipment and the App of App functional module
CN107798617A (en) * 2017-04-07 2018-03-13 平安科技(深圳)有限公司 Insurance business treating method and apparatus
CN108958730A (en) * 2017-08-23 2018-12-07 北京五八信息技术有限公司 Application component sharing method and device, terminal device and readable storage medium storing program for executing
CN107943484A (en) * 2017-11-30 2018-04-20 广州酷狗计算机科技有限公司 The method and apparatus for performing business function
CN108419089A (en) * 2018-02-08 2018-08-17 广州虎牙信息科技有限公司 Module data processing method, device, equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443130A (en) * 2020-11-06 2022-05-06 北京金山云网络技术有限公司 An application program porting method, device, device and storage medium
CN114443130B (en) * 2020-11-06 2025-02-25 北京金山云网络技术有限公司 Application program transplantation method, device, equipment and storage medium
CN112559218A (en) * 2020-12-22 2021-03-26 北京自如信息科技有限公司 Service center bus assembly, service assembly registration method and calling method
WO2024093409A1 (en) * 2022-11-02 2024-05-10 Tcl移动通信科技(宁波)有限公司 Service component calling method and apparatus, and computer device and storage medium

Also Published As

Publication number Publication date
CN111580892B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN107885533B (en) Method and device for managing component codes
CN110308956B (en) Application interface display method and device and mobile terminal
CN108132790B (en) Method, apparatus and computer storage medium for detecting a garbage code
CN110659127A (en) Method, device and system for processing task
CN108717365B (en) Method and device for executing function in application program
CN111159604A (en) Picture resource loading method and device
CN111866140A (en) Fusion management apparatus, management system, service calling method, and medium
CN113051015A (en) Page rendering method and device, electronic equipment and storage medium
CN111897465B (en) Popup display method, device, equipment and storage medium
CN111580892B (en) Method, device, terminal and storage medium for calling service components
CN111400002B (en) Application process and processor core binding method and terminal
CN111881423A (en) Method, device and system for limiting function use authorization
CN109783176B (en) Page switching method and device
CN110597801B (en) Database system and establishing method and device thereof
CN111694521B (en) Method, device and system for storing file
CN111064657B (en) Method, device and system for grouping concerned accounts
CN110569064B (en) Interface identifier generation method, device, equipment and storage medium
CN112612539A (en) Data model unloading method and device, electronic equipment and storage medium
CN112181915A (en) Method, device, terminal and storage medium for executing service
CN111008083A (en) Page communication method and device, electronic equipment and storage medium
CN109101158A (en) Import the method, apparatus and storage medium of list of songs
CN112597417B (en) Page updating method and device, electronic equipment and storage medium
CN111641853B (en) Multimedia resource loading method and device, computer equipment and storage medium
CN110851435B (en) Data storage method and device
CN110471613B (en) Data storage method, data reading method, device and system

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