Routing method and routing device

By pre-saving the correspondence between access requests and routing information on the back-end platform, front-end applications can use new business functions without upgrading, solving the problem of cumbersome upgrade process of front-end applications and improving management convenience.

CN118984300APending Publication Date: 2024-11-19HANGZHOU HUACHENG SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410997917.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

In software development, the business iteration and upgrading process of front-end applications is cumbersome and inefficient, and new services are frequently released to facilitate users to use new functions.

Method used

By pre-saving the correspondence between access request and routing information on the backend platform, the front-end application pulls the corresponding routing information from the back-end platform for routing after receiving the access request, thereby realizing that new business functions can be used without upgrading.

Benefits of technology

It improves the convenience of iterative upgrade management of front-end applications, enables users to use new business functions on old versions of front-end applications, and reduces the complexity and time of upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984300A_ABST
    Figure CN118984300A_ABST
Patent Text Reader

Abstract

The invention discloses a routing method and device, the method is applied to a front-end application, and the routing method comprises the steps: obtaining a target access request sent by a target user, and sending the target access request to a rear-end platform; obtaining target routing information corresponding to the target access request sent by the back-end platform; and performing routing according to the target routing information. According to the routing method provided by the invention, the convenience of the iterative upgrade management of the front-end application can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software development technology, and in particular to a routing method and a routing device. Background Art

[0002] In software development, the services on the front-end applications will be frequently iterated and upgraded. Currently, if you want to successfully execute new services on the front-end applications, you need to release the new services online first. This operation is cumbersome and inefficient. Summary of the invention

[0003] The present application provides a routing method and a routing device, which can improve the convenience of iterative upgrade management of front-end applications.

[0004] A first aspect of an embodiment of the present application provides a routing method, which is applied to a front-end application. The routing method includes: obtaining a target access request sent by a target user, and sending the target access request to a back-end platform; obtaining target routing information corresponding to the target access request sent by the back-end platform; and performing routing according to the target routing information.

[0005] A second aspect of an embodiment of the present application provides a routing method, which is applied to a backend platform. The routing method includes: after receiving a target access request sent by a front-end application, searching for target routing information corresponding to the target access request; sending the target routing information to the front-end application, wherein the front-end application performs routing according to the target routing information after receiving the target routing information.

[0006] A third aspect of an embodiment of the present application provides a routing device, which includes a processor, a memory, and a communication circuit. The processor is coupled to the memory and the communication circuit respectively. Program data is stored in the memory. The processor implements the steps in the above method by executing the program data in the memory.

[0007] The beneficial effect is that in the scheme of the present application, the corresponding relationship between the access request and the routing information is saved in advance on the back-end platform. After receiving the target access request, the front-end application pulls the target routing information corresponding to the target access request from the back-end platform, and routes according to the target routing information, thereby opening the page or application that the user wants to open. Through the scheme of the present application, when you want to release a new business function of the front-end application, you can directly save the access request and routing information corresponding to the new business function in advance on the back-end platform. At this time, the new business function can also be used through the old version of the front-end application without upgrading the front-end application, thereby improving the convenience of iterative upgrade management of the front-end application. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0009] Figure 1 It is a flowchart of an implementation method of the routing method of the present application;

[0010] Figure 2 It is a flowchart of another implementation method of the routing method of the present application;

[0011] Figure 3 It is a flowchart of another implementation method of the routing method of the present application;

[0012] Figure 4 It is a structural diagram of an implementation method of a routing device of the present application;

[0013] Figure 5 It is a structural schematic diagram of another implementation mode of the routing device of the present application;

[0014] Figure 6 It is a structural diagram of another implementation method of the routing device of the present application;

[0015] Figure 7 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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 creative work are within the scope of protection of this application.

[0017] It should be noted that the terms "first" and "second" in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. 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 that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0018] See also Figure 1 , Figure 1 This is a flowchart of an implementation method of the routing method of the present application. In this implementation method, the routing method is executed by the front-end application and the back-end platform together, wherein the front-end application can be a web application (that is, WebApp) developed based on JavaScript technology, HTML technology or CSS technology, and these web applications are usually built using HTML5 (H5 for short). In the prior art, H5 is widely used by businesses due to its cross-platform nature, convenient publishing, and rapid development. However, with the iteration and complexity of the business, the shortcomings of the original H5 are gradually exposed, such as slow loading and especially the inability to have native capabilities. With the development of technology, technologies that are closer to native capabilities have emerged, such as Weex, ReactNative, etc. These technologies have all the advantages of H5 while also having some native capabilities. So far, more and more H5s need to be upgraded to technologies such as Weex and ReactNative, and the solution of the present application can make the upgrade process easier to implement and manage. Please continue to refer to Figure 1 , the routing method includes:

[0019] S110: The front-end application obtains a target access request sent by a target user.

[0020] Specifically, when a user wants to open a certain page or an application, a target access request is generated on the front-end application. The user can generate the target access request by clicking a button or inputting an instruction on the front-end application.

[0021] S120: The front-end application sends the target access request to the back-end platform.

[0022] Specifically, after receiving the target access request, the front-end application sends the target access request to the back-end platform to pull the corresponding target routing information from the back-end platform.

[0023] The backend platform may be a server or a cloud platform, etc., which is not limited here.

[0024] S130: The backend platform searches for target routing information corresponding to the target access request.

[0025] Specifically, the correspondence between the access request and the routing information is saved in advance on the back-end platform, so that after receiving the target access request sent by the front-end application, the back-end platform searches for the routing information corresponding to the target access request in the pre-saved correspondence, and the routing information is the target routing information.

[0026] S140: The backend platform sends the target routing information to the frontend application.

[0027] S150: The front-end application performs routing according to the target routing information.

[0028] Specifically, the target routing information may include routing address, routing mode and other information, so that the front-end application can perform routing according to the routing address in the target routing information or according to the routing mode in the target routing information after receiving the target routing information. The routing mode may be direct routing or routing through bridging.

[0029] After the front-end application is routed according to the target routing information, it can either open an application or access a page.

[0030] In the above implementation, the correspondence between the access request and the routing information is saved in advance on the back-end platform. After receiving the target access request, the front-end application pulls the target routing information corresponding to the target access request from the back-end platform and routes according to the target routing information, thereby opening the page or application that the user wants to open. Through the solution of the present application, when you want to release a new business function of the front-end application, you can directly save the access request and routing information corresponding to the new business function in advance on the back-end platform. At this time, the new business function can also be used through the old version of the front-end application without upgrading the front-end application, thereby improving the convenience of iterative upgrade management of the front-end application.

[0031] In order to facilitate the understanding of the above scheme, an example is given here to illustrate:

[0032] Assume that there is a button B on the front-end application. Before the business function is released, when the user triggers button B, the front-end application will open web page C1.

[0033] But now a new business function has been added: when the user triggers button B, the front-end application can open application C2. Therefore, the access request corresponding to the trigger button B and the routing address corresponding to application C3 can be saved on the back-end platform. When the user clicks button B on the front-end application, the front-end application sends the access request corresponding to button B to the back-end platform, so that the back-end platform can find the corresponding application C2 opened by the access request in the saved correspondence, and return the routing information of opening application C2 to the front-end application, so that after receiving the routing information, the front-end application analyzes the routing information and opens application C2.

[0034] It can be seen that through the solution of the present application, the front-end application can be equipped with new business functions without upgrading the front-end application, that is, users can use the new business functions on the old version of the front-end application, thereby improving the convenience of iterative upgrade management of the front-end application.

[0035] See also Figure 2 In another embodiment, the routing method includes:

[0036] S210: Obtain a target access request sent by a target user, and send the target access request to a backend platform.

[0037] S220: Obtain target routing information corresponding to the target access request sent by the backend platform.

[0038] S230: Determine whether the target routing information is legal.

[0039] If the judgment result is yes, then execute step S240 , and if the judgment result is no, then execute step S250 .

[0040] S240: Perform routing according to the target routing information.

[0041] S250: Generate prompt information to prompt that the target access request is wrong.

