CN111526034B - Route centralized management method, device, electronic device and storage medium - Google Patents

Route centralized management method, device, electronic device and storage medium Download PDF

Info

Publication number
CN111526034B
CN111526034B CN202010141735.1A CN202010141735A CN111526034B CN 111526034 B CN111526034 B CN 111526034B CN 202010141735 A CN202010141735 A CN 202010141735A CN 111526034 B CN111526034 B CN 111526034B
Authority
CN
China
Prior art keywords
urls
url
cache
received
module
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.)
Active
Application number
CN202010141735.1A
Other languages
Chinese (zh)
Other versions
CN111526034A (en
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202010141735.1A priority Critical patent/CN111526034B/en
Priority to PCT/CN2020/099294 priority patent/WO2021174729A1/en
Publication of CN111526034A publication Critical patent/CN111526034A/en
Application granted granted Critical
Publication of CN111526034B publication Critical patent/CN111526034B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of cloud service, and provides a route centralized management method, which comprises the following steps: uniformly configuring urls according to a preset instruction, storing the configured urls into a cache, and externally providing an interface for receiving an external incoming url; receiving a url transmitted through the interface; matching the received urls with the urls in the cache one by one; if the received url is matched with the url in the urls in the cache, entering a view function corresponding to the matched url; and returning a page, wherein the page comprises the data returned by the view function. The invention also provides a device, an electronic device and a storage medium, which can realize centralized routing management.

Description

Route centralized management method, device, electronic device and storage medium
Technical Field
The invention relates to the technical field of cloud services, in particular to a method and a device for centralized management of routes, an electronic device and a storage medium.
Background
The flash framework is a web framework developed based on the python language. The flash framework is divided into modules by utilizing blueprints, and the modules are registered by the app decorator and are called by the main module in a unified mode. The current flash framework cannot realize centralized routing management.
Disclosure of Invention
In view of the above, it is desirable to provide a method, an apparatus, an electronic apparatus and a storage medium for centralized route management, which can implement centralized route management.
A first aspect of the present application provides a method for centralized management of routes, where the method includes:
uniformly configuring urls according to a preset instruction, storing the configured urls into a cache, and externally providing an interface for receiving an external incoming url;
receiving a url which is transmitted through the interface;
matching the received urls with the urls in the cache one by one;
if the received url is matched with the url in the urls in the cache, entering a view function corresponding to the matched url;
and returning a page, wherein the page comprises the data returned by the view function.
Further, the uniformly configuring urls according to the preset instructions and storing the configured urls into the cache includes:
creating a project app file;
and starting an entry file according to a preset instruction, and carrying the core module to uniformly configure the urls and store the configured urls into a cache.
Further, the unified configuration urls include:
judging whether the url comprises include;
if the url includes include, putting urls including include into a list by a global url language to realize uniform configuration urls;
if the url does not include, the urls are uniformly configured by placing urls that do not include in a list by a global urls pattern erns.
Further, prior to determining whether the url includes an include, the method further comprises:
indexing urls;
the uniformly configuring urls according to preset instructions and storing the configured urls into a cache comprise:
and uniformly configuring the urls of the index according to a preset instruction and storing the configured urls into a cache.
Further, the index urls s includes:
transmitting the item app as a parameter into a core module;
indexing a url in a function module in the item app.
Further, said matching said url received with said urls in the buffer one by one includes:
parsing the url received;
matching the url resolved with the urls in the cache one by one. Further, said parsing said url received comprises:
judging whether the received url includes include;
if the received url does not include, parsing a path included in the url from the received url;
if the received url comprises the include, analyzing a path contained in the url and a sub-path contained in the include from the received url, continuously searching whether the sub-path comprises the include, and analyzing according to a searching result until the sub-path does not comprise the include.
A second aspect of the present application provides a route centralized management apparatus, including:
the registration module is used for uniformly configuring urls according to a preset instruction, storing the configured urls into a cache and providing an interface for receiving an externally-transmitted url;
the receiving module is used for receiving the url transmitted through the interface;
the matching module is used for matching the received urls with the urls in the cache one by one;
an entering module, configured to enter a view function corresponding to the url that is matched if the url received is matched with the url in the urls in the cache;
and the page returning module is used for returning a page, and the page comprises the data returned by the view function.
A third aspect of the present application provides an electronic device, which includes a processor and a memory, where the processor is configured to implement the centralized route management method as described in any one of the above items when executing at least one instruction stored in the memory.
A fourth aspect of the present application provides a computer-readable storage medium storing at least one instruction executed by a processor to implement a route centralized management method as described in any one of the above.
According to the scheme, the routes are centrally managed by uniformly configuring the urls, so that the urls are clearer and more clear, the urls are more convenient to search, and the urls can be quickly indexed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for centralized management of routes according to an embodiment of the present invention.
Fig. 2 is a structural diagram of a route centralized management apparatus according to a second embodiment of the present invention.
Fig. 3 is a schematic view of an electronic device according to a third embodiment of the invention.
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Description of the main elements
Route centralized management device 20
Registration module 21
Receiving module 22
Matching module 23
Entry module 24
Page return module 25
Electronic device 3
Memory 31
Processor 32
Computer readable instructions 33
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a detailed description of the present invention will be given below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention, and the described embodiments are merely a subset of the embodiments of the present invention, rather than a complete embodiment. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Example one
Fig. 1 is a flowchart of a method for centralized management of routes according to an embodiment of the present invention. The method is applied to an electronic device, which may be any kind of electronic product, such as a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), and the like. As shown in fig. 1, the method for centralized management of routes may include the following steps:
s11: and uniformly configuring the urls according to a preset instruction, storing the configured urls into a cache, and externally providing an interface for receiving an external incoming url.
In this embodiment, the uniformly configuring urls according to the preset instructions and storing the configured urls into the cache includes:
creating a project app file;
and starting an entry file according to a preset instruction, and carrying the core module to uniformly configure the urls and store the configured urls into a cache.
In this embodiment, the project app file is a flash project app file. The project app file comprises the own attributes of a flash frame and partial attributes of a django frame, so that the django style can be realized based on the flash frame. The project app file comprises an entry file, a core module and a function module. Wherein the item app file is not changed in other parts under the flash framework.
In this embodiment, the portal file may be the same file as the project app file. The starting of the entry file according to the preset instruction is starting of the entry file according to an operation of selecting the project app file. The entry file is the entry point for all requests by the project app. Launching the portal file launches the project app.
In this embodiment, the core module includes a first module and a second module. In this embodiment, the first module includes urlconf _ module, urlpatterns, and urlincludepatterns. Add _ url _ rule function, regular match function, view function, name of endpoint, and other parameters. The canonical match function is used to match the url to classify the url. The view function is used for receiving a request of a user and returning a corresponding response. The name of the endpoint is a name set for a routing rule, and is used for the urls to find a view function with the name matched with the name of the endpoint. The other parameters comprise reserved parameters such as kwarges.
In this embodiment, the unified configuration urls includes:
the first module is carried to configure urls via a global urlpatterns and/or urlincludepatterns. In this embodiment, configuring urls by a global urlpatterns and/or urlinclepiderns includes: and the urls of different functional modules are placed in a list through the urlpatterns and/or the urlincludepatterns to realize the arrangement of the urls, so that the urls of different functional modules are managed in a centralized way.
In this embodiment, the urls configured include urls for a plurality of functional modules in the project app. In this embodiment, the urls can include multi-level nested urls and single-level urls. The multi-level nested url is a url of a function module that includes a plurality of sub-function modules. The sub-urls of the multi-level nested url are urls of other sub-function modules introduced to the function module. The multi-level nested url includes an include for the url. The single-stage url is a url of a functional module that does not include a sub-functional module. The single stage url is such that the url does not include an include. The functional modules are used for realizing corresponding functions, and different functional modules are used for realizing different functions. Py files are included in each function module. In this embodiment, the url.py is a routing file, and includes the url of the corresponding function module.
In this embodiment, the unified configuration urls includes:
judging whether the url comprises include;
if the url includes include, putting urls including include into a list by a global url language to realize uniform configuration urls;
if the url does not include, the urls are uniformly configured by placing the urls without include in a list through a global url patterns.
In this embodiment, before determining whether the url includes include an include, the method further includes:
an index urls;
the uniformly configuring urls according to preset instructions and storing the configured urls into a cache comprise:
and uniformly configuring the urls of the index according to a preset instruction and storing the configured urls into a cache.
In this embodiment, the index urls s includes:
transmitting the item app as a parameter into a core module;
indexing a url in a functional module in the item app.
In this embodiment, the indexing url in the function module in the item app includes:
and indexing url in a url.py file corresponding to a functional module in the item app by using the self-attribute url conf _ module of the flash framework.
In this embodiment, the storing the configured urls into the cache includes:
carry the second module to use app add url rule function to register the indexed url in turn in the app's cache. In this embodiment, the second module is compatible with the multi-level nested url and the single-level url, so that the use of one url in various scenes is realized by the compatibility of the second module with the multi-level nested url.
In this embodiment, the sequentially registering the indexed urls into the cache of the app by using the app.add _ url _ rule function includes:
add _ url _ rule function is used to automatically register the indexed url as the parameters of the app into the buffer of the app in sequence according to the rule matching from front to back so that the url matches the respective view function.
In this embodiment, the method further includes: add _ url _ rule function also binds view function and url via endpoint when registering url.
The interface for receiving the external incoming url is provided for the external, and an interface which can be called is provided for the implementation to receive the external incoming url as a parameter.
S12: receiving a url that is inbound through the interface.
The url that is passed in through the interface may be, for example: url ('/test/', test,); url ('/test 2/', test2 '); url ('/post/', include ('model 2. urls')).
And S13, matching the url received with the urls in the cache one by one.
The one-by-one matching of the received urls and the urls in the cache can be that the received urls are matched with the urls in the cache one by one according to the sequence from top to bottom through a regular matching function. Said matching said url received with said urls in the cache one by one comprises:
parsing the url received;
matching the parsed urls with the urls in the cache one by one.
In this embodiment, the parsing the received url includes:
judging whether the received url includes include;
if the received url does not include, parsing a path included in the url from the received url;
if the received url includes the include, analyzing the path included by the url and the sub-path included by the include from the received url, continuing to search whether the include is included in the sub-path, and analyzing according to the search result until the include is not included in the sub-path.
In this embodiment, if the received url does not include, and the path included in the url parsed from the received url may be, for example, url ('/test/', test), then the path test included in the url is parsed from the received url.
If the url received includes an include, the path included in the url and the path included in the include may be parsed from the url received, for example, the url is url ('/post/', include ('model 2. urls')), then the path included in the url and the path included in the include are parsed from the url received as post and model2, respectively.
In this embodiment, the matching the parsed urls with the urls in the cache one by one includes:
if the analyzed url is the path contained by the url and the sub-path contained by the include, matching the path contained by the url with the urls in the cache one by one according to the sequence from top to bottom; if a plurality of matching urls exist, matching the paths contained in the include with the matching urls one by one according to the sequence from top to bottom;
and if the analyzed url is the path contained by the url, matching the path contained by the url with the urls in the cache one by one according to the sequence from top to bottom.
S14, if the received url is matched with the url in the urls in the cache, entering the view function corresponding to the matched url.
In this embodiment, once the received url matches the url in the urls in the cache, the matching is not continued. Each url corresponds to a view function. In this embodiment, the item app file further includes a url _ map table and a view _ functions table. The url _ map table is used to maintain a mapping of url rules and endpoint. The view _ functions table is used to maintain the mapping of endpoint and view functions. The view function corresponding to the url entering the matching comprises:
finding the matched endpoint corresponding to the url by using a url _ map table;
and searching a view function corresponding to the endpoint by using a view _ functions table.
In this embodiment, when entering the matched view function corresponding to the url, the view function corresponding to the url is also executed.
And S15, returning a page, wherein the page comprises the data returned by the view function.
In this embodiment, if the received url does not match any url in the urls in the cache, an error is prompted.
According to the first embodiment of the invention, urls are uniformly configured according to a preset instruction, the configured urls are stored in a cache, and an interface for receiving an external incoming url is provided externally; receiving a url which is transmitted through the interface; matching the received urls with the urls in the cache one by one; if the received url is matched with the url in the urls in the cache, entering a view function corresponding to the matched url; and returning a page, wherein the page comprises the data returned by the view function. Therefore, the route is managed in a centralized manner by uniformly configuring the urls under the flash framework, so that the urls are clearer and clearer, the urls are more convenient to search, and the urls can be quickly indexed; the urls of other modules are introduced in an include mode, so that the operation is simpler and more concise; meanwhile, the url is classified, so that the intuitive urls structure is clearer and convenient for subsequent modification.
The above is a detailed description of the method provided by the present invention. The order of execution of the blocks in the illustrated flowcharts may be changed, and some blocks may be omitted, as desired. The apparatus provided by the present invention is described below.
Example two
Fig. 2 is a functional block diagram of a centralized routing management apparatus according to a second embodiment of the present invention. In some embodiments, the centralized routing management device 20 operates in an electronic device. The electronic device may be any kind of electronic product, such as a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), and the like. The centralized routing management apparatus 20 may include a plurality of functional modules composed of program code segments. The program codes of the respective program segments in the route centralized management apparatus 20 may be stored in a memory and executed by at least one processor to implement centralized route management.
In this embodiment, the route centralized management device 20 may be divided into a plurality of functional modules according to the functions performed by the device. The functional module may include: a registration module 21, a receiving module 22, a matching module 23, an entry module 24, and a page return module 25. The modules referred to herein are a series of computer program segments stored in a memory that can be executed by at least one processor and that perform a fixed function.
The registration module 21 is configured to uniformly configure urls according to a preset instruction, store the configured urls into a cache, and externally provide an interface for receiving an external incoming url.
In this embodiment, the uniformly configuring urls according to the preset instructions and storing the configured urls into the cache includes:
creating a project app file;
and starting an entry file according to a preset instruction, and carrying the core module to uniformly configure the urls and store the configured urls into a cache.
In this embodiment, the project app file is a flash project app file. The project app file comprises the own attributes of a flash frame and partial attributes of a django frame, so that the django style can be realized based on the flash frame. The project app file comprises an entry file, a core module and a function module. Wherein the other part of the project app file is unchanged under the flash framework.
In this embodiment, the portal file may be the same file as the project app file. The starting of the entry file according to the preset instruction is starting of the entry file according to an operation of selecting the project app file. The entry file is the entry point for all requests by the project app. Launching the portal file launches the project app.
In this embodiment, the core module includes a first module and a second module. In this embodiment, the first module includes urlconf _ module, urlpatterns, and urlincludepatterns. Add _ url _ rule function, regular match function, view function, name of endpoint, and other parameters. The regular matching function is used to match the url to classify the url. The view function is used for receiving a request of a user and returning a corresponding response. The name of the endpoint is a name set for a routing rule, and the endpoint is used for the urls to find a view function with the name matched with the name of the endpoint. The other parameters comprise reserved parameters such as kwarges.
In this embodiment, the unified configuration urls includes:
the first module is carried to configure urls via a global urlpatterns and/or urlincludepatterns. In this embodiment, configuring urls by a global urlpatterns and/or urlinclepiderns includes: and the urls of different functional modules are placed in a list through the urls patterns and/or urls cludepatterns to realize the arrangement of the urls, so that the urls of different functional modules are managed in a centralized way.
In this embodiment, the urls configured include urls for a plurality of functional modules in the project app. In this embodiment, the urls can include multi-level nested urls and single-level urls. The multi-level nested url is a url of a function module that includes a plurality of sub-function modules. The sub-urls of the multi-level nested url are urls of other sub-function modules introduced to the function module. The multi-level nested url includes an include for the url. The single-stage url is a url of a functional module that does not include a sub-functional module. The single stage of url is such that the url does not include an include. The functional modules are used for realizing corresponding functions, and different functional modules are used for realizing different functions. Py files are included in each function module. In this embodiment, the url.py is a routing file, and includes the url of the corresponding function module.
In this embodiment, the unified configuration urls further includes:
judging whether the url comprises include;
if the url includes include, putting urls including include into a list by a global url language to realize uniform configuration urls;
if the url does not include, the urls are uniformly configured by placing urls that do not include in a list by a global urls pattern erns.
In this embodiment, before determining whether the url includes include, the registration module 21 is further configured to:
the indices urls.
The uniformly configuring urls according to preset instructions and storing the configured urls into a cache comprise:
and uniformly configuring the urls of the index according to a preset instruction and storing the configured urls into a cache.
In this embodiment, the index urls s includes:
transmitting the item app as a parameter into a core module;
indexing a url in a function module in the item app.
In this embodiment, the indexing url in the functional module in the item app includes:
and indexing url in a url.py file corresponding to a functional module in the item app by using the self-attribute url conf _ module of the flash framework.
In this embodiment, the storing the configured urls into the cache includes:
carry the second module to use app add url rule function to register the indexed url in turn in the app's cache. In this embodiment, the second module is compatible with a multi-level nested url and a single-level url, so that one url is adapted to be used in multiple scenes by the second module being compatible with the multi-level nested url.
In this embodiment, the sequentially registering the indexed urls into the cache of the app by using the app.add _ url _ rule function includes:
add _ url _ rule function is used to automatically register the indexed url as the parameters of the app into the buffer of the app in sequence according to the rule matching from front to back so that the url matches the respective view function.
In this embodiment, the registration module 21 is further configured to: add url register url with app end point also binding view function with url.
The interface for receiving the external incoming url is provided for the external, and an interface which can be called is provided for the implementation to receive the external incoming url as a parameter.
The receiving module 22 is configured to receive the url transmitted through the interface.
The url that is passed in through the interface may be, for example: url ('/test/', test,); url ('/test 2/', test2 '); url ('/post/', include ('model 2. urls')).
The matching module 23 is configured to match the url received with the urls in the cache one by one.
The one-by-one matching of the received urls and the urls in the buffer memory can be implemented by matching the received urls and the urls in the buffer memory one by one according to the sequence from top to bottom through a regular matching function. Said matching said url received with said urls in the cache one by one comprises:
parsing the url received;
matching the parsed urls with the urls in the cache one by one.
In this embodiment, the parsing the received url includes:
judging whether the received url includes include;
if the received url does not include, parsing a path included in the url from the received url;
if the received url includes the include, analyzing the path included by the url and the sub-path included by the include from the received url, continuing to search whether the include is included in the sub-path, and analyzing according to the search result until the include is not included in the sub-path.
In this embodiment, if the received url does not include, and the path included in the url parsed from the received url may be, for example, url ('/test/', test), then the path test included in the url is parsed from the received url.
If the url received includes an include, the path included in the url and the path included in the include may be parsed from the url received, for example, the url is url ('/post/', include ('model 2. urls')), then the path included in the url and the path included in the include are parsed from the url received as post and model2, respectively.
In this embodiment, the matching the parsed urls one by one with the urls in the cache includes:
if the analyzed url is the path contained by the url and the sub-path contained by the include, matching the path contained by the url with the urls in the cache one by one according to the sequence from top to bottom; if a plurality of matching urls exist, matching the paths contained in the include with the matching urls one by one according to the sequence from top to bottom;
and if the analyzed url is the path contained by the url, matching the path contained by the url with the urls in the cache one by one according to the sequence from top to bottom.
The entering module 24 is configured to enter a view function corresponding to the url that is matched if the url received matches the url in the urls in the cache.
In this embodiment, once the received url matches the url in the urls in the cache, the matching is not continued. Each url corresponds to a view function. In this embodiment, the item app file further includes a url _ map table and a view _ functions table. The url _ map table is used to maintain a mapping of url rules and endpoint. The view _ functions table is used to maintain a mapping of endpoint and view functions. The view function corresponding to the url entering the matching comprises:
finding the matched endpoint corresponding to the url by using a url _ map table;
and searching a view function corresponding to the endpoint by using a view _ functions table.
In this embodiment, when entering the matched view function corresponding to the url, the view function corresponding to the url is also executed.
The page returning module 25 is configured to return a page, where the page includes data returned by the view function.
In this embodiment, if the received url does not match any url in the urls in the cache, an error is prompted.
In the embodiment of the invention, the urls are uniformly configured according to the preset instruction, the configured urls are stored in the cache, and an interface for receiving the externally-transmitted urls is externally provided; receiving a url which is transmitted through the interface; matching the received urls with the urls in the cache one by one; if the received url is matched with the url in the urls in the cache, entering a view function corresponding to the matched url; and returning a page, wherein the page comprises the data returned by the view function. Therefore, the route is centrally managed by uniformly configuring the urls under the flash framework, so that the urls are clearer and clearer, the urls are more convenient to search, and the urls can be quickly indexed; the urls of other modules are introduced in an include mode, so that the operation is simpler and more concise; meanwhile, the url is classified, so that the intuitive urls structure is clearer and convenient for subsequent modification.
The integrated unit implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for causing an electronic device or a processor (processor) to execute the parts of the methods according to the embodiments of the present invention.
EXAMPLE III
Fig. 3 is a schematic view of an electronic device according to a third embodiment of the present application.
The electronic device 3 includes: a memory 31, at least one processor 32, and computer readable instructions 33 stored in the memory 31 and executable on the at least one processor 32. The steps in the above described embodiments of the method of centralized management of routes are implemented when the computer readable instructions 33 are executed by the at least one processor 32. Alternatively, the at least one processor 32, when executing the computer readable instructions 33, implements the functions of the modules in the route centralized management apparatus embodiment described above.
Illustratively, the computer-readable instructions 33 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the at least one processor 32 to accomplish the present application. The one or more modules/units may be a series of computer-readable instruction segments capable of performing specific functions, which are used for describing the execution process of the computer-readable instructions 33 in the electronic device 3. For example, the computer readable instructions 33 may be divided into modules shown in fig. 2, and the specific functions of each module are described in embodiment two.
The electronic device 3 may be any electronic product, such as a smart phone, a Personal Digital Assistant (PDA), and the like. It will be understood by those skilled in the art that the schematic diagram 3 is only an example of the electronic apparatus 3, and does not constitute a limitation to the electronic apparatus 3, and may include more or less components than those shown, or combine some components, or different components, for example, the electronic apparatus 3 may further include an input and output device, a network access device, a bus, etc.
The at least one Processor 32 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The processor 32 may be a microprocessor or the processor 32 may be any conventional processor, etc., and the processor 32 is a control center of the electronic device 3 and connects various parts of the whole electronic device 3 by various interfaces and lines.
The memory 31 may be used to store the computer readable instructions 33 and/or modules/units, and the processor 32 implements various functions of the electronic device 3 by executing or executing the computer readable instructions and/or modules/units stored in the memory 31 and invoking data stored in the memory 31. The memory 31 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data) created according to the use of the electronic apparatus 3, and the like. Further, the memory 31 may include non-volatile computer-readable memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other non-volatile solid state storage device.
The integrated modules/units of the electronic device 3 may be stored in a non-volatile computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the processes in the methods of the embodiments described above may also be implemented by a computer program, which may be stored in a non-volatile computer-readable storage medium, and when the computer program is executed by a processor, the following steps may be implemented:
uniformly configuring urls according to a preset instruction, storing the configured urls into a cache, and externally providing an interface for receiving an external incoming url;
receiving a url which is transmitted through the interface;
matching the received urls with the urls in the cache one by one;
if the received url is matched with the url in the urls in the cache, entering a view function corresponding to the matched url;
and returning a page, wherein the page comprises the data returned by the view function.
For specific content, reference may be made to the above embodiment of the route centralized management method, and details are not described here. Wherein the computer program comprises computer readable instruction code which may be in source code form, object code form, an executable file or some intermediate form, etc. The non-transitory computer-readable storage medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), and the like.
In the several embodiments provided in the present application, it should be understood that the disclosed electronic device and method may be implemented in other ways. For example, the above-described embodiments of the electronic device are merely illustrative, and for example, the division of the units is only one logical function division, and there may be other division ways in actual implementation.
In addition, functional units in the embodiments of the present application may be integrated into the same processing unit, or each unit may exist alone physically, or two or more units are integrated into the same unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or that the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present application and not for limiting, and although the present application is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present application without departing from the spirit scope of the technical solutions of the present application.

