Sub-application access method, system, blockchain platform, gateway and storage medium

By monitoring browser routing changes and sending access requests to the gateway, the problem of slow resource loading and poor performance when embedding sub-applications in the blockchain platform is solved, the need to quickly build and manage sub-applications is realized, performance is improved and sub-applications are allowed to be embedded. The application opens its own entrance.

CN114401320BActive Publication Date: 2024-10-29HANGZHOU QULIAN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111530136.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2024-10-29
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

When embedding sub-applications in existing blockchain platforms, resource loading is slow and performance is poor. Moreover, routing between sub-applications and the platform cannot be synchronized, and memory variables cannot be shared.

Method used

By monitoring the routing changes of the browser, the access request of the sub-application is generated, the request is sent to the gateway, and the sub-application interface is received and displayed; the routing prefix is ​​obtained to obtain the business server address, and the access request is forwarded to synchronize the sub-application interface.

Benefits of technology

It realizes the rapid construction and management of sub-applications, improves performance, allows sub-applications to decide whether to open entrances, and facilitates platform expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114401320B_ABST
    Figure CN114401320B_ABST
Patent Text Reader

Abstract

The present application relates to a sub-application access method, system, blockchain platform, gateway and storage medium, the method comprising generating an access request corresponding to the sub-application when it is detected that the browser route becomes the mounted route of the sub-application; sending the access request to the gateway; receiving and displaying the application interface of the sub-application sent by the gateway in response to the access request. From the perspective of the blockchain platform, this solution can meet the needs of rapid construction, so that the blockchain platform can manage the sub-application. In addition, the sub-application can also decide whether to open an entrance on the platform, which is also convenient for the platform to expand the sub-application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain, and in particular to a sub-application access method, system, blockchain platform, gateway and storage medium. Background Art

[0002] The current blockchain platforms with more complete functions involve many functions and sub-applications, such as user sub-applications, blockchain sub-applications, IDE sub-applications, contract sub-applications, wallet sub-applications, document sub-applications, etc. Each sub-application is a complete Web application with its own front-end and back-end services; sub-applications are developed by different developers, using different frameworks and languages; sub-applications are loosely coupled and isolated from each other.

[0003] As a portal for sub-applications, the platform needs to integrate multiple sub-applications together so that the sub-applications can be browsed and operated without leaving the platform. In related technologies, the sub-applications are embedded in the browser page through iframe tags.

[0004] Iframe is an HTML tag that can embed a sub-application into a page by configuring the address. It can achieve complete context isolation and is easy to access. However, it has many disadvantages: slow resource loading and poor performance; sub-application and platform routes cannot be synchronized; sub-application memory variables are completely isolated from the platform and cannot be shared. Summary of the invention

[0005] The present application provides a sub-application access method, system, blockchain platform, gateway and storage medium to solve the problems of slow resource loading and poor performance when the sub-application is embedded in the blockchain platform using iframe tags.

[0006] In a first aspect, a sub-application access method is provided, comprising:

[0007] When it is detected that the route of the browser becomes the mounted route of the sub-application, an access request corresponding to the sub-application is generated;

[0008] Sending the access request to a gateway;

[0009] Receive and display the application interface of the sub-application sent by the gateway in response to the access request.

[0010] Optionally, before monitoring that the browser route becomes the sub-application's mounted route, the following is also included:

[0011] Obtaining a registration request for the sub-application, where the registration request carries the mount route;

[0012] Update the front-end routing table with the mounted route.

[0013] Optionally, the registration request also carries the address of the service server to which the sub-application belongs;

[0014] After the front-end routing table is updated with the mounted routing, and before the browser routing is detected to be the sub-application mounted routing, the method further includes:

[0015] By using the address of the service server, it is determined that the sub-application is in a live state.

[0016] Optionally, the registration request also carries location information of the sub-application entry;

[0017] Before the browser route is detected to become the sub-application's mounted route, it also includes:

[0018] The entrance of the sub-application is drawn according to the position information of the sub-application entrance.

[0019] In a second aspect, a sub-application access method is provided, comprising:

[0020] Obtain access requests for sub-applications from the blockchain platform;

[0021] Extracting a routing prefix from the access request;

[0022] Acquire the address of the business server corresponding to the sub-application based on the routing prefix;

[0023] forwarding the access request to the business server based on the address of the business server, receiving an application interface sent by the business server in response to the access request, and sending the application interface to the blockchain platform.

[0024] Optionally, acquiring an address of a business server corresponding to the sub-application based on the routing prefix includes:

[0025] Obtaining a target application identifier that matches the routing prefix;

[0026] Obtaining the address of the service server corresponding to the target application identifier;

[0027] The address of the business server corresponding to the target application identifier is used as the address of the business server corresponding to the sub-application.

[0028] In a third aspect, a sub-application access system is provided, including:

[0029] Blockchain platform, gateway and business server;

[0030] The blockchain platform is used to generate an access request corresponding to the sub-application when it is detected that the route of the browser has become the mounted route of the sub-application; send the access request to the gateway; receive and display the application interface of the sub-application sent by the gateway in response to the access request;

[0031] The gateway is used to obtain an access request for a sub-application from a blockchain platform; extract a routing prefix in the access request; obtain the address of a business server corresponding to the sub-application based on the routing prefix; forward the access request to the business server based on the address of the business server, receive an application interface sent by the business server in response to the access request, and send the application interface to the blockchain platform.

[0032] In a fourth aspect, a blockchain platform is provided, comprising:

[0033] A generating unit, configured to generate an access request corresponding to the sub-application when detecting that the route of the browser has become the mounted route of the sub-application;

[0034] A sending unit, configured to send the access request to the gateway;

[0035] A display unit is used to receive and display the application interface of the sub-application sent by the gateway in response to the access request.

[0036] In a fifth aspect, a gateway is provided, including:

[0037] A first acquisition unit, configured to acquire an access request for a sub-application from a blockchain platform;

[0038] An extraction unit, configured to extract a routing prefix from the access request;

[0039] A second acquisition unit, configured to acquire an address of a business server corresponding to the sub-application based on the routing prefix;

[0040] A forwarding unit is used to forward the access request to the business server based on the address of the business server, receive an application interface sent by the business server in response to the access request, and send the application interface to the blockchain platform.

[0041] In a sixth aspect, a computer-readable storage medium is provided, storing a computer program, wherein when the computer program is executed by a processor, the method described in the first aspect or the method described in the second aspect is implemented.

[0042] In a seventh aspect, an electronic device is provided, comprising: a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other via the communication bus;

[0043] The memory is used to store computer programs;

[0044] The processor is used to execute the program stored in the memory to implement the method described in the first aspect or the method described in the second aspect.

[0045] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: in the technical solution provided by the embodiment of the present application, when it is detected that the route of the browser becomes the mounted route of the sub-application, an access request corresponding to the sub-application is generated; an access request is sent to the gateway; and the application interface of the sub-application sent by the gateway in response to the access request is received and displayed. From the perspective of the blockchain platform, this set of solutions can meet the needs of rapid construction, so that the blockchain platform can manage sub-applications. In addition, the sub-application can also decide whether to open an entrance on the platform, which is also convenient for the platform to expand the sub-application. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0048] Figure 1 A schematic diagram of a flow chart of a sub-application access method in an embodiment of the present application;

[0049] Figure 2 A schematic diagram of another flow chart of the sub-application access method in the embodiment of the present application;

[0050] Figure 3 This is a schematic diagram of the implementation principle of the front-end mounting sub-application of the blockchain platform shown in the embodiment of the present application;

[0051] Figure 4 This is a schematic diagram of the structure of the sub-application access system in the embodiment of the present application;

[0052] Figure 5 This is a schematic diagram of the structure of the blockchain platform in the embodiment of this application;

[0053] Figure 6 This is a schematic diagram of the structure of the gateway in the embodiment of the present application;

[0054] Figure 7 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0057] In order to facilitate understanding of the embodiments of the present application, some terms involved in the present application are explained below.

[0058] ETCD Registry: A registration center in a distributed system. The principle is to record the machine address of the deployed service to the registration center. When a service consumer has a need, he only needs to query the registration center and enter the provided service name to get the address and initiate a call.

[0059] Microservice management module: manages the entire microservice cluster and the service registration of third-party microservice components, and collaborates with the gateway to complete instance management, routing strategy, traffic control and other functions.

[0060] The present application embodiment provides a sub-application access method, which can be applied to a blockchain platform; Figure 1 As shown, the method may include the following steps:

[0061] Step 101: When it is detected that the route of the browser becomes the mounted route of the sub-application, an access request corresponding to the sub-application is generated;

[0062] Step 102: Send an access request to the gateway;

[0063] Step 103: Receive and display the application interface of the sub-application sent by the gateway in response to the access request.

[0064] In this embodiment, the access request of the sub-application may include a URL (Uniform Resource Locator). In the application, a complete URL may include a protocol part, a domain name part, a port part, a virtual directory part, and a file name part.

[0065] Taking the URL http: / / www.aspxfans.com:8080 / news / index.asp?boardID=5&ID=24618&page=1#name as an example, the above parts are explained in detail:

[0066] Protocol part: The protocol part of the URL is "http:", which means that the webpage uses the HTTP protocol. There are many protocols that can be used on the Internet, such as HTTP, FTP, etc. In this example, the HTTP protocol is used. The " / / " after "HTTP" is a separator.

[0067] Domain name part: The domain name part of the URL is "www.aspxfans.com". In a URL, an IP address can also be used as a domain name.

[0068] Port part: Following the domain name is the port, and ":" is used as a separator between the domain name and the port. The port is not a required part of a URL. If the port part is omitted, the default port 80 will be used.

[0069] Virtual directory part: From the first " / " after the domain name to the last " / ", it is the virtual directory part. The virtual directory is not a required part of a URL. In this example, the virtual directory is " / news / ".

[0070] File name part: From the last " / " after the domain name to the "?", it is the file name part. If there is no "?", then from the last " / " after the domain name to the "#", it is the file part. If there is no "?" and "#", then from the last " / " after the domain name to the end, it is the file name part. The file name in this example is "index.asp". The file name part is not a required part of a URL. If it is omitted, the default file name is used.

[0071] In the application, the blockchain platform stores the correspondence between the mounted route and the sub-application. Therefore, when there is an operation event for the sub-application, the browser's route is switched to the mounted route of the sub-application according to the correspondence.

[0072] In the application, after the blockchain platform obtains the application interface sent by the gateway in response to the access request, it renders and displays the application interface.

[0073] In the technical solution provided by the embodiment of the present application, when it is detected that the browser route becomes the mounted route of the sub-application, an access request corresponding to the sub-application is generated; the access request is sent to the gateway; and the application interface of the sub-application sent by the gateway in response to the access request is received and displayed. From the perspective of the blockchain platform, this solution can meet the needs of rapid construction, so that the blockchain platform can manage the sub-application.

[0074] In another embodiment of the present application, in order to enable the blockchain platform to identify the mounting route of the sub-application, the configuration information of the sub-application can also be registered before monitoring that the browser route becomes the mounting route of the sub-application.

[0075] In a specific embodiment, a registration request of a sub-application is obtained, the registration request carries a mounting route of the sub-application; and a routing table of the browser is updated with the mounting route.

[0076] In the application, the registration request may also carry the application identifier of the sub-application and the address of the business server to which the sub-application belongs.

[0077] It should be noted that the application identifier of the sub-application must be unique, and all interfaces in the sub-application must use the identifier as a prefix. For example, the application identifier can be the application name.

[0078] In the application, in order to ensure the uniqueness of the application identifier of the sub-application, after obtaining the registration request of the sub-application, it is also possible to determine whether the application identifier of the sub-application is stored. If so, an error is reported and the registration request is refused to register the sub-application.

[0079] To ensure the availability of the sub-application, you can also determine whether the sub-application is in an available state through the address of the business server before monitoring that the browser route becomes the mounted route of the sub-application, and monitor the browser route only when it is determined that the sub-application is in an available state.

[0080] In the application, the survival status of the sub-application service is detected through the service probe, that is, at a fixed time interval, the sub-application service with an open access portal is continuously checked to see whether it is available. If the number of access failures exceeds 5 times, the sub-application is determined to be in an available state.

[0081] It should be understood that when a sub-application is determined to be in an unavailable state, the blockchain platform will generally prohibit access to the sub-application.

[0082] In another embodiment of the present application, in order to facilitate user operations, the configuration information used to register the sub-application may also carry the location information of the sub-application entrance. The location information of the sub-application entrance indicates the drawing location of the sub-application on the blockchain platform. For example, the location of the sub-application entrance can be the top menu bar or the side menu bar.

[0083] In a specific embodiment, the registration request also carries the location information of the sub-application entrance; before obtaining the access request for the sub-application, it also includes: drawing the entrance of the sub-application according to the location information of the sub-application entrance.

[0084] It should be understood that after the sub-application is drawn on the blockchain platform according to the location information of the sub-application entry, the sub-application can be displayed with the application identifier in the registration request. In order to facilitate user understanding, it can also be displayed with a special sub-application title, and the registration request also carries the sub-application title.

[0085] The present application embodiment provides a sub-application access method, which can be applied to a gateway; Figure 2 As shown, the method may include the following steps:

[0086] Step 201: Obtain an access request for a sub-application from a blockchain platform;

[0087] Step 202: extract the routing prefix in the access request;

[0088] Step 203: Obtain the address of the service server corresponding to the sub-application based on the routing prefix;

[0089] Step 204: forward the access request to the business server based on the address of the business server, receive the application interface sent by the business server in response to the access request, and send the application interface to the blockchain platform.

[0090] The routing prefix in the access request is usually the application identifier of the accessed sub-application. Therefore, the address of the business service request corresponding to the routing prefix can be obtained based on the application identifier and the address of the business server.

[0091] In a specific embodiment, a target application identifier that matches the routing prefix is ​​obtained; an address of a business server corresponding to the target application identifier is obtained; and the address of the business server corresponding to the target application identifier is used as the address of the business server corresponding to the sub-application.

[0092] It should be understood that in this embodiment, the gateway can pre-synchronize the configuration information of the sub-application in the blockchain platform, so it can determine whether the target application identifier exists and obtain the address of the business server corresponding to the sub-application.

[0093] The following three parts introduce the sub-application access method of this application, including registration of molecular applications to the blockchain platform, logical implementation of the front-end mounting of sub-applications on the blockchain platform, and logical implementation of platform access to sub-applications:

[0094] About sub-application registration to blockchain platform:

[0095] The blockchain platform provides a set of SDK (Software Development Kit). When the sub-application is initialized, it calls the register interface in the SDK to provide relevant configuration information, such as the application name and the address of the business server. After receiving the configuration information of the sub-application, the SDK will register the access entry of the sub-application on the microservice management module of the blockchain platform and save the configuration of the sub-application to the ETCD registration center of the platform.

[0096] Specifically:

[0097] The application name must be unique, and the interface routes of the sub-application must use this name as a prefix.

[0098] After deployment, the sub-application calls the platform SDK and sends configuration information such as the IP address and port of the current running environment and the application name to the platform SDK.

[0099] The platform SDK receives the sub-application configuration information carried in the request and sends the configuration information to the microservice management module. The microservice management module opens the access entrance of the sub-application according to the sub-application configuration and registers the sub-application configuration in the ETCD database. The ETCD database saves all sub-application configuration information.

[0100] The microservice management module detects the survival status of the sub-application service through the service probe, that is, at a fixed time interval, it continuously checks whether the sub-application service with an open access portal is available. If the number of access failures exceeds 5 times, the microservice management module will close the portal of the sub-application.

[0101] As the unified entry and distribution center for platform requests, the gateway will periodically synchronize all sub-application entries currently open in the microservice management module.

[0102] The configuration information that the sub-application needs to provide to the SDK is as follows:

[0103] ServiceName: sub-application name, which must be unique. All interfaces in the sub-application must use this name as a prefix.

[0104] HTTPAddress: The access address of the sub-application server, including IP and port.

[0105] Page: Display configuration of the sub-application on the platform, including:

[0106] Title: sub-application title;

[0107] Route: the sub-application's mounted route;

[0108] Location: The location information of the sub-application entrance, which can be the top menu bar or the side menu bar.

[0109] For the logical implementation of the front-end mounting sub-application of the blockchain platform, please refer to Figure 3 , Figure 3 The diagram is a schematic diagram showing the implementation principle of the front-end mounting sub-application of the blockchain platform.

[0110] Specific:

[0111] When a user enters the platform, the platform front end sends a request to the platform back end to obtain the sub-application configuration information.

[0112] The platform backend accesses the microservice management module, obtains the currently accessible sub-application configuration information and returns it to the frontend.

[0113] The platform front end obtains the sub-application's mounted route, dynamically registers the mounted route into the routing table maintained by the front end, and registers the sub-application's mounted route and access address into the single-spa framework.

[0114] Through the sub-application entry information in the sub-application configuration, draw the sub-application entry to the location specified by the platform, such as the top navigation bar or the side navigation bar, and bind the sub-application entry to the mounted route.

[0115] When the user clicks on the sub-application entrance, the platform front end jumps to the sub-application's mounted route. At this time, single-spa listens to the route switch and matches the mounted route. It will request the sub-application page according to the access address corresponding to the mounted route and render it.

[0116] Logical implementation of platform access to sub-applications:

[0117] When a user operates a sub-application in the platform, the sub-application initiates a request, and the request route uses the sub-application name as a prefix to access the platform's gateway.

[0118] After receiving the sub-application request, the gateway performs prefix matching on the request route. The sub-application has been registered in the microservice registration center with the sub-application name as the prefix and has opened the access entrance. After the prefix matching is successful, the gateway forwards the sub-application request to the sub-application's access address.

[0119] The sub-application interface returns the data to the front end, thus completing the access to the sub-application service.

[0120] The following is an example:

[0121] When the sub-application example is deployed, the platform SDK is called to register the current sub-application configuration. The configuration content is:

[0122]

[0123] 1. The user enters the platform, assuming the current browser route is / control

[0124] 2. The platform obtains the data of the sub-application and adds the entry of the sub-application on the page. The corresponding mounting route of the sub-application is / app / example

[0125] 3. The user clicks on the sub-application entrance on the platform. The browser route is changed from / control-> / app / example

[0126] 4. The single-spa framework detects that the browser route has changed, so it sends a request prefixed with the sub-application name to the gateway, requesting the sub-application page. The route for this request is / example / index.html

[0127] 5. When the gateway receives a request with the path / example / index.html, it matches the prefix example and finds that the server address is 10.10.10.10, so it forwards the request to the corresponding server.

[0128] 6. The server receives the request and returns the sub-application page, and then returns it to the browser. The browser displays the page based on the returned content.

[0129] The present application embodiment provides a sub-application access system. The specific implementation of the system can refer to the description of the method embodiment part, and the repeated parts will not be repeated. Figure 4 As shown, the system mainly includes:

[0130] Blockchain platform 401, gateway 402 and business server 403;

[0131] The blockchain platform 401 is used to generate an access request corresponding to the sub-application when it is detected that the browser route has become the mounted route of the sub-application; send the access request to the gateway 402; receive and display the application interface of the sub-application sent by the gateway 402 in response to the access request;

[0132] Gateway 402 is used to obtain access requests for sub-applications from blockchain platform 401; extract the routing prefix in the access request; obtain the address of the business server 403 corresponding to the sub-application based on the routing prefix; forward the access request to the business server 403 based on the address of the business server 403, receive the application interface sent by the business server 403 in response to the access request, and send the application interface to blockchain platform 401.

[0133] Based on the same concept, a blockchain platform is provided in the embodiment of the present application. The specific implementation of the platform can be found in the description of the method embodiment part, and the repetitive parts will not be repeated. Figure 5As shown, the platform mainly includes:

[0134] The generating unit 501 is used to generate an access request corresponding to the sub-application when it is detected that the route of the browser becomes the mounted route of the sub-application;

[0135] A sending unit 502, configured to send an access request to a gateway;

[0136] The display unit 503 is used to receive and display the application interface of the sub-application sent by the gateway in response to the access request.

[0137] Optionally, the blockchain platform is also used to:

[0138] Before detecting that the browser route becomes the sub-application's mounted route, obtain the sub-application's registration request, which carries the mounted route.

[0139] Update the browser's routing table with the mounted route.

[0140] The registration request also carries the address of the business server to which the sub-application belongs;

[0141] The blockchain platform is also used to:

[0142] After updating the front-end routing table with the mounted route, before monitoring that the browser's route becomes the mounted route of the sub-application, determine that the sub-application is alive through the address of the business server.

[0143] Optionally, the registration request also carries the location information of the sub-application entry;

[0144] Optionally, the blockchain platform is also used to:

[0145] Before obtaining an access request for a sub-application, an entry of the sub-application is drawn according to the location information of the entry of the sub-application.

[0146] Based on the same concept, a gateway is provided in the embodiment of the present application. The specific implementation of the gateway can refer to the description of the method embodiment part, and the repeated parts will not be repeated. Figure 6 As shown, the gateway mainly includes:

[0147] A first acquisition unit 601 is used to acquire an access request for a sub-application from a blockchain platform;

[0148] An extraction unit 602, configured to extract a routing prefix from an access request;

[0149] A second acquisition unit 603 is used to acquire the address of the business server corresponding to the sub-application based on the routing prefix;

[0150] The forwarding unit 604 is used to forward the access request to the business server based on the address of the business server, receive the application interface sent by the business server in response to the access request, and send the application interface to the blockchain platform.

[0151] Optionally, the second acquiring unit 603 is used to:

[0152] Get the target application ID that matches the route prefix;

[0153] Obtain the address of the service server corresponding to the target application identifier;

[0154] The address of the business server corresponding to the target application identifier is used as the address of the business server corresponding to the sub-application.

[0155] Based on the same concept, an electronic device is also provided in the embodiment of the present application, such as Figure 7 As shown, the electronic device mainly includes: a processor 701, a memory 702 and a communication bus 703, wherein the processor 701 and the memory 702 communicate with each other through the communication bus 703. The memory 702 stores a program executable by the processor 701, and the processor 701 executes the program stored in the memory 702 to implement the following steps:

[0156] When it is detected that the browser route has become the mounted route of the sub-application, an access request corresponding to the sub-application is generated; the access request is sent to the gateway; and the application interface of the sub-application sent by the gateway in response to the access request is received and displayed;

[0157] or,

[0158] Obtain an access request for a sub-application from the blockchain platform; extract a routing prefix in the access request; obtain the address of a business server corresponding to the sub-application based on the routing prefix; forward the access request to the business server based on the address of the business server, receive an application interface sent by the business server in response to the access request, and send the application interface to the blockchain platform.

[0159] The communication bus 703 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 703 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0160] The memory 702 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the processor 701.

[0161] The above-mentioned processor 701 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0162] In another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program runs on a computer, the computer executes the sub-application access method described in the above embodiment.

[0163] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction is transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape, etc.), an optical medium (e.g., a DVD) or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0164] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0165] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A sub-application access method, characterized in that: Applied to a blockchain platform, the method comprises: When it is detected that the route of the browser becomes the mounted route of the sub-application, an access request corresponding to the sub-application is generated; Sending the access request to the gateway so that the gateway obtains the access request for the sub-application from the blockchain platform; extracting the routing prefix in the access request; obtaining the address of the business server corresponding to the sub-application based on the routing prefix; forwarding the access request to the business server based on the address of the business server, receiving the application interface sent by the business server in response to the access request, and sending the application interface to the blockchain platform; Receive and display the application interface of the sub-application sent by the gateway in response to the access request.

2. The method according to claim 1, characterized in that Before the browser route is detected to become the sub-application's mounted route, it also includes: Obtaining a registration request for the sub-application, where the registration request carries the mount route; The routing table of the browser is updated with the mounted route.

3. The method according to claim 2, characterized in that The registration request also carries the address of the service server to which the sub-application belongs; After the front-end routing table is updated with the mounted routing, and before the browser routing is detected to be the sub-application mounted routing, the following steps are also included: By using the address of the service server, it is determined that the sub-application is in a live state.

4. The method according to claim 2, characterized in that: The registration request also carries the location information of the sub-application entry; Before the browser route is detected to become the sub-application's mounted route, it also includes: The entrance of the sub-application is drawn according to the position information of the sub-application entrance.

5. A sub-application access method, characterized in that: include: Obtaining an access request for the sub-application from the blockchain platform, wherein the access request is an access request corresponding to the sub-application generated when the blockchain platform detects that the browser route has become the mounting route of the sub-application; Extracting a routing prefix from the access request; Acquire the address of the business server corresponding to the sub-application based on the routing prefix; forwarding the access request to the business server based on the address of the business server, receiving an application interface sent by the business server in response to the access request, and sending the application interface to the blockchain platform.

6. The method according to claim 5, characterized in that Acquiring an address of a business server corresponding to the sub-application based on the routing prefix includes: Obtaining a target application identifier that matches the routing prefix; Obtaining the address of the service server corresponding to the target application identifier; The address of the business server corresponding to the target application identifier is used as the address of the business server corresponding to the sub-application.

7. A sub-application access system, characterized in that: include: Blockchain platform, gateway and business server; The blockchain platform is used to generate an access request corresponding to the sub-application when it is detected that the route of the browser becomes the mounted route of the sub-application; Sending the access request to a gateway; receiving and displaying the application interface of the sub-application sent by the gateway in response to the access request; The gateway is used to obtain access requests for sub-applications from the blockchain platform; Extracting a routing prefix from the access request; The method further comprises: obtaining an address of a business server corresponding to the sub-application based on the routing prefix; forwarding the access request to the business server based on the address of the business server, receiving an application interface sent by the business server in response to the access request, and sending the application interface to the blockchain platform.

8. A blockchain platform, characterized in that: include: A generating unit, configured to generate an access request corresponding to the sub-application when detecting that the route of the browser has become the mounted route of the sub-application; A sending unit, configured to send the access request to the gateway, so that the gateway obtains the access request for the sub-application from the blockchain platform; Extracting a routing prefix from the access request; Acquire the address of the business server corresponding to the sub-application based on the routing prefix; forward the access request to the business server based on the address of the business server, receive the application interface sent by the business server in response to the access request, and send the application interface to the blockchain platform; A display unit is used to receive and display the application interface of the sub-application sent by the gateway in response to the access request.

9. A gateway, characterized in that: include: A first acquisition unit is used to acquire an access request for a sub-application from a blockchain platform, wherein the access request is an access request corresponding to the sub-application generated when the blockchain platform detects that the route of the browser becomes the mounting route of the sub-application; An extraction unit, configured to extract a routing prefix from the access request; A second acquisition unit, configured to acquire an address of a business server corresponding to the sub-application based on the routing prefix; A forwarding unit is used to forward the access request to the business server based on the address of the business server, receive an application interface sent by the business server in response to the access request, and send the application interface to the blockchain platform.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 4 or the method described in any one of claims 5 to 6 is implemented.

Citation Information

Patent Citations

  • Sub-application access method and device, electronic equipment and readable storage medium

    CN111666585A

  • Application page display method and device, electronic equipment, medium and application system

    CN113761412A