[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN111930382B - Application page access method, device and equipment - Google Patents

Application page access method, device and equipment Download PDF

Info

Publication number
CN111930382B
CN111930382B CN202010993512.8A CN202010993512A CN111930382B CN 111930382 B CN111930382 B CN 111930382B CN 202010993512 A CN202010993512 A CN 202010993512A CN 111930382 B CN111930382 B CN 111930382B
Authority
CN
China
Prior art keywords
application
target function
functional
program package
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010993512.8A
Other languages
Chinese (zh)
Other versions
CN111930382A (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.)
Zhejiang Koubei Network Technology Co Ltd
Original Assignee
Zhejiang Koubei Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Koubei Network Technology Co Ltd filed Critical Zhejiang Koubei Network Technology Co Ltd
Priority to CN202010993512.8A priority Critical patent/CN111930382B/en
Publication of CN111930382A publication Critical patent/CN111930382A/en
Application granted granted Critical
Publication of CN111930382B publication Critical patent/CN111930382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses an application page access method, device and equipment, relates to the technical field of data processing, and can integrate a code product of a cross-application page into an original project file to improve the page loading speed of the cross-application access. The method comprises the following steps: responding to an acquisition instruction of a functional program package, and screening a target functional program package mapped with an application identifier from a data platform based on the application identifier carried by the acquisition instruction, wherein the data platform stores the functional program package which is generated by using a functional source code and is used for being embedded into different applications with different requirements; and embedding the target function program package into a project file of a required application corresponding to an application identifier, so that the required application is accessed into a target function page according to the target function program package in the project file.

Description

Application page access method, device and equipment
Technical Field
The present application relates to the field of data processing technologies, and in particular, to an access method, an access device, and an access device for an application page.
Background
With the development of internet technology, the popularization of intelligent terminals is large, and the transmission and interaction of information are more and more convenient. At present, in the APP application of a terminal, a developer divides applets in the application into a plurality of sub-packets, and the sub-packets are packaged into different sub-packets during construction, so that a plurality of sub-packets suitable for the application of the developer are integrated into each application, each sub-packet is specific to an application function, and a user can load the sub-packets as required during use, and when the application function is executed, the corresponding sub-packets are run to enter a page of the application function.
In the related art, pages of application functions are difficult to run across applications, and in order to enable a page of any application function to run in multiple applications, in the access process for different application pages, an h5 page is usually set, and an h5 page is embedded into a sub-package integrated by an application function program, or an h5 page is directly loaded from multiple applications. However, the loading of the h5 page mainly depends on the network, and especially in a weak network scenario, the loading speed of the h5 page is limited, so that the page loading speed of the cross-application access is slow, and the use experience of the application function is affected.
Disclosure of Invention
In view of this, the present application provides an access method, an access device, and an access device for an application page, and mainly aims to solve the problem that a page loading speed across application access is slow in the prior art.
According to a first aspect of the present application, there is provided an access method for an application page, the method including:
responding to an acquisition instruction of a functional program package, and screening a target functional program package mapped with an application identifier from a data platform based on the application identifier carried by the acquisition instruction, wherein the data platform stores the functional program package which is generated by using a functional source code and is used for being embedded into different applications with different requirements;
and embedding the target function program package into a project file of a required application corresponding to an application identifier, so that the required application is accessed into a target function page according to the target function program package in the project file.
In another embodiment of the present invention, the configuration information of a directory structure formed by function packages is recorded in the data platform, and the screening, based on the application identifier carried by the obtaining instruction, of the target function package mapped with the application identifier from the data platform specifically includes:
traversing configuration information of a directory structure formed by a functional program package in a matched data platform based on the application identifier carried by the acquisition instruction;
and if the application identification is matched with the application information defined by the configuration information, screening the target function program package mapped with the application identification from the data platform.
In another embodiment of the present invention, before the obtaining instruction responding to the functional program package, based on the application identifier carried by the obtaining instruction, querying a target functional program package mapped with the application identifier from a data platform, the method further includes:
receiving a target function source code;
and compiling the functional source code into a functional program package for embedding into different application requirements by utilizing a source code compiling tool.
In another embodiment of the present invention, the compiling the functional source code into a functional package for embedding into applications with different requirements by using a source code compiling tool specifically includes:
extracting a code logic framework from the functional source code by using a source code compiling tool, wherein the code logic framework comprises a plurality of functional modules provided by an application;
and respectively converting the functional source codes in the functional modules according to a code logic framework, and compiling the functional source codes into functional program packages for embedding into different application requirements.
In another embodiment of the present invention, the respectively performing a conversion process on the functional source codes in the functional modules according to a code logic framework, and compiling the functional source codes into functional packages for embedding into applications with different requirements specifically includes:
compiling functional source codes in a view layer into functional source codes for embedding into different application requirements by page attribute mapping and replacement aiming at functional modules provided by a page layer in a code logic framework;
compiling functional source codes in a logic layer into functional source codes for embedding into different application requirements by adapting an abstract syntax tree aiming at functional modules provided by the logic layer in a code logic framework;
aiming at a functional module provided by a view layer in a code logic framework, compiling functional source codes in the view layer into functional source codes for embedding into different application requirements through interface component mapping.
In another embodiment of the present invention, after the embedding the target function package into the project file of the requirement application corresponding to the application identifier, the method further includes:
responding to a calling instruction for adding a function instance to the function program package, and acquiring a target function instance matched with the function identifier from an existing project file based on the function identifier carried by the calling instruction;
and binding the function in the target function instance to a target function program package by calling the function in the target function instance.
According to a second aspect of the present application, an access method for an application page includes:
responding to the trigger operation of an option button bound with a target function program package, and generating and sending an acquisition instruction of the target function program package, wherein the acquisition instruction carries an application identifier;
and receiving a target function program package, and embedding the target function program package into the project file to form an application program package.
In another embodiment of the present invention, after the receiving the target function package and embedding the target function package into the project file to form an application package, the method further includes:
and responding to the triggering operation of displaying the target function page, providing loading link access by using the target function program package in the application program package, and displaying the target function page.
According to a third aspect of the present application, there is provided an access apparatus applied to an application page of a server, the apparatus including:
the screening unit is used for responding to an acquisition instruction of a functional program package, screening a target functional program package mapped with an application identifier from a data platform on the basis of the application identifier carried by the acquisition instruction, wherein the data platform stores the functional program package which is generated by using a functional source code and is used for being embedded into applications with different requirements;
and the embedding unit is used for embedding the target function program package into a project file of the demand application corresponding to the application identifier so that the demand application accesses a target function page according to the target function program package in the project file.
In another embodiment of the present invention, the data platform records configuration information of a directory structure formed by a function package, and the screening unit includes:
the matching module is used for traversing the configuration information of a directory structure formed by the functional program packages in the matching data platform based on the application identification carried by the acquisition instruction;
a screening module for screening the target function program package mapped with the application identification from the data platform if the application identification is matched with the application information defined by the configuration information
In another embodiment of the present invention, the apparatus further comprises:
a first receiving unit, configured to receive a target function source code before the obtaining instruction responding to the function package queries, based on an application identifier carried by the obtaining instruction, a target function package mapped with the application identifier from a data platform;
and the compiling unit is used for compiling the functional source code into a functional program package which is embedded into applications with different requirements by utilizing a source code compiling tool.
In another embodiment of the present invention, the compiling unit includes:
an extraction module, configured to extract a code logic framework from the functional source code by using a source code compiling tool, where the code logic framework includes a plurality of functional modules provided by an application;
and the compiling module is used for respectively converting the functional source codes in the functional modules according to the code logic framework and compiling the functional source codes into functional program packages which are embedded into different application requirements.
In another embodiment of the present invention, the compiling module includes:
the first compiling submodule is used for compiling the functional source codes in the view layer into functional source codes for embedding into different application requirements through page attribute mapping and replacement aiming at the functional modules provided by the page layer in the code logic framework;
the second compiling submodule is used for compiling the functional source codes in the logic layer into functional source codes for being embedded into applications with different requirements through an adaptive abstract syntax tree aiming at the functional modules provided by the logic layer in the code logic framework;
and the third compiling sub-module is used for compiling the functional source codes in the view layer into functional source codes for embedding into different application requirements through interface component mapping aiming at the functional modules provided by the view layer in the code logic framework.
In another embodiment of the present invention, the apparatus further comprises:
an obtaining unit, configured to, after the target function package is embedded in a project file of a required application corresponding to an application identifier, respond to a call instruction for attaching a function instance to the function package, and obtain, based on a function identifier carried by the call instruction, a target function instance matched with the function identifier from an existing project file;
and the calling unit is used for binding the function in the target function instance to the target function program package by calling the function in the target function instance.
According to a fourth aspect of the present application, there is provided an access apparatus applied to an application page of an development end, the apparatus including:
the generating unit is used for responding to the triggering operation of the option button bound with the target function program package, and generating and sending an acquisition instruction of the target function program package, wherein the acquisition instruction carries an application identifier;
and the second receiving unit is used for receiving the target function program package and embedding the target function program package into the project file to form an application program package.
In another embodiment of the present invention, the apparatus further comprises:
and the access unit is used for responding to the triggering operation of displaying the target function page after the target function program package is received and embedded into the project file to form the application program package, and providing access of a loading link and displaying the target function page by using the target function program package in the application program package.
According to a fifth aspect of the present application, an access system for an application page is provided, which includes a receiving end and a transmitting end;
in response to the triggering operation of the option button bound with the target function program package, the sending end generates and sends an acquisition instruction of the target function program package, wherein the acquisition instruction carries an application identifier;
in response to an acquisition instruction of a functional program package, the receiving end screens a target functional program package mapped with an application identifier from a data platform based on the application identifier carried by the acquisition instruction, wherein the data platform stores the functional program package which is generated by using a functional source code and is embedded into applications with different requirements;
the receiving end embeds the target function program package into a project file of a required application corresponding to an application identifier, so that the required application is accessed into a target function page according to the target function program package in the project file;
and the sending end receives the target function program package and embeds the target function program package into the project file to form an application program package.
According to a sixth aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described access method for an application page.
According to a seventh aspect of the present application, a development-side device and a server device are provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, where the processor implements the access method of the application page when executing the program.
By the technical scheme, compared with the access mode of the application page which is realized by embedding the h5 page into the application function program integrated sub-package in the existing mode, the access method, the device and the equipment of the application page provided by the application have the advantages that the target function program package mapped with the application identifier is screened from the data platform based on the application identifier carried by the acquisition instruction by responding to the acquisition instruction of the function program package, the target function program package is equivalent to a cross-application code product, the target function program package is embedded into the project file of the required function corresponding to the application identifier, so that the required application can integrate the cross-application code product into the original project file, the page can be compatible with a plurality of applications while the historical project is slightly damaged, the development efficiency of the application is improved, and the page does not need to depend on a network, the page loading speed is not limited, and the page loading speed of cross-application access is improved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 illustrates a flowchart of an access method of an application page provided in an embodiment of the present application;
fig. 2 is a flowchart illustrating another access method for an application page according to an embodiment of the present application;
fig. 3 is a flowchart illustrating another access method for an application page according to an embodiment of the present application;
fig. 4 shows an interaction sequence diagram of an access method of an application page provided in an embodiment of the present application;
FIG. 5 illustrates a timing diagram of a scenario in which multiple demanding applications access to a target function page provided by an embodiment of the present application;
FIG. 6 illustrates a timing diagram of a scenario in which multiple demanding applications access to a target function page provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram illustrating an access apparatus for an application page according to an embodiment of the present application;
fig. 8 is a schematic structural diagram illustrating an access apparatus for another application page provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram illustrating an access apparatus for another application page provided in an embodiment of the present application;
fig. 10 is a schematic structural diagram illustrating another access apparatus for an application page according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The application page access system comprises a sending end and a receiving end, wherein the sending end is an opening end, the opening end can be specifically applied to an opening end embedded with an application program, the application program is used as a demand application, in order to be compatible with pages of other applications, the application page access system is used for responding to the triggering operation of an option button bound with a target function program package, generating and sending an acquisition instruction of the target function program package, the acquisition instruction carries an application identifier, receiving the target function program package, embedding the target function program package into a project file, forming the application program package, and realizing the access of other application pages according to the target function program package in the application program package. The receiving end is a server and can be a server corresponding to the application programs, the server can receive the functional source codes uploaded by the development ends of the application programs, form functional program packages which are embedded into different application requirements and stored in the data platform, respond to the acquisition instruction of the functional program packages, screen the target functional program packages which are mapped with the application identifiers from the data platform based on the application identifiers carried by the acquisition instruction, and further embed the target functional program packages into the project files of the application requirements corresponding to the application identifiers, so that the application requirements can be accessed into the target functional pages according to the target functional program packages in the project files. Specifically, in the actual application process, the development end of the application program interacts with the server, the server can compile the functional source code into a functional program package which is embedded into different application requirements, and then the functional program package is accessed into a target functional page, so that the application requirements can integrate a code product of cross-application into an original project file, the page can be compatible with multiple applications while a historical project is slightly damaged, and the development efficiency of the application is improved.
In order to solve the problem, this embodiment provides an access method for an application page, as shown in fig. 1, where the method is applied to a server of an application program, and includes the following steps:
101. and responding to an acquisition instruction of the functional program package, and screening a target functional program package mapped with the application identifier from a data platform based on the application identifier carried by the acquisition instruction.
In general, in order to attract users and improve the user experience of the users, new functions are continuously added or existing functions are improved or improved as application programs with functional requirements, the application programs serving as requirements can initiate an acquisition instruction of a functional program package to a server, and then the corresponding functional program package is screened out from the server through an application identifier carried by the acquisition instruction.
Wherein the acquisition instruction is used as an instruction for transmitting the demand application to the application program server for acquiring the functional program package, because new functions need to be added in the operation process of the application, and functional program packages between different applications cannot be compatible, the acquisition instruction carries an application identifier of a required application, such as an application version number, an application name and the like, in order to facilitate the application development end to download the function program package, the service end stores the function program package generated by using the function source code and used for being embedded into different applications in the data platform in advance, the feature package may be npm packages compiled and packaged based on feature source code, the data platform may be a database storing npm packages, and then screening the target function program package mapped with the application identifier from the data platform according to the application identifier carried by the acquisition instruction.
In the embodiment of the invention, a data platform can collect and compile functional source codes in a service end of an application program, a multi-end compiling tool is embedded in the data platform, and when the functional source codes provided by any application are received, the functional source codes can be compiled into functional program packages for embedding into applications with different requirements by using the multi-end compiling tool.
For the access device or equipment of which the execution subject in this embodiment may be an application page, the access device or equipment may be configured at the server of the application program, and after the server receives the obtaining instruction of the function package, the server may obtain the function package mapped with the application identifier from the data platform, and issue the function package to the project file of the demanding application, so that the demanding application may access the function pages of other applications, and compatibility between applications is improved.
102. And embedding the target function program package into a project file of the required application corresponding to the application identifier.
In the embodiment of the invention, because the target function program package is the newly added function code aiming at the existing project file, the operation of the function code needs to depend on the existing project file, and the target function program package is further embedded into the project file of the required application corresponding to the application identifier.
It can be understood that, in consideration of the project file on which the function code depends when running, in the process of embedding the target function package into the project file of the required application, the function code in the target function package may be analyzed to determine the dependency relationship between the function code and the function in the project file, and based on the dependency relationship, the function code is embedded into the project file containing the corresponding function.
Compared with the access method of the application page which is realized by embedding the h5 page into the application function program integrated sub-package in the existing method, the access method of the application page provided by the embodiment of the application page screens the target function program package mapped with the application identifier from the data platform based on the application identifier carried by the acquisition instruction by responding to the acquisition instruction of the function program package, the target function program package is equivalent to a cross-application code product, the target function program package is embedded into the project file of the required function corresponding to the application identifier, so that the required application can integrate the cross-application code product into the original project file, the page can be compatible with a plurality of applications while the historical project is slightly damaged, the development efficiency of the application is improved, the page does not need to depend on the network, and the page loading speed is not limited, the page loading speed of cross-application access is improved.
Further, as a refinement and an extension of the specific implementation of the foregoing embodiment, in order to fully describe the specific implementation process of the present embodiment, the present embodiment provides another access method for an application page, as shown in fig. 2, the method includes:
201. target function source code is received.
The target function code may be a function source code of the target application developer for developing the application based on the requirement, and the function source code is a new project usually added on a history project of the target application, and can implement a new function to form a new function page, for example, a search surrounding people function page, a sorting function page, a payment function page, and the like.
202. And compiling the functional source code into a functional program package for embedding into different application requirements by utilizing a source code compiling tool.
In general, a functional package for a single application can only be embedded into a project file of the application, and a functional page of another application cannot be opened across applications, for example, the application a cannot open a functional page of the application B, and similarly, a target functional source code can only form a target functional page and cannot be accessed and used by another application. In order to make the functional page formed by the target functional source code compatible with more application programs, in the embodiment of the present invention, a source code compiling tool embedded in a server of an application program may be utilized, and the source code compiling tool may disassemble and recompile the target functional source code to form a functional source code suitable for other applications, and encapsulate the functional source code suitable for other applications into a functional program package.
In the embodiment of the present invention, a source code compiling tool may be specifically utilized to extract a code logic framework from a functional source code, where the code logic framework includes a plurality of functional modules provided by an application, and further perform a conversion process on the functional source code in the plurality of functional modules according to the code logic framework, and compile the functional source code into a functional package for embedding into applications with different requirements.
Because the functional code logical framework comprises different functional modules, specifically aiming at the functional modules provided by the page layer in the code logical framework, the functional source codes in the view layer can be compiled into the functional source codes for being embedded into different applications with different requirements through page attribute mapping and replacement; aiming at a functional module provided by a logic layer in a code logic framework, compiling functional source codes in the logic layer into functional source codes for being embedded into different application requirements through an adaptive abstract syntax tree; aiming at the functional modules provided by the view layer in the code logic framework, functional source codes in the view layer can be compiled into functional source codes for embedding into different application requirements through interface component mapping.
It is understood that the compiled source code can be packaged into a function package by using a compiling and packaging tool, for example, an npm package management tool, and the compiled source code can be packaged into a npm package, that is, a function package, each function package is generally composed of a plurality of sub-modules, since different dependency packages are used in the development of the source code, and different dependency packages depend on different application versions, the compiling and packaging tool can declare a common dependency in the function package, so as to facilitate the operation of the function package.
203. And responding to an acquisition instruction of the functional program package, and traversing the configuration information of the directory structure formed by the functional program package in the matching data platform based on the application identifier carried by the acquisition instruction.
The data platform records configuration information of a directory structure formed by a function program package, such as a function program package installation directory, a resource directory of the function program package, a temporary directory of the function program package and the like, the installation directory of the function program package is used for storing installation information of an application program, such as an installation path, an installation position, installation authority and the like, the resource directory of the function program package is used for storing resource files of the application program, such as pictures, videos, audios, dialog boxes and the like, and the temporary directory of the function program package is used for storing temporary files generated when the application program is compiled.
In general, the function package is composed of function source code, and all the function source code is embedded in application information defined by an application developer, for example, an application version, an application name, an application self-defined class, and the like, the application information is used to place a description file of an application program, which is different from other application programs, and is equivalent to an identity inherent to the application program, and after the application information is generated, the application information can be distributed in configuration information of a directory structure, so that the configuration information of each directory structure can identify the application identity according to the defined application information.
204. And if the application identification is matched with the application information defined by the configuration information, screening the target function program package mapped with the application identification from the data platform.
In the embodiment of the invention, a function program package which is compiled by using a function energy code and is embedded into different application requirements is recorded in a data platform, if an application identifier is matched with application information defined by configuration information, the function program package is suitable for the application requirements corresponding to the application identifier, a target function program package mapped with the application identifier is further screened from the data platform, the target function program package can be embedded into the application requirements to access a target function page, the data platform is used as an npm package management tool of a multi-terminal code, the application requirements can download a npm package compiled by using a target function source code from a npm package management tool, and a function page product formed by the npm package is copied into a project file of the application requirements.
205. And responding to a calling instruction for adding a function instance to the function program package, and acquiring a target function instance matched with the function identifier from an existing project file based on the function identifier carried by the calling instruction.
It should be noted that, in the process of accessing the target function page by the application requiring, if an existing project file in the application requiring, such as a login state, history information, and the like, needs to be used in the loading process of the function package, and an additional function instance call needs to be performed on the function package, since an application instance generated in the historical operation process of the application program is recorded in the existing project file, the target function instance matched with the function identifier is further obtained from the existing project file based on the function identifier carried by the call instruction.
206. And binding the function in the target function instance to a target function program package by calling the function in the target function instance.
In the embodiment of the present invention, because the target function instance includes the function required for accessing the target function page, in a general case, initialization of the target function instance often requires definition of a variable or a function, and in order to execute a code of the target instance, the function of the target function instance needs to be called, and then the function in the target function instance is bound to the target function package, so that when the target function package is run, page contents of an existing item required for the target function page can be loaded by calling the target function.
For example, the target function page needs a login state of a demand application, a function instance in the login state is found from an existing project file of the demand application, the function instance in the login state is bound to the target function program package, and further, when the target function program package runs, a function of the corresponding login state instance can be run, and the login state is loaded into the target function page.
The embodiment provides another access method for an application page, as shown in fig. 3, the method is applied to an initiating terminal, and includes the following steps:
301. and generating and sending an acquisition instruction of the target function program package in response to the triggering operation of the option button bound with the target function program package.
In the embodiment of the present invention, the development end of the demand application is an execution main body, the development end of the demand application can access the target function page by triggering the option button, and certainly, the combination of the target function page and the content of the demand application can also be realized.
302. And receiving a target function program package, and embedding the target function program package into the project file to form an application program package.
It is understood that the server of the application program will compile the functional packages for embedding into different applications in advance according to the target functional source code, and the different functional packages correspond to the different applications in different requirements, for example, after receiving the target function source code, the server compiles the target function source code into a function package for the required application B, a function package for the required application C, and a function package for the required application D, here the server can decide whether to generate the functional package of the demanding application according to whether the demanding application sends a compilation request, for a demanding application that does not send a compilation request, no package of functions for the demanding application is generated for the time being, after the server compiles the functional program packages for embedding into different application requirements, the subsequent application requirements can be directly downloaded from the server.
Further, in order to more effectively display the target function page, the target function program package can be embedded into the project file to form the application program package, and then the target function program package in the application program package is used for providing a loading link which is accessed to the target function page and further responding to the triggering operation of the display of the target function page, so that the target function program package in the application program package is used for providing the loading link to access and display the target function page, and the loading link can enable a product packaged by the target function page to be integrated into a sub-package of an original project, so that the existing project is minimally modified, the application development efficiency is improved, and the compatibility between applications is improved.
An embodiment of the present invention provides another access method for an application page, as shown in fig. 4, the method relates to interaction between a development end and a service end, and includes:
401. and responding to the triggering operation of the option button bound with the target function program package, and generating and sending an acquisition instruction of the target function program package by the development end, wherein the acquisition instruction carries the application identifier.
402. Responding to an acquisition instruction of the functional program package, screening a target functional program package mapped with an application identifier from a data platform by a server side based on the application identifier carried by the acquisition instruction, wherein the data platform stores the functional program package which is generated by using a functional source code and is used for being embedded into applications with different requirements.
403. And the server embeds the target function program package into a project file of the required application corresponding to the application identifier, so that the required application accesses a target function page according to the target function program package in the project file.
404. And the development end receives the target function program package and embeds the target function program package into the project file to form an application program package.
It can be understood that the development end can embed the target function program package into the project file to form an application program package, and when a subsequent user uses the application program, the function page of the application with the requirement can be loaded by using the project content provided by the application program package, so as to realize the access of the cross-application function page.
Specifically, in a scenario where multiple demand applications are accessed to a target function page, as shown in fig. 5, function source codes of a target function C are compiled into npm packets for embedding into multiple demand applications in a data platform, when a demand application a requests to obtain a npm packet for accessing the target function C, the data platform can copy a page product of a npm packet of the target function C into a project file of the demand application a, so that the demand application a can embed a npm packet of the target function C into the demand application a, and when a user terminal requests to display a function page of the target function C, a development terminal can access a applet function page of the target function C in the demand application a and display the applet function page of the target function C at the user terminal, and similarly, when the demand application B requests to obtain a npm packet for accessing the target function C, the data platform can copy a page product of a npm packet of the target function C into a project file of the demand application B, thus, the demand application B can embed the npm package of the target function C into the demand application B, and when receiving a request from the user terminal to display the function page of the target function C, the development terminal can access the applet function page of the target function C in the demand application B and display the applet function page of the target function C at the user terminal.
Specifically, in a scenario that a demand application is accessed to multiple target function pages, as shown in fig. 6, a data platform compiles function source codes of a target function D and a target function E into npm packages for embedding into multiple demand applications, when the demand application F requests to obtain a npm package for accessing the target function D, the data platform may copy a page product of a npm package of the target function D into a project file of the demand application F, so that the demand application F may embed a npm package of the target function D into the demand application F, when a user terminal requests to display a function page of the target function D, a development terminal may access a applet function page of the target function D in the demand application F and display the applet function page of the target function D at the user terminal, and similarly, when the demand application F requests to obtain a npm package for accessing the target function E, the data platform may copy a page product of a npm package of the target function E into a project file of the demand application F In this way, the demand application F may embed the npm package of the target function E into the demand application F, and when receiving a request from the user side to display the function page of the target function E, the initiating side accesses the applet function page of the target function E in the demand application F and displays the applet function page of the target function E at the user side.
Further, as a specific implementation of the method in fig. 1-2, an embodiment of the present application provides an access apparatus applied to an application page of a server, as shown in fig. 7, the apparatus includes: a screening unit 51 and an embedding unit 52.
A screening unit 51, configured to, in response to an obtaining instruction of a functional package, screen, based on an application identifier carried by the obtaining instruction, a target functional package mapped with the application identifier from a data platform, where the data platform stores the functional package generated by using a functional source code and used for being embedded into applications with different requirements;
the embedding unit 52 is configured to embed the target function package into a project file of a demand application corresponding to the application identifier, so that the demand application accesses a target function page according to the target function package in the project file.
Compared with the access method of the application page which is realized by embedding the h5 page into the application function program integrated sub-package in the existing method, the access device of the application page provided by the embodiment of the invention screens the target function program package mapped with the application identifier from the data platform based on the application identifier carried by the acquisition instruction by responding to the acquisition instruction of the function program package, the target function program package is equivalent to a cross-application code product, the target function program package is embedded into the project file of the required function corresponding to the application identifier, so that the required application can integrate the cross-application code product into the original project file, the page can be compatible with a plurality of applications while the historical project is slightly damaged, the development efficiency of the application is improved, the page loading speed is not limited because the page does not need to depend on the network, the page loading speed of cross-application access is improved.
In a specific application scenario, as shown in fig. 8, configuration information of a directory structure formed by a function package is recorded in the data platform, and the screening unit 51 includes:
the matching module 511 may be configured to traverse configuration information of a directory structure formed by a functional program package in the matching data platform based on the application identifier carried by the obtaining instruction;
the screening module 512 may be configured to screen the target function package mapped with the application identifier from the data platform if the application identifier matches the application information defined by the configuration information.
In a specific application scenario, as shown in fig. 8, the apparatus further includes:
a first receiving unit 53, configured to receive a target function source code before the obtaining instruction responding to the function package queries, based on the application identifier carried by the obtaining instruction, a target function package mapped with the application identifier from a data platform;
a compiling unit 54, which may be configured to compile the functional source code into a functional package for embedding into different applications requiring different functions using a source code compiling tool.
In a specific application scenario, as shown in fig. 8, the compiling unit 54 includes:
an extraction module 541, which may be configured to extract a code logic framework from the functional source code using a source code compilation tool, where the code logic framework includes a plurality of functional modules provided by an application;
the compiling module 542 may be configured to perform conversion processing on the functional source codes in the plurality of functional modules according to a code logic framework, and compile the functional source codes into functional packages for embedding into applications with different requirements.
In a specific application scenario, as shown in fig. 8, the compiling module 542 includes:
the first compiling sub-module 5421 may be configured to compile, for a function module provided in a page layer in a code logic framework, a function source code in the view layer into a function source code for embedding into different demanding applications through page attribute mapping and replacement;
a second compiling submodule 5422, configured to compile, for a functional module provided in a logical layer in a code logical framework, a functional source code in the logical layer into a functional source code for embedding into an application with different requirements by adapting an abstract syntax tree;
the third compiling sub-module 5423 may be configured to compile, for a function module provided in a view layer in the code logical framework, function source code in the view layer into function source code for embedding into different application-on-demand applications through interface component mapping.
In a specific application scenario, as shown in fig. 8, the apparatus further includes:
an obtaining unit 55, configured to, after the target function package is embedded into the project file of the required application corresponding to the application identifier, respond to a call instruction for attaching a function instance to the function package, and obtain, based on the function identifier carried in the call instruction, a target function instance matched with the function identifier from an existing project file;
the invoking unit 56 may be configured to bind the function in the target function instance to the target function package by invoking the function in the target function instance.
It should be noted that other corresponding descriptions of the functional units related to the access device applicable to the application page at the server side provided in this embodiment may refer to the corresponding descriptions in fig. 1 and fig. 2, and are not described again here.
Further, as a specific implementation of the method in fig. 3, an embodiment of the present application provides an access apparatus applied to an application page of an development end, and as shown in fig. 9, the apparatus includes: a generating unit 61 and a second receiving unit 62.
The generating unit 61 may be configured to generate and send an obtaining instruction of the target function program package in response to a trigger operation of an option button bound with the target function program package, where the obtaining instruction carries an application identifier;
the second receiving unit 62 may be configured to receive the target function package, and embed the target function package into the project file to form an application package.
In a specific application scenario, as shown in fig. 10, the apparatus further includes:
the access unit 63 may be configured to, after receiving the target function package and embedding the target function package into the project file to form an application package, respond to a trigger operation of displaying a target function page, and provide access to a loading link and display the target function page by using the target function package in the application package.
It should be noted that other corresponding descriptions of the functional units related to the access device applicable to the application page on the development end side provided in this embodiment may refer to the corresponding descriptions in fig. 3, and are not described herein again.
Based on the method shown in fig. 1-2, correspondingly, an embodiment of the present application further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the access method for the application page shown in fig. 1-2; based on the method shown in fig. 3, correspondingly, the embodiment of the present application further provides another storage medium, on which a computer program is stored, and the program, when executed by a processor, implements the access method for the application page shown in fig. 3.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the method shown in fig. 1-2 and the virtual device embodiment shown in fig. 7-8, to achieve the above object, an embodiment of the present application further provides a server entity device, which may specifically be a computer, a server, or other network devices, and the entity device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the method for accessing an application page as shown in fig. 1-2 above.
Based on the method shown in fig. 3 and the virtual device embodiments shown in fig. 9 to fig. 10, in order to achieve the above object, an embodiment of the present application further provides a development end entity device, which may specifically be a computer, a smart phone, a tablet computer, a smart watch, or a network device, where the entity device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the above-described access method for the application page as shown in fig. 3.
Optionally, both the two entity devices may further include a user interface, a network interface, a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), etc.
Those skilled in the art will appreciate that the physical device structure for accessing the application page provided in the present embodiment does not constitute a limitation to the physical device, and may include more or fewer components, or combine some components, or arrange different components.
The storage medium may further include an operating system and a network communication module. The operating system is a program for managing hardware and software resources of the actual device for store search information processing, and supports the operation of the information processing program and other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and communication with other hardware and software in the information processing entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. Through the technical scheme, compared with the existing mode, the method and the device have the advantages that the target function program package is embedded into the project file of the required function corresponding to the application identifier, so that the required application can integrate the code product of the cross-application into the original project file, the page can be compatible with a plurality of applications while the historical project is slightly damaged, the development efficiency of the application is improved, the page loading speed is not limited because the page does not need to depend on a network, and the page loading speed of the cross-application access is improved.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (12)

