Hybrid application page jump method and device, electronic equipment and storage medium

By using pseudo-links and task stack management in hybrid applications, the cumbersome page navigation caused by independent task stacks of different technologies is solved, achieving flexible and efficient page navigation and improving user experience.

CN115130040BActive Publication Date: 2026-01-02CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210867878.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2026-01-02
Estimated Expiration
2042-07-21

AI Technical Summary

Technical Problem

In hybrid applications, the independent task stacks of different technologies lead to cumbersome page navigation, making it difficult to achieve cross-page navigation and affecting user experience.

Method used

By using pseudo-links, the navigation operations of different types of pages are unified to the same entry point, and different types of page instances are managed uniformly through a task stack, enabling direct navigation to any page.

Benefits of technology

It improves the flexibility and efficiency of page navigation in hybrid applications, simplifies the page navigation process, and facilitates the development and expansion of hybrid applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115130040B_ABST
    Figure CN115130040B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a hybrid application page jump method, device, system and storage medium, and belongs to the technical field of computers. The method comprises the following steps: in response to a jump instruction of a current page, extracting a page address of a target link in the jump instruction as a page identifier; prefixing a preset resource locator to the page identifier to splice the page identifier and obtain a jump pseudo link; determining a target page instance in response to the jump pseudo link; and placing the target page instance at the top of a task stack to jump from the current page to the target page, wherein the task stack is used for managing created page instances of multiple types. The embodiment of the application can realize arbitrary jump of different types of pages of a hybrid application, and improve the flexibility of page jump.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a hybrid application page jump method, device, system and storage medium. BACKGROUND

[0002] With the development of mobile terminal technology, hybrid application components have become one of the mainstream development methods. In the hybrid development process, multiple technologies are used, such as native, ReactNative, Futtler and H5 technologies, which can open different types of pages. Each technology creates a task stack to manage the corresponding type of page. Since the task stacks of each technology are independent of each other, it is difficult to jump from the current page to other historical pages in the hybrid application, and the jump process is cumbersome, resulting in poor user experience of the hybrid application. SUMMARY

[0003] The main purpose of the embodiments of the present application is to provide a hybrid application page jump method, device, electronic device and storage medium, which aims to realize arbitrary jump of different types of pages in the hybrid application and improve the flexibility of page jump.

[0004] To achieve the above purpose, the first aspect of the embodiments of the present application provides a hybrid application page jump method, which comprises:

[0005] In response to a jump instruction of a current page, extracting a page address of a target link in the jump instruction as a page identifier;

[0006] Prefixing the page identifier with a preset resource locator to obtain a jump pseudo link;

[0007] Determining a target page instance in response to the jump pseudo link;

[0008] Placing the target page instance at the top of a task stack to jump from the current page to a target page, wherein the task stack is used to manage multiple types of created page instances.

[0009] In some embodiments, the step of determining a target page instance in response to the jump pseudo link comprises:

[0010] Parsing the jump pseudo link to obtain a page identifier;

[0011] Querying a data table according to the page identifier to obtain the target page instance, wherein the data table is used to represent the mapping relationship between the page identifier in the jump pseudo link and the page instance in the task stack.

[0012] In some embodiments, the hybrid application page jump method further comprises the following steps:

[0013] determining an operation type parameter according to the jump instruction, wherein the operation type parameter is used to represent a management mode of the task stack;

[0014] splicing the operation type parameter to the jump pseudo-link as a suffix.

[0015] In some embodiments, the step of placing the target page instance at the top of the task stack comprises:

[0016] determining a task stack management mode according to the jump pseudo-link;

[0017] adjusting the task stack according to the task stack management mode and the target page instance, so that the target page instance is located at the top of the task stack.

[0018] In some embodiments, the step of adjusting the task stack according to the task stack management mode and the target page instance comprises:

[0019] when the task stack management mode is a default mode, creating the target page instance at the top of the task stack.

[0020] In some embodiments, the step of adjusting the task stack according to the task stack management mode and the target page instance comprises:

[0021] when the task stack management mode is a top-reuse mode, detecting whether the target page instance is located at the top of the task stack;

[0022] when the target page instance is located at the top of the task stack, reusing the target page instance at the top; or,

[0023] when the target page instance is not located at the top of the task stack, creating the target page instance at the top of the task stack.

[0024] In some embodiments, the step of adjusting the task stack according to the task stack management mode and the target page instance comprises:

[0025] when the task stack management mode is an intra-stack reuse mode, detecting whether the task stack contains the target page instance;

[0026] when the task stack contains the target page instance and the target page instance is located at the top of the task stack, reusing the target page instance at the top; or,

[0027] when the task stack contains the target page instance and the target page instance is not located at the top of the task stack, popping the page instances in the task stack after the target page instance.

[0028] To achieve the above object, a second aspect of the embodiment of the present application provides a hybrid application page jump device, the device comprising:

[0029] A first module is configured to extract a page address of a target link in a jump instruction as a page identifier in response to the jump instruction of a current page;

[0030] A second module is configured to prefix the page identifier with a preset resource locator to obtain a jump pseudo link;

[0031] A third module is configured to determine a target page instance in response to the jump pseudo link;

[0032] A fourth module is configured to place the target page instance at the top of a task stack to jump from the current page to a target page, wherein the task stack is used to manage created page instances of multiple types.

