CN106815037B - Application function execution method and device - Google Patents
Application function execution method and device Download PDFInfo
- Publication number
- CN106815037B CN106815037B CN201510864277.3A CN201510864277A CN106815037B CN 106815037 B CN106815037 B CN 106815037B CN 201510864277 A CN201510864277 A CN 201510864277A CN 106815037 B CN106815037 B CN 106815037B
- Authority
- CN
- China
- Prior art keywords
- application
- function
- client
- application client
- webpage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44568—Immediately runnable code
- G06F9/44573—Execute-in-place [XIP]
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses an execution method and device of an application function, wherein the method comprises the steps that an application client side obtains a webpage access request, the webpage access request comprises a uniform resource locator UR L address of a webpage to be accessed, the application client side judges whether a UR L address comprises a preset function calling parameter or not, and if the UR L address comprises the preset function calling parameter, the application client side executes an application function corresponding to the function calling parameter in the application client side.
Description
Technical Field
The invention relates to the field of computers, in particular to an application function execution method and device.
Background
Nowadays, Application clients (apps) on many terminals often load some web pages displayed in operation activities or web pages with specific functions, so that User Interface (UI) contents are richer and more diversified.
However, when the App function in the web page is updated, a web page producer often needs to redesign the UI interface of the web page and also needs to remake the App installation package corresponding to the UI interface. Therefore, a large amount of extra codes need to be introduced during design, so that the webpage volume is obviously increased, the development difficulty is increased, the development period is prolonged, and the like. Further, when a user wants to call and execute an App function in a webpage through the webpage loaded in the App of the application client, the user needs to perform multiple system interactions through JavaScript codes embedded in the webpage to execute a large number of additional codes to call the App function to be executed. Therefore, not only is the complexity of the operation for executing the App function increased, but also the execution efficiency of the App function is greatly influenced.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides an application function execution method and device, and aims to at least solve the technical problem of low execution efficiency caused by the fact that an application installation package needs to be re-made when an application function is executed.
According to one aspect of the embodiment of the invention, an application function execution method is provided, and includes the steps that an application client side obtains a webpage access request, the webpage access request comprises a uniform resource locator (uniform resource L adapter, UR L) address of a webpage to be accessed, the application client side judges whether the UR L address comprises a preset function calling parameter or not, and if the UR L address comprises the preset function calling parameter, the application client side executes an application function corresponding to the function calling parameter in the application client side.
According to another aspect of the embodiment of the invention, the device for executing the application function is applied to an application client, and comprises an obtaining unit, a judging unit and an executing unit, wherein the obtaining unit is used for obtaining a webpage access request, the webpage access request comprises a uniform resource locator UR L address of a webpage to be accessed, the judging unit is used for judging whether a UR L address comprises a predetermined function calling parameter, and the executing unit is used for executing the application function corresponding to the function calling parameter in the application client when the UR L address comprises the predetermined function calling parameter.
In the embodiment of the present invention, after an application client obtains a web page access request, where the web page access request includes a UR L address of a web page to be accessed, the application client determines whether to execute an application function corresponding to a predetermined function call parameter by determining whether the UR L address of the web page to be accessed included in the obtained web page access request includes the predetermined function call parameter, that is, by embedding the predetermined function call parameter in the UR L address of the web page access request, the application client directly calls the corresponding application function according to the predetermined function call parameter without performing a large amount of additional interactions, thereby simplifying an operation of executing the application function, saving execution time, and further achieving an effect of improving efficiency of executing the application function, so as to overcome a problem of low execution efficiency caused by a need to make an application installation package again when executing the application function in the prior art.
Furthermore, the application client judges whether to execute the corresponding application function by identifying the preset function calling parameter in the UR L address, so that the complex development design of the webpage and the application function package is not needed, thereby achieving the effect of shortening the development period, and simultaneously realizing the improvement of the flexibility of executing the application function without designing the corresponding fixed execution code for different webpages.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of an application scenario of an optional method for executing an application function according to an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative method of executing application functions in accordance with embodiments of the present invention;
FIG. 3 is a schematic diagram of an alternative method of executing application functions in accordance with embodiments of the present invention;
FIG. 4 is a schematic diagram of another alternative method of implementing application functionality in accordance with embodiments of the present invention;
FIG. 5 is a schematic diagram of yet another alternative method of implementing application functionality in accordance with embodiments of the present invention;
FIG. 6 is a schematic diagram of yet another alternative method of executing application functions in accordance with embodiments of the present invention;
FIG. 7 is a schematic diagram of yet another alternative method of implementing application functionality in accordance with embodiments of the present invention;
FIG. 8 is a schematic diagram of yet another alternative method of implementing application functionality in accordance with embodiments of the present invention;
FIG. 9 is a schematic diagram of an alternative application function executing apparatus according to an embodiment of the present invention; and
fig. 10 is a schematic diagram of an optional application function executing terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, an embodiment of an execution method of an application function is provided, which may be but is not limited to be applied in an application scenario as shown in fig. 1, a terminal 102 acquires a web page to be accessed from a server 104 through a network 106 and loads the web page into an application client installed on the terminal 102, and then the application client acquires a web page access request for the web page to be accessed, and determines whether a Uniform Resource locator (UR L) address of the web page to be accessed requested by the web page access request includes a predetermined function call parameter, and if the UR L address includes the predetermined function call parameter, the application client executes an application function corresponding to the function call parameter in the application client.
According to an embodiment of the present invention, there is provided an execution method of an application function, as shown in fig. 2, the method including:
s202, an application client acquires a webpage access request, wherein the webpage access request comprises a uniform resource locator UR L address of a webpage to be accessed;
s204, the application client judges whether the UR L address comprises a preset function calling parameter;
s206, if the UR L address includes the predetermined function call parameter, the application client executes the application function corresponding to the function call parameter in the application client.
As shown in fig. 3, the application client is assumed to be a client of an application S, wherein a web page a is loaded and displayed in the client of the application S, a link-1 corresponding to a web page a to be accessed is set in the web page a, after the client of the application S obtains a web page access request of the web page a to be accessed, whether a Uniform Resource locator (Uniform Resource L atom, UR L) address included in the web page access request includes a predetermined function call parameter is determined, when the UR L address includes the predetermined function call parameter, an application function corresponding to the function call parameter in the application client is executed, which is assumed to be App-1.
It should be noted that, in this embodiment, whether to execute an application function corresponding to a predetermined function call parameter is determined by determining whether the UR L address of the to-be-accessed web page included in the web page access request acquired by the application client includes the predetermined function call parameter, that is, by embedding the predetermined function call parameter in the UR L address of the web page access request, it is implemented to directly execute the corresponding application function according to the predetermined function call parameter without executing a large amount of additional interactions, thereby simplifying the operation of executing the application function, saving the execution time, and further achieving the effect of improving the efficiency of executing the application function.
For example, the predetermined function call parameter is "RedGame", and the predetermined function call parameter is "Share _0_0 _" + content + "+ link". then, the UR L address may only include the predetermined function call parameter as "RedGame", or may include the predetermined function call parameter and a corresponding parameter value, such as "RedGame _0_0 _" + content + "+ link". this embodiment is not limited in any way.
For example, after the application client determines that the UR L address includes the predetermined function call parameter, the application client may execute the corresponding operation according to the parameter value of the predetermined function call parameter acquired from the function of the application function when executing the corresponding application function.
Optionally, in this embodiment, before the application client obtains the web page access request, the method further includes: the application client loads and displays the webpage to be displayed on the application client through the system component, wherein the system component is a component used for loading the webpage in a system running on a terminal where the application client is located.
It should be noted that, the application client may load, but is not limited to, one or more to-be-presented web pages, where the to-be-presented web pages include a to-be-accessed web page. For example, as shown in fig. 4, still taking the client of the application S as an example, after the terminal where the client of the application S is located obtains the web page to be displayed from the server, the web page to be displayed is loaded and displayed on the application client through the system component. For example, as shown in fig. 4, the web pages to be displayed include a web page a and a web page B, where the web page a is provided with a link-1 corresponding to a web page a to be accessed, the web page B is provided with a link-2 corresponding to a web page B to be accessed, and the web page B is further provided with a link-3 corresponding to a web page c to be accessed.
Optionally, in this embodiment, the obtaining, by the application client, the web page access request includes: the application client side obtains a webpage access request generated in response to click operation of a link in a webpage to be displayed.
For example, as shown in fig. 4, the application client loads and displays the to-be-displayed web pages, such as the web page a and the web page B, and then the application client obtains a web page access request generated by a click operation performed on the to-be-accessed web page a in the to-be-displayed web page corresponding to the "link-1", where the web page access request carries the UR L address of the to-be-accessed web page (i.e., the web page a).
Optionally, in this embodiment, the application function executed by the application client and corresponding to the predetermined function call parameter may include, but is not limited to: and the application function preset in the application client. That is, the application client may execute the preset application function through the predetermined function call parameter, and this way separates the web page from the application function and separately establishes the corresponding relation required for execution, which not only improves the flexibility of executing the application function through the web page loaded on the application client, but also reduces the operation complexity of web page making, does not need to make an application function package for the web page again, and simplifies the step of calling the application function through the web page, thereby achieving the purpose of improving the efficiency of executing the application function.
Optionally, in this embodiment, the application client executing the application function corresponding to the function call parameter in the application client may include, but is not limited to, at least one of the following: the application client calls other application clients indicated by the application function to execute the operation indicated by the application function; and executing the operation indicated by the application function in the application client.
Specifically, the following example is combined to explain, various controls are set in a to-be-displayed web page, wherein the controls include a link for accessing the to-be-accessed web page, and an application client jumps to a UR L address corresponding to the to-be-accessed web page after acquiring a web page access request formed by clicking the link by a user, wherein when designing the web page, a predetermined function calling parameter (for example, a special character or field encoded by using base 64) agreed with the client is added to a Query sub-entry in the UR L address, that is, a customized WebView component can be thrown to a UR L decoder, so as to implement execution of an application function corresponding to the function calling parameter.
According to the embodiment provided by the application, after the application client acquires the webpage access request, wherein the webpage access request comprises the UR L address of the webpage to be accessed, the application client determines whether to execute the application function corresponding to the predetermined function call parameter by judging whether the UR L address of the webpage to be accessed, which is included in the acquired webpage access request, comprises the predetermined function call parameter, that is, the application client directly executes the corresponding application function according to the predetermined function call parameter without executing a large amount of extra interaction by embedding the predetermined function call parameter in the UR L address of the webpage access request, so that the operation of executing the application function is simplified, the execution time is saved, the efficiency of executing the application function is improved, and the problem of low execution efficiency caused by the need of re-making an application installation package when the application function is executed in the prior art is solved.
As an alternative to this, it is possible to,
s1, before the application client obtains the web page access request, further includes: the method comprises the steps that an application client loads and displays a webpage to be displayed on the application client through a system component, wherein the system component is a component for loading the webpage in a system running on a terminal where the application client is located;
s2, the acquiring, by the application client, the web page access request includes: s22, the application client acquires the webpage access request generated by the click operation of the link in the webpage to be displayed.
Specifically, the UR L address requested by the application client is transferred to the WebView component, and the WebView component can throw the acquired UR L address to the upper-layer logic side.
Optionally, in this embodiment, the links in the webpage to be displayed may be, but are not limited to: for accessing a link to a web page to be accessed. For example, as shown in "link-1" in fig. 3, after the application client obtains the click operation performed on "link-1" in the web page a to be displayed, a web page access request of the web page a to be accessed corresponding to "link-1" is generated.
According to the embodiment provided by the application, the application client loads and displays the webpage to be displayed on the application client through the system component, and generates the webpage access request carrying the UR L address of the webpage to be accessed in response to the click operation of the link in the webpage to be displayed, so that the corresponding application function is directly selected and executed from the preset application functions through the link on the webpage.
As an optional scheme, the executing, by the application client, the application function corresponding to the function call parameter in the application client includes:
and S1, the application client executes the application function corresponding to the preset function calling parameter from the preset application functions in the application client, wherein part or all of the preset application functions are not provided with corresponding links on the display interface of the application client.
Optionally, in this embodiment, the application client may store one or more preset application functions, and after acquiring the web page access request, the application client may select a corresponding application function from the preset application functions to execute according to a predetermined function call parameter included in the UR L address in the web page access request.
Optionally, in this embodiment, a part or all of the links corresponding to the preset application functions may be set on the display interface of the application client, but not limited to. That is to say, a preset link of the application function may be hidden and displayed, for example, as shown in fig. 5, a link "to share" for accessing the web page a to be accessed is set on the web page a in the web page to be displayed, and after the link is clicked, a selection box as shown in fig. 5 is displayed, where client identifiers of the sharing application clients that execute the sharing function, such as App-1 to App-4, are displayed in the selection box, and after the selected client identifiers are obtained, the web page to be accessed of the sharing application client corresponding to the client identifiers is skipped to execute the sharing function.
According to the embodiment provided by the application, the application function corresponding to the preset function calling parameter is selected from the application functions preset in the application client to be executed, so that the separation of the webpage and the application function is realized, the webpage development operation is simplified, an extra large amount of codes are not required to be designed, the step of executing the application function is simplified, and the efficiency of executing the application function is improved.
As an optional scheme, before the application client obtains the web page access request, the method further includes:
s1, the application client sets a corresponding relationship between the preset application function and the preset function call parameter, where the preset function call parameter includes: and the preset function calling parameters correspond to one or more preset function calling parameters.
It should be noted that, in this embodiment, before the application client obtains the web page access request, the corresponding relationship between the application function and the function call parameter may be preset. The application function with the preset setting may have a corresponding relationship with one or more preset function call parameters, or may have a corresponding relationship with one preset function call parameter.
For example, the callable parameter "RedGame" may be set to establish a correspondence with the application function a, or the function call parameter "RedGame & BlueGame" may be set to establish a correspondence with the application function a.
Through the embodiment provided by the application, the application client side can call and execute the corresponding application function in time after acquiring the webpage access request by setting the corresponding relation between the preset application function and the preset function calling parameter, so that the efficiency of executing the application function is further ensured.
As an optional scheme, the executing, by the application client, the application function corresponding to the function call parameter in the application client includes:
s1, the application client calls other application clients indicated by the application function to execute the operation indicated by the application function; and/or
S2, the application client performs the operation indicated by the application function.
Specifically, as described with reference to fig. 6(a) - (b), the application function that the client of the application S calls the other application clients to execute is a "sharing function", and assuming that the further selected client identifier is App-3, where the application corresponding to the client identifier App-3 is an application P, when the "sharing function" is executed, the current client of the application S is skipped to the client of the application P, so as to execute the sharing operation indicated by the "sharing function".
Specifically, as described with reference to fig. 7(a) - (b), the application function executed by the client of the application S is the "comment function", and when the client of the application S executes the "comment function", the comment operation indicated by the "comment function" is executed in the client of the application S.
By the embodiment provided by the application, when the application client executes the corresponding application function, not only the operation indicated by the application function can be executed in the current application client, but also the operation indicated by the application function can be executed by other application clients indicated by the application function, so that the execution of the application function can be completed on a third-party client.
As an alternative, the operation of the application client for calling the application function indication by the application client to execute the application function indication includes:
and S1, the application client shares the parameters indicated by the application function with other application clients indicated by the application function.
It should be noted that, when a web page is embedded in an application client, the application client needs to interact with a WebViewClient component (i.e., corresponding Android. webkit. WebViewClient in the Android system, and corresponding uiwebviewdelete in the iOS system) object in the terminal system, and as long as a key interface of the system, i.e., a necessary interface for the UR L to request is realized again, a UR L address obtained by the system is intercepted in the interface, and is handed to an upper logic layer through a callback function, so that analysis and execution of predefined logic can be started without introducing other modules.
Specifically, the following example is used for explanation, and it is assumed that the application function to be executed is a "shared function", where the UR L address including the function call parameter corresponding to the "shared function" is as follows:
var RedGame=“Share_0_0_”+content+“_”+link;
var url=
"http://peng.qq.com/cp/a20150527ttaxc/index.htm?RedGame="+RedGame+"&types=1";
wherein the content has been encoded via base 64.
After a webpage access request formed after clicking a link of a webpage to be accessed is acquired, a function calling parameter with the parameter name 'RedGame' is added to a Query sub-item of a UR L address of the webpage to be accessed, then the UR L address is transmitted to a WebView component of a system, after an interface is rewritten, the UR L address is intercepted by an application client and sent to a UR L decoder to execute corresponding logic, after the UR L decoder obtains the UR L address, whether the parameter 'RedGame' exists in the Query sub-item of the UR L is checked, if the parameter 'RedGame' exists, analysis decoding is started, and the corresponding logic is executed, and data brought by applying P 'RedGame' is shared as shown in FIGS. 6(a) - (b).
According to the embodiment provided by the application, the application client shares the parameters indicated by the application function to other application clients indicated by the application function, so that the efficient execution of the application function is realized directly by acquiring the function calling parameters corresponding to the application function.
As an optional scheme, after the application client executes an application function corresponding to the function call parameter in the application client, the method further includes:
s1, the application client keeps displaying the webpage to be displayed; or
S2, the application client closes the webpage to be displayed; or
S3, the application client jumps to the appointed webpage from the webpage to be displayed.
Optionally, in this embodiment, the skipping, by the application client, from the to-be-displayed webpage to the specified webpage includes: the application client displays information indicating the execution result of the application function.
The description is made with specific reference to the following examples: as an optional implementation manner, the client of the application S may keep displaying the web page to be displayed; as another alternative, taking the "comment function" shown in fig. 7 as an example, after the client of the application S executes the "comment function", the web page a in the web page to be presented displayed on the client of the application S may be directly closed; as still another alternative, as shown in fig. 8, it is possible to jump from the to-be-presented web page to the specified web page, for example, jump from the to-be-presented web page of the client of the application S to the specified web page, and display a push window on the specified web page, and display information of the execution result of the "comment function" in the push window, for example, display "comment successful".
By the embodiment provided by the application, after the application client executes the application function corresponding to the function calling parameter in the application client, the to-be-displayed webpage can be continuously displayed, or the to-be-displayed webpage is closed in time, or the specified webpage is jumped to, so that the normal operation of the application client is ensured, and the influence of the to-be-displayed webpage on the normal display of the application client is avoided.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to an embodiment of the present invention, there is also provided an apparatus for executing an application function, for implementing the method for executing an application function, as shown in fig. 9, where the apparatus is applied to an application client, and the apparatus includes:
1) an obtaining unit 902, configured to obtain a web page access request, where the web page access request includes a uniform resource locator UR L address of a web page to be accessed;
2) a judging unit 904, configured to judge whether a predetermined function call parameter is included in the UR L address;
3) an executing unit 906, configured to execute, when a predetermined function call parameter is included in the UR L address, an application function corresponding to the function call parameter in the application client.
As shown in fig. 3, the application client is assumed to be a client of an application S, wherein a web page a is loaded and displayed in the client of the application S, a link-1 corresponding to a web page a to be accessed is set in the web page a, after the client of the application S obtains a web page access request of the web page a to be accessed, whether a Uniform Resource locator (Uniform Resource L atom, UR L) address included in the web page access request includes a predetermined function call parameter is determined, when the UR L address includes the predetermined function call parameter, an application function corresponding to the function call parameter in the application client is executed, which is assumed to be App-1.
It should be noted that, in this embodiment, whether to execute an application function corresponding to a predetermined function call parameter is determined by determining whether the UR L address of the to-be-accessed web page included in the web page access request acquired by the application client includes the predetermined function call parameter, that is, by embedding the predetermined function call parameter in the UR L address of the web page access request, it is implemented to directly execute the corresponding application function according to the predetermined function call parameter without executing a large amount of additional interactions, thereby simplifying the operation of executing the application function, saving the execution time, and further achieving the effect of improving the efficiency of executing the application function.
For example, the predetermined function call parameter is "RedGame", and the predetermined function call parameter is "Share _0_0 _" + content + "+ link". then, the UR L address may only include the predetermined function call parameter as "RedGame", or may include the predetermined function call parameter and a corresponding parameter value, such as "RedGame _0_0 _" + content + "+ link". this embodiment is not limited in any way.
For example, after the application client determines that the UR L address includes the predetermined function call parameter, the application client may execute the corresponding operation according to the parameter value of the predetermined function call parameter acquired from the function of the application function when executing the corresponding application function.
Optionally, in this embodiment, before the application client obtains the web page access request, the method further includes: the application client loads and displays the webpage to be displayed on the application client through the system component, wherein the system component is a component used for loading the webpage in a system running on a terminal where the application client is located.
It should be noted that, the application client may load, but is not limited to, one or more to-be-presented web pages, where the to-be-presented web pages include a to-be-accessed web page. For example, as shown in fig. 4, still taking the client of the application S as an example, after the terminal where the client of the application S is located obtains the web page to be displayed from the server, the web page to be displayed is loaded and displayed on the application client through the system component. For example, as shown in fig. 4, the web pages to be displayed include a web page a and a web page B, where the web page a is provided with a link-1 corresponding to a web page a to be accessed, the web page B is provided with a link-2 corresponding to a web page B to be accessed, and the web page B is further provided with a link-3 corresponding to a web page c to be accessed.
Optionally, in this embodiment, the obtaining, by the application client, the web page access request includes: the application client side obtains a webpage access request generated in response to click operation of a link in a webpage to be displayed.
For example, as shown in fig. 4, the application client loads and displays the to-be-displayed web pages, such as the web page a and the web page B, and then the application client obtains a web page access request generated by a click operation performed on the to-be-accessed web page a in the to-be-displayed web page corresponding to the "link-1", where the web page access request carries the UR L address of the to-be-accessed web page (i.e., the web page a).
Optionally, in this embodiment, the application function executed by the application client and corresponding to the predetermined function call parameter may include, but is not limited to: and the application function preset in the application client. That is, the application client may execute the preset application function through the predetermined function call parameter, and this way separates the web page from the application function and separately establishes the corresponding relation required for execution, which not only improves the flexibility of executing the application function through the web page loaded on the application client, but also reduces the operation complexity of web page making, does not need to make an application function package for the web page again, and simplifies the step of calling the application function through the web page, thereby achieving the purpose of improving the efficiency of executing the application function.
Optionally, in this embodiment, the application client executing the application function corresponding to the function call parameter in the application client may include, but is not limited to, at least one of the following: the application client calls other application clients indicated by the application function to execute the operation indicated by the application function; and executing the operation indicated by the application function in the application client.
Specifically, the following example is combined to explain, various controls are set in a to-be-displayed web page, wherein the controls include a link for accessing the to-be-accessed web page, and an application client jumps to a UR L address corresponding to the to-be-accessed web page after acquiring a web page access request formed by clicking the link by a user, wherein when designing the web page, a predetermined function calling parameter (for example, a special character or field encoded by using base 64) agreed with the client is added to a Query sub-entry in the UR L address, that is, a customized WebView component can be thrown to a UR L decoder, so as to implement execution of an application function corresponding to the function calling parameter.
According to the embodiment provided by the application, after the application client acquires the webpage access request, wherein the webpage access request comprises the UR L address of the webpage to be accessed, the application client determines whether to execute the application function corresponding to the predetermined function call parameter by judging whether the UR L address of the webpage to be accessed, which is included in the acquired webpage access request, comprises the predetermined function call parameter, that is, the application client directly executes the corresponding application function according to the predetermined function call parameter without executing a large amount of extra interaction by embedding the predetermined function call parameter in the UR L address of the webpage access request, so that the operation of executing the application function is simplified, the execution time is saved, the efficiency of executing the application function is improved, and the problem of low execution efficiency caused by the need of re-making an application installation package when the application function is executed in the prior art is solved.
As an alternative to this, it is possible to,
the above-mentioned device still includes: 1) the system comprises a loading unit, a display unit and a display unit, wherein the loading unit is used for loading and displaying a webpage to be displayed on an application client through a system component before acquiring a webpage access request, and the system component is a component for loading the webpage in a system running on a terminal where the application client is located;
the above-mentioned acquisition unit includes: (1) the acquisition module is used for acquiring a webpage access request generated by responding to click operation of a link in a webpage to be displayed.
Specifically, the UR L address requested by the application client is transferred to the WebView component, and the WebView component can throw the acquired UR L address to the upper-layer logic side.
Optionally, in this embodiment, the links in the webpage to be displayed may be, but are not limited to: for accessing a link to a web page to be accessed. For example, as shown in "link-1" in fig. 3, after the application client obtains the click operation performed on "link-1" in the web page a to be displayed, a web page access request of the web page a to be accessed corresponding to "link-1" is generated.
According to the embodiment provided by the application, the application client loads and displays the webpage to be displayed on the application client through the system component, and generates the webpage access request carrying the UR L address of the webpage to be accessed in response to the click operation of the link in the webpage to be displayed, so that the corresponding application function is directly selected and executed from the preset application functions through the link on the webpage.
As an alternative, the execution unit 906 includes:
1) the first execution module is used for executing the application function corresponding to the preset function calling parameter from the preset application functions in the application client, wherein part or all of the preset application functions are not provided with corresponding links on the display interface of the application client.
Optionally, in this embodiment, the application client may store one or more preset application functions, and after acquiring the web page access request, the application client may select a corresponding application function from the preset application functions to execute according to a predetermined function call parameter included in the UR L address in the web page access request.
Optionally, in this embodiment, a part or all of the links corresponding to the preset application functions may be set on the display interface of the application client, but not limited to. That is to say, a preset link of the application function may be hidden and displayed, for example, as shown in fig. 5, a link "to share" for accessing the web page a to be accessed is set on the web page a in the web page to be displayed, and after the link is clicked, a selection box as shown in fig. 5 is displayed, wherein client identifiers of the sharing application clients executing the sharing function, such as App-1 to App-4, are displayed in the selection box, and after the selected client identifiers are obtained, the web page to be accessed of the sharing application client corresponding to the client identifiers is skipped to execute the sharing function.
According to the embodiment provided by the application, the application function corresponding to the preset function calling parameter is selected from the application functions preset in the application client to be executed, so that the separation of the webpage and the application function is realized, the webpage development operation is simplified, an extra large amount of codes are not required to be designed, the step of executing the application function is simplified, and the efficiency of executing the application function is improved.
As an optional scheme, the method further comprises the following steps:
1) the device comprises a setting unit and a processing unit, wherein the setting unit is used for setting the corresponding relation between the preset application function and the preset function calling parameter before acquiring the webpage access request, and the preset function calling parameter comprises: and the preset function calling parameters correspond to one or more preset function calling parameters.
It should be noted that, in this embodiment, before the application client obtains the web page access request, the corresponding relationship between the application function and the function call parameter may be preset. The application function with the preset setting may have a corresponding relationship with one or more preset function call parameters, or may have a corresponding relationship with one preset function call parameter.
For example, the callable parameter "RedGame" may be set to establish a correspondence with the application function a, or the function call parameter "RedGame & BlueGame" may be set to establish a correspondence with the application function a.
Through the embodiment provided by the application, the application client side can call and execute the corresponding application function in time after acquiring the webpage access request by setting the corresponding relation between the preset application function and the preset function calling parameter, so that the efficiency of executing the application function is further ensured.
As an alternative, the execution unit 906 includes:
1) the second execution module is used for calling other application clients indicated by the application function to execute the operation indicated by the application function; and/or
2) And the third execution module is used for executing the operation indicated by the application function.
Specifically, as described with reference to fig. 6(a) - (b), the application function that the client of the application S calls the other application clients to execute is a "sharing function", and assuming that the further selected client identifier is App-3, where the application corresponding to the client identifier App-3 is an application P, when the "sharing function" is executed, the current client of the application S is skipped to the client of the application P, so as to execute the sharing operation indicated by the "sharing function".
Specifically, as described with reference to fig. 7(a) - (b), the application function executed by the client of the application S is the "comment function", and when the client of the application S executes the "comment function", the comment operation indicated by the "comment function" is executed in the client of the application S.
By the embodiment provided by the application, when the application client executes the corresponding application function, not only the operation indicated by the application function can be executed in the current application client, but also the operation indicated by the application function can be executed by other application clients indicated by the application function, so that the execution of the application function can be completed on a third-party client.
As an optional solution, the second execution module includes:
1) and the sharing submodule is used for sharing the parameters indicated by the application functions to other application clients indicated by the application functions.
It should be noted that, when a web page is embedded in an application client, the application client needs to interact with a WebViewClient component (i.e., corresponding Android. webkit. WebViewClient in the Android system, and corresponding uiwebviewdelete in the iOS system) object in the terminal system, and as long as a key interface of the system, i.e., a necessary interface for the UR L to request is realized again, a UR L address obtained by the system is intercepted in the interface, and is handed to an upper logic layer through a callback function, so that analysis and execution of predefined logic can be started without introducing other modules.
Specifically, the following example is used for explanation, and it is assumed that the application function to be executed is a "shared function", where the UR L address including the function call parameter corresponding to the "shared function" is as follows:
var RedGame=“Share_0_0_”+content+“_”+link;
var url=
"http://peng.qq.com/cp/a20150527ttaxc/index.htm?RedGame="+RedGame+"&types=1";
wherein the content has been encoded via base 64.
After a webpage access request formed after clicking a link of a webpage to be accessed is acquired, a function calling parameter with the parameter name 'RedGame' is added to a Query sub-item of a UR L address of the webpage to be accessed, then the UR L address is transmitted to a WebView component of a system, after an interface is rewritten, the UR L address is intercepted by an application client and sent to a UR L decoder to execute corresponding logic, after the UR L decoder obtains the UR L address, whether the parameter 'RedGame' exists in the Query sub-item of the UR L is checked, if the parameter 'RedGame' exists, analysis decoding is started, and the corresponding logic is executed, and data brought by applying P 'RedGame' is shared as shown in FIGS. 6(a) - (b).
According to the embodiment provided by the application, the application client shares the parameters indicated by the application function to other application clients indicated by the application function, so that the efficient execution of the application function is realized directly by acquiring the function calling parameters corresponding to the application function.
As an optional scheme, the method further comprises the following steps:
1) the first display unit is used for keeping displaying the webpage to be displayed after executing the application function corresponding to the function calling parameter in the application client; or
2) The closing unit is used for closing the webpage to be displayed after executing the application function corresponding to the function calling parameter in the application client; or
3) And the second display unit is used for jumping from the webpage to be displayed to a specified webpage after executing the application function corresponding to the function calling parameter in the application client.
Optionally, in this embodiment, the second display unit includes: and the display module is used for displaying information used for indicating the execution result of the application function.
The description is made with specific reference to the following examples: as an optional implementation manner, the client of the application S may keep displaying the web page to be displayed; as another alternative, taking the "comment function" shown in fig. 7 as an example, after the client of the application S executes the "comment function", the web page a in the web page to be presented displayed on the client of the application S may be directly closed; as still another alternative, as shown in fig. 8, it is possible to jump from the to-be-presented web page to the specified web page, for example, jump from the to-be-presented web page of the client of the application S to the specified web page, and display a push window on the specified web page, and display information of the execution result of the "comment function" in the push window, for example, display "comment successful".
By the embodiment provided by the application, after the application client executes the application function corresponding to the function calling parameter in the application client, the to-be-displayed webpage can be continuously displayed, or the to-be-displayed webpage is closed in time, or the specified webpage is jumped to, so that the normal operation of the application client is ensured, and the influence of the to-be-displayed webpage on the normal display of the application client is avoided.
Example 3
According to an embodiment of the present invention, there is also provided an application function execution terminal for implementing the application function execution method, as shown in fig. 10, the terminal including:
1) the communication interface 1002 is configured to obtain a web page access request, where the web page access request includes a uniform resource locator UR L address of a web page to be accessed;
2) a memory 1004 connected to the communication interface 1002 and configured to store the UR L address of the web page to be accessed;
2) and the processor 1006 is connected with the communication interface 1002 and the memory 1004, and is configured to judge whether the UR L address includes a predetermined function call parameter, and is further configured to execute an application function corresponding to the function call parameter in the application client when the UR L address includes the predetermined function call parameter.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
Example 4
The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, acquiring a webpage access request, wherein the webpage access request comprises a uniform resource locator UR L address of a webpage to be accessed;
s2, judging whether the UR L address includes the preset function calling parameter;
and S3, if the UR L address includes the preset function calling parameter, executing the application function corresponding to the function calling parameter in the application client.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (14)
1. An execution method of an application function, comprising:
an application client acquires a webpage access request for accessing an application function embedded in a webpage loaded in the application client, wherein the webpage access request comprises a uniform resource locator UR L address of the webpage to be accessed;
the application client judges whether the UR L address comprises a preset function calling parameter and a parameter value of the preset function calling parameter;
if the UR L address comprises the preset function calling parameter and the parameter value, the application client determines the application function corresponding to the function calling parameter in the application client and executes the operation corresponding to the parameter value in the application function, wherein the application function comprises various application functions under the system where the application client is located;
wherein the executing, by the application client, the application function corresponding to the function call parameter in the application client includes: the application client shares the parameters indicated by the application function to other application clients indicated by the application function, and calls the other application clients indicated by the application function to execute the operation indicated by the application function.
2. The method of claim 1,
before the application client obtains the webpage access request, the method further comprises the following steps: the application client loads and displays the webpage to be displayed on the application client through a system component, wherein the system component is a component for loading the webpage in a system running on a terminal where the application client is located;
the application client side acquiring the webpage access request comprises the following steps: the application client side obtains the webpage access request generated in response to click operation of the link in the webpage to be displayed.
3. The method of claim 1, wherein the executing, by the application client, the application function corresponding to the function call parameter in the application client comprises:
and the application client executes the application function corresponding to the preset function calling parameter from preset application functions in the application client, wherein part or all of the preset application functions are not provided with corresponding links on a display interface of the application client.
4. The method of claim 3, further comprising, before the application client obtains the web page access request:
the application client sets the corresponding relation between the preset application function and the preset function calling parameter, wherein the preset function calling parameter comprises: and one preset application function corresponds to one or more preset function calling parameters.
5. The method according to claim 2, further comprising, after the application client executes an application function corresponding to the function call parameter in the application client, the following steps:
the application client keeps displaying the webpage to be displayed; or
The application client closes the webpage to be displayed; or
And the application client jumps to a specified webpage from the webpage to be displayed.
6. The method of claim 5, wherein the application client jumping from the to-be-presented web page to a specified web page comprises:
the application client displays information indicating an execution result of the application function.
7. An apparatus for executing an application function, the apparatus being applied to an application client, wherein the apparatus comprises:
an obtaining unit, configured to obtain a web page access request for accessing an application function embedded in a web page loaded in the application client, where the web page access request includes an address of a uniform resource locator UR L of the web page to be accessed;
a determining unit, configured to determine whether the UR L address includes a predetermined function call parameter and a parameter value of the predetermined function call parameter;
an execution unit, configured to determine, when the UR L address includes the predetermined function call parameter and the parameter value, an application function corresponding to the function call parameter in the application client, and execute an operation corresponding to the parameter value in the application function, where the application function includes various application functions under a system where the application client is located;
wherein the execution unit includes: the second execution module is used for calling other application clients indicated by the application function to execute the operation indicated by the application function;
the second execution module includes: and the sharing submodule is used for sharing the parameters indicated by the application functions to other application clients indicated by the application functions.
8. The apparatus of claim 7,
the device further comprises: the system comprises a loading unit, a display unit and a display unit, wherein the loading unit is used for loading and displaying a webpage to be displayed on the application client through a system component before acquiring a webpage access request, and the system component is a component for loading the webpage in a system running on a terminal where the application client is located;
the acquisition unit includes: and the acquisition module is used for acquiring the webpage access request generated by responding to the click operation of the link in the webpage to be displayed.
9. The apparatus of claim 7, wherein the execution unit comprises:
and the first execution module is used for executing the application function corresponding to the preset function calling parameter from preset application functions in the application client, wherein part or all of the preset application functions are not provided with corresponding links on a display interface of the application client.
10. The apparatus of claim 9, further comprising:
a setting unit, configured to set a correspondence between the preset application function and a preset function call parameter before acquiring the web page access request, where the preset function call parameter includes: and one preset application function corresponds to one or more preset function calling parameters.
11. The apparatus of claim 8, further comprising:
the first display unit is used for keeping displaying the webpage to be displayed after executing the application function corresponding to the function calling parameter in the application client; or
A closing unit, configured to close the to-be-displayed web page after executing an application function corresponding to the function call parameter in the application client; or
And the second display unit is used for jumping from the webpage to be displayed to a specified webpage after executing the application function corresponding to the function calling parameter in the application client.
12. The apparatus of claim 11, wherein the second display unit comprises:
and the display module is used for displaying information used for indicating the execution result of the application function.
13. A storage medium readable by a computer, the storage medium storing a computer program, the computer program, when executed by a processor, implementing the method of any one of claims 1 to 6.
14. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, implements the method of any of claims 1 to 6.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510864277.3A CN106815037B (en) | 2015-11-30 | 2015-11-30 | Application function execution method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510864277.3A CN106815037B (en) | 2015-11-30 | 2015-11-30 | Application function execution method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106815037A CN106815037A (en) | 2017-06-09 |
| CN106815037B true CN106815037B (en) | 2020-08-04 |
Family
ID=59107210
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510864277.3A Active CN106815037B (en) | 2015-11-30 | 2015-11-30 | Application function execution method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106815037B (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109086143B (en) * | 2017-06-14 | 2022-02-08 | 北京小米移动软件有限公司 | Application interaction method and device |
| EP3627322A4 (en) * | 2017-06-14 | 2020-04-29 | Beijing Xiaomi Mobile Software Co., Ltd. | Application interaction method, interaction method and device |
| CN109327530B (en) * | 2018-10-31 | 2023-05-23 | 网易(杭州)网络有限公司 | Information processing method, device, electronic equipment and storage medium |
| CN112307378B (en) * | 2019-07-30 | 2024-03-01 | 上海幻电信息科技有限公司 | Network view display method |
| CN120579176A (en) * | 2020-08-21 | 2025-09-02 | 华为技术有限公司 | Resource access control method, terminal device and computer-readable storage medium |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7543238B2 (en) * | 2003-01-21 | 2009-06-02 | Microsoft Corporation | System and method for directly accessing functionality provided by an application |
| CN100492363C (en) * | 2006-12-06 | 2009-05-27 | 腾讯科技(深圳)有限公司 | Method and system for controlling game platform or chat platform by configuring hyperlink |
| CN101146119A (en) * | 2007-10-25 | 2008-03-19 | 珠海金山软件股份有限公司 | A device and method for browser-cross self-adapted call of local function |
| CN101150577B (en) * | 2007-11-02 | 2010-10-20 | 珠海金山软件有限公司 | A system and method for secure Internet local function call |
| CN103177040A (en) * | 2011-12-26 | 2013-06-26 | 腾讯科技(深圳)有限公司 | Method and device for calling function of webpage application |
| CN104219078B (en) * | 2013-06-04 | 2018-08-24 | 阿里巴巴集团控股有限公司 | A kind for the treatment of method and apparatus of more runtime environment data |
| CN103679476A (en) * | 2013-12-03 | 2014-03-26 | 大连大学 | Intelligent campus electronic commerce system based on WAMP framework and use method thereof |
-
2015
- 2015-11-30 CN CN201510864277.3A patent/CN106815037B/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| CN106815037A (en) | 2017-06-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110221872B (en) | Page jump method and device, electronic equipment and storage medium | |
| US11399090B2 (en) | Page control for history pages of browsed data | |
| CN107368487B (en) | Dynamic layout method, device and client for page components | |
| US9130932B2 (en) | Hybrid network application architecture | |
| CN106815037B (en) | Application function execution method and device | |
| CN110941779B (en) | Page loading method and device, storage medium and electronic equipment | |
| CN107291759B (en) | Method and device for processing browser page resources | |
| CN110708346A (en) | Information processing system and method | |
| US9858094B2 (en) | Monitoring and actuation of view controller parameters to reach deep states without manual developer intervention | |
| CN108319474B (en) | Page information generation method, device and equipment | |
| CN104111944A (en) | Page processing method and device and page generating method and device | |
| CN109672580A (en) | Full link monitoring method, apparatus, terminal device and storage medium | |
| CN108399119B (en) | Method and device for data processing and automatic testing of browsing service kernel engine | |
| CN109522500B (en) | Webpage display method, device, terminal and storage medium | |
| CN108038665B (en) | Business rule management method, device, equipment and computer readable storage medium | |
| CN106569856A (en) | Method and device of loading application view resource file | |
| CN107800611B (en) | Page switching method and page switching device | |
| CN112818270A (en) | Data cross-domain transfer method and device and computer equipment | |
| CN105956136B (en) | Method and device for acquiring login information | |
| CN112148395A (en) | Page display method, device, equipment and storage medium | |
| CN106681767B (en) | Light application adding method and device | |
| CN108509228B (en) | Page loading method, terminal equipment and computer readable storage medium | |
| CN106649581B (en) | Webpage repairing method and client | |
| CN105005596B (en) | page display method and device | |
| CN106126198B (en) | In the method and device of the mobile terminal load end PC application page |
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 |