CN112748962B - Application loading method, device, electronic equipment and computer readable medium - Google Patents

Application loading method, device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN112748962B
CN112748962B CN202110089994.9A CN202110089994A CN112748962B CN 112748962 B CN112748962 B CN 112748962B CN 202110089994 A CN202110089994 A CN 202110089994A CN 112748962 B CN112748962 B CN 112748962B
Authority
CN
China
Prior art keywords
application
sub
loading
target sub
response
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
CN202110089994.9A
Other languages
Chinese (zh)
Other versions
CN112748962A (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.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information 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 Beijing 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN202110089994.9A priority Critical patent/CN112748962B/en
Publication of CN112748962A publication Critical patent/CN112748962A/en
Application granted granted Critical
Publication of CN112748962B publication Critical patent/CN112748962B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

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)
  • Stored Programmes (AREA)

Abstract

Embodiments of the present disclosure disclose application loading methods, apparatuses, electronic devices, and computer-readable media. One embodiment of the method comprises the following steps: in response to the main application loading being completed, obtaining a sub-application configuration file from a server; creating a plurality of sub-applications corresponding to the sub-application configuration files according to the sub-application configuration files; determining whether a route matching condition corresponding to the address of the target sub-application exists or not by the target sub-application with the changed address; and loading the target sub-application through a path corresponding to the route matching condition in response to the existence of the route matching condition corresponding to the address of the target sub-application. The embodiment realizes the splitting of different functional modules and improves the loading speed.

Description

Application loading method, device, electronic equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and in particular, to an application loading method, an application loading device, an electronic device, and a computer readable medium.
Background
The data platform typically provides modules for data presentation, multidimensional analysis, data management, user analysis, and the like. These modules continue to iterate and a number of modules are added later. When the related technology generally puts each service module in the same project, the following technical problems often exist:
firstly, project iterative optimization of a certain module deployment and upgrading needs to be carried out in full quantity, so that fault tolerance is low and development cost is increased.
Second, with the continuous increase of modules, codes are more and more, packaging is slower and slower, and rapid deployment is not facilitated.
Disclosure of Invention
The disclosure is in part intended to introduce concepts in a simplified form that are further described below in the detailed description. The disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Some embodiments of the present disclosure propose application loading methods, apparatuses, electronic devices, and computer-readable media to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide an application loading method, the method comprising: in response to the main application loading being completed, obtaining a sub-application configuration file from a server; creating a plurality of sub-applications corresponding to the sub-application configuration files according to the sub-application configuration files; for the target sub-application with the address changed, determining whether a route matching condition corresponding to the address of the target sub-application exists; and loading the target sub-application in response to the route matching condition corresponding to the address of the target sub-application.
In a second aspect, some embodiments of the present disclosure provide an application loading apparatus, the apparatus comprising: an acquisition unit configured to acquire a sub-application configuration file from a server in response to completion of loading of the main application; the creation unit is configured to create a plurality of sub-applications corresponding to the sub-application configuration files according to the sub-application configuration files; a determining unit configured to determine, for a target sub-application whose address changes, whether a route matching condition corresponding to the address of the target sub-application exists; and the loading unit is configured to load the target sub-application through a path corresponding to the route matching condition in response to the existence of the route matching condition corresponding to the address of the target sub-application.
In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors causes the one or more processors to implement the method described in any of the implementations of the first aspect above.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
The above embodiments of the present disclosure have the following advantageous effects: splitting for different functional modules in the application is achieved. Thus, when a module needs to be upgraded, a full upgrade of the entire application is avoided. In addition, the self-application can be independently developed and deployed, so that the rapid packing and deployment of the new module are realized under the condition of adding the new module. In the process, in response to the completion of the loading of the main application, a sub-application configuration file can be acquired from the server, and a plurality of sub-applications corresponding to the sub-application configuration file are created according to the sub-application configuration file. Thereby, a pre-loading of the sub-applications is achieved. In this way, the loading speed can be increased when it is really necessary to load these applications.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is an architecture diagram of an exemplary system in which some embodiments of the present disclosure may be applied;
FIG. 2 is a flow chart of some embodiments of an application loading method according to the present disclosure;
FIG. 3 is a flow chart of other embodiments of an application loading method according to the present disclosure;
FIG. 4 is a schematic structural view of some embodiments of an application loading device according to the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings. Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary system architecture to which the application loading method or application loading apparatus of some embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture may include a main engineering chassis, an underlying routing, a message bus, a module loader, a front-end application, and the like. As shown, the front terminal applications include application 1, application 2, and so on. In addition, a base front end module (base) may be included.
In practice, the host application may be changed to a host engineering base by: a sub-application container is created in the main application for rendering the sub-application. As an example, the host application may be a browser. The sub-applications may be used to implement functions such as data presentation, user analysis, etc. On this basis, sub-applications may be registered, including but not limited to: setting activation conditions of the sub-application, addresses of the sub-application, and the like. In practice, data or methods of the main application may be passed to the sub-applications through the tips. The underlying route can be used for matching and loading corresponding sub-applications, so that management of a plurality of sub-applications is realized. The message bus is used to transmit data. The module loader may load the corresponding sub-application if a URL change is detected. In this process, sub-applications, such as app1, app2, etc., may be loaded according to their names. These sub-applications may each implement different functions, corresponding to different services, e.g. service1, service2, etc.
It should be understood that the number of sub-applications in fig. 1 is merely illustrative. There may be any number of sub-applications, as desired for implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of an application loading method according to the present disclosure is shown. The application loading method comprises the following steps:
in response to the main application loading being completed, a sub-application configuration file is obtained from the server, step 201.
In some embodiments, the sub-application profile may be pre-stored in the server. The sub-application configuration file may be updated continuously according to actual needs. At this time, the execution subject of the application loading method may acquire the latest sub-application configuration file from the server. The sub-application configuration file may include information about the sub-application, including but not limited to: name of the sub-application, entry address, mount element identification, etc. Wherein the mount element identifies a container ID for identifying the mount sub-application.
In practice, the sub-applications may be obtained by dividing the content contained in the page according to a certain function, as required. That is, some of the functions in the page are implemented as separate sub-applications. On this basis, sub-applications are created and loaded as needed to implement the corresponding functions.
In some alternative implementations of some embodiments, in response to the main application loading being completed, obtaining the sub-application configuration file from the server includes: generating and transmitting an authentication request including an authentication token in response to the master application loading being completed, the authentication token being generated based on the user login information; in response to receiving information characterizing the success of the verification request, a sub-application profile is obtained from the server.
In these implementations, secure authentication of user information is achieved by generating and sending an authentication request that includes an authentication token.
Step 202, creating a plurality of sub-applications corresponding to the sub-application configuration file according to the sub-application configuration file.
In some embodiments, the execution body may create a plurality of sub-applications according to the sub-application configuration file.
As an example, a sub-application may be created by: first, a container is created in the main application for each sub-application. Then, the resource file corresponding to each sub-application is pulled. By way of example, the resource file may be a Javascript file, css file, or the like. These resource files may be used to render the sub-application.
In some alternative implementations of some embodiments, global variables may be set to store shared external resource files. On the basis, pulling the resource file corresponding to each sub-application, which comprises the following steps: determining whether a pre-stored external resource file exists in the global variable, and acquiring the external resource file from the global variable in response to the pre-stored external resource file exists in the global variable. Thereby improving the acquisition speed of the resource file and saving network resources.
Optionally, the execution body may bind a lifecycle for each sub-application. At the same time, the main application may communicate with the sub-applications during the corresponding lifecycle.
Wherein the lifecycle may comprise different states. As an example, the following five states may be included: load, bootstrap, mount, unload, unmount. Where load represents the decision of which application to load. Bootstrap means acquire static resources. Mount represents the lifecycle of the delete application. Unload denotes the lifecycle of the delete application. Unmoun may represent an offload application, such as deleting DOM nodes. Because of the binding lifecycle for each sub-application, some lifecycle management platforms (e.g., single-SPA, etc.) may be utilized to uniformly host the sub-applications.
Step 203, for the target application whose address changes, it is determined whether there is a route matching condition corresponding to the address of the target sub-application.
In some embodiments, when a user clicks on a menu tag in a page or enters a new URL (uniform resource locator ), the address of the corresponding sub-application may change. Thus, for a target sub-application whose address changes, it can be determined whether or not there is a route match condition corresponding to the address of the target sub-application. In practice, these condition sets may be pre-registered sub-application activation conditions.
In step 204, in response to the existence of the route matching condition corresponding to the address of the target sub-application, loading the target sub-application through the path corresponding to the route matching condition.
As an example, in response to the presence of a route matching condition corresponding to the address of the target sub-application, the content data of the sub-application is acquired through a path corresponding to the route matching condition, and the acquired content data is presented.
According to the method provided by some embodiments of the present disclosure, the sub-applications are loaded in a configuration manner, so that the splitting for different functional modules in the applications is realized. Thus, when a module needs to be upgraded, a full upgrade of the entire application is avoided. In addition, the self-application can be independently developed and deployed, so that the rapid packing and deployment of the new module are realized under the condition of adding the new module. In addition, the sub-application which is developed can be fully utilized to realize the required functions, and only the sub-application is required to be written into the configuration file, so that the multiplexing of the sub-application is realized.
With further reference to FIG. 3, a flow 300 of further embodiments of an application loading method is shown. The application loading method flow 300 includes the steps of:
in response to the main application loading being completed, a sub-application configuration file is obtained from the server, step 301.
Step 302, creating a plurality of sub-applications corresponding to the sub-application configuration file according to the sub-application configuration file.
Step 303, for the target sub-application whose address changes, it is determined whether there is a route matching condition corresponding to the address of the target sub-application.
Step 304, in response to the existence of the route matching condition corresponding to the address of the target sub-application, loading the target sub-application through the path corresponding to the route matching condition.
In some embodiments, the specific implementation of steps 301-304 and the technical effects thereof may refer to those embodiments corresponding to fig. 2, and will not be described herein.
In step 305, in response to detecting the data acquisition request corresponding to the target sub-application, the data acquisition request is intercepted.
In practice, since a plurality of sub-applications are mutually independent to some extent. When these sub-applications are loaded in the main application, if a request is sent to a server corresponding to the sub-application, the request fails due to the limitation of the main application (such as an application browser) and the like.
Thus, in some embodiments, a data acquisition request of a sub-application may be detected. In response to detecting a data acquisition request of a sub-application, the data acquisition request may be intercepted.
Step 306, forwarding the data acquisition request to the server.
Step 307, receiving data corresponding to the data acquisition request returned by the server.
Step 308, distributing the data to the target sub-application.
As can be seen in fig. 3, in comparison with the description of some embodiments corresponding to fig. 2, the flow 300 of the application loading method in some embodiments corresponding to fig. 3 implements the acquisition of sub-application data by intercepting a request of a sub-application and forwarding the request. In the process, forwarding is performed through the proxy, so that request failure of directly requesting data due to limitation of the main application is avoided.
With further reference to fig. 4, as an implementation of the method shown in the above figures, the present disclosure provides some embodiments of an application loading apparatus, which correspond to those method embodiments shown in fig. 2, and which are particularly applicable in various electronic devices.
As shown in fig. 4, the application loading apparatus 400 of some embodiments includes: an acquisition unit 401, a creation unit 402, a determination unit 403, and a loading unit 404. Wherein the obtaining unit 401 is configured to obtain the sub-application configuration file from the server in response to the main application loading being completed. The creation unit 402 is configured to create a plurality of sub-applications corresponding to the sub-application profile from the sub-application profile. The determining unit 403 is configured to determine whether a route match condition corresponding to the address of the target sub-application exists for the target sub-application whose address is changed. The loading unit 404 is configured to load the target sub-application through a path corresponding to a route matching condition in response to the existence of the route matching condition corresponding to the address of the target sub-application.
In some optional implementations of some embodiments, the creating unit 402 is further configured to create a container in the main application for each sub-application; and pulling a resource file corresponding to each sub-application, wherein the resource file is used for rendering the sub-application.
In some optional implementations of some embodiments, the loading unit 404 is further configured to, in response to a route match condition corresponding to the address of the target sub-application being present, obtain content data of the sub-application through a path corresponding to the route match condition; the content data is presented in a target sub-application corresponding container.
In some optional implementations of some embodiments, the obtaining unit 401 is further configured to generate and send an authentication request including an authentication token in response to the master application loading being completed, the authentication token being generated based on the user login information; in response to receiving information characterizing the success of the verification request, a sub-application profile is obtained from the server.
In some optional implementations of some embodiments, the creation unit 402 is further configured to determine whether there is a pre-stored external resource file in the global variable; and in response to the existence of the external resource file stored in the global variable in advance, acquiring the external resource file from the global variable.
In some alternative implementations of some embodiments, the apparatus 400 further includes: an interception unit configured to intercept a data acquisition request in response to detecting the data acquisition request corresponding to the target sub-application; a forwarding unit configured to forward the data acquisition request to the server; the receiving unit is configured to receive data corresponding to the data acquisition request returned by the server; and a distribution unit configured to distribute the data to the target sub-application.
It will be appreciated that the elements described in the apparatus 400 correspond to the various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting benefits described above with respect to the method are equally applicable to the apparatus 400 and the units contained therein, and are not described in detail herein.
Referring now to fig. 5, a schematic diagram of an electronic device 500 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 5 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 5, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 505 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 5 may represent one device or a plurality of devices as needed.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communications device 509, or from the storage device 508, or from the ROM 502. The above-described functions defined in the methods of some embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
It should be noted that, the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to the main application loading being completed, obtaining a sub-application configuration file from a server; creating a plurality of sub-applications corresponding to the sub-application configuration files according to the sub-application configuration files; determining whether a route matching condition corresponding to the address of the target sub-application exists or not by the target sub-application with the changed address; and loading the target sub-application through a path corresponding to the route matching condition in response to the existence of the route matching condition corresponding to the address of the target sub-application.
Computer program code for carrying out operations for some embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor comprising: the device comprises an acquisition unit, a creation unit, a determination unit and a loading unit. The names of these units do not in some way constitute a limitation of the unit itself, for example, the acquisition unit may also be described as "unit acquiring a sub-application profile from a server".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (9)

1. An application loading method, comprising:
in response to the main application loading being completed, obtaining a sub-application configuration file from a server;
creating a plurality of sub-applications corresponding to the sub-application configuration files according to the sub-application configuration files;
for a target sub-application with changed address, determining whether a route matching condition corresponding to the address of the target sub-application exists;
responding to a route matching condition corresponding to the address of the target sub-application, and loading the target sub-application through a path corresponding to the route matching condition;
in response to detecting that a target sub-application sends a data acquisition request to a corresponding server, intercepting the data acquisition request;
forwarding the data acquisition request to a server;
receiving data corresponding to the data acquisition request returned by the server;
and distributing the data to the target sub-application.
2. The method of claim 1, wherein the creating the plurality of sub-applications corresponding to the sub-application profile comprises:
creating a container in the main application for each sub-application;
and pulling a resource file corresponding to each sub-application, wherein the resource file is used for rendering the sub-application.
3. The method of claim 2, wherein the loading the target sub-application over the path corresponding to the route matching condition in response to the route matching condition corresponding to the address of the target sub-application being present comprises:
responding to a route matching condition corresponding to the address of the target sub-application, and acquiring the content data of the sub-application through a path corresponding to the route matching condition;
the content data is presented in the target sub-application corresponding container.
4. The method of claim 1, wherein the obtaining the sub-application profile from the server in response to the main application loading being completed comprises:
generating and transmitting, in response to the master application loading being completed, an authentication request including an authentication token, the authentication token being generated based on user login information;
in response to receiving information characterizing the verification of the verification request, a sub-application profile is obtained from the server.
5. The method of claim 2, wherein the pulling the resource file corresponding to each child application comprises:
determining whether a pre-stored external resource file exists in the global variable;
and acquiring the external resource file from the global variable in response to the external resource file stored in advance in the global variable.
6. An application loading apparatus comprising:
an acquisition unit configured to acquire a sub-application configuration file from a server in response to completion of loading of the main application;
the creation unit is configured to create a plurality of sub-applications corresponding to the sub-application configuration files according to the sub-application configuration files;
a determining unit configured to determine, for a target sub-application whose address changes, whether a route matching condition corresponding to the address of the target sub-application exists;
a loading unit configured to load a target sub-application through a path corresponding to a route matching condition in response to the existence of the route matching condition corresponding to an address of the target sub-application;
an interception unit configured to intercept a data acquisition request in response to detecting that a target sub-application transmits the data acquisition request to a corresponding server;
a forwarding unit configured to forward the data acquisition request to a server;
the receiving unit is configured to receive data corresponding to the data acquisition request returned by the server;
and a distribution unit configured to distribute the data to the target sub-application.
7. The apparatus of claim 6, wherein the creation unit is further configured to: creating a container in the main application for each sub-application;
and pulling a resource file corresponding to each sub-application, wherein the resource file is used for rendering the sub-application.
8. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-5.
9. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-5.
CN202110089994.9A 2021-01-22 2021-01-22 Application loading method, device, electronic equipment and computer readable medium Active CN112748962B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110089994.9A CN112748962B (en) 2021-01-22 2021-01-22 Application loading method, device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110089994.9A CN112748962B (en) 2021-01-22 2021-01-22 Application loading method, device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN112748962A CN112748962A (en) 2021-05-04
CN112748962B true CN112748962B (en) 2023-10-20