[0033] To achieve the above object, a third aspect of the embodiment of the present application provides an electronic device, comprising a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, wherein the program is executed by the processor to realize the hybrid application page jump method of the first aspect.

[0034] To achieve the above object, a fourth aspect of the embodiment of the present application provides a storage medium, which is a computer readable storage medium for computer readable storage, and stores one or more programs, wherein the one or more programs are executable by one or more processors to realize the hybrid application page jump method of the first aspect.

[0035] The hybrid application page jump method, device, system and storage medium provided by the present application can unify the jump operations of different types of pages to the same entrance by the way of jump pseudo link and set a task stack to uniformly manage created different types of page instances, convert different types of page jump operations based on different technologies into target page instances based on jump pseudo link to adjust the top of the task stack, thereby realizing direct jump from a current page to any page in a hybrid application and improving the flexibility of page jump. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 is a flowchart of the hybrid application page jump method provided by the embodiment of the present application;

[0037] Figure 2 is a flowchart of step S103 in Figure 1 ​

[0038] Figure 3 is Figure 1 the flow chart before step S103 in

[0039] Figure 4 is Figure 3 the flow chart of step S302 in

[0040] Figure 5 is Figure 4 one embodiment flow chart of step S402 in

[0041] Figure 6 is another embodiment flow chart of step S402 in Figure 4

[0042] Figure 7 is another embodiment flow chart of step S402 in Figure 4

[0043] Figure 8 is a schematic diagram of a page jump process provided by an embodiment of the present application;

[0044] Figure 9 is a schematic diagram of a task stack before and after adjustment in a default mode provided by an embodiment of the present application;

[0045] Figure 10 is a schematic diagram of a task stack before and after adjustment in a stack top reuse mode provided by an embodiment of the present application;

[0046] Figure 11 is a schematic diagram of a task stack before and after adjustment in a stack top reuse mode provided by another embodiment of the present application;

[0047] Figure 12 is a schematic diagram of a task stack before and after adjustment in a stack reuse mode provided by an embodiment of the present application;

[0048] Figure 13 is a schematic diagram of a task stack before and after adjustment in a stack reuse mode provided by another embodiment of the present application;

[0049] Figure 14 is a structural schematic diagram of a hybrid application page jump device provided by an embodiment of the present application;

[0050] Figure 15 is a hardware structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application. ​​

[0052] It should be noted that although the functional modules are divided in the device schematic diagram, the logical order is shown in the flowchart, but in some cases, the steps shown or described can be performed in a manner different from the module division in the device, or the order in the flowchart. The terms "first", "second", etc. in the specification and claims and the above-described drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.

[0054] Currently, mixed applications use multiple different page development technologies, such as Figure 8 As shown, the user successively creates page A developed based on H5 technology, page B developed based on native technology, page C developed based on ReactNative (RN) technology, and page D developed based on H5 technology, in the process, based on the technology used, a task stack is created respectively, for example, H5 task stack, native task stack, and ReactNative task stack, the H5 task stack manages page instance A and page instance D, the native task stack manages page instance B, and the ReactNative task stack manages page instance C. When the user wants to return to page A from page D, since the page D developed based on H5 technology cannot obtain the pages in the native task stack and the ReactNative task stack, and the native task stack and the ReactNative task stack cannot know the task stack where page A and page C are located, therefore, page D cannot directly return to page A, and can only re-create page A or manually return one level at a time, that is, return from page D to page C, return from page C to B, and return from page B to page A, resulting in poor user experience of using the mixed application.

[0055] In the related art, the page D can be jumped to the page A by means of automatically closing the pages step by step, in the process of jumping from the page D to the page A, the page instance D is closed and a notification information containing the page instance A is sent to the page instance C in the front stage. The page instance C judges that the page instance A does not exist in the ReactNative task stack of itself, then the page C is closed and a notification information containing the page instance A is sent to the page instance B in the front stage. The page instance B judges that the page instance A does not exist in the native task stack of itself, then the page B is closed and a notification information containing the page A is sent to the page instance A in the front stage. The page instance A judges that the page instance A exists in the H5 task stack of itself, then the page A is kept. Although the above process can realize the jumping from the page D to the page A, the jumping efficiency is low, and each page instance in the stage needs to make corresponding logical judgment and processing according to the corresponding notification information, so this way is not convenient for the function expansion and modification of the hybrid application page.

[0056] Based on this, the embodiment of the application provides a hybrid application page jumping method, device, system and storage medium, aiming to realize the arbitrary jumping of different types of pages of the hybrid application and improve the flexibility of page jumping.

[0057] The hybrid application page jumping method, device, system and storage medium provided by the embodiment of the application are specifically explained by the following embodiment, first, the hybrid application page jumping method in the embodiment of the application is described.

[0058] The hybrid application page jumping method provided by the embodiment of the application relates to the technical field of computers. The hybrid application page jumping method provided by the embodiment of the application can be applied in a terminal, can be applied in a server end, and can also be software running in the terminal or the server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as an independent physical server, can be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms; and the software can be an application for realizing the hybrid application page jumping method, etc., but is not limited to the above forms.

[0059] The application is operable in a variety of general purpose or special purpose computer systems environments or configurations. Examples of well known computing systems, environments, and / or configurations that can be suitable for use with the application include personal computers, server computers, handheld or laptop devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like, that perform particular tasks or implement particular abstract data types. The application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in local and remote computer storage media including memory storage devices.

[0060] Figure 1 is an optional flowchart of the hybrid application page jump method provided by the embodiments of the application, Figure 1 The method in the step S101 to the step S104 can include but not limited to including the steps of:

[0061] The step S101, in response to the jump instruction of the current page, extracts the page address of the target link in the jump instruction as a page identifier;

[0062] The step S102, with the preset resource locator as the prefix, splices the page identifier to obtain a jump pseudo link;

[0063] The step S103, in response to the jump pseudo link, determines a target page instance;

[0064] The step S104, places the target page instance at the top of a task stack to jump from the current page to the target page, wherein the task stack is used to manage the created page instances of multiple types.

[0065] The step S101 to the step S104 shown in the embodiments of the application, by the way of the jump pseudo link, unifies the jump operations of different types of pages to the same entrance and sets the task stack to uniformly manage the created different types of page instances, converts the different types of page jump operations based on different technologies into the target page instance based on the jump pseudo link to adjust the top of the task stack, so as to directly jump from the current page to any page in the hybrid application, and improve the flexibility of page jump.

[0066] In step S101 of some embodiments, the user can click a certain control on the current page of the mobile terminal to generate a corresponding jump instruction. For example, in a user registration process, the user can click a registration control after inputting a mobile phone number on a registration home page developed by native technology to generate a jump instruction, based on which a graphical verification page developed by H5 technology is called to realize jumping from the registration home page to the graphical verification page. Further, the user can click a return control on the graphical verification page to generate a jump instruction, based on which the user is returned to the registration home page. In this embodiment, the jump instruction can be an instruction indicating to create a new page, or an instruction indicating to return to a historical page, and the present embodiment does not make a specific limitation as long as the jump instruction can instruct to perform a page jump operation.

[0067] In step S102 of some embodiments, the jump instruction includes a target link indicating a target page. For example, jumping from a current page developed based on native technology to a target page developed by ReactNative technology, the target page being a shopping page, the target link in the jump instruction being "pai: / / interview / shopping / ?_orientation=landscape". In related technologies, since the current page is developed by native technology and the shopping page is developed by ReactNative technology, the two are not developed by the same technology, and each technology platform will directly close the previous pages based on the jump instruction until the shopping page is returned, or the native platform will create a new shopping page based on the jump instruction. In the present embodiment, the native platform does not directly perform an operation based on the jump instruction, but after obtaining the jump instruction, the page address of the target link in the jump instruction is intercepted as a page identifier, that is, the "protocol" and "specific path" parts in the target link can be taken as the page identifier. For example, the "protocol" part in the target link is "pai: / / ", and the "specific path" part is "interview / shopping / ", the "pai: / / interview / shopping / " part in the target link is intercepted, and the trailing " / " is removed to obtain the page identifier "pai: / / interview / shopping". After obtaining the page identifier, the page identifier is concatenated with a preset resource locator as a prefix to obtain a jump pseudo-link. For example, the preset resource locator is "https: / / esales-local / ask_bob#visit?jumpUrl", the resource locator and the page identifier are concatenated with an equal sign therebetween to obtain the jump pseudo-link "https: / / esales-local / ask_bob#visit?jumpUrl=pai: / / interview / shopping".

[0068] It can be understood that the target protocol in the jump instruction corresponding to different types of target pages is different, and the obtained jump pseudo link is also different. Referring to Table 1, the jump pseudo link obtained for the target page of different technical types is as follows:

[0069] Table 1: Target page and jump pseudo link table

[0070]

[0071] It should be noted that the resource locator of the embodiment of the present application is used to locate the position of a resource on the Internet, such as the native platform position, the H5 platform position or any other third-party server position. The resource locator is set according to the position of the task stack of the embodiment of the present application. For example, a mobile hybrid application development combines native technology, H5 technology and ReactNative technology, and the task stack is created uniformly on the native platform. The native platform sends the resource locator specified by the native platform to the H5 platform and the ReactNative platform, so that the native platform, the H5 platform and the ReactNative platform can all use the same resource locator to process the jump instruction to obtain the jump pseudo link, thereby locating the unified entry for further processing.

[0072] It can be understood that after the platform where the current page is located obtains the jump pseudo link based on the jump instruction of the current page, the resource locator in the jump pseudo link can be located to the position corresponding to the resource locator. The embodiment of the present application converts the jump instruction generated by each different type of page into a jump pseudo link, and then locates the jump operation on different pages to a unified entry for further processing through the resource locator in the jump pseudo link.

[0073] In steps S103 and S104 of some embodiments, taking the resource locator as an example of locating the native platform, a task stack is created on the native platform server. Since the jump operation of the page of different types based on different technologies is converted into a jump pseudo link to access the native platform, the task stack on the native platform manages not only the page instance of its own native technology, but also the page instance of other technical types, so as to realize that one task stack manages different types of page instances. In the jump process, the current page instance obtains a jump pseudo link based on the jump instruction, and redirects to the native platform based on the jump pseudo link. The native platform responds to the jump pseudo link, determines the target page instance according to the page identifier in the jump pseudo link, and places the target page instance at the top of the native platform task stack, so as to realize the jump from the current page to the target page.

[0074] It can be understood that the resource locator of the embodiment of the present application can be a server location of a technical service provider, or a specific file location in the server, for example, the resource locator can be a native platform shopping application file location. Based on this, the task stack of the native platform on which the shopping application is created, in the jump process, based on the jump instruction of the current page, the jump pseudo link is obtained, and based on the jump pseudo link, the native platform shopping application file is redirected. After the jump pseudo link, the native platform responds to the jump pseudo link, determines the target page instance of the shopping application according to the page identifier in the jump pseudo link, places the target page instance at the top of the task stack of the shopping application, so as to separately manage the task stacks of different hybrid applications on the same platform.

[0075] Please refer to Figure 2 In some embodiments, step S103 can include but is not limited to including steps S201 and S202:

[0076] Step S201, parsing the jump pseudo link to obtain a page identifier;

[0077] Step S202, querying a data table according to the page identifier to obtain a target page instance, wherein the data table is used to represent the mapping relationship between the page identifier in the jump pseudo link and the page instance in the task stack.

[0078] In some embodiments, the current page instance converts the jump instruction into a jump pseudo link, and based on the jump pseudo link, it can be positioned to the corresponding platform. The platform responds to the jump pseudo link, queries the data table according to the page identifier in the jump pseudo link to determine the target page instance, and then places the target page instance at the top of the task stack, realizing the jump from the current page to the target page.

[0079] Specifically, as Figure 8The page jump process is shown as an example to illustrate the data table construction process and the task stack management process of the embodiments of the present application. The resource locator is set as the native platform address. The native platform obtains a jump instruction including the address of page A in response to the operation of creating H5 page A, concatenates the address of page A as identifier A to the resource locator, obtains a jump pseudo link of page A, and redirects the resource locator based on the jump pseudo link to the native platform. The native platform queries the data table and finds that identifier A does not exist in the data table, creates H5 page instance A across platforms according to identifier A in the jump pseudo link, then stacks page instance A to jump to page A, and stores identifier A as the key value and page instance A as the value in the data table in association. H5 page instance A obtains a jump instruction including the address of page B in response to the operation of creating native page B, concatenates the address of page B as identifier B to the resource locator, obtains a jump pseudo link of page B, and directs the resource locator based on the jump pseudo link to the native platform. The native platform queries the data table and finds that identifier B does not exist in the data table, creates native page instance B according to identifier B in the jump pseudo link, then stacks page instance B to jump from page A to page B, and stores identifier B as the key value and page instance B as the value in the data table in association. Page instance B obtains a jump instruction including the address of page C in response to the operation of creating RN page C, concatenates the address of page C as identifier C to the resource locator, obtains a jump pseudo link of page C, and directs the resource locator based on the jump pseudo link to the native platform. The native platform queries the data table and finds that identifier C does not exist in the data table, creates RN page instance C across platforms according to identifier C in the jump pseudo link, then stacks page instance C to jump from page B to page C, and stores identifier C as the key value and page instance C as the value in the data table in association. Page instance C obtains a jump instruction including the address of page D in response to the operation of creating H5 page D, concatenates the address of page D as identifier D to the resource locator, obtains a jump pseudo link of page D, and directs the resource locator based on the jump pseudo link to the native platform. The native platform queries the data table and finds that identifier D does not exist in the data table, creates H5 page instance D across platforms according to identifier D in the jump pseudo link, then stacks page instance D to jump from page C to page D, and stores identifier D as the key value and page instance D as the value in the data table in association. Through the above process, the task stack on the native platform has page instance D, page instance C, page instance B and page instance A from top to bottom, and the data table respectively stores the key-value pairs of identifier A-page instance A, identifier B-page instance B, identifier C-page instance C and identifier D-page instance D.

[0080] Further, the page instance D obtains a jump instruction including the page A address in response to the operation of jumping to the page A, concatenates the page A address behind the resource locator to obtain a jump pseudo-link of the page A, and directs the resource locator based on the jump pseudo-link to the native platform. The native platform queries that the identifier A exists in the data table, and determines the page instance A according to the key-value pair of the identifier A, and then places the page instance A at the top of the task stack to jump from the page D to the page A. In the embodiment of the present application, the page instance A can be placed at the top of the task stack in multiple ways, for example, a page instance A is created and then stacked, or the page instance D, the page instance C and the page instance A are sequentially stacked out.

[0081] In some embodiments, in addition to using key-value pairs to store the mapping relationship between the page identifier and the page instance, the data table can also use a tree structure to store the mapping relationship between the page identifier and the page instance. For example, the native platform extracts the protocol part "https: / / " and the specific path part "xxxxxxxx" from the jump pseudo link identified by A "https: / / xxxxxxxx" in response to the jump pseudo link jumping to H5 page A, and then takes the protocol part "https: / / " as the parent node and the specific path part "xxxxxxxx" as the intermediate node, and takes the corresponding page instance A as the child node. The native platform successively responds to the jump pseudo links of H5 page A, native page B, RN page C and H5 page D, and obtains the parent nodes in the data table including "https: / / ", "aipage: / / " and "pai: / / ". The intermediate node corresponding to the parent node "https: / / " is the specific path A identified by A and the specific path D identified by D. The specific path A corresponds to the page instance A, and the specific path D corresponds to the page instance D. The intermediate node corresponding to the parent node "aipage: / / " is the specific path B identified by B. The specific path B corresponds to the page instance B. The intermediate node corresponding to the parent node "pai: / / " is the specific path C identified by C. The specific path C corresponds to the page instance C. Further, when the native platform responds to the jump pseudo link jumping from page D to page A, the protocol "https: / / " and the specific path A are extracted from the jump pseudo link identified by A. When querying the data table, the extracted protocol "https: / / " is directly matched with the parent node in the data table to locate the parent node "https: / / ", and then the extracted specific path A is matched with the intermediate node of the parent node "https: / / " to locate the specific path A of the intermediate node, and then the page instance A is determined according to the intermediate node, and then the task stack is managed based on the page instance A. In the embodiment of the application, the protocol and the specific path in the page identifier are taken as the parent node and the child node to construct the tree structure data table, which not only can reduce the data storage amount of the native platform, but also can query in the database based on the protocol and the specific path of the page identifier, thereby improving the query speed.

[0082] Before step S103 of some embodiments, please refer to Figure 3 In some embodiments, the mixed application page jump method of the embodiment of the application further includes but is not limited to steps S301 and S302:

[0083] Step S301, determining an operation type parameter according to the jump instruction, wherein the operation type parameter is used to represent the management mode of the task stack;

[0084] Step S302, splicing the operation type parameter as a suffix into the jump pseudo link.

[0085] In step S301 of some embodiments, based on different management needs of the user for the pages of the hybrid application, the jump instruction can include an operation type parameter in addition to the target link, and the operation type parameter is used to represent the management mode of the task stack, so as to realize different management needs of the user for the pages of the hybrid application. For example, after the user successively creates H5 page A, native page B, RN page C and H5 page D, the user needs to jump from the current page D to page A. The user's needs may be to create a new page A, or to return to the original page A. The user may need to turn off pages B and C at the same time while returning to the original page A, or may need to keep pages B and C at the same time. For the different management needs of the user for the pages of the hybrid application, the back end generates a jump instruction corresponding to the operation type parameter based on the user's operation on the current page, and then splices the operation type parameter in the jump instruction into the jump pseudo link, so that in the platform corresponding to the resource locator, the task stack can be managed according to the operation type parameter.

[0086] In step S302 of some embodiments, the operation type parameter can be spliced into the jump pseudo link in multiple ways. The present application provides the following three ways of splicing the operation type parameter into the jump pseudo link, as follows:

[0087] First, the connection symbol "&" is used to directly splice the operation type parameter to the jump pseudo-link. The connection symbol "&" has the function of parameter connection, and can also be called the separator of different parameters. Generally, it is used in combination with the question mark. After the question mark in a dynamic link, it is the first parameter. The connection symbol "&" is used to concatenate multiple parameters or values. Illustratively, the jump instruction includes the operation type parameter "singleTop" and the target link "pai: / / interview / shopping / ?_orientation=landscape". The "pai: / / interview / shopping / " part in the target link is intercepted, and then the trailing " / " is removed to obtain the page identifier "pai: / / interview / shopping". The preset resource locator is "https: / / esales-local / ask_bob#visit?jumpUrl", the operation type parameter is added to the page identifier after the resource locator using "=", and then the operation type parameter is added to the page identifier after the connection symbol "&", so as to obtain the jump pseudo-link "https: / / esales-local / ask_bob#visit?jumpUrl=pai: / / interview / shopping&singleTop". Through the above jump pseudo-link, the jump request is redirected to the "esales-local / ask_bob#visit" location based on the "https" protocol for processing, and then the value after "=" in the first parameter "jumpUrl=pai: / / interview / shopping" of the jump request is determined as the page identifier to determine the target page instance, and the second parameter of the jump request is used to determine the operation type parameter to manage the task stack accordingly.

[0088] Second, for complex operation type parameters, the _coparams special parameter value field can be wrapped in JSON format. Illustratively, _coparams={"webUrl":"https: / / www.xxx.com"}.

[0089] Third, for operation type parameters including some special characters, the urlEncode function can be used for encoding before encapsulation into the jump pseudo-link.

[0090] Please refer to Figure 4 In some embodiments, step S302 can include but is not limited to including steps S401 and S402:

[0091] Step S401, determining the task stack management mode according to the jump pseudo-link;

[0092] In step S401 of some embodiments, the parameter passed in the jump pseudo-link in addition to the page identifier is an operation type parameter, according to which the corresponding task stack management mode can be determined. For example, if the operation type parameter carried in the jump pseudo-link is "standard" or the jump pseudo-link does not carry the operation type parameter, the task stack management mode is the default mode; if the operation type parameter carried in the jump pseudo-link is "singleTop", the task stack management mode is the stack top reuse mode; and if the operation type parameter carried in the jump pseudo-link is "singleTask", the task stack management mode is the in-stack reuse mode.

[0093] In step S401 of some embodiments, the parameter passed in the jump pseudo-link in addition to the page identifier is an operation type parameter, according to which the corresponding task stack management mode can be determined. For example, if the operation type parameter carried in the jump pseudo-link is "standard" or the jump pseudo-link does not carry the operation type parameter, the task stack management mode is the default mode; if the operation type parameter carried in the jump pseudo-link is "singleTop", the task stack management mode is the stack top reuse mode; and if the operation type parameter carried in the jump pseudo-link is "singleTask", the task stack management mode is the in-stack reuse mode.

[0094] It should be noted that the correspondence between the operation type parameter and the task stack management mode or the task stack management mode used when the operation type is not carried in the jump pseudo-link can be determined through negotiation between the two platforms. Illustratively, a mobile hybrid application development combines native technology, H5 technology and ReactNative technology, and the task stack is created uniformly on the native platform. The native platform can send parameter negotiation requests to the H5 platform and the ReactNative platform respectively to negotiate the correspondence between the operation type parameter and the task stack management mode between the native platform and the H5 platform and between the native platform and the ReactNative platform. It can be understood that the correspondence between the operation type parameter and the task stack management mode negotiated between the native platform and the H5 platform and the correspondence between the operation type parameter and the task stack management mode negotiated between the native platform and the ReactNative technology can be the same or different, as long as the native platform can determine the user's page management operation requirement based on the jump pseudo-link.

[0095] It can be understood that the task stack management mode can include but is not limited to three modes of default mode, stack top reuse mode and stack reuse mode, and more task stack management modes can be adopted according to actual user needs. If it is necessary to further add a task stack management mode later, it is only necessary to negotiate a new mapping relationship between the task stack management mode and the operation type parameter between the platform where the task stack is located and other platforms. The application embodiment defines a new jump protocol, and all entrances and exits of technologies are unified through a jump pseudo link, and the task stacks of different technologies are unified to a task stack management. Not only the problem that the current multiple task stack hierarchy is chaotic and cannot directly return to the previous page is solved, but also arbitrary jumping between different types of interfaces is realized. In addition, since the access protocol party only needs to obtain the unique page identifier in the jump pseudo link to control the task stack to perform the jump operation, the H5 technology, the ReactNative technology, the Fullter technology used in the hybrid application and the new technology that may appear in the future can be compatible with each other, and the development difficulty of the hybrid application is reduced.

[0096] In step S402 of some embodiments, after determining the task stack management mode according to the operation type parameter in the jump pseudo link, the task stack is adjusted according to the task stack management mode and the target page instance, so that the target page is located at the top of the task stack. Specifically, taking the jump connection as an example, the storage module of the native platform respectively stores a plurality of computer executable subprograms for adjusting the task stack. The native platform obtains the target page instance and the task stack management mode based on the jump pseudo link, calls the corresponding computer executable program according to the task stack management mode, and passes the target page instance as a parameter to the computer executable program. In the computer executable program, the execution result is that the target page instance is at the top of the task stack, so as to realize jumping from the current page to the target page.

[0097] Please refer to Figure 5 In some embodiments, step S402 can include but is not limited to step S501.

[0098] In step S501, when the task stack management mode is the default mode, the target page instance is created at the top of the task stack.

[0099] Specifically, taking the resource locator locating to the native platform as an example, the native platform creates a task stack, and the native platform is an access party of the jump pseudo-link. The native platform determines the target page instance based on the jump pseudo-link and determines that the operation type parameter in the jump pseudo-link is “standard” or does not carry the operation type parameter, and can determine that the task stack management mode is the default mode. In the default mode, whether the target page instance exists in the current task stack or not, a new target page instance is created at the top of the task stack. Please refer to Figure 9 , the initial task stack is in turn from top to bottom as page instance A, page instance B and page instance C, the target page instance is page instance A, and the default mode is adopted. After the page instance A is created at the top of the stack, the task stack is in turn from top to bottom as page instance A, page instance A, page instance B and page instance C, and the operation of opening a new page A on the current page A is implemented.

[0100] Please refer to Figure 6 In some embodiments, the step S402 can include but is not limited to steps S601 to S603:

[0101] Step S601, when the task stack management mode is the top stack reuse mode, whether the target page instance is located at the top of the task stack is detected;

[0102] Step S602, when the target page instance is located at the top of the task stack, the target page instance at the top of the stack is reused;

[0103] Step S603, when the target page instance is not located at the top of the task stack, the target page instance is created at the top of the task stack.

[0104] Specifically, taking the resource locator locating to the native platform as an example, the native platform determines the target page instance based on the jump pseudo-link and determines that the operation type parameter in the jump pseudo-link is “singleTop”, and can determine that the task stack management mode is the top stack reuse mode. In the top stack reuse mode, whether the target page instance A is located at the top of the task stack is detected. If the target page instance is located at the top of the task stack, the target page instance at the top of the stack is reused. If the target page instance is not located at the top of the task stack, the target page instance is created at the top of the stack. Please refer to Figure 10 , the initial task stack is in turn from top to bottom as page instance A, page instance B and page instance C, the target page instance is page instance A, and the top stack reuse mode is adopted. After it is detected that the top of the initial task stack is page instance A, the target page instance A at the top of the stack is reused. The task stack is still in turn from top to bottom as page instance A, page instance B and page instance C, and the operation of refreshing the current page A is implemented. Please refer to Figure 11, the initial task stack is in sequence from top to bottom as page instance A, page instance B and page instance C, the target page instance is page instance B, the stack top reuse mode is adopted, it is detected that the stack top of the initial task stack is not page instance B, page instance B is created at the stack top of the task stack, the task stack is in sequence from top to bottom as page instance B, page instance A, page instance B and page instance C, and the operation of opening a new page B on the current page A is realized.