Claims (7)

1. A method for centralized management of routes, the method comprising:
uniformly configuring urls according to a preset instruction, storing the configured urls into a cache, and externally providing an interface for receiving an external incoming url;
the unified configuration urls includes:
judging whether the url comprises include; the urls comprise multi-stage nested urls and single-stage urls, the multi-stage nested urls are that the urls include includees, and the single-stage urls are that the urls do not include includees;
if the url includes include, putting urls including include into a list by a global url language to realize uniform configuration urls;
if the url does not include the include, the urls are uniformly configured by placing the urls without the include in a list through a global urls paltterns;
receiving a url which is transmitted through the interface;
matching the received url with the urls in the buffer one by one, comprising:
analyzing the received url specifically includes:
judging whether the received url includes include;
if the received url does not include, parsing a path included in the url from the received url;
if the received url includes the include, analyzing a path included by the url and a sub-path included by the include from the received url, continuing to search whether the include is included in the sub-path, and analyzing according to a search result until the include is not included in the sub-path;
matching the parsed urls with the urls in the cache one by one;
if the received url is matched with the url in the urls in the cache, entering a view function corresponding to the matched url;
and returning a page, wherein the page comprises the data returned by the view function.
2. The method as claimed in claim 1, wherein the uniformly configuring urls according to the preset commands and storing the configured urls into the cache comprises:
creating a project app file;
and starting an entry file according to a preset instruction, and carrying the core module to uniformly configure the urls and store the configured urls into a cache.
3. The method of centralized route management according to claim 1, wherein prior to determining whether the url includes an include, the method further comprises:
an index urls;
the uniformly configuring urls according to preset instructions and storing the configured urls into a cache comprise:
and uniformly configuring the urls of the index according to a preset instruction and storing the configured urls into a cache.
4. The method for centralized management of routing of claim 3, wherein the indexing urls s comprises:
transmitting the item app as a parameter into a core module;
indexing a url in a functional module in the item app.
5. An apparatus for centralized management of routes, the apparatus comprising:
the registration module is used for uniformly configuring urls according to a preset instruction, storing the configured urls into a cache and providing an interface for receiving an externally-transmitted url;
the registration module uniformly configuring urls comprises:
judging whether the url comprises include; the urls comprise multi-stage nested urls and single-stage urls, the multi-stage nested urls are that the urls include includees, and the single-stage urls are that the urls do not include includees;
if the url includes include, putting urls including include into a list by a global url language to realize uniform configuration urls;
if the url does not comprise include, the urls are uniformly configured by placing the urls which do not comprise include in a list through a global url patterns;
the receiving module is used for receiving the url transmitted through the interface;
the matching module is used for matching the received urls with the urls in the cache one by one;
the matching module matches the received url with the urls in the cache one by one, and the matching module comprises the following steps:
analyzing the received url specifically includes:
judging whether the received url comprises include an include;
if the received url does not comprise include, parsing out a path contained in the url from the received url;
if the received url includes the include, analyzing a path included by the url and a sub-path included by the include from the received url, continuing to search whether the include is included in the sub-path, and analyzing according to a search result until the include is not included in the sub-path;
matching the parsed urls with the urls in the cache one by one;
an entering module, configured to enter a view function corresponding to the url if the received url matches a url in the urls in the cache;
and the page returning module is used for returning a page, and the page comprises the data returned by the view function.
6. An electronic device, comprising a processor and a memory, wherein the processor is configured to implement the method for centralized management of routes according to any one of claims 1 to 4 when executing at least one instruction stored in the memory.
7. A computer-readable storage medium storing at least one instruction executed by a processor to implement the route centralized management method according to any one of claims 1 to 4.
CN202010141735.1A 2020-03-04 2020-03-04 Route centralized management method, device, electronic device and storage medium Active CN111526034B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010141735.1A CN111526034B (en) 2020-03-04 2020-03-04 Route centralized management method, device, electronic device and storage medium
PCT/CN2020/099294 WO2021174729A1 (en) 2020-03-04 2020-06-30 Routing centralized management method and apparatus, electronic apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010141735.1A CN111526034B (en) 2020-03-04 2020-03-04 Route centralized management method, device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN111526034A CN111526034A (en) 2020-08-11
CN111526034B true CN111526034B (en) 2022-09-30

