CN117439945A - Routing processing method and device, storage medium and electronic equipment - Google Patents

Routing processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117439945A
CN117439945A CN202311372226.XA CN202311372226A CN117439945A CN 117439945 A CN117439945 A CN 117439945A CN 202311372226 A CN202311372226 A CN 202311372226A CN 117439945 A CN117439945 A CN 117439945A
Authority
CN
China
Prior art keywords
sub
information
route
routing
target
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
CN202311372226.XA
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.)
Weichai Power Co Ltd
Original Assignee
Weichai Power 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 Weichai Power Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN202311372226.XA priority Critical patent/CN117439945A/en
Publication of CN117439945A publication Critical patent/CN117439945A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables

Landscapes

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

Abstract

The invention provides a route processing method, a device, a storage medium and electronic equipment, which are used for acquiring adjusted target route configuration information under the condition that user adjustment route configuration information is determined, acquiring a route address generation rule, and generating a route address corresponding to each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target route configuration information and the route address generation rule, namely generating the route address corresponding to the sub-information in the target route configuration information according to user operation, thereby realizing dynamic change of the route address, and further, when a new route address is newly added, only the user is required to adjust the route configuration information, and code and deployment code are not required to be rewritten, thereby simplifying operation and improving efficiency. And after the changed route address is obtained, the page template identification can be obtained, and the route object of the sub-information is generated according to the route address corresponding to the sub-information and the page template identification, so that the route object generation efficiency is also improved.

Description