[0105] Please refer to Figure 7 In some embodiments, step S402 can include but is not limited to steps S701 to S702:

[0106] Step S701, when the task stack management mode is the stack-in reuse mode, whether the target page instance exists in the task stack is detected.

[0107] Step S702, when the target page instance exists in the task stack and is located at the stack top of the task stack, the target page instance at the stack top is reused.

[0108] Step S703, when the target page instance exists in the task stack and is not located at the stack top of the task stack, the page instances in the task stack after the target page instance are all stacked out.

[0109] Specifically, taking the native platform located by the resource locator as an example, the native platform determines the target page instance based on the jump pseudo link and determines that the operation type parameter in the jump pseudo link is “singleTask”, and it can be determined that the task stack management mode is the stack-in reuse mode. In the stack-in reuse mode, whether the target page instance exists at the stack top of the task stack is detected, and as long as the target page instance already exists in the task stack, a new target page instance will not be created again. If the stack top of the task stack is the target page instance, the target page instance at the stack top is reused, if the stack top of the task stack is not the target page instance, the target page instance is located at the middle position of the task stack, and the page instances after the target page instance are all stacked out. Please refer to Figure 12 , the initial task stack is in sequence from top to bottom as page instance A, page instance B and page instance C, the target page instance is page instance C, the stack-in reuse mode is adopted, it is detected that page instance C exists in the task stack and is not located at the stack top, after page instance A and page instance B are stacked out in sequence, the stack top of the task stack is page instance C, the operation of jumping back to the original page C from the current page A and simultaneously closing page A and page C is realized.

[0110] Further, two same target page instances can exist in the task stack, in the stack-in reuse mode, it is detected that two or more target page instances exist in the task stack, and none of the two or more target page instances is located at the top of the task stack, then the page instance at the top of the stack is popped, and it is detected whether the page instance at the top of the stack is the target page instance, if not, the page instance will continue to be popped until the target page instance is at the top of the stack. Please refer to Figure 13 , the initial task stack is in turn page instance D, page instance A, page instance B, page instance A and page instance C from top to bottom, the target page instance is page instance A, the stack-top reuse mode is adopted, it is detected that two page instances A exist in the initial task stack and none of the two page instances A is located at the top of the stack, the page instance B at the top of the stack is popped, and it is then detected that the page instance at the top of the current stack is page instance A, the page instance popping operation is stopped, so that other page instances between the two page instances A can be retained. After the above operation, page instance A, page instance B, page instance A and page instance C, the operation of returning from the current page D to page A and closing page A is realized.

[0111] In combination Figure 13 The user page management scenario is described, page instance C corresponds to a home page, page instance A corresponds to a commodity list page, page instance B corresponds to a B commodity detail page, and page instance D corresponds to a D commodity detail page, the user opens the home page, the commodity list page and the B commodity detail page in turn in the default mode, the user can be interested in the B commodity and needs to retain the B commodity detail page, therefore, the default mode or the stack-top reuse mode is adopted to jump to the commodity list page, and then the D commodity detail page is opened. After the D commodity detail page is browsed, the user can not be interested in the D commodity, then the stack-in reuse mode is adopted to return to the commodity list page at the upper level while closing the D commodity detail page, so that the page management demand of the user is met.

[0112] Please refer to Figure 14 The application embodiment further provides a hybrid application page jump device, which can realize the hybrid application page jump method, the device comprises:

[0113] A first module is configured to extract a page address of a target link in a jump instruction as a page identifier in response to a jump instruction of a current page;

[0114] A second module is configured to prefix a preset resource locator to the page identifier to obtain a jump pseudo link;

[0115] A third module is configured to determine a target page instance according to the jump pseudo link;

[0116] A fourth module is configured to place the target page instance at the top of a task stack to jump from the current page to the target page, wherein the task stack is used to manage created page instances of multiple types.

[0117] The specific implementation of the hybrid application page jump device is basically the same as the specific embodiment of the hybrid application page jump method described above, and will not be repeated here.

[0118] The embodiments of the present application also provide an electronic device, which comprises a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, and the program is executed by the processor to realize the hybrid application page jump method described above. The electronic device can be any smart terminal including a tablet computer, a vehicle-mounted computer, etc.

[0119] Please refer to Figure 15 , Figure 15 The hardware structure of the electronic device of another embodiment is illustrated, which comprises:

[0120] The processor 1501 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, etc., for executing related programs to realize the technical solutions provided by the embodiments of the present application.

[0121] The memory 1502 can be implemented in the form of a ROM (ReadOnly Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory), etc. The memory 1502 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are saved in the memory 1502 and are called and executed by the processor 1501 to realize the hybrid application page jump method of the embodiments of the present application.

[0122] The input / output interface 1503 is used to realize information input and output.

[0123] The communication interface 1504 is used to realize the communication interaction between the device and other devices, which can realize communication through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).

[0124] The bus 1505 transmits information between various components (such as the processor 1501, the memory 1502, the input / output interface 1503, and the communication interface 1504) of the device.