Family

ID=71910268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010141735.1A Active CN111526034B (en) 2020-03-04 2020-03-04 Route centralized management method, device, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN111526034B (en)
WO (1) WO2021174729A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115242625B (en) * 2022-06-24 2024-03-19 平安银行股份有限公司 Service deployment method, device, computer equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8706909B1 (en) * 2013-01-28 2014-04-22 University Of North Dakota Systems and methods for semantic URL handling
CN108491247A (en) * 2018-04-10 2018-09-04 武汉斗鱼网络科技有限公司 Method for page jump, device, terminal and computer-readable medium
CN110362567A (en) * 2019-05-29 2019-10-22 武汉快快充通信技术有限公司 A kind of the telephone expenses front-end platform and financial statement deriving method of distributed deployment
CN110505074A (en) * 2018-05-17 2019-11-26 北京京东尚科信息技术有限公司 A kind of application module integrated approach and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8627442B2 (en) * 2011-05-24 2014-01-07 International Business Machines Corporation Hierarchical rule development and binding for web application server firewall
US20130179552A1 (en) * 2012-01-09 2013-07-11 Ezshield, Inc. Computer Implemented Method, Computer System And Nontransitory Computer Readable Storage Medium For Matching URL With Web Site
CN104598513B (en) * 2014-11-03 2018-05-01 腾讯科技(成都)有限公司 A kind of method of data flow control and system based on web page frame
CN109725883A (en) * 2017-10-30 2019-05-07 林良煌 A kind of industrial management and control software game implementation method
CN108153678A (en) * 2018-01-17 2018-06-12 北京网信云服信息科技有限公司 A kind of test assignment processing method and processing device
CN109857663B (en) * 2019-01-26 2022-04-12 北京工业大学 Keyword driving and image similarity combined automatic test platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8706909B1 (en) * 2013-01-28 2014-04-22 University Of North Dakota Systems and methods for semantic URL handling
CN108491247A (en) * 2018-04-10 2018-09-04 武汉斗鱼网络科技有限公司 Method for page jump, device, terminal and computer-readable medium
CN110505074A (en) * 2018-05-17 2019-11-26 北京京东尚科信息技术有限公司 A kind of application module integrated approach and device
CN110362567A (en) * 2019-05-29 2019-10-22 武汉快快充通信技术有限公司 A kind of the telephone expenses front-end platform and financial statement deriving method of distributed deployment

Also Published As

Publication number Publication date
WO2021174729A1 (en) 2021-09-10
CN111526034A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
US8661023B1 (en) Optimizing search query logic to speed retrieval
CN109558525B (en) Test data set generation method, device, equipment and storage medium
CN110276074B (en) Distributed training method, device, equipment and storage medium for natural language processing
CN111400387B (en) Conversion method and device for import and export data, terminal equipment and storage medium
US11222067B2 (en) Multi-index method and apparatus, cloud system and computer-readable storage medium
CN113391826B (en) Solution method for software package dependence in customized mirror image
US20190147104A1 (en) Method and apparatus for constructing artificial intelligence application
US20200204688A1 (en) Picture book sharing method and apparatus and system using the same
US20200218760A1 (en) Music search method and device, server and computer-readable storage medium
CN110851136A (en) Data acquisition method and device, electronic equipment and storage medium
US9053450B2 (en) Automated business process modeling
CN111526034B (en) Route centralized management method, device, electronic device and storage medium
CN109542398B (en) Business system generation method and device and computer readable storage medium
CN109669678A (en) Template engine integration method, device, electronic equipment and storage medium
CN113568605A (en) Method, device and system for configuring constrained route
CN113760242A (en) Data processing method, device, server and medium
CN117008920A (en) Engine system, request processing method and device, computer equipment and storage medium
CN114968917A (en) Method and device for rapidly importing file data
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN109783134B (en) Front-end page configuration method and device and electronic equipment
CN111858864A (en) Method and device for realizing slot filling, electronic equipment and readable medium
CN111151008A (en) Game operation data verification method, device, configuration background and medium
WO2019095582A1 (en) Method and device for navigating to target location, storage medium and terminal
CN109284268A (en) A kind of method, system and the electronic equipment of fast resolving log
CN109284097A (en) Realize method, equipment, system and the storage medium of complex data analysis

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
GR01 Patent grant
GR01 Patent grant