Routing processing method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of route generation, and in particular, to a route processing method, apparatus, storage medium, and electronic device.
Background
In a front-end framework, such as a vue framework, a routing address list used when a routing object is generated is written in a front-end code in advance, and when a front-end item is started, the routing address list of the writing death needs to be acquired, so that a dynamic effect is achieved.
Because the routing address list is written, if a new routing address is to be added, a developer is required to rewrite codes and deploy the codes to take effect, so that the operation of adding the new routing address is complex, the efficiency is low, and the generation efficiency of generating the routing object based on the routing address is low.
Disclosure of Invention
In view of the above, the present invention provides a routing processing method, apparatus, storage medium and electronic device, so as to solve the problems of complex operation and low efficiency of adding a new routing address, and further complex generation process and low efficiency of generating a routing object based on the routing address.
In order to solve the technical problems, the invention adopts the following technical scheme:
a routing processing method, comprising:
under the condition that the user adjustment route configuration information is determined, acquiring adjusted target route configuration information;
Acquiring a route address generation rule; the routing address generation rule comprises routing address generation sub-rules of different levels;
generating a routing address corresponding to each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target routing configuration information and the routing address generation rule;
and acquiring a page template identifier configured for each piece of sub-information, and generating a routing object of the sub-information according to the routing address and the page template identifier corresponding to the sub-information.
Optionally, generating the routing address corresponding to each piece of sub-information based on the hierarchical relationship of each piece of sub-information in the target routing configuration information and the routing address generation rule includes:
based on the hierarchical relation of each piece of sub-information in the target route configuration information, sequentially acquiring each piece of sub-information and taking the sub-information as target sub-information;
determining the level of the target sub-information, and acquiring a target routing address generation sub-rule corresponding to the level in the routing address generation rule; the target routing address generation sub-rule includes: a plurality of routing address keys;
and determining the content of each routing address keyword in the target routing address generation sub-rule according to the hierarchy and the content of the target sub-information so as to generate the routing address corresponding to the target sub-information.
Optionally, generating the routing object of the sub-information according to the routing address and the page template identifier corresponding to the sub-information includes:
acquiring page names and key word information corresponding to the sub-information;
and adding the routing address, the page template identification, the page name and the keyword information into a routing object code template to generate a routing object of the sub-information.
Optionally, after generating the routing object of the sub-information according to the routing address and the page template identifier corresponding to the sub-information, the method further includes:
and generating a route object list according to the data hierarchy structure of the route object, and storing the route object list in a back-end database.
Optionally, after generating the routing object list according to the data hierarchy of the routing objects, the method further includes:
and generating a catalog corresponding to the route object list.
Optionally, after generating the directory based on the routing object of each sub-information in the target routing configuration information, the method further includes:
acquiring clicking operation of a user on a directory entry in the directory;
acquiring keyword information in a routing object corresponding to the directory entry, and inquiring data to be displayed corresponding to the keyword information from a back-end database;
Rendering the data to be displayed in a page template corresponding to the page template identifier in the routing object.
A route processing device, comprising:
the information acquisition module is used for acquiring the adjusted target route configuration information under the condition that the user adjustment route configuration information is determined;
the rule acquisition module is used for acquiring a route address generation rule; the routing address generation rule comprises routing address generation sub-rules of different levels;
the route generation module is used for generating a route address corresponding to each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target route configuration information and the route address generation rule;
and the object generation module is used for acquiring the page template identification configured for each piece of sub-information and generating a routing object of the sub-information according to the routing address corresponding to the sub-information and the page template identification.
Optionally, the route generation module includes:
the information acquisition sub-module is used for sequentially acquiring each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target route configuration information and taking the sub-information as target sub-information;
the rule acquisition sub-module is used for determining the level of the target sub-information and acquiring a target routing address generation sub-rule corresponding to the level in the routing address generation rule; the target routing address generation sub-rule includes: a plurality of routing address keys;
And the address generation sub-module is used for determining the contents of the routing address keywords in the target routing address generation sub-rule according to the hierarchy and the contents of the target sub-information so as to generate the routing address corresponding to the target sub-information.
A computer readable storage medium storing at least one instruction that when executed by a processor implements a routing method as described above.
An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor invokes a program for performing one of the routing methods described above.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a route processing method, a device, a storage medium and electronic equipment, wherein in the invention, under the condition that user adjustment route configuration information is determined, the adjusted target route configuration information is obtained, a route address generation rule is obtained, and a route address corresponding to each sub-information is generated based on the hierarchical relation of each sub-information in the target route configuration information and the route address generation rule. And after the changed route address is obtained, the page template identifier configured for each piece of sub-information can be obtained, and the route object of the sub-information is generated according to the route address and the page template identifier corresponding to the sub-information, so that the route object generation efficiency is also improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a method flowchart of a routing processing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of route configuration information according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for generating a routing address according to an embodiment of the present invention;
fig. 4 is a scene flow chart of a routing processing method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a page template according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a route object content according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of another routing object content according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a routing processing device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In a front-end framework, such as vue (a set of progressive front-end framework for constructing a user interface), a routing (a routing in the front-end technology is a state manager of different front-end pages, and the effect of multiple pages can be directly achieved through the front-end technology without sending a request to the background) object is generated, and a routing address list used in the generation of the object is written in the front-end code in advance, and when a front-end item is started, the routing address list of the writing death needs to be acquired, so that a dynamic effect is achieved.
Because the routing address list is written, if a new routing address is to be added, a developer is required to rewrite codes and deploy the codes to take effect, so that the operation of adding the new routing address is complex, the efficiency is low, and the generation efficiency of generating the routing object based on the routing address is low.
In addition, the route address list can also be written in a back-end database, and the route list is acquired through an interface when the front-end item is started. If a routing address is to be newly added, even if a routing address is newly added in the routing list, a page corresponding to the routing address still needs to be configured in the front-end code at this time, that is, a developer needs to rewrite codes and deploy codes to take effect.
In order to avoid the problems of large workload and low efficiency caused by complex operation caused by code re-writing, a route can be generated on a back-end platform through interface configuration, a certain code foundation is needed for a user, and the route address and the object cannot be generated dynamically and in real time without perception of the user in the project operation process through writing a simple js (JavaScript) code, then re-configuring and re-deploying the code, so that the technical requirements on the user are high.
Therefore, the embodiment of the invention provides a routing processing method, a device, a storage medium and electronic equipment, which can generate a corresponding routing address based on user operation, reserve a page template in a code in advance according to service logic, subsequently establish a mapping relation between the page template and the routing address, dynamically generate a routing object in real time, store the routing object in a back-end database, and acquire the latest routing address object from a back-end interface when a user reopens the software, so that the newly added data of the front-end page and the dynamically generated routing object of the previous user can be ensured to be permanently and effectively.
Specifically, in the invention, under the condition that the user adjusts the route configuration information is determined, the adjusted target route configuration information is obtained, the route address generation rule is obtained, and the route address corresponding to each piece of sub-information is generated based on the hierarchical relation of each piece of sub-information in the target route configuration information and the route address generation rule. And after the changed route address is obtained, the page template identifier configured for each piece of sub-information can be obtained, and the route object of the sub-information is generated according to the route address and the page template identifier corresponding to the sub-information, so that the route object generation efficiency is also improved.
It should be noted that, the front end frame according to the present invention may be, for example, a vue frame, a React frame, or an Angular frame, and specifically, which frame is used may be selected according to an actual scenario, and whichever frame is used may support a routing processing method, apparatus, storage medium, and electronic device according to the present invention.
On the basis of the foregoing, referring to fig. 1, an embodiment of the present invention provides a routing processing method, which may include:
s11, under the condition that the user adjustment route configuration information is determined, the adjusted target route configuration information is obtained.
In this embodiment, the route configuration information may be service information, that is, the service information is multiplexed, so that the service information is used as route configuration information to generate a route address and a route object.
In the service information, the user can configure according to the actual service requirement, the service information can comprise a plurality of data, a hierarchical relationship can exist among the plurality of data, namely, data 1, data 2, data 3 and data 4 are in parallel relationship, the lower side of the data 1 comprises data 1-1 and data 1-2, and the lower side of the data 1-1 comprises data 1-1-1 and data 1-1-2.
The user can perform adding and deleting operations in the service information, such as deleting the data 1-1-2, adding the data 1-1-3, changing the content of the data 1-1-2, and the like, and the user considers that the service information, namely the routing configuration information, is adjusted no matter what the operations are.
The service information generally exists in the form of a table, such as an Excel table, and after a user opens an application configured with the service information, such as an XXX system, the front end obtains a current latest route object list in a back end database through an interface and renders the current latest route object list to a side directory, so that the user can see the directory on an application interface.
Note that, in this embodiment, the generated directory corresponds to the service information, that is, the generated directory corresponds to the service information, and specifically, reference may be made to the left directory in fig. 2.
When a user adds, deletes or modifies at least one piece of data in the service information on an application page, such as page a, updated service information, that is, updated Excel table data, that is, adjusted target route configuration information is acquired, and then a subsequent route address generation operation is triggered and executed.
S12, acquiring a route address generation rule.
In practical application, the routing address generation rule comprises routing address generation sub-rules of different levels.
In general, the routing address generation sub-rule may be, for example, a first-level routing address generation sub-rule, a second-level routing address generation sub-rule, a third-level routing address generation sub-rule, a fourth-level routing address generation sub-rule, etc., where the routing address generation sub-rule of the lower level is related to the routing address generation sub-rule of the previous level, and is generated by adding the routing address key of the present level to the routing address key in the routing address generation sub-rule of the previous level.
For example, the primary routing address generation sub-rule may be as follows: business key + index.
The service key word may be a fixed word of the application, such as a compatibility display, and the index may be specifically configured as a name of the primary route, such as data 1, data 2, and the like, or may be configured as an identifier of the primary route, such as 0, 1, 2, and the like, and then the primary route address may be, for example, compatibility display0.
When there is no duplicate name between the primary routes, the name or the identifier may be used as index, and if there is a duplicate name between the primary routes, the name may be used as index at this time, and there is a case where the duplicate routes cannot be distinguished, so in this case, the identifier is selected as index.
The secondary routing address generation sub-rule may be as follows: business key + index + name.
The name is the name of the secondary route, for example, data 11, and the secondary route address may be, for example, complexationdisplay0 data 11.
The three-level routing address generation sub-rule may be as follows: business key + index + index + name.
The four-level routing address generation sub-rule may be as follows: service key + index + index + index + name. The explanation of the three-level and four-level routing address generation sub-rules refers to the explanation of the one-level and two-level routing address generation sub-rules, in addition, the five-level, six-level and subsequent routing address generation sub-rules are similar, the corresponding index and name are added, the recursion is adopted, the multi-level routing address is realized, and the global uniqueness of the routing can be maintained.
S13, generating a routing address corresponding to each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target routing configuration information and the routing address generation rule.
In this embodiment, for example, the route configuration information includes that data 1, data 2, data 3, and data 4 are in parallel relationship, the lower side of data 1 includes data 1-1 and data 1-2, and the lower side of data 1-1 includes data 1-1-1 and data 1-1-2. Each data needs to be generated in turn, i.e. the routing address of each sub-information, in this embodiment called sub-information, data 1-2, data 1-1-2, etc. needs to be generated.
It should be noted that, because of the hierarchical relationship between the sub-information, the lower edge of the data 1 includes the data 1-1 and the data 1-2, and the data 2 is located after the data 1, the traversing operation is performed on the data list composed of the sub-information according to the hierarchical traversal.
In another implementation of the present invention, referring to fig. 3, step S13 may include:
s21, each piece of sub-information is acquired in turn based on the hierarchical relation of each piece of sub-information in the target route configuration information, and the sub-information is used as target sub-information.
Specifically, for example, the route configuration information includes data such as data 1, data 2, data 3, and data 4 in parallel relationship, where the lower side of data 1 includes data 1-1 and data 1-2, and the lower side of data 1-1 includes data 1-1-1 and data 1-1-2.
According to the hierarchical relationship, the data 2 is located behind the data 1, the lower side of the data 1 comprises data 1-1 and data 1-2, the lower side of the data 1-1 comprises data 1-1-1 and data 1-1-2, and then the data 1, the data 1-1-2, the data 3, the data 4 and the like are sequentially used as target sub-information.
S22, determining a level of the target sub-information, and acquiring a target routing address generation sub-rule corresponding to the level in the routing address generation rule; the target routing address generation sub-rule includes: a plurality of routing address keys.
Specifically, taking the target sub-information as data 1 as an example, and taking the hierarchy as one stage, acquiring a first-stage route address generation sub-rule, and taking the first-stage route address generation sub-rule as the target route address generation sub-rule. And the level of the data 1-1-2 is three, and then three-level route address generation sub-rules are acquired.
Each target routing address generation sub-rule includes a plurality of routing address keywords, such as the above-mentioned service keywords, index, and name, where the service keywords may be fixed, and in this embodiment, only the values of index and name need to be determined.
S23, determining the content of each routing address keyword in the target routing address generation sub-rule according to the hierarchy and the content of the target sub-information so as to generate the routing address corresponding to the target sub-information.
In this embodiment, taking the target sub-information as data 1 as an example, the hierarchy is 1, if the index in the first-level routing address generation sub-rule is configured as an identifier, the identifier of the data 1 is 0, the index is 0, the service keyword is a compatibility display, and the routing address of the data 1 is a compatibility display0.
The routing address of data 1-1 is the competitionDisplay0 data 11.
In order that the generation process of the routing address in the present invention can be more clearly understood by those skilled in the art, the explanation will be made with reference to steps S31-311 in fig. 4.
Specifically, after the user opens the application, the front end obtains the current latest route list, generally referred to as a route object list, in the back end database through the interface, and renders the route object list to the side directory, so that the user can see the directory on the application interface.
If the user adds a piece of data in the page of the current service information, such as page a, updated form data, namely Excel data, is obtained.
Then traversing the data list composed of the sub information, judging whether index is smaller than the list length, if there are four data at one stage, so the list length is 4.index typically starts from 0, so when index is not less than 4, it is explained that four levels of data and data included in one level have been processed. In practical application, the data 1 and the sub data included in the data 1 are processed first, then the data 3 and the data 4 are processed sequentially, after the data 4 and the sub data included in the data 4 are processed, index is changed to 4, and at the moment, the index is not smaller than the list length, which indicates that the processing is completed.
When it is determined that index is smaller than 4, for example, when processing data 1, index is 0, a first-level routing address is generated according to the data content and the routing generation rule, after processing data 1 is completed, sub-data child included in data 1, namely data 1-1 is processed continuously, at this time, as with the index length determination rule, it is also required to determine whether child data included in data 1 is smaller than child data length, if so, a second-level routing address is generated according to the data content and the routing generation rule, then sub-data included in data 1-1 is determined continuously, namely data 1-1-1, a routing address of data 1-1-1 is generated, after the routing address of data 1-1-1 is generated, since data 1-1 no longer includes sub-data, then processing data 1-1-2 is processed continuously after processing is completed, further sub-data 1-2 included in data 1 is processed sequentially until all sub-data included in data 1 is processed, then data 2 is processed sequentially, and data 4 is processed sequentially until the sub-data included in data 1 and 4 is processed sequentially. After the processing is completed, a plurality of routing addresses with different levels can be obtained, at this time, the list of the side bar pages is updated based on the routing addresses, and then the latest routing list, namely the routing address list is updated into the back-end database.
It should be noted that, since the routing address at this time does not have a mapping relationship with the corresponding page, the corresponding page cannot be accessed according to the routing address at this time, or the side bar page directory may be updated based on the routing object after the mapping relationship between the routing address and the page is established, that is, after the routing object is generated. The latest route object list is then updated into the backend database.
S14, acquiring page template identifiers configured for each piece of sub-information, and generating a routing object of the piece of sub-information according to the routing address corresponding to the piece of sub-information and the page template identifiers.
In this embodiment, a page template is reserved in the code in advance according to the service logic, and a corresponding relationship between data and the page template is set, for example, first-level data uses the page template one, second-level data uses the page template two, third-level data uses the page template three … …, and how the specific corresponding relationship is configured is determined according to the actual scene.
An example of a page template may be referred to in fig. 5. It should be noted that, in fig. 5, the page template has already added data obtained by querying the back-end database, and in practical application, if no data is added to the page template, the page template is a bar graph with a plurality of data to be filled, and the abscissa, the length, the data, the meaning and the name of the bar graph need to be queried from the back-end database.
The page template is configured with corresponding page template identifiers, such as a first page template, a second page template and the like, and when the page template is used subsequently, the corresponding page template is queried based on the page template identifiers, rendering is performed, and a final page template added with data is obtained.
The page template may also be configured in vue file, that is, the page template is fixed in advance in vue file corresponding to the page, where in this example, the template may be:
‘@/views/modules/competitiveAnalysis/competitionDisplay/index.vue’。
the routing object in the present invention may include information such as a page name, keyword information, a routing address, and the page template identifier corresponding to the information, and specifically refer to fig. 6.
In fig. 6, the content of the routing object corresponding to the primary routing address is given, where path represents the routing address, name represents the routing name, component represents the page template identifier, specifically, may be obtained by querying according to the correspondence between the data and the page template identifier, and if the processed sub-information is primary data, the page template identifier is the page template one.
The meta is remark, specifically includes title, noCache, parentName, info, title represents page name, i.e. target item name, which is finally mapped to page name in item directory menu list, nocche represents system attribute, pantname represents parent page, i.e. system name, info is key information, which can represent a certain page, i.e. unique identification key of each data in page a, is search information used when querying data from back-end database, page specific data access parameters (unique identification key corresponding to each data in page a) can be transmitted into template page by route through info field. In this embodiment, the nocche and the pantName may be fixed, and the title and the info may specifically be data contents, such as data 1, data 1-2, and the like, as described above.
In order to generate a routing object as soon as possible, a routing object code template may be configured, and information such as path, component, title, info in the routing object code template is blank, and path, component, title, info needs to be added to the routing object code template according to actual addition data, so that fig. 6 can be obtained.
The second level routing object may refer to fig. 7, and the implementation is similar to the generation process of the routing object.
In summary, according to the routing address and the page template identifier corresponding to the sub-information, generating the routing object of the sub-information may include:
and acquiring the page name and the keyword information corresponding to the sub-information, and adding the routing address, the page template identification, the page name and the keyword information into a routing object code template to generate a routing object of the sub-information.
It should be noted that, the specifically configured fields in the routing object code template may be added or deleted according to the actual scenario, and the embodiment of the present invention does not limit the number and content of the fields.
After generating the routing object of each sub-information through the above steps, a list of the routing objects may be generated according to the data hierarchy of the routing object and stored in the back-end database.
The data hierarchy in this embodiment may be a hierarchy of routing objects, for example, the routing object of the data 1 is level 1, the routing object of the data 1-1 is level 2, and the routing object of the data 1-1-1 is level 3, then a routing object list is generated according to the hierarchy, and added to the existing routing list of the project, and the data hierarchy is validated in real time, and meanwhile, the front end sends the latest routing object list to the back end and stores the latest routing object list in the back end database, and when storing, the latest routing object list may be stored in a character string format.
In this step, the latest route object list is updated to the database through the interface to ensure that the latest route object list is used every time the application is entered, and ensure that the dynamically generated route object can be permanently and effectively.
In this embodiment, under the condition that the user adjusts the route configuration information is determined, the adjusted target route configuration information is obtained, the route address generation rule is obtained, and the route address corresponding to each piece of sub-information is generated based on the hierarchical relationship of each piece of sub-information in the target route configuration information and the route address generation rule. And after the changed route address is obtained, the page template identifier configured for each piece of sub-information can be obtained, and the route object of the sub-information is generated according to the route address and the page template identifier corresponding to the sub-information, so that the route object generation efficiency is also improved.
In addition, in the invention, since the page template is reserved in the code in advance, after the dynamic route address is generated based on the user operation, the mapping relation between the page template and the route address is established, namely the route object is generated, so that the route address is ensured to be effective, and the corresponding page can be accessed.
In addition, the invention is based on vue and other frames, and can dynamically edit the route and the catalogue in real time according to the user data in program operation without the need of a developer to modify codes or redeploy codes, and in vue project operation, the corresponding route and the corresponding menu catalogue can be dynamically added/deleted in real time through the data added by the user, thereby realizing one solution from nothing to nothing. The method and the system can generate the route in real time and dynamically in the use process of the user without developing and deploying codes again by developers or any programming basis of the user, real-time and dynamic in real sense are achieved, and the working efficiency and the user experience are greatly improved.
In another embodiment of the present invention, after generating the route object list according to the data hierarchy of the route object, a directory corresponding to the route object list may be generated.
Specifically, the route object list is rendered to obtain the catalogue, the catalogue can be a side page catalogue and displayed on the side, so that the user can conveniently check the catalogue, and the route and the side page catalogue can be generated in real time and dynamically according to the data operation of the user, so that real-time and dynamic in real sense are achieved, and the working efficiency and the user experience are greatly improved.
In this embodiment, the routing information is added to the item directory menu list, and the template page can be skipped by clicking the corresponding directory.
In detail, after the directory is generated, a page access operation may be performed by clicking on the directory entry. Specifically, when a user clicks a directory entry, a clicking operation of the user on the directory entry in the directory is obtained, if the user clicks the directory entry of the data 1, and at this time, it is determined that the user needs to access a page corresponding to the data 1, keyword information in a route object corresponding to the directory entry is obtained, data to be displayed corresponding to the keyword information is queried from a back-end database, and the data to be displayed is rendered in a page template corresponding to a page template identifier in the route object.
Specifically, since the key words are already transmitted into the page templates corresponding to the page template identifications in the routing objects corresponding to the directory entries clicked by the user through the info fields in the routing when the routing objects are generated, after the page templates receive the key words, before the user clicks the directory entries to perform page rendering, that is, when the life cycle is created, the page templates acquire the info parameters transmitted in the routing objects, acquire the page data to be displayed from the rear end through the key words, and complete the rendering of the page,
In this embodiment, after the routing address is dynamically created, the corresponding page can be accessed according to the page access operation of the user, so as to realize the query and access of the user data at any time.
On the basis of the above embodiment of the routing processing method, another embodiment of the present invention provides a processing apparatus, referring to fig. 8, which may include:
an information obtaining module 11, configured to obtain adjusted target route configuration information when determining that the user adjusts the route configuration information;
a rule acquisition module 12, configured to acquire a routing address generation rule; the routing address generation rule comprises routing address generation sub-rules of different levels;
a route generating module 13, configured to generate a route address corresponding to each piece of sub-information based on the hierarchical relationship of each piece of sub-information in the target route configuration information and the route address generating rule;
the object generating module 14 is configured to obtain the page template identifier configured for each piece of sub-information, and generate the routing object of the sub-information according to the routing address and the page template identifier corresponding to the sub-information.
Further, the route generation module includes:
The information acquisition sub-module is used for sequentially acquiring each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target route configuration information and taking the sub-information as target sub-information;
the rule acquisition sub-module is used for determining the level of the target sub-information and acquiring a target routing address generation sub-rule corresponding to the level in the routing address generation rule; the target routing address generation sub-rule includes: a plurality of routing address keys;
and the address generation sub-module is used for determining the contents of the routing address keywords in the target routing address generation sub-rule according to the hierarchy and the contents of the target sub-information so as to generate the routing address corresponding to the target sub-information.
Further, the object generation module 14 is specifically configured to:
and acquiring the page name and the keyword information corresponding to the sub-information, and adding the routing address, the page template identification, the page name and the keyword information into a routing object code template to generate a routing object of the sub-information.
Further, the method further comprises the following steps:
and the data storage module is used for generating a routing object list according to the data hierarchy structure of the routing object and storing the routing object list in the back-end database.
Further, the method further comprises the following steps:
and the catalog generation module is used for generating a catalog corresponding to the route object list.
Further, the method further comprises the following steps:
the operation acquisition module is used for acquiring clicking operation of a user on the directory entry in the directory;
the data determining module is used for acquiring the keyword information in the route object corresponding to the directory entry and inquiring the data to be displayed corresponding to the keyword information from a back-end database;
and the data display module is used for rendering the data to be displayed in a page template corresponding to the page template identifier in the routing object.
In this embodiment, under the condition that the user adjusts the route configuration information is determined, the adjusted target route configuration information is obtained, the route address generation rule is obtained, and the route address corresponding to each piece of sub-information is generated based on the hierarchical relationship of each piece of sub-information in the target route configuration information and the route address generation rule. And after the changed route address is obtained, the page template identifier configured for each piece of sub-information can be obtained, and the route object of the sub-information is generated according to the route address and the page template identifier corresponding to the sub-information, so that the route object generation efficiency is also improved.
It should be noted that, in the working process of each module and sub-module in this embodiment, please refer to the corresponding description in the above embodiment, and the description is omitted here.
In addition to the foregoing embodiments of the routing method and apparatus, another embodiment of the present invention provides a computer readable storage medium, where the computer readable storage medium stores at least one instruction, and the at least one instruction when executed by a processor implements the foregoing routing method.
In this embodiment, under the condition that the user adjusts the route configuration information is determined, the adjusted target route configuration information is obtained, the route address generation rule is obtained, and the route address corresponding to each piece of sub-information is generated based on the hierarchical relationship of each piece of sub-information in the target route configuration information and the route address generation rule. And after the changed route address is obtained, the page template identifier configured for each piece of sub-information can be obtained, and the route object of the sub-information is generated according to the route address and the page template identifier corresponding to the sub-information, so that the route object generation efficiency is also improved.
On the basis of the embodiments of the routing processing method and apparatus, another embodiment of the present invention provides an electronic device, including: a memory and a processor;
wherein the memory is used for storing programs;
the processor invokes a program for performing one of the routing methods described above.
Specifically, a routing processing method includes:
under the condition that the user adjustment route configuration information is determined, acquiring adjusted target route configuration information;
acquiring a route address generation rule; the routing address generation rule comprises routing address generation sub-rules of different levels;
generating a routing address corresponding to each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target routing configuration information and the routing address generation rule;
and acquiring a page template identifier configured for each piece of sub-information, and generating a routing object of the sub-information according to the routing address and the page template identifier corresponding to the sub-information.
Further, generating a routing address corresponding to each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target routing configuration information and the routing address generation rule, including:
Based on the hierarchical relation of each piece of sub-information in the target route configuration information, sequentially acquiring each piece of sub-information and taking the sub-information as target sub-information;
determining the level of the target sub-information, and acquiring a target routing address generation sub-rule corresponding to the level in the routing address generation rule; the target routing address generation sub-rule includes: a plurality of routing address keys;
and determining the content of each routing address keyword in the target routing address generation sub-rule according to the hierarchy and the content of the target sub-information so as to generate the routing address corresponding to the target sub-information.
Further, generating a routing object of the sub-information according to the routing address and the page template identifier corresponding to the sub-information, including:
acquiring page names and key word information corresponding to the sub-information;
and adding the routing address, the page template identification, the page name and the keyword information into a routing object code template to generate a routing object of the sub-information.
Further, after generating the routing object of the sub-information according to the routing address and the page template identifier corresponding to the sub-information, the method further includes:
And generating a route object list according to the data hierarchy structure of the route object, and storing the route object list in a back-end database.
Further, after generating the route object list according to the data hierarchy of the route object, the method further comprises:
and generating a catalog corresponding to the route object list.
Further, after generating the directory based on the routing object of each of the sub-information in the target routing configuration information, the method further includes:
acquiring clicking operation of a user on a directory entry in the directory;
acquiring keyword information in a routing object corresponding to the directory entry, and inquiring data to be displayed corresponding to the keyword information from a back-end database;
rendering the data to be displayed in a page template corresponding to the page template identifier in the routing object.
In this embodiment, under the condition that the user adjusts the route configuration information is determined, the adjusted target route configuration information is obtained, the route address generation rule is obtained, and the route address corresponding to each piece of sub-information is generated based on the hierarchical relationship of each piece of sub-information in the target route configuration information and the route address generation rule. And after the changed route address is obtained, the page template identifier configured for each piece of sub-information can be obtained, and the route object of the sub-information is generated according to the route address and the page template identifier corresponding to the sub-information, so that the route object generation efficiency is also improved.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A routing method, comprising:
under the condition that the user adjustment route configuration information is determined, acquiring adjusted target route configuration information;
acquiring a route address generation rule; the routing address generation rule comprises routing address generation sub-rules of different levels;
generating a routing address corresponding to each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target routing configuration information and the routing address generation rule;
and acquiring a page template identifier configured for each piece of sub-information, and generating a routing object of the sub-information according to the routing address and the page template identifier corresponding to the sub-information.
2. The route processing method according to claim 1, wherein generating a route address corresponding to each piece of sub information based on the hierarchical relationship of the pieces of sub information in the target route configuration information and the route address generation rule, comprises:
based on the hierarchical relation of each piece of sub-information in the target route configuration information, sequentially acquiring each piece of sub-information and taking the sub-information as target sub-information;
determining the level of the target sub-information, and acquiring a target routing address generation sub-rule corresponding to the level in the routing address generation rule; the target routing address generation sub-rule includes: a plurality of routing address keys;
and determining the content of each routing address keyword in the target routing address generation sub-rule according to the hierarchy and the content of the target sub-information so as to generate the routing address corresponding to the target sub-information.
3. The routing processing method according to claim 1, wherein generating the routing object of the sub-information according to the routing address and the page template identifier corresponding to the sub-information includes:
acquiring page names and key word information corresponding to the sub-information;
And adding the routing address, the page template identification, the page name and the keyword information into a routing object code template to generate a routing object of the sub-information.
4. The routing processing method according to claim 1, further comprising, after generating the routing object of the sub-information according to the routing address and the page template identifier corresponding to the sub-information:
and generating a route object list according to the data hierarchy structure of the route object, and storing the route object list in a back-end database.
5. The route processing method according to claim 4, further comprising, after generating the route object list in accordance with the data hierarchy of the route object:
and generating a catalog corresponding to the route object list.
6. The route processing method according to claim 5, further comprising, after generating a directory based on the route object of each of the sub information in the target route configuration information:
acquiring clicking operation of a user on a directory entry in the directory;
acquiring keyword information in a routing object corresponding to the directory entry, and inquiring data to be displayed corresponding to the keyword information from a back-end database;
Rendering the data to be displayed in a page template corresponding to the page template identifier in the routing object.
7. A route processing device, comprising:
the information acquisition module is used for acquiring the adjusted target route configuration information under the condition that the user adjustment route configuration information is determined;
the rule acquisition module is used for acquiring a route address generation rule; the routing address generation rule comprises routing address generation sub-rules of different levels;
the route generation module is used for generating a route address corresponding to each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target route configuration information and the route address generation rule;
and the object generation module is used for acquiring the page template identification configured for each piece of sub-information and generating a routing object of the sub-information according to the routing address corresponding to the sub-information and the page template identification.
8. The route processing device of claim 7, wherein the route generation module comprises:
the information acquisition sub-module is used for sequentially acquiring each piece of sub-information based on the hierarchical relation of each piece of sub-information in the target route configuration information and taking the sub-information as target sub-information;
The rule acquisition sub-module is used for determining the level of the target sub-information and acquiring a target routing address generation sub-rule corresponding to the level in the routing address generation rule; the target routing address generation sub-rule includes: a plurality of routing address keys;
and the address generation sub-module is used for determining the contents of the routing address keywords in the target routing address generation sub-rule according to the hierarchy and the contents of the target sub-information so as to generate the routing address corresponding to the target sub-information.
9. A computer readable storage medium storing at least one instruction which when executed by a processor implements a routing method as claimed in any one of claims 1 to 6.
10. An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
a processor calling program and adapted to perform a routing method as claimed in any one of claims 1 to 6.
CN202311372226.XA 2023-10-23 2023-10-23 Routing processing method and device, storage medium and electronic equipment Pending CN117439945A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311372226.XA CN117439945A (en) 2023-10-23 2023-10-23 Routing processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311372226.XA CN117439945A (en) 2023-10-23 2023-10-23 Routing processing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117439945A true CN117439945A (en) 2024-01-23

