Encryption and decryption processing method and device for dynamic routing, equipment and medium

By using dynamic routing encryption and decryption methods, the development difficulties and security deficiencies of static routing obfuscation technology are solved, achieving secure and efficient routing navigation and a user-friendly experience.

CN121151071APending Publication Date: 2025-12-16天津新智感知科技有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511420164.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing static route obfuscation technology is difficult to maintain during the development phase, resulting in low development efficiency, insufficient static encryption security, insufficient dynamic security, and easily affecting user experience.

Method used

The system employs a dynamic routing encryption and decryption method, configuring encryption and decryption in plaintext during the development phase and dynamically during runtime. It integrates routing interception, full-path encryption, dynamic key injection, and decryption failure interception mechanisms, and distinguishes between jump and entry scenarios for encryption and decryption processing.

Benefits of technology

It prevents the exposure of the routing structure and malicious attacks without affecting the user experience, ensuring the security and stability of routing navigation, and improving development efficiency and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121151071A_ABST
    Figure CN121151071A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic routing encryption and decryption processing method, device and equipment and a medium. Comprising the steps of intercepting a navigation request and determining an operation stage corresponding to the navigation request; when the operation stage is a jump scene, encrypting the target routing address to generate an encrypted route, and performing route navigation based on the encrypted route; and when the operation stage is entering the scene, decrypting the target routing address and determining a decryption result, and performing routing jump based on the decryption result. And by determining the operation stage, a basis can be provided for subsequent targeted processing, and non-invasive intervention is realized. In the skipping scene, the target routing address is encrypted to generate the encrypted routing and navigate, so that exposure of an address bar can be avoided, hostile attacks are prevented, and user operation is ensured not to be perceived; the target routing address is decrypted and skipped according to the result in the entering scene, so that the plaintext routing can be restored to ensure normal matching rendering of the component, successful normal skipping and failure security are realized through the clear result, and page exception is avoided.
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 dynamic route encryption and decryption processing method, device, equipment and medium. BACKGROUND

[0002] With the popularity of front-end single-page applications, the front-end routing library becomes the core tool for realizing page jump, which defines the correspondence between path and page component through routing table configuration, supporting the navigation function of the application.

[0003] The prior art adopts static route obfuscation technology, and the implementation process of the technology needs to run through the development and construction stages. In the development stage, the developer directly configures a random string without business meaning as the route, instead of a clear plaintext path. In the construction stage, all routing tables are fixed in the form of ciphertext, and cannot be adjusted at runtime. When the user accesses the application, the front-end routing library directly matches the ciphertext route in the address bar to complete the page jump, thereby trying to hide the route structure and avoid the security risks of plaintext path.

[0004] The static route obfuscation technology needs to maintain meaningless ciphertext paths in the development stage, which has poor readability, leading to difficult development and debugging, and the need for re-deployment of route changes, which greatly reduces the development efficiency and maintainability. In addition, the encryption key is hard-coded in the code, and the routing table is fixed as static ciphertext after construction. Once the key is leaked, the encryption protection of all routes is invalid, and the dynamic security is insufficient. SUMMARY

[0005] The present application provides a dynamic route encryption and decryption processing method, device, equipment and medium, which constructs a dual-state routing architecture of plaintext configuration in the development stage and dynamic encryption and decryption in the running stage, integrates routing interception, full-path encryption, key dynamic injection and decryption failure interception mechanism, and solves the technical problems of the existing route obfuscation technology, such as the contradiction between development friendliness and security, the easy exposure of route structure, the low security of static encryption, and the easy influence of user experience.

[0006] According to an aspect of the present application, a dynamic route encryption and decryption processing method is provided, which comprises:

[0007] intercepting a navigation request and determining a running stage corresponding to the navigation request, wherein the navigation request includes a target route address, and the running stage includes a jump scenario and an entry scenario;

[0008] when the running stage is the jump scenario, encrypting the target route address to generate an encrypted route, and performing route navigation based on the encrypted route;

[0009] when the running stage is the entry scenario, decrypting the target route address and determining a decryption result, and performing route jump based on the decryption result.

[0010] Optionally, determining the running stage corresponding to the navigation request comprises: judging whether the navigation request is encrypted, if yes, determining that the running stage is the entering scene; otherwise, determining that the running stage is the jump scene.

[0011] Optionally, encrypting the target routing address to generate an encrypted routing comprises: obtaining a preset encryption algorithm and a key; and calling an encryption engine to encrypt the target routing address based on the encryption algorithm and the key to generate an encrypted string, and taking the encrypted string as the encrypted routing.

[0012] Optionally, performing routing navigation based on the encrypted routing comprises: preventing the original navigation request, and initiating a new routing navigation request based on the encrypted routing; determining a front-end routing mode, and updating the display content of the address bar of the browser to a uniform resource locator containing the encrypted routing according to the front-end routing mode.

[0013] Optionally, decrypting the target routing address and determining a decryption result comprises: calling an encryption engine to decrypt the target routing address based on the encryption algorithm and the key to obtain decryption content; and performing legality verification on the decryption content, and determining that the decryption result is decryption success when the verification is passed, or determining that the decryption result is decryption failure.

[0014] Optionally, performing routing jump based on the decryption result comprises: when the decryption result is decryption success, replacing the decryption content with an internal current path of the front-end routing library, and generating a rendering page based on the decryption content by the front-end routing library.

[0015] Optionally, performing routing jump based on the decryption result comprises: when the decryption result is decryption failure, directly jumping to a preset safe jump page.

[0016] According to another aspect of the present application, there is provided a dynamic routing encryption and decryption processing device, which comprises:

[0017] A running stage determination module is configured to intercept a navigation request and determine a running stage corresponding to the navigation request, wherein the navigation request comprises a target routing address, and the running stage comprises a jump scene and an entering scene.

[0018] An encrypted routing module is configured to, when the running stage is the jump scene, encrypt the target routing address to generate an encrypted routing, and perform routing navigation based on the encrypted routing.

[0019] A decrypted routing module is configured to, when the running stage is the entering scene, decrypt the target routing address and determine a decryption result, and perform routing jump based on the decryption result.

[0020] According to another aspect of the present application, there is provided an electronic device, which comprises:

[0021] At least one processor;

[0022] and a memory communicatively connected to the at least one processor;

[0023] The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform a dynamic routing encryption / decryption processing method as described in any embodiment of the present invention.

[0024] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement a dynamic routing encryption / decryption processing method as described in any embodiment of the present invention.

[0025] The technical solution of this invention, by determining the operational phase, can accurately distinguish scenarios before navigation execution, providing a basis for subsequent targeted processing and achieving non-intrusive intervention. In the jump scenario, encrypting the target route address to generate an encrypted route and navigating avoids exposing the original route structure in the address bar, prevents malicious attacks, and ensures that the user's operation is imperceptible. In the entry scenario, decrypting the target route address and jumping according to the result can not only restore the plaintext route to ensure that the components match and render normally, but also achieve successful and normal jumps and a safety net for failures by clearly defining the result, avoiding the risk of unauthorized access and page anomalies.

[0026] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a flowchart of a dynamic routing encryption / decryption processing method provided in Embodiment 1 of the present invention;

[0029] Figure 2 This is a flowchart of another dynamic routing encryption / decryption processing method provided in Embodiment 2 of the present invention;

[0030] Figure 3 This is a schematic diagram of the structure of a dynamic routing encryption / decryption processing device provided in Embodiment 3 of the present invention;

[0031] Figure 4 This is a schematic diagram of the structure of an electronic device that implements a dynamic routing encryption / decryption processing method according to an embodiment of the present invention. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0034] Example 1

[0035] Figure 1 This is a flowchart illustrating a dynamic routing encryption / decryption method according to Embodiment 1 of the present invention. This embodiment is applicable to scenarios where a user initiates a navigation request. The method can be executed by a dynamic routing encryption / decryption processing device, which can be implemented in hardware and / or software and can be configured in a computer controller. Figure 1 As shown, the method includes:

[0036] S110. Intercept the navigation request and determine the corresponding operation stage of the navigation request. The navigation request includes the target route address, and the operation stage includes the jump scenario and the entry scenario.

[0037] Intercepting navigation requests refers to the process of capturing navigation operations after they are triggered but before actual redirection or page rendering, using hook functions in the front-end routing library. The runtime phase refers to the different scenarios in which dynamic routes are actually used by users. Distinguished from the development phase, it is mainly divided into two categories: redirection scenarios and entry scenarios, each with different encryption / decryption processing logic. Redirection scenarios occur when users, within a loaded front-end application, trigger navigation by clicking links, buttons, or code, jumping from the current page to another target page. In this scenario, the original target route address needs to be encrypted to ensure the browser's address bar displays the encrypted text, preventing the route structure from being exposed. Entry scenarios occur when users directly access a Uniform Resource Locator (URL) with encrypted routes or refresh the current page with encrypted routes, causing the front-end routing library to initialize and obtain the path. In this scenario, the encrypted target route address needs to be decrypted to obtain the original route before matching and rendering components.

[0038] Optionally, the execution phase corresponding to the navigation request can be determined, including: determining whether the navigation request is encrypted; if so, determining the execution phase as an entry scenario; otherwise, determining the execution phase as a jump scenario.

[0039] It is known that the division of the running phase in this invention is directly related to the dual-state routing architecture of plaintext configuration in the development phase and dynamic encryption and decryption in the running phase. The jump scenario corresponds to the outbound process of generating ciphertext routes from plaintext routes during runtime, and the entry scenario corresponds to the inbound process of parsing plaintext routes from ciphertext routes during runtime. The judgment criterion is whether the target route address conforms to the encrypted form characteristics.

[0040] In specific judgment, the target route address can be extracted from the navigation request first. Regardless of whether Base64 or AES algorithms are used, encrypted routes will exhibit the characteristic of character combinations without clear business meaning and will not contain plaintext path keywords configured by the developer. Unencrypted target route addresses, on the other hand, are the original plaintext routes defined by the developer in the route configuration module, containing clear business path keywords and conforming to the conventional configuration format of front-end routes. Based on these characteristics, the target route address can be determined as follows: If the extracted target route address is a character combination without clear business meaning and matches the ciphertext format output by the encryption engine, such as conforming to the URL-Safe variant rules of Base64, or having a specific prefix / length characteristic after AES encryption, then the route address is encrypted, and the running stage can be identified as an entry scenario. Conversely, if the extracted target route address contains clear business path keywords and conforms to the plaintext route format configured by the developer, then the route address is unencrypted, and the running stage can be identified as a redirect scenario.

[0041] S120. When the running phase is a jump scenario, the target routing address is encrypted to generate an encrypted route, and route navigation is performed based on the encrypted route.

[0042] The target route address refers to the final route the user expects to access in a navigation request. In redirection scenarios, the target route address refers to the plaintext route configured by the developer—the original route before encryption / decryption. The encrypted route, in redirection scenarios, is a random string generated by encrypting the plaintext target route address using an encryption engine, such as Base64 or AES algorithms. This encrypted route ultimately replaces the original plaintext route, is displayed in the browser's address bar, and is used for navigation, preventing malicious route guessing.

[0043] Optionally, the target routing address is encrypted to generate an encrypted route, including: obtaining a preset encryption algorithm and key; calling the encryption engine to encrypt the target routing address based on the encryption algorithm and key to generate an encrypted string, and using the encrypted string as the encrypted route.

[0044] It should be noted that this application addresses the shortcomings of traditional static encryption key hard-coding by employing a dynamic key injection scheme, while simultaneously supporting multiple encryption algorithms to adapt to different security requirements. The preset encryption algorithm can be Base64 or the highly secure Advanced Encryption Standard (AES) algorithm; and the preset key is not hard-coded in the code but is obtained in real-time through environment variables, separated from the code, ensuring key security every time it runs.