[0125] The processor 1501, the memory 1502, the input / output interface 1503, and the communication interface 1504 are communicatively connected to each other within the device through the bus 1505.

[0126] The embodiment of the present application further provides a storage medium, which is a computer readable storage medium, used for computer readable storage, and stores one or more programs, which can be executed by one or more processors to implement the mixed application page jump method.

[0127] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can further include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0128] The mixed application page jump method, device, system and storage medium provided by the embodiment of the present application unify the jump operations of different types of pages to the same entry by the method of jumping pseudo links and set the task stack to uniformly manage the different types of page instances created, convert the different types of page jump operations based on different technologies into target page instances based on the jump pseudo links to adjust the top of the task stack, so as to realize the direct jump from the current page to any page in the mixed application, and improve the flexibility of page jump.

[0129] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0130] Those skilled in the art can understand that, Figures 1-7 The technical solutions shown in the above description do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than those shown in the figure, or combine certain steps, or different steps.

[0131] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separated, that is, can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment of the present application.

[0132] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the function modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof.

[0133] The terms "first", "second", "third", "fourth" and the like in the description of the application and in the claims hereof, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of orderly or chronological permutations. Moreover, the terms "comprise", "have" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, article, or apparatus that comprises a list of steps or units can not necessarily be limited to those steps or units, but can include additional steps or units not expressly listed or inherent to such process, method, article, or apparatus.

[0134] It should be understood that, in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases: only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0135] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above-mentioned units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed objects can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0136] The units described as separate components above can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0137] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0138] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including multiple instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0139] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and the scope of the rights of the embodiments of the present application is not limited thereto. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the rights of the embodiments of the present application.

Claims

1. A hybrid application page jump method, characterized in that, The method comprises: in response to a jump instruction of a current page, extracting a page address of a target link in the jump instruction as a page identifier; prefixing the page identifier with a preset resource locator to obtain a jump pseudo-link; determining a target page instance in response to the jump pseudo-link; placing the target page instance at the top of a task stack to jump from the current page to a target page, wherein the task stack is used to manage multiple types of created page instances; the step of placing the target page instance at the top of the task stack comprises: determining a task stack management mode according to the jump pseudo-link; adjusting the task stack according to the task stack management mode and the target page instance, so that the target page instance is located at the top of the task stack; when the task stack management mode is a default mode, the target page instance is created at the top of the task stack; when the task stack management mode is a stack top reuse mode, it is detected whether the target page instance is located at the top of the task stack; when the target page instance is located at the top of the task stack, the target page instance at the top is reused; or, when the target page instance is not located at the top of the task stack, the target page instance is created at the top of the task stack; when the task stack management mode is a stack reuse mode, it is detected whether the task stack exists the target page instance; when the task stack exists the target page instance and the target page instance is located at the top of the task stack, the target page instance at the top is reused; or, when the task stack exists the target page instance and the target page instance is not located at the top of the task stack, the page instances in the task stack after the target page instance are popped out.

2. The mixed application page jump method according to claim 1, characterized in that, the step of determining a target page instance in response to the jump pseudo-link comprises: parsing the jump pseudo-link to obtain a page identifier; querying a data table according to the page identifier to obtain the target page instance, wherein the data table is used to represent a mapping relationship between the page identifier in the jump pseudo-link and the page instances in the task stack.

3. The hybrid application page jump method of claim 1, wherein, The hybrid application page jump method further comprises the following steps: determining an operation type parameter according to the jump instruction, wherein the operation type parameter is used to represent a management mode of the task stack; splicing the operation type parameter as a suffix to the jump pseudo-link.

4. A hybrid application page jump apparatus, characterized by, The device comprises: a first module configured to extract a page address of a target link in a jump instruction of a current page as a page identifier in response to the jump instruction; a second module configured to prefix the page identifier with a preset resource locator to obtain a jump pseudo-link; a third module configured to determine a target page instance in response to the jump pseudo-link; a fourth module configured to place the target page instance at the top of a task stack to jump from the current page to a target page, wherein the task stack is used to manage multiple types of created page instances; the fourth module is specifically configured to perform the following steps: determine a task stack management mode according to the jump pseudo-link; adjust the task stack according to the task stack management mode and the target page instance, so that the target page instance is located at the top of the task stack; wherein, when the task stack management mode is a default mode, the target page instance is created at the top of the task stack; when the task stack management mode is a top reuse mode, it is detected whether the target page instance is located at the top of the task stack; when the target page instance is located at the top of the task stack, the target page instance at the top is reused; or, when the target page instance is not located at the top of the task stack, the target page instance is created at the top of the task stack; when the task stack management mode is an in-stack reuse mode, it is detected whether the task stack exists the target page instance; when the task stack exists the target page instance and the target page instance is located at the top of the task stack, the target page instance at the top is reused; or, when the task stack exists the target page instance and the target page instance is not located at the top of the task stack, the page instances in the task stack which are stacked after the target page instance are popped.

5. An electronic device, comprising: The electronic device comprises a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, and the program is executed by the processor to realize the steps of the method in any one of claims 1 to 3.

6. A storage medium, the storage medium being a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, and the one or more programs are executable by one or more processors to realize the steps of the method in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Interface skipping method and device, storage medium and electronic device

    CN112632420A

  • Page jumping method and device, electronic equipment and storage medium

    CN112905933A