[0042] Specifically, the routing method of this embodiment is executed by the front-end application. Different from the above-mentioned embodiment, in this embodiment, after the front-end application obtains the target routing information returned by the back-end platform, it will judge the legality of the target routing information. When it is identified that the target routing information is illegal, it will generate information indicating that the target access request is wrong, and will not perform routing. Only when the target routing information is legal, will it perform routing according to the target routing information, thereby ensuring the security of routing. Of course, in other embodiments, after receiving the target routing information, the front-end application may not perform a legality judgment, but directly perform routing according to the target routing information.

[0043] In one embodiment, step S230 specifically includes: determining whether the target routing information matches a pre-saved template, for example, determining whether the format of the target routing information conforms to the format of the template, and for example, whether the identifier carried by the target routing information is consistent with the identifier in the template; if it is determined that the target routing information matches the template, the target routing information is determined to be legal, otherwise, the target routing information is determined to be illegal.

[0044] In one embodiment, the target routing information includes a routing address, and the process of determining whether the target routing information matches a pre-saved template specifically includes: determining whether the format of the routing address matches the format of the template; if so, determining that the target routing information is legal; otherwise, determining that the target routing information is illegal.

[0045] In one implementation, step S240 specifically includes:

[0046] S241: Determine whether the target routing address in the target routing information is an address of a preset type.

[0047] If the judgment result is yes, execute step S242, otherwise, execute step S243.

[0048] S242: Directly perform routing according to the target routing address.

[0049] S243: Generate bridging information according to the target routing information, and perform bridge routing according to the bridging information.

[0050] Specifically, the construction language of the object corresponding to the address of the preset type matches the construction language corresponding to the front-end application. That is to say, if the construction language of the object corresponding to the target routing address in the target routing information matches the construction language corresponding to the front-end application, routing is performed directly according to the target routing address, otherwise routing is performed using a bridging method. For ease of understanding, this is explained in conjunction with an example:

[0051] When the front-end application is a web application built with H5 (H5 application for short), if the page / application corresponding to the target routing address in the target routing information is also built with H5, the front-end application directly routes according to the target routing address; however, if the page corresponding to the target routing address in the target routing information is an App native page or reactNative application, the front-end application uses a bridging method for routing.

[0052] Through the above method, the present application can expand the jump capability of the front-end application. For example, when the front-end application is a web application built with H5, it can not only be routed to the H5 application, but also to other applications such as App native pages, reactNative applications, or flutter applications.

[0053] See also Figure 3 In another embodiment of the present application, the routing method includes:

[0054] S310: After receiving the target access request sent by the front-end application, search for target routing information corresponding to the target access request.

[0055] S320: Determine whether the target access request is configured with grayscale.

[0056] If it is determined that the target access request is configured with grayscale, step S330 is executed, otherwise step S340 is executed.

[0057] S330: All target routing addresses corresponding to the target access request are used as target routing information.

[0058] S340: Use other target routing addresses corresponding to the target access request except the latest target routing address as target routing information.

[0059] In this embodiment, the routing method is executed by the back-end platform. Different from the above method, after receiving the target access request, the back-end platform will first determine whether the target access request is configured with grayscale, and the judgment result of whether grayscale is configured is different, and the target routing information returned by the control is different.

[0060] Specifically, in the backend platform, an access request may correspond to one or two routing addresses (the two routing addresses are saved at different times). Of the two routing addresses corresponding to the access request, the latest routing address (the one with the closest saving time to the current moment, for ease of explanation, the latest routing address is defined as the first target routing address) is the routing address corresponding to the new business function, and the other is the routing address corresponding to the current business function (in the prior art, if the front-end application is not upgraded, the front-end application can only execute the current business function).

[0061] If the target access request is configured with grayscale, it means that the user who currently sends the target access request is allowed to use the new business function, and all target routing addresses corresponding to the target access request are sent to the front-end application as target routing information. After receiving the target routing information, the front-end application can first route according to the latest target routing address (first target routing address). If routing according to the latest target routing address fails, routing can also be performed according to the old target routing address (second target routing address) to ensure the success rate of routing.

[0062] If the target access request is not configured with grayscale, it means that the user who currently sends the target access request is not allowed to use the latest business function. In this case, the latest target routing address will not be used as the target routing information. Instead, other target routing addresses except the latest target routing address (that is, the old target routing address) will be used as the target routing information. Subsequent front-end applications can only allow users to use the current business functions.