Family

ID=75652916

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110089994.9A Active CN112748962B (en) 2021-01-22 2021-01-22 Application loading method, device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN112748962B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535160B (en) * 2021-07-13 2024-03-26 杭州安恒信息技术股份有限公司 Method, device, system, electronic device and storage medium for multiplexing application modules
CN113691455B (en) * 2021-10-27 2022-02-15 深圳市信润富联数字科技有限公司 Routing scheduling method, device, equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035804A (en) * 2014-06-26 2014-09-10 北京中电普华信息技术有限公司 Application integrating method and application integrating device
WO2018072634A1 (en) * 2016-10-18 2018-04-26 腾讯科技(深圳)有限公司 Application processing method and device
WO2018095306A1 (en) * 2016-11-25 2018-05-31 腾讯科技(深圳)有限公司 Method and device for processing application program page, and storage medium
CN111767090A (en) * 2020-06-28 2020-10-13 百度在线网络技术(北京)有限公司 Method and device for starting small program, electronic equipment and storage medium
CN112000353A (en) * 2020-08-18 2020-11-27 北京三快在线科技有限公司 Application running method and device and storage medium
CN112149169A (en) * 2020-10-12 2020-12-29 Oppo广东移动通信有限公司 Application access method and device and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035804A (en) * 2014-06-26 2014-09-10 北京中电普华信息技术有限公司 Application integrating method and application integrating device
WO2018072634A1 (en) * 2016-10-18 2018-04-26 腾讯科技(深圳)有限公司 Application processing method and device
WO2018095306A1 (en) * 2016-11-25 2018-05-31 腾讯科技(深圳)有限公司 Method and device for processing application program page, and storage medium
CN111767090A (en) * 2020-06-28 2020-10-13 百度在线网络技术(北京)有限公司 Method and device for starting small program, electronic equipment and storage medium
CN112000353A (en) * 2020-08-18 2020-11-27 北京三快在线科技有限公司 Application running method and device and storage medium
CN112149169A (en) * 2020-10-12 2020-12-29 Oppo广东移动通信有限公司 Application access method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN112748962A (en) 2021-05-04

Similar Documents

Publication Publication Date Title
CN110120917B (en) Routing method and device based on content
CN111581563B (en) Page response method and device, storage medium and electronic equipment
CN111475180A (en) Method and system for updating client cache
CN112748962B (en) Application loading method, device, electronic equipment and computer readable medium
CN110377440B (en) Information processing method and device
CN111427701A (en) Workflow engine system and business processing method
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN112269959B (en) Control method and device for display content, readable medium and electronic equipment
CN113760536A (en) Data caching method and device, electronic equipment and computer readable medium
CN114595065A (en) Data acquisition method and device, storage medium and electronic equipment
CN110618768B (en) Information presentation method and device
CN114115941A (en) Resource sending method, page rendering method, device, electronic equipment and medium
CN114398035A (en) Method, apparatus, device and computer readable medium for providing service using component
CN114428925A (en) Page rendering method and device, electronic equipment and computer readable medium
CN113765983A (en) Site service deployment method and device
CN112929453A (en) Method and device for sharing session data
CN113132447A (en) Reverse proxy method and system
CN111314457B (en) Method and device for setting virtual private cloud
CN113157365B (en) Program running method, program running device, electronic equipment and computer readable medium
CN113495747B (en) Gray scale release method and device
CN112486826B (en) Test method, test device, electronic equipment and computer readable medium
CN117093214A (en) Page access request processing method and device, electronic equipment, medium and product
CN114398098A (en) Application script execution method and device, electronic equipment and computer readable medium
CN117609647A (en) Page rendering method, device, apparatus, computer readable medium and program product
CN114428805A (en) Page display method, device, equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant