CN114172805A - Decentralized automatic routing method - Google Patents

Decentralized automatic routing method Download PDF

Info

Publication number
CN114172805A
CN114172805A CN202111406655.5A CN202111406655A CN114172805A CN 114172805 A CN114172805 A CN 114172805A CN 202111406655 A CN202111406655 A CN 202111406655A CN 114172805 A CN114172805 A CN 114172805A
Authority
CN
China
Prior art keywords
routing
file
json
route
file object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111406655.5A
Other languages
Chinese (zh)
Inventor
黄帅辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan XW Bank Co Ltd
Original Assignee
Sichuan XW Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan XW Bank Co Ltd filed Critical Sichuan XW Bank Co Ltd
Priority to CN202111406655.5A priority Critical patent/CN114172805A/en
Publication of CN114172805A publication Critical patent/CN114172805A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for decentralized automatic routing, which belongs to the technical field of electronic information and solves the problem of dependence of route maintenance on centralization in the prior art, and comprises the following steps: step A: introducing a json package containing classes; and B: instantiating a routing object according to the json packet; and C: customizing a routing rule of a configuration project to obtain a file object; step D: returning the file object in the step C to the user side; step E: and D, initializing the route according to the file object in the step D, thereby realizing the technical effects of reducing manual configuration of developers, improving the development and maintenance efficiency to a certain extent and reducing redundant codes.

Description

Decentralized automatic routing method
Technical Field
The invention belongs to the technical field of electronic information, and particularly relates to a decentralized automatic routing method.
Background
The front-end routing develops to today and goes through the processes of back-end routing, transition of front-end routing and front-end routing. One feature of front-end routing over back-end routing is that pages are switched views without being completely refreshed. The page URL changes but is not reloaded, bringing the user experience closer to the native app. The rise of front-end routing changes page rendering from server rendering to front-end rendering. The route describes a mapping between the URL and the UI, which is one-way, i.e. a URL change causes a UI update (without refreshing the page). The most important display modes of front-end routing are 2 types:
front-end routing with hash: the address column URL has a #, namely a hash value, which is not good, but has high compatibility. Front-end routing history mode without hash: there is no #, nice look in the address bar URL, but some browsers do not support, and also need back-end server support. In vue-router and exact-router, the two presentation forms are defined as two modes, namely a Hash mode and a History mode. The front-end routing realization principle is simple, essentially, the change of the URL is detected, the URL address is intercepted, and the UI updating is realized by analyzing and matching the routing rule.
The routing uses: vue-router and exact-router are the most popular routes today, both history and hash are browser-owned features, and single-page routing only uses these features. Under the condition that the current document is not jumped out, the difference of all browsers can not exist except the compatibility of the history, and the single-page development is to complete all interactions in one document, and the two are perfectly combined, so that the front-end development is improved to a new height. A state management tool. Although the two implementation principles are consistent, the use modes are slightly different due to different technology stacks. But even different technology stacks, depending on the official document requirements:
1. declaring a component file;
2. configuring a routing file;
3. instantiating a route;
4. and mounting the route.
The first and second steps are needed to be repeated for subsequent adding or deleting of the route, wherein if the control of service requirements such as embedded points, authorities and the like is involved, parameters needing to be configured on the route are more and more, and places using the route are more and more, so that modification in maintenance is certainly needed to be carried out by searching each place from a center to modify.
Disclosure of Invention
Aiming at the problem of the dependence of the maintenance route on the centralization in the prior art, the invention provides a method for decentralized automatic routing, which aims to: the manual configuration of developers is reduced, the development and maintenance efficiency is improved to a certain extent, and redundant codes are reduced.
The technical scheme adopted by the invention is as follows:
a method of decentralized automatic routing, comprising the steps of:
step A: introducing a json package containing classes;
and B: instantiating a routing object according to the json packet;
and C: customizing a routing rule of a configuration project to obtain a file object;
step D: returning the file object in the step C to the user side;
step E: and D, initializing the route according to the file object in the step D.
By adopting the scheme, after the route is read through automatic configuration, the route is newly added or modified in the project iteration, only the file is required to be modified, the route configuration is not required to be frequently modified in multiple levels, the method is suitable for various front-end frameworks, the route is automatically loaded and unloaded by taking the standard file directory as an angle, the manual configuration of developers is reduced, the development and maintenance efficiency is improved to a certain extent, and redundant codes are reduced.
And B, establishing a json object for accessing the attributes and the method in the json package according to the class in the json package.
By adopting the scheme, a user can directly integrate, polymorphism or overload the class in the json package.
In the step C, the instantiated routing object is sent to the folder and the reading rule which are needed to be read by the user item.
By adopting the scheme, the multi-channel routing re-coverage use is supported, and the problem caused by channel differentiation is greatly reduced. The pages can be shared by different channels, the pages of the users can be customized and used, and the method can be applied to routing and all files needing to be read can be used.
The file object in the step D comprises a file name, a file path, a file and a file suffix name.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:
1. after the route can be read through automatic configuration, the route is newly added or modified in the project iteration, only the file is required to be modified, the route configuration is not required to be frequently modified in multiple levels, the method is suitable for various front-end frameworks, the route is automatically loaded and unloaded by taking a standard file directory as an angle, the manual configuration of developers is reduced, the development and maintenance efficiency is improved to a certain extent, redundant codes are reduced, and the user can directly integrate, use classes in a json packet in a multi-state or heavy-load mode.
2. And the method supports multi-channel routing repeated coverage and greatly reduces the problems caused by channel differentiation. The page can be shared when different channels enter, the page can be customized and used, the method can be applied to routing, and all files needing to be read can be used
Drawings
The invention will now be described, by way of example, with reference to the accompanying drawings, in which:
FIG. 1 is a flow chart of the present invention;
Detailed Description
All of the features disclosed in this specification, or all of the steps in any method or process so disclosed, may be combined in any combination, except combinations of features and/or steps that are mutually exclusive.
The present invention will be described in detail with reference to fig. 1.
A method of decentralized automatic routing, comprising the steps of:
step A: introducing a json package containing classes;
and B: instantiating a routing object according to the json packet;
and C: customizing a routing rule of a configuration project to obtain a file object;
step D: returning the file object in the step C to the user side;
step E: and D, initializing the route according to the file object in the step D.
And B, establishing a json object for accessing the attributes and the method in the json package according to the class in the json package.
In the step C, the instantiated routing object is sent to the folder and the reading rule which are needed to be read by the user item.
The file object in the step D comprises a file name, a file path, a file and a file suffix name.
The js package in the application can be directly used after being introduced, supports UMD, is compatible with AMD and commomJS specifications, and is compatible with a global reference mode, when an object is re-instantiated, a new object needs to be newly established so as to facilitate the internal attributes and methods of the accessor, wherein the instantiated object can be transmitted into a folder and a reading rule which need to be read by a user project, and the reading rule comprises the following steps: the method can be suitable for various regular matching, not only can be suitable for routing, but also can be used for all files needing to be read.
The above-mentioned embodiments only express the specific embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for those skilled in the art, without departing from the technical idea of the present application, several changes and modifications can be made, which are all within the protection scope of the present application.