[0063] Among them, for the front-end application, after receiving the target routing information, if the target routing address carried by the target routing information is one, it can only route according to the target routing address; but if the target routing information includes two target routing addresses (i.e., the first target routing address and the second target routing address), the front-end application routes according to the first target routing address.

[0064] In one embodiment, after the front-end application routes according to the first target routing address, if it receives information indicating that the routing has failed, in order to ensure the success rate of routing, the front-end application continues to route according to the second target routing address. In another embodiment, after the front-end application routes according to the first target routing address, if it receives information indicating that the routing has failed, it may not continue routing but generate a prompt message.

[0065] In the above implementation, the backend platform determines whether the target access request is configured with grayscale, but in other implementations, the front-end application can also determine whether the target access request is configured with grayscale. Specifically, in this implementation, after the front-end application receives the target routing information, if the target routing information includes both the first target routing address and the second target routing address, the front-end application first determines whether the target access request is configured with grayscale. If grayscale is configured, the front-end application first routes according to the first target routing address, and continues to route according to the second target routing address after routing fails. However, if grayscale is not configured, routing is performed according to the second target routing address, skipping the first target routing address.

[0066] See also Figure 4 , Figure 4 1 is a schematic diagram of the structure of an embodiment of a routing device of the present application. The routing device 200 includes a processor 210, a memory 220, and a communication circuit 230. The processor 210 is coupled to the memory 220 and the communication circuit 230 respectively. The memory 220 stores program data. The processor 210 implements the steps in any of the above-mentioned implementation methods by executing the program data in the memory 220. The detailed steps can be found in the above-mentioned implementations and will not be repeated here.

[0067] The routing device 200 may be any device with algorithm processing capability, such as a computer, etc., and is not limited here.

[0068] See also Figure 5 , Figure 5 3 is a schematic diagram of the structure of another embodiment of the routing device of the present application. The routing device 300 includes a first acquisition module 310, a first sending module 320, a second acquisition module 330 and a routing module 340 which are connected in sequence.

[0069] The first acquisition module 310 is used to acquire a target access request sent by a target user.

[0070] The first sending module 320 is used to send the target access request to the backend platform.

[0071] The second acquisition module 330 is used to acquire the target routing information corresponding to the target access request sent by the backend platform.

[0072] The routing module 340 is used to perform routing according to the target routing information.

[0073] In one embodiment, before routing according to the target routing information, the routing module 340 will also determine whether the target routing information is legal; in response to the target routing information being illegal, the routing module 340 generates a prompt message to indicate that the target access request is wrong; in response to the target routing information being legal, the routing module 340 routes according to the target routing information.

[0074] In one embodiment, the routing module 340 is specifically used to: determine whether the target routing information matches the pre-stored template; if it is determined to match, determine that the target routing information is legal; otherwise, determine that the target routing information is illegal.

[0075] In one embodiment, the routing module 340 is specifically used to: in response to the number of target routing addresses in the target routing information being one, perform routing according to the target routing address; in response to the target routing information including two target routing addresses, perform routing according to the first target routing address of the two target routing addresses, wherein the two target routing addresses include the first target routing address and the second target routing address, and the storage time of the first target routing address on the back-end platform is later than the storage time of the second target routing address.

[0076] In one embodiment, the routing module 340 is further configured to: perform routing according to the second target routing address in response to receiving information indicating routing failure.

[0077] In one embodiment, before routing according to the first target routing address, the routing module 340 will also determine whether the target access request is configured with grayscale; in response to the target access request being configured with grayscale, routing is performed according to the first target routing address; otherwise, routing is performed according to the second target routing address.

[0078] In one embodiment, the routing module 340 is specifically used to: determine whether the target routing address in the target routing information is an address of a preset type; if the determination result is yes, directly perform routing according to the target routing address; otherwise, generate bridging information according to the target routing information, and perform bridge routing according to the bridging information.

[0079] Among them, the routing device 300 executes the routing method executed by the front-end application in any of the above implementation modes when working. The detailed routing method can be found in the above related content and will not be described in detail here.

[0080] See also Figure 6 , Figure 6 4 is a schematic diagram of the structure of another embodiment of the routing device of the present application. The routing device 400 includes a search module 410 and a second sending module 420 which are connected to each other.

[0081] The search module 410 is used to search for target routing information corresponding to the target access request after receiving the target access request sent by the front-end application.

[0082] The second sending module 420 is used to send the target routing information to the front-end application, wherein the front-end application performs routing according to the target routing information after receiving the target routing information.

[0083] In one embodiment, the search module 410 is specifically used to: determine whether the target access request is configured with grayscale; in response to the target access request being configured with grayscale, all target routing addresses corresponding to the target access request are used as target routing information; otherwise, other target routing addresses corresponding to the target access request except the latest target routing address are used as target routing information.

[0084] Among them, the routing device 400 executes the routing method executed by the backend platform in any of the above implementation modes when working. The detailed routing method can be found in the above related content and will not be described in detail here.

[0085] See also Figure 7 , Figure 7 The computer-readable storage medium 500 stores a computer program 510, which can be executed by a processor to implement the steps in any of the above methods.

[0086] The computer-readable storage medium 500 may specifically be a device that can store the computer program 510, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or may be a server that stores the computer program 510. The server may send the stored computer program 510 to other devices for execution, or may also execute the stored computer program 510 by itself.

[0087] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A routing method, characterized in that: The method is applied to front-end applications, and the routing method includes: Obtaining a target access request sent by a target user, and sending the target access request to a backend platform; Obtaining target routing information corresponding to the target access request sent by the backend platform; Routing is performed according to the target routing information.

2. The method according to claim 1, characterized in that Before performing routing according to the target routing information, the method further includes: Determining whether the target routing information is legal; In response to the target routing information being illegal, generating prompt information to prompt that the target access request is wrong; In response to the target routing information being legal, the step of routing according to the target routing information is performed.

3. The method according to claim 2, characterized in that The step of determining whether the target routing information is legal includes: Determining whether the target routing information matches a pre-saved template; If a match is determined, the target routing information is determined to be legal; otherwise, the target routing information is determined to be illegal.

4. The method according to claim 1, characterized in that: The step of routing to the target object according to the target routing information comprises: In response to the number of target routing addresses in the target routing information being one, routing is performed according to the target routing address; In response to the target routing information including two target routing addresses, routing is performed according to a first target routing address of the two target routing addresses, wherein the two target routing addresses include the first target routing address and a second target routing address, and a storage time of the first target routing address on the back-end platform is later than a storage time of the second target routing address.

5. The method according to claim 4, characterized in that After routing according to the first target routing address of the two target routing addresses, the method further includes: In response to receiving the information indicating the routing failure, routing is performed according to the second target routing address.

6. The method according to claim 4, characterized in that Before routing according to the first target routing address of the two target routing addresses, the method further includes: Determine whether the target access request is configured with grayscale; In response to the target access request being configured with grayscale, executing the step of routing according to the first target routing address of the two target routing addresses; Otherwise, routing is performed according to the second target routing address.

7. The method according to claim 1, characterized in that The step of performing routing according to the target routing information comprises: Determining whether the target routing address in the target routing information is an address of a preset type; If the judgment result is yes, routing is performed directly according to the target routing address; Otherwise, bridge information is generated according to the target routing information, and bridge routing is performed according to the bridge information.

8. A routing method, characterized in that: The method is applied to a backend platform, and the routing method includes: After receiving the target access request sent by the front-end application, searching for target routing information corresponding to the target access request; The target routing information is sent to the front-end application, wherein the front-end application performs routing according to the target routing information after receiving the target routing information.

9. The method according to claim 8, characterized in that The step of searching for target routing information corresponding to the target access request after receiving the target access request sent by the front-end application includes: Determine whether the target access request is configured with grayscale; In response to the target access request being configured with grayscale, all target routing addresses corresponding to the target access request are used as the target routing information; Otherwise, other target routing addresses except the latest target routing address corresponding to the target access request are used as target routing information.

10. A routing device, characterized in that: The routing device includes a processor, a memory and a communication circuit, the processor is coupled to the memory and the communication circuit respectively, the memory stores program data, and the processor implements the steps in the method as described in any one of claims 1 to 9 by executing the program data in the memory.