[0045] Specifically, this application employs a full-path encryption method, requiring encryption of the entire path and query parameters, not just the path portion. After invoking the encryption engine, if the Base64 algorithm is selected, the encryption engine will directly Base64 encode the entire string of path and parameters, generating a ciphertext string. If the AES algorithm is selected, the encryption engine will first generate a random initialization vector, then combine it with a preset key to encrypt the entire path and parameters, ultimately outputting a ciphertext string with encryption identifiers.

[0046] Optionally, route navigation based on encrypted routes includes: blocking the original navigation request and initiating a new route navigation request based on the encrypted routes; determining the front-end routing mode and updating the content displayed in the browser address bar to a Uniform Resource Locator (URL) containing the encrypted routes according to the front-end routing mode.

[0047] Specifically, when the runtime phase involves a navigation scenario, the route interception module captures the original navigation request—that is, the navigation request triggered by the user's action and pointing to the plaintext target route—through the hook function of the front-end routing library. To avoid exposing the plaintext route, the interception module first blocks the default execution of the original request, i.e., it does not directly redirect to the page corresponding to the plaintext route. Then, based on the generated encrypted route, it calls the navigation API of the front-end routing library to initiate a new navigation request, ensuring that subsequent route matching and page rendering are based on the encrypted route, while not affecting the continuity of user operations. Next, the route interception module determines the routing mode currently used by the application, including Hash mode and History mode. When the routing mode is Hash mode, the updated URL will use the encrypted route as the content of the Hash part, in the format: domain name# / encrypted route. Because in Hash mode, the content after # in the URL is not sent to the server, but only parsed in the front-end routing library to adapt to the front-end processing logic of the encrypted route. When the routing mode is History mode, the updated URL will use the encrypted route as the content of the path part, in the format: domain name / encrypted route. Ultimately, regardless of the mode, the browser address bar displays a URL containing encrypted routes, which hides the original route structure while ensuring that route navigation works properly, thus solving the problem that traditional plaintext URLs are easily traversed maliciously.

[0048] S130. When the running phase is entering a scenario, the target routing address is decrypted and the decryption result is determined. The routing is then performed based on the decryption result.

[0049] The decryption result refers to the result obtained after the encryption engine decrypts the ciphertext target route address using the same algorithm and key as during encryption, upon entering the scene. There are two scenarios: Successful decryption yields the plaintext original route address consistent with the configuration during development, which can be used for subsequent route matching and rendering. Failed decryption results in the inability to parse a valid plaintext route, triggering an error handling process, such as redirecting to a 404 page or returning to the login page.

[0050] The technical solution of this invention, by determining the operational phase, can accurately distinguish scenarios before navigation execution, providing a basis for subsequent targeted processing and achieving non-intrusive intervention. In the jump scenario, encrypting the target route address to generate an encrypted route and navigating avoids exposing the original route structure in the address bar, prevents malicious attacks, and ensures that the user's operation is imperceptible. In the entry scenario, decrypting the target route address and jumping according to the result can not only restore the plaintext route to ensure that the components match and render normally, but also achieve successful and normal jumps and a safety net for failures by clearly defining the result, avoiding the risk of unauthorized access and page anomalies.

[0051] Example 2

[0052] Figure 2This is a flowchart of a dynamic routing encryption / decryption method provided in Embodiment 2 of the present invention. This embodiment adds a specific process of decrypting the target routing address and determining the decryption result, and then performing a route jump based on the decryption result, based on Embodiment 1. The specific content of steps S210-S220 is largely the same as steps S110-S120 in Embodiment 1, and therefore will not be repeated in this embodiment. Figure 2 As shown, the method includes:

[0053] S210. Intercept the navigation request and determine the corresponding operational phase of the navigation request. The navigation request includes the target route address, and the operational phase includes the jump scenario and the entry scenario.

[0054] Optionally, the execution phase corresponding to the navigation request can be determined, including: determining whether the navigation request is encrypted; if so, determining the execution phase as an entry scenario; otherwise, determining the execution phase as a jump scenario.

[0055] S220. When the running phase is a jump scenario, the target routing address is encrypted to generate an encrypted route, and route navigation is performed based on the encrypted route.

[0056] Optionally, the target routing address is encrypted to generate an encrypted route, including: obtaining a preset encryption algorithm and key; calling the encryption engine to encrypt the target routing address based on the encryption algorithm and key to generate an encrypted string, and using the encrypted string as the encrypted route.

[0057] Optionally, route navigation based on encrypted routes includes: blocking the original navigation request and initiating a new route navigation request based on the encrypted routes; determining the front-end routing mode and updating the content displayed in the browser address bar to a Uniform Resource Locator (URL) containing the encrypted routes according to the front-end routing mode.

[0058] S230: Call the encryption engine to decrypt the target routing address based on the encryption algorithm and key to obtain the decrypted content.

[0059] It is known that the target route address entering the scenario is the encrypted route in the browser's address bar. At this point, the route interception module first determines the encryption algorithm corresponding to the encrypted route. This algorithm is completely consistent with the algorithm preset in the encryption stage; that is, if Base64 is used for encryption, Base64 is also used for decryption, and if AES is used for encryption, AES is also used for decryption. Simultaneously, the same key as in the encryption stage is obtained through environment variables. Then, the encryption engine is called, passing in the encrypted target route address, the corresponding algorithm, and the key. The encryption engine then performs the decryption operation in reverse. For example, when decrypting using Base64, the encrypted string is directly Base64 decoded to restore the original string of path + parameters. If decrypting using AES, the encrypted string is first decrypted using the key and N, then the original route string is obtained, and the final output string is the decrypted content.

[0060] S240. Perform a validity check on the decrypted content. If the check passes, proceed to S250; otherwise, proceed to S260.

[0061] Specifically, the validity check revolves around whether the decrypted content conforms to the routing configuration rules. The check logic includes verifying whether the decrypted content contains valid plaintext route keywords defined by the developer in the routing configuration module. If the decrypted content contains meaningless characters or an unconfigured path, it is deemed invalid. The check logic may also include verifying whether the format of the decrypted content conforms to the front-end routing specifications. When all the above checks pass, the decrypted content is considered a valid original plaintext route, and the decryption result is considered successful, allowing it to be used in the routing library for matching and rendering components. If the checks fail, the decryption result is considered unsuccessful, triggering a pre-defined error handling process to prevent security risks from unauthorized route access.

[0062] S250. Confirm that the decryption result is successful, replace the decrypted content with the current internal path of the front-end routing library, and generate a rendered page based on the decrypted content through the front-end routing library.

[0063] Specifically, the decrypted content obtained after successful decryption is the plaintext route consistent with the plaintext route defined by the developer in the route configuration module. However, the current path obtained during the initialization of the front-end route library is still the ciphertext route in the browser's address bar. To ensure that the route library can match the correct component, the route interception module will proactively replace the current path maintained internally by the route library with the decrypted plaintext route. For example, in Vue Router, this is done by modifying the `matched` property of the route instance or calling an internal API, making the route library believe that the path to be processed is a plaintext route, not the original ciphertext route. This hides the route structure without affecting the route library's matching based on the plaintext rules configured by the developer.

[0064] Furthermore, when the current path within the routing library is replaced with the decrypted plaintext route, the native route matching process is automatically executed: the routing library traverses the preset routing table, compares the decrypted plaintext route with the rules in the routing table, finds the route item where both the path and parameters match, and passes the route parameters to the component via the routing API for internal use. Finally, the component is rendered and displayed on the page, and the user sees the functional page corresponding to the plaintext route, all without any prior awareness of the process.

[0065] In summary, by replacing internal paths, the ciphertext and plaintext are isolated, allowing the front-end routing library to still operate based on plaintext rules familiar to developers. This ensures both the security provided by encryption and the user-friendliness of the development phase, while also ensuring the stability of page rendering by reusing the native logic of the routing library.

[0066] S260. If the decryption result is confirmed as decryption failure, redirect directly to the preset secure redirection page.

[0067] Specifically, decryption failure may occur when the encryption engine fails to parse a valid string from the encrypted route due to key mismatch, algorithm error, or ciphertext tampering, resulting in garbled text after decryption. It could also be due to the decrypted content failing validity checks, such as the decrypted content being a path not defined in the route configuration module or parameter formats not conforming to business rules. All of these situations will be considered decryption failures, triggering subsequent secure redirection procedures. Developers can pre-set the route address of the secure redirection page in the route configuration module, such as a 404 page or a login page, based on business security requirements. The routing rules for this page are unaffected by encryption / decryption and are considered fixed, accessible secure routes within the front-end application. When decryption failure is detected, the route interception module directly calls the navigation API of the front-end route library, skipping the normal route matching process and forcibly navigating the page to the pre-defined secure redirection page. For example, when the pre-defined page is a 404 page, it will directly redirect to the page corresponding to the plaintext route / 404 configured by the developer; when the pre-defined page is a login page, it will redirect to the page corresponding to / login.

[0068] In summary, by forcibly redirecting users to block further processing of illegally encrypted routes, we can avoid page blanking, error messages, or exposure of application internal logic due to decryption failures. Furthermore, providing a unified error feedback exit through a pre-defined secure page aligns with users' familiarity with error pages and guides users to log in again in scenarios requiring authentication, thus ensuring security.

[0069] The technical solution of this invention, by decrypting the target routing address and determining the decryption result, calls the encryption engine to decrypt and obtain the content based on the corresponding algorithm and key. This ensures that only legitimate requests with the correct key can restore the plaintext route, guaranteeing the security of route resolution. Performing legality verification on the decrypted content and determining the result filters out illegal or tampered decrypted content, preventing invalid routes from entering subsequent processes. Based on the decryption result, a redirect is performed. Upon success, the decrypted content is replaced with the current path within the front-end routing library, and a rendered page is generated. This allows the routing library to match the plaintext routing rules configured by the developer, ensuring normal page loading without affecting the developer's routing configuration habits. Upon failure, a direct redirect to a preset security page blocks unauthorized route access, prevents page errors or exposure of application logic, and ensures application security and user experience.

[0070] Example 3

[0071] Figure 3 This is a schematic diagram of the structure of a dynamic routing encryption / decryption processing device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a running phase determination module 310, used to intercept navigation requests and determine the running phase corresponding to the navigation requests, wherein the navigation requests include a target routing address and the running phases include a jump scenario and an entry scenario;

[0072] The encrypted routing module 320 is used to encrypt the target routing address to generate an encrypted route when the running phase is a jump scenario, and to perform route navigation based on the encrypted route;

[0073] The decryption routing module 330 is used to decrypt the target routing address and determine the decryption result when the running phase is entering a scene, and to perform routing jump based on the decryption result.

[0074] Optionally, the runtime phase determination module 310 is specifically used to: determine whether the navigation request is encrypted; if so, determine the runtime phase as an entry scene; otherwise, determine the runtime phase as a jump scene.

[0075] Optionally, the encrypted routing module 320 specifically includes: an address encryption unit, used to: obtain a preset encryption algorithm and key; call the encryption engine to encrypt the target routing address based on the encryption algorithm and key to generate an encrypted string, and use the encrypted string as the encrypted route.

[0076] Optionally, the encrypted routing module 320 specifically includes: an encrypted navigation unit, used to: block the original navigation request and initiate a new route navigation request based on the encrypted route; determine the front-end routing mode and update the content displayed in the browser address bar to a Uniform Resource Locator containing the encrypted route according to the front-end routing mode.

[0077] Optionally, the decryption routing module 330 specifically includes: a decryption address unit, used to: call the encryption engine to decrypt the target routing address based on the encryption algorithm and key to obtain the decrypted content; perform a validity check on the decrypted content, and if the check passes, determine that the decryption result is successful; otherwise, determine that the decryption result is unsuccessful.

[0078] Optionally, the decryption routing module 330 specifically includes: a decryption success redirection unit, used to: when the decryption result is successful, replace the decrypted content with the current internal path of the front-end routing library, and generate a rendered page based on the decrypted content through the front-end routing library.

[0079] Optionally, the decryption routing module 330 specifically includes: a decryption failure redirection unit, used to: directly redirect to a preset secure redirection page when the decryption result is decryption failure.

[0080] The technical solution of this invention, by determining the operational phase, can accurately distinguish scenarios before navigation execution, providing a basis for subsequent targeted processing and achieving non-intrusive intervention. In the jump scenario, encrypting the target route address to generate an encrypted route and navigating avoids exposing the original route structure in the address bar, prevents malicious attacks, and ensures that the user's operation is imperceptible. In the entry scenario, decrypting the target route address and jumping according to the result can not only restore the plaintext route to ensure that the components match and render normally, but also achieve successful and normal jumps and a safety net for failures by clearly defining the result, avoiding the risk of unauthorized access and page anomalies.

[0081] The encryption and decryption processing device for dynamic routing provided in this embodiment of the invention can execute the encryption and decryption processing method for dynamic routing provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0082] Example 4

[0083] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0084] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0085] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0086] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a dynamically routed encryption / decryption processing method.

[0087] In some embodiments, a dynamic routing encryption / decryption processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the dynamic routing encryption / decryption processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform a dynamic routing encryption / decryption processing method by any other suitable means (e.g., by means of firmware).

[0088] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0089] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0090] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0091] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0092] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0093] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0094] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0095] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for encrypting and decrypting dynamic routing, characterized in that, include: Intercept navigation requests and determine the corresponding operational phase of the navigation request, wherein the navigation request includes a target route address and the operational phase includes a jump scenario and an entry scenario; When the operation phase is a jump scenario, the target route address is encrypted to generate an encrypted route, and route navigation is performed based on the encrypted route; When the operation phase is entering a scenario, the target routing address is decrypted and the decryption result is determined, and a routing jump is performed based on the decryption result.

2. The method according to claim 1, characterized in that, Determining the operational phase corresponding to the navigation request includes: Determine whether the navigation request is encrypted; if so, determine that the running phase is entering a scene. Otherwise, the aforementioned operational phase is determined to be a jump scenario.

3. The method according to claim 1, characterized in that, The step of encrypting the target routing address to generate an encrypted route includes: Obtain the preset encryption algorithm and key; The encryption engine is invoked to encrypt the target routing address based on the encryption algorithm and key to generate an encrypted string, and the encrypted string is used as the encrypted route.

4. The method according to claim 1, characterized in that, The route navigation based on the encrypted route includes: Block the original navigation request and initiate a new route navigation request based on the encrypted route; Determine the front-end routing mode and update the browser address bar display to a Uniform Resource Locator (URL) containing encrypted routes based on the front-end routing mode.

5. The method according to claim 3, characterized in that, The step of decrypting the target routing address and determining the decryption result includes: The encryption engine is invoked to decrypt the target routing address based on the encryption algorithm and key to obtain the decrypted content; The decrypted content is validated for legality. If the validation passes, the decryption result is determined to be successful; otherwise, the decryption result is determined to be unsuccessful.

6. The method according to claim 5, characterized in that, The routing based on the decryption result includes: When the decryption result is successful, the decrypted content is replaced with the current internal path of the front-end routing library, and the front-end routing library generates a rendered page based on the decrypted content.

7. The method according to claim 5, characterized in that, The routing based on the decryption result includes: If the decryption result is a decryption failure, the user will be redirected directly to a preset secure redirection page.

8. A dynamic routing encryption / decryption processing device, characterized in that, include: The operation phase determination module is used to intercept navigation requests and determine the operation phase corresponding to the navigation requests, wherein the navigation requests include a target route address and the operation phase includes a jump scenario and an entry scenario; An encrypted routing module is used to encrypt the target routing address to generate an encrypted route when the running phase is a jump scenario, and to perform route navigation based on the encrypted route; The decryption routing module is used to decrypt the target routing address and determine the decryption result when the running phase is entering a scene, and to perform routing jump based on the decryption result.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.

10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions that are used to cause a processor to execute the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Page management method and device

    CN113760278A

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

    CN114745190A

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

    CN116569165A

  • Page sharing method and system and computer storage medium

    CN117220930A

  • Page display method and apparatus, storage medium, and electronic device

    US20250013705A1