Family

ID=89549165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311372226.XA Pending CN117439945A (en) 2023-10-23 2023-10-23 Routing processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117439945A (en)

Similar Documents

Publication Publication Date Title
US10324909B2 (en) Omega names: name generation and derivation utilizing nested three or more attributes
US9342301B2 (en) Converting and input script to a natural language description
US7801876B1 (en) Systems and methods for customizing behavior of multiple search engines
JP6016808B2 (en) Method and server system for implementing web access
US9483508B1 (en) Omega names: name generation and derivation
CN107609302B (en) Method and system for generating product process structure
US20210174004A1 (en) Methods and systems for dynamic customization of independent webpage section templates
CN110727417B (en) Data processing method and device
KR20100091209A (en) Device and method for automatically building applications from specifications and from off-the-shelf components selected by semantic analysis
CN111708805A (en) Data query method and device, electronic equipment and storage medium
CN106547646B (en) Data backup and recovery method and data backup and recovery device
US20090287724A1 (en) Data Viewer Management
CN115599386A (en) Code generation method, device, equipment and storage medium
US9722967B2 (en) Exposing file metadata as LDAP attributes
US8666951B2 (en) Managing multiple versions of enterprise meta-models using semantic based indexing
CN111625728B (en) Method, device, equipment and medium for generating retrieval catalog from webpage document
CN110955855A (en) Information interception method, device and terminal
US20230315405A1 (en) Discovering matching code segments according to index and comparative similarity
CN116048517B (en) API (application program interface) generating method, system and device based on B/S (browser/Server) architecture application system
CN117439945A (en) Routing processing method and device, storage medium and electronic equipment
CN116400914A (en) Method for quickly constructing web application based on data model
CN111881220B (en) Data operation method and device under list storage, electronic equipment and storage medium
CN114490651A (en) Data storage method and device
CN101599018A (en) Upgrade the method and system of static page in a kind of service integration platform system
US20150324333A1 (en) Systems and methods for automatically generating hyperlinks

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