Claims (4)

1. A method of decentralized automatic routing, comprising the steps of:
step A: introducing a json package containing classes;
and B: instantiating a routing object according to the json packet;
and C: customizing a routing rule of a configuration project to obtain a file object;
step D: returning the file object in the step C to the user side;
step E: and D, initializing the route according to the file object in the step D.
2. The method according to claim 1, wherein the step B is specifically configured to create a json object for accessing the attributes and methods in the json packet according to the class in the json packet.
3. The method according to claim 1, wherein in step C, folders and reading rules that need to be read by user items are introduced into instantiated routing objects.
4. The method for decentralized automatic routing according to claim 1, wherein the file object in step D includes a file name, a file path, a file and a file suffix name.
CN202111406655.5A 2021-11-24 2021-11-24 Decentralized automatic routing method Pending CN114172805A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111406655.5A CN114172805A (en) 2021-11-24 2021-11-24 Decentralized automatic routing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111406655.5A CN114172805A (en) 2021-11-24 2021-11-24 Decentralized automatic routing method

Publications (1)

Publication Number Publication Date
CN114172805A true CN114172805A (en) 2022-03-11

Family

ID=80480507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111406655.5A Pending CN114172805A (en) 2021-11-24 2021-11-24 Decentralized automatic routing method

Country Status (1)

Country Link
CN (1) CN114172805A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170374180A1 (en) * 2016-06-22 2017-12-28 RtBrick Inc. Method to build a modular distributed network device using microservices architecture
CN108804099A (en) * 2017-04-27 2018-11-13 北京微影时代科技有限公司 A kind of PHP development approaches and frame
CN112532546A (en) * 2020-11-24 2021-03-19 上海浦东发展银行股份有限公司 Call route selection method based on soft switch

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170374180A1 (en) * 2016-06-22 2017-12-28 RtBrick Inc. Method to build a modular distributed network device using microservices architecture
CN108804099A (en) * 2017-04-27 2018-11-13 北京微影时代科技有限公司 A kind of PHP development approaches and frame
CN112532546A (en) * 2020-11-24 2021-03-19 上海浦东发展银行股份有限公司 Call route selection method based on soft switch

Similar Documents

Publication Publication Date Title
CN108038114B (en) Path query method, terminal and computer readable storage medium
US9210118B2 (en) Automatically providing a communication based on location information for a user of a social networking system
KR101312810B1 (en) Partial item change tracking and synchronization
US8438558B1 (en) System and method of updating programs and data
US8769125B2 (en) Method and apparatus for ensuring transport of user agent information
US20200382458A1 (en) Coordination of Data Received from One or More Sources over One or More Channels into a Single Context
US8001077B2 (en) Distributed method for synchronizing and updating bookmarks on multiple computer devices
US20140143446A1 (en) Data transport by named content synchronization
US20090288004A1 (en) System, method, apparatus and computer program product for providing a notification of widget availability
US20120158893A1 (en) Methods and apparatus for enabling a hybrid web and native application
CN102073526B (en) Software transfer installation method and system for mobile terminal
CN101132413B (en) ActiveX component multiplexing method based on Web application
WO2006110005A1 (en) Method for providing contents for mobile comunication terminal
CN106874357B (en) Resource customization method and device for Web application
US8595224B2 (en) Smart path finding for file operations
MXPA04007146A (en) Method and apparatus for late-binding/dynamic pathname resolution.
CN105843867A (en) Metadata model-based search method and search device based on metadata model
WO2015000342A1 (en) Method and client device for accessing webpage
CN101115180B (en) Electronic program menu system and functional module dynamic load operating method
US20060015849A1 (en) Application splitting for network edge computing
CN107632752B (en) Multimedia data display method and device and computer readable storage medium
US20090119345A1 (en) Resolving conflicts when importing an application customization
CN114172805A (en) Decentralized automatic routing method
CN104217021B (en) Reading server, terminal device and its method for showing reading content
US20090024664A1 (en) Method and system for generating a content-based file, and content-based data structure

Legal Events

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