1. An access method for an application page, comprising:
responding to an acquisition instruction of a functional program package, and screening a target functional program package mapped with an application identifier from a data platform based on the application identifier carried by the acquisition instruction, wherein the data platform stores the functional program package which is generated by using a functional source code and is used for being embedded into different applications with different requirements, the target functional program package provides a loading link which is accessed to a target functional page and corresponds to the target functional page, and the loading link enables a packed product of the target functional page to be integrated into a sub-package of an original project;
and embedding the target function program package into a project file of a required application corresponding to an application identifier so that the required application accesses a target function page according to the target function program package in the project file, acquiring a target function instance matched with the function identifier from the existing project file based on the function identifier carried by a calling instruction if the existing project file in the required application is required to be used in the loading process of the function program package in the process of accessing the target function page by the required application, and binding the function in the target function instance to the target function program package by calling the function in the target function instance.
2. The method according to claim 1, wherein configuration information of a directory structure formed by function packages is recorded in the data platform, and the screening of the target function package mapped with the application identifier from the data platform based on the application identifier carried by the obtaining instruction specifically includes:
traversing configuration information of a directory structure formed by a functional program package in a matched data platform based on the application identifier carried by the acquisition instruction;
and if the application identification is matched with the application information defined by the configuration information, screening the target function program package mapped with the application identification from the data platform.
3. The method according to claim 1, wherein before the fetching instruction responding to the feature package queries a target feature package mapped with the application identifier from a data platform based on the application identifier carried by the fetching instruction, the method further comprises:
receiving a target function source code;
and compiling the functional source code into a functional program package for embedding into different application requirements by utilizing a source code compiling tool.
4. The method of claim 3, wherein compiling the source code into a functional package for embedding into different applications requiring different functionality using a source code compilation tool comprises:
extracting a code logic framework from the functional source code by using a source code compiling tool, wherein the code logic framework comprises a plurality of functional modules provided by an application;
and respectively converting the functional source codes in the functional modules according to a code logic framework, and compiling the functional source codes into functional program packages for embedding into different application requirements.
5. The method according to claim 4, wherein the respectively performing a conversion process on the functional source codes in the functional modules according to a code logic framework to compile the functional source codes into functional packages for embedding into different applications with different requirements specifically comprises:
compiling functional source codes in a page layer into functional source codes for embedding into different application requirements by page attribute mapping and replacement aiming at functional modules provided by the page layer in a code logic framework;
compiling functional source codes in a logic layer into functional source codes for embedding into different application requirements by adapting an abstract syntax tree aiming at functional modules provided by the logic layer in a code logic framework;
aiming at a functional module provided by a view layer in a code logic framework, compiling functional source codes in the view layer into functional source codes for embedding into different application requirements through interface component mapping.
6. An access method for an application page, comprising:
responding to a trigger operation of an option button bound with a target function program package, generating and sending an acquisition instruction of the target function program package, wherein the acquisition instruction carries an application identifier, a loading link corresponding to a target function page is provided in the target function program package, and the loading link enables a product packaged by the target function page to be integrated into a sub-package of an original project;
the method comprises the steps that a demand application receives a target function program package, the target function program package is embedded into a project file to form an application program package, in the process that the demand application accesses a target function page, if the existing project file in the demand application is needed to be used in the loading process of the function program package, a target function instance matched with a function identifier is obtained from the existing project file based on the function identifier carried by a calling instruction, and the function in the target function instance is bound to the target function program package by calling the function in the target function instance.
7. The method of claim 6, wherein after said receiving the target functionality package and embedding the target functionality package into the project file to form an application package, the method further comprises:
and responding to the triggering operation of displaying the target function page, providing loading link access by using the target function program package in the application program package, and displaying the target function page.
8. An apparatus for accessing an application page, comprising:
the screening unit is used for responding to an acquisition instruction of a functional program package, screening a target functional program package mapped with an application identifier from a data platform based on the application identifier carried by the acquisition instruction, wherein the data platform stores the functional program package which is generated by using a functional source code and is used for being embedded into different applications with different requirements, and a loading link corresponding to a target functional page is provided in the target functional program package and accessed to the target functional page, and the loading link enables a product packaged by the target functional page to be integrated into a sub-package of an original project;
and the embedding unit is used for embedding the target function program package into a project file of the required application corresponding to the application identifier so that the required application is accessed into a target function page according to the target function program package in the project file, acquiring a target function instance matched with the function identifier from the existing project file based on the function identifier carried by the calling instruction if the existing project file in the required application is required to be used in the loading process of the function program package in the process of accessing the target function page by the required application, and binding the function in the target function instance to the target function program package by calling the function in the target function instance.
9. An apparatus for accessing an application page, comprising:
the generating unit is used for responding to the triggering operation of an option button bound with a target function program package, generating and sending an obtaining instruction of the target function program package, wherein the obtaining instruction carries an application identifier and provides a loading link corresponding to a target function page accessed in the target function program package, and the loading link enables a product packed by the target function page to be integrated into a sub-package of an original project;
and the second receiving unit is used for receiving a target function program package by the demand application, embedding the target function program package into the project file to form an application program package, acquiring a target function instance matched with the function identifier from the existing project file based on the function identifier carried by the calling instruction if the existing project file in the demand application is required to be used in the loading process of the function program package in the process of accessing the target function page by the demand application, and binding the function in the target function instance to the target function program package by calling the function in the target function instance.
10. An access system for an application page, comprising: a receiving end and a transmitting end;
in response to the triggering operation of the option button bound with the target function program package, the sending end generates and sends an acquisition instruction of the target function program package, wherein the acquisition instruction carries an application identifier;
in response to an acquisition instruction of a functional program package, the receiving end screens a target functional program package mapped with an application identifier from a data platform based on the application identifier carried by the acquisition instruction, wherein the data platform stores the functional program package which is generated by using a functional source code and is embedded into applications with different requirements;
the receiving end embeds the target function program package into a project file of a required application corresponding to an application identifier, so that the required application accesses a target function page according to the target function program package in the project file, in the process of accessing the target function page by the required application, if the existing project file in the required application is needed to be used in the loading process of the function program package, a target function instance matched with the function identifier is obtained from the existing project file based on the function identifier carried by a calling instruction, and the function in the target function instance is bound to the target function program package by calling the function in the target function instance;
and the sending end receives the target function program package and embeds the target function program package into the project file to form an application program package.
11. A storage medium on which a computer program is stored, which program, when executed by a processor, implements the method of accessing an application page of any one of claims 1 to 7.
12. A server and developer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method for accessing an application page according to any one of claims 1 to 7 when executing the program.
CN202010993512.8A 2020-09-21 2020-09-21 Application page access method, device and equipment Active CN111930382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010993512.8A CN111930382B (en) 2020-09-21 2020-09-21 Application page access method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010993512.8A CN111930382B (en) 2020-09-21 2020-09-21 Application page access method, device and equipment

Publications (2)

Publication Number Publication Date
CN111930382A CN111930382A (en) 2020-11-13
CN111930382B true CN111930382B (en) 2021-02-09

Family

ID=73334878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010993512.8A Active CN111930382B (en) 2020-09-21 2020-09-21 Application page access method, device and equipment

Country Status (1)

Country Link
CN (1) CN111930382B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506582B (en) * 2020-12-18 2024-04-09 北京百度网讯科技有限公司 Method, device, equipment and medium for processing small program data packet
CN113296762B (en) * 2021-06-21 2023-07-21 北京有竹居网络技术有限公司 Page embedding method and device, storage medium and electronic equipment
US11941386B2 (en) * 2021-10-19 2024-03-26 Sap Se Flexible provision of multi-application content
CN114356477B (en) * 2021-12-22 2024-04-09 青岛海信移动通信技术有限公司 Terminal equipment and application program calling method
CN115129300A (en) * 2022-08-30 2022-09-30 太平金融科技服务(上海)有限公司深圳分公司 Application development method, apparatus, device, medium, and program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228305A (en) * 2018-02-02 2018-06-29 广东欧珀移动通信有限公司 Display methods, device, storage medium and the electronic equipment of five application page
CN111475142A (en) * 2020-04-03 2020-07-31 支付宝(杭州)信息技术有限公司 Method, device and equipment for generating applet file package
CN111610978A (en) * 2020-05-19 2020-09-01 中国建设银行股份有限公司 Applet conversion method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108345632B (en) * 2017-12-29 2020-12-11 中国平安财产保险股份有限公司 Method, device and equipment for calling H5 page and computer readable storage medium
CN111767109A (en) * 2020-06-30 2020-10-13 深圳前海微众银行股份有限公司 H5 page display method and device based on terminal application and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228305A (en) * 2018-02-02 2018-06-29 广东欧珀移动通信有限公司 Display methods, device, storage medium and the electronic equipment of five application page
CN111475142A (en) * 2020-04-03 2020-07-31 支付宝(杭州)信息技术有限公司 Method, device and equipment for generating applet file package
CN111610978A (en) * 2020-05-19 2020-09-01 中国建设银行股份有限公司 Applet conversion method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111930382A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN111930382B (en) Application page access method, device and equipment
US20160019072A1 (en) Dynamic determination of application server runtime classloading
CN106569880B (en) Method and system for dynamically sharing resources between Android applications
CN110058864A (en) The dispositions method and device of micro services
CN109213533B (en) Advertisement SDK dynamic loading method, device and terminal
CN111506366A (en) Plug-in calling method and device, electronic equipment and storage medium
CN117093286B (en) Plug-in generation method, device, equipment and computer readable storage medium
CN106598662B (en) Android-based application loading method and device
CN111367685B (en) Interface calling method and device, computer equipment and storage medium
KR101117165B1 (en) Web platform unit for mobile terminal connectioned web-application program in heterogeneous operating system
CN109062714A (en) The method, apparatus and electronic equipment of long-range control Android device
CN111045746B (en) Code expansion method and framework
CN103917951B (en) Application invocation method, operating system and browser
CN110502251B (en) Application installation method and device
CN111610982B (en) Application program development method, device and related system
CN106778270B (en) Malicious application detection method and system
CN117270873A (en) Real-time compiling method, device, equipment and medium based on Android application
CN107092601B (en) Resource file construction method, resource file application method and device
CN112887352B (en) Image file uploading method and device for Docker container
CN115269040A (en) Tenant business application expanding method, device and system
CN114860204A (en) Program processing method, program operating device, terminal, smart card and storage medium
CN110286907B (en) Display method and device of public button assembly
CN114064176A (en) View interaction method and device, electronic equipment and computer readable medium
CN114398073B (en) Application updating method and device based on RN
CN105204882A (en) Application running method and terminal

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