CN111083054A - Route configuration processing method and device, computer equipment and storage medium - Google Patents

Route configuration processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111083054A
CN111083054A CN201911118517.XA CN201911118517A CN111083054A CN 111083054 A CN111083054 A CN 111083054A CN 201911118517 A CN201911118517 A CN 201911118517A CN 111083054 A CN111083054 A CN 111083054A
Authority
CN
China
Prior art keywords
routing
file
identifier
route
database
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.)
Granted
Application number
CN201911118517.XA
Other languages
Chinese (zh)
Other versions
CN111083054B (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.)
Zhejiang Dasou Vehicle Software Technology Co Ltd
Original Assignee
Zhejiang Dasou Vehicle Software Technology 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 Zhejiang Dasou Vehicle Software Technology Co Ltd filed Critical Zhejiang Dasou Vehicle Software Technology Co Ltd
Priority to CN201911118517.XA priority Critical patent/CN111083054B/en
Publication of CN111083054A publication Critical patent/CN111083054A/en
Application granted granted Critical
Publication of CN111083054B publication Critical patent/CN111083054B/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
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

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

Abstract

The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a route configuration, a computer device, and a storage medium. The method comprises the steps of receiving a trigger instruction, wherein the trigger instruction carries a service interface identifier; acquiring a corresponding routing identifier according to the service interface identifier, and searching a routing file matched with the routing identifier from an updated routing database; and extracting a routing website from the routing file, replacing the routing configuration in the source code according to the routing website, and generating an updated routing configuration file according to the replaced routing configuration. By adopting the method, the routing configuration in the source code can be updated in time.

Description

Route configuration processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a route configuration, a computer device, and a storage medium.
Background
In recent years, with the widespread use of internet technology, the demand for browsing web page content on computer devices such as computers and smart devices is increasing.
At present, a plurality of webpage pages can be embedded into software, and the software acquires the routing configuration of the related webpage pages by calling a service background interface, so that the requirement of opening the webpage pages is met. However, since the maintenance work of these routing configurations is participated in by different developers, especially when the routing configuration changes, the developers cannot obtain the change message in time, and thus cannot update the routing configuration file in the source code in time.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium for processing routing configuration, which can update the routing configuration in time.
A method of route configuration processing, the method comprising:
receiving a trigger instruction, wherein the trigger instruction carries a service interface identifier;
acquiring a corresponding routing identifier according to the service interface identifier, and searching a routing file matched with the routing identifier from an updated routing database;
and extracting a routing website from the routing file, replacing the routing configuration in the source code according to the routing website, and generating an updated routing configuration file according to the replaced routing configuration.
In one embodiment, the generation manner of the routing database includes:
acquiring a routing configuration file corresponding to the service interface identifier from a source code database;
traversing the routing configuration file to obtain a mapping relation between a routing identifier and a routing website;
and generating a routing file according to the mapping relation, and storing the routing file to a routing database.
In one embodiment, the updating method of the routing database includes:
receiving an updating instruction of the routing file in the routing database;
extracting an updating type identifier carried by the updating instruction, and searching an operation method corresponding to the updating type identifier;
and updating the route identifier and/or the route website in the route file according to the operation method.
In an embodiment, the updating the route identifier and/or the route website in the route file according to the operation method includes:
and extracting a standard description field from the updating instruction, and adding the standard description field into a corresponding routing file.
In one embodiment, the step of searching for the routing file matching the route identifier from the routing database includes:
searching a standard description field corresponding to each routing file from a routing database;
calculating the matching degree of the description field to be matched and each standard description field;
and acquiring the routing file corresponding to the standard description field with the maximum matching degree.
In an embodiment, the updating the route identifier and/or the route website in the route file according to the operation method includes:
acquiring the serial number of each routing file in the routing database;
generating a standard serial number identifier of each routing file according to each serial number;
and adding each standard serial number identification to each corresponding routing file.
In one embodiment, the searching the routing file matched with the routing identifier from the routing database includes:
and searching a corresponding routing file from a routing database according to the serial number identifier to be inquired and the standard serial number identifier.
A routing configuration processing apparatus, the apparatus comprising:
an interface identifier obtaining module, configured to receive a trigger instruction, where the trigger instruction carries a service interface identifier;
the routing file searching module is used for acquiring a corresponding routing identifier according to the service interface identifier and searching a routing file matched with the routing identifier from an updated routing database;
and the update file generation module is used for extracting a routing website from the routing file, replacing the routing configuration in the source code according to the routing website, and generating an update routing configuration file according to the replaced routing configuration.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the above method when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The routing configuration processing method, the device, the computer equipment and the storage medium receive the compiling instruction, the compiling instruction carries the service interface identification, the corresponding routing identification is obtained according to the service interface identification, the routing file matched with the routing identification is searched from the routing database, and the routing file is automatically obtained when the codes are compiled. And the routing website is extracted from the routing file, so that the routing website is automatically acquired, then the routing configuration in the source code is replaced according to the routing website, and the updated routing configuration file is generated according to the replaced routing configuration. Especially when the routing website is changed, the latest routing website can be extracted from the routing file in time by automatically acquiring the routing website, the routing configuration in the source code is replaced according to the latest routing website, and the updated routing configuration file is generated according to the replaced routing configuration, so that the routing configuration file is updated in time.
Drawings
FIG. 1 is a diagram illustrating an exemplary implementation of a method for routing configuration processing;
FIG. 2 is a flow diagram illustrating a method for route configuration processing according to one embodiment;
FIG. 3 is a flow diagram that illustrates a method for generating a routing database, according to one embodiment;
FIG. 4 is a flowchart illustrating an embodiment of obtaining a routing website;
FIG. 5 is a block diagram of a routing configuration processing apparatus in one embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The routing configuration processing method provided by the application can be applied to the application environment shown in fig. 1. Wherein a user terminal 102 communicates with a server 104 over a network. The server 104 receives a trigger instruction sent by the user terminal 102, wherein the trigger instruction carries a service interface identifier; acquiring a corresponding routing identifier according to the service interface identifier, and searching a routing file matched with the routing identifier from an updated routing database; and extracting a routing website from the routing file, replacing the routing configuration in the source code according to the routing website, generating an updated routing configuration file according to the replaced routing configuration, and sending the updated routing configuration file to the user terminal 102.
The user terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster composed of a plurality of servers. When the server 104 is an independent server, a plurality of databases may be deployed in the server 104, and each database may store a routing file of a specific service; when the server 104 is a server cluster composed of a plurality of servers, a database deployed in each server may store a routing file for a particular service.
In one embodiment, as shown in fig. 2, a method for processing route configuration is provided, which is described by taking the method as an example applied to the server 104 in fig. 1, and the method includes the following steps:
step 220, receiving a trigger instruction, where the trigger instruction carries a service interface identifier.
The trigger instruction is an instruction for generating an execution signal by a trigger operation. For example, the triggering instruction may be a compiling instruction, which is an instruction for making the object program act through the compiler, and for example, the compiling instruction may be computer code, and the user terminal triggers the computer code to issue the triggering instruction. In another embodiment, the triggering instruction may also be generated by a triggering control, for example, the triggering control is a triggering button, and the user terminal may trigger the button on the web page to issue the triggering instruction. And after the user terminal sends the trigger instruction, the server receives the trigger instruction and acquires the service interface identifier carried by the trigger instruction.
It should be noted that, when the trigger instruction is a compile instruction, the compile instruction may be a first compile instruction. The first compiling instruction is an instruction generated in a process of compiling the source code for the first time, for example, a compiling instruction generated when a developer compiles an APP program for the first time in order to obtain a routing website required by the APP program. In other words, the first compiling instruction is utilized in the process of compiling the source code, so that the routing website required in the source code is automatically acquired, and the efficiency and the accuracy of compiling the source code are improved.
The compiling instruction can also be a recompiling instruction, and the recompiling instruction is an instruction for updating the source code on the basis of the written source code. And acquiring the routing website corresponding to the routing identifier from the routing database again through the recompilation instruction, and automatically updating the routing website in the source code, wherein particularly when the routing website is changed, the routing website in the source code can be automatically updated under the triggering of the recompilation instruction, so that the effect of updating the routing website in time is realized, and the accuracy of the source code required in the service is ensured.
The service interface identification is used to identify the class of the service interface. Specifically, the service is composed of a plurality of sub-services, each sub-service corresponds to a service interface, a sub-service source code corresponding to the sub-service is called through the service interface, and the sub-service source code is executed to realize a sub-service task. For example, the sub-service may be web page addresses of all web pages in the service code, and the web page addresses corresponding to all web pages are acquired by calling the service interface of the sub-service.
Specifically, the server receives a trigger instruction sent by the user terminal, extracts a service interface identifier carried in the trigger instruction, acquires a corresponding execution program through the service interface, and the execution program realizes a task corresponding to a service.
And step 240, acquiring a corresponding routing identifier according to the service interface identifier, and searching a routing file matched with the routing identifier from the updated routing database.
The route identification is used to uniquely identify the route file. The mapping relation between the routing website and the routing identifier is stored in the routing file, and the routing file is stored in the routing database.
Specifically, the manner of obtaining the route identifier may include: when the routing files are stored in the routing database in a list form, the sequence numbers of the routing files in the routing database are obtained according to the positions of the routing files in the routing database list, the sequence numbers serve as routing identifiers, and the routing files are uniquely identified in the routing database by the routing identifiers. The method for obtaining the route identifier may further include: the server extracts the name of the webpage corresponding to the routing website and generates a routing identifier according to the name. For example, when the routing website is a list page routing website, the routing identifier corresponding to the list page routing website may be a "list page", and the user terminal inputs the "list page" routing identifier, and may call the routing file corresponding to the "list page" from the routing database.
When the routing file in the routing database is updated, the server needs to update the routing configuration in the source code at the same time to ensure that the routing configuration in the source code is consistent with the routing file in the routing database. Specifically, the server searches a routing file uniquely matched with the routing identifier from the updated routing database, and updates the routing configuration in the source code according to the searched routing file, so as to ensure that the source code can be normally executed.
Step 260, extracting a routing website from the routing file, replacing the routing configuration in the source code according to the routing website, and generating an updated routing configuration file according to the replaced routing configuration.
The source code is a code for implementing a service task, and further, the source code includes a source code for implementing each sub-service in the service. When the service interface identification is the routing service interface identification, the server calls a source code corresponding to the routing service interface identification, executes the source code to call a routing file, searches a routing website from the routing file according to the routing identification, replaces routing configuration in the source code according to the automatically acquired routing website, and generates an updated routing configuration file according to the replaced routing configuration.
The routing configuration may include not only the routing identifier and the routing website, but also other files, such as a routing description. The routing configuration may be a routing file in one embodiment.
In this embodiment, the server automatically obtains the routing website corresponding to the routing identifier from the updated routing database, and updates the routing configuration in the source code according to the routing website, so that the effect of updating the routing configuration file in time is achieved, and the efficiency and accuracy of updating the routing configuration file in the source code are improved.
Referring to fig. 3, fig. 3 provides a flow chart of a method for generating a routing database. In one embodiment, the generation manner of the routing database includes:
step 320, obtaining the route configuration file corresponding to the service interface identifier from the source code database.
The source code database stores all source code files required for realizing all services, and more specifically, the source code database stores the source code files in a classified manner according to the categories of the sub-services. And the server acquires a source code file corresponding to the service interface from the source code database according to the service interface identifier. And when the service interface identifier is the routing service interface identifier, the server acquires a routing configuration file corresponding to the routing service interface identifier from the source code database.
The source code database may be an engineering warehouse, for example, a routing configuration file in the engineering warehouse is acquired by using an open source project of the warehouse management system, for example, a routing configuration file of a designated engineering warehouse is acquired by using a gitlab-api, where the designated engineering warehouse is an engineering warehouse to which the service is directed. When a routing configuration file corresponding to a routing service interface needs to be obtained, a gitlab-api is used for obtaining files in all js formats in a src/router folder, wherein the src/router aims at a VueJs frame and a directory structure in vue-router routing plug-in architecture.
Step 340, traversing the route configuration file to obtain the mapping relationship between the route identifier and the route website.
The server analyzes the acquired route configuration files, acquires route websites and route names in each route configuration file, generates corresponding KEY-VALUE KEY VALUE pair data according to the route websites and the route names, and generates JSON structure data corresponding to each route configuration file according to the KEY-VALUE KEY VALUE pair data. Specifically, the parsing process includes downloading all files in the specified directory to the server, and the server imports (import) the downloaded files to obtain JSON structure data. One designated directory may correspond to one routing file, or multiple designated directories may correspond to one routing file. The server may be a nodejs server.
And 360, generating a routing file according to the mapping relation, and storing the routing file to a routing database.
And the server generates each corresponding routing record according to the obtained JSON structure data, and stores the generated routing record into a routing database. The step of generating the routing record comprises the step of recursively traversing an array corresponding to JSON structure data in the routing file, wherein the array is a { path:/xxx/xx, name: 'xx' } structure, for example, the path is a routing website, and the name is a routing name, and the array is stored in a routing database. And storing the route identification into a route database and generating a route identification corresponding to each route file, wherein the route identification can be a serial number (ID) of the route file in the route database, and the ID is also called a standard serial number identification. Specifically, the ID may be an ID that is self-added when the routing file is stored in the routing database, and the ID and the number are stored in the routing database correspondingly, and the record format of the routing file in the routing database is { ID: 'sequence number', path: /xxx/xx, name: 'x' }.
In another embodiment, the method further comprises performing a routing description on the routing file, wherein the routing description may be a standard description field, and may be used to identify the routing file, and associating the standard description field with the routing file, and storing the routing file in a database, and a record format of the routing file in the routing database may be { ID: 'sequence number', path: /xxx/xx, name: 'x', description: 'standard description field'. It should be noted that the standard description field and the ID may exist in the routing file at the same time, or may exist in the routing file separately.
The standard description field can be added by front-end personnel through a system foreground interface, and the service back-end personnel inquire the required routing file and the corresponding standard serial number identification through the standard description field. In a specific implementation, if the routing file does not have the standard description field, the front-end personnel is required to provide a specific standard serial number identifier to the service back-end personnel, and the service back-end personnel searches the routing file from the routing database according to the obtained standard serial number identifier.
When the route identifier is the standard serial number identifier, the route file can be read from the route database according to the standard serial number identifier, and when the route identifier is the standard description field, the route file can be read from the route database according to the standard description field.
In addition, the server in this embodiment may be a front-end server or a back-end server.
In this embodiment, the server stores the routing file corresponding to the source code in the routing database, and when the routing file needs to be called in the process of compiling the source code, only the corresponding routing file needs to be searched from the routing database, and particularly when the routing file needs to be modified, only the routing file in the routing database needs to be modified. When the server receives a trigger instruction sent by the user terminal, the routing website corresponding to the routing identifier is called from the updated routing database, so that the effect of automatically updating the routing configuration file in the source code is realized, and the effective and accurate maintenance of the routing website in the source code is ensured.
In one embodiment, the updating method of the routing database includes: receiving an updating instruction of a routing file in a routing database; extracting an updating type identifier carried by the updating instruction, and searching an operation method corresponding to the updating type identifier; and updating the route identifier and/or the route website address in the route file according to the operation method.
The update instruction is an instruction to update a routing file stored in the routing database. The updating instruction can include a modification instruction, a deletion instruction, an addition instruction and the like of the routing file. Specifically, the server receives an update instruction for the routing file sent by the user terminal, extracts an update type identifier carried in the update instruction, wherein the update type identifier may be modified, deleted or added, and selects a corresponding update operation method according to the update type identifier.
When the update type identifier corresponds to "add", the server obtains an add operation method, adds a routing file in the routing database, or adds a routing identifier in the routing file, for example, adds a standard description field in the routing file, adds a standard sequence number identifier in the routing file, or adds a routing website address in the routing file.
When the update type identifier corresponds to 'modification', the server obtains a modification operation method, modifies the route identifier or the route website in the route file, or simultaneously modifies the route identifier and the route website in the route file, and the like.
When the update type identifier corresponds to 'delete', the server acquires a deletion operation method, deletes the routing file in the routing database, or deletes the routing identifier in the routing file and/or the routing website, and the like.
Specifically, the front-end server or the back-end server can expose all the routing files, and provide functions of adding, deleting, modifying or viewing the routing files. Specifically, the front-end server realizes the functions of adding, deleting, modifying or viewing based on the existing vuejs framework, and the back-end server realizes the functions of adding, deleting, modifying or viewing the routing file based on the egg.
When the server obtains a checking instruction of the routing file, the server can also query a corresponding routing website from a routing database according to the standard serial number identification or the standard description field, and pack the routing website into the source code, so as to realize the automatic updating of the routing website in the source code.
In this embodiment, by storing the routing file in the routing database, the unified management of the routing file is realized, and the management efficiency of the routing file is improved.
In one embodiment, updating the route identifier and/or the route website address in the route file according to the operation method includes: and extracting the standard description field from the updating instruction, and adding the standard description field into the corresponding routing file.
The standard description field is used to uniquely identify the routing file. Specifically, the server obtains a file name of the routing file carried in the update instruction as a standard description field, and the server may also use a pinyin character corresponding to the file name of the routing file as the standard description field. And is not limited herein as long as the retrieved standard description field can be used to identify the routing file.
In one embodiment, when the pinyin characters are used as standard description fields, a field-character database is stored in the server in advance, mapping relations between the fields and the corresponding pinyin characters are stored in the field-character database, and the pinyin characters are used for uniquely identifying one field. Specifically, the server may search the pinyin characters corresponding to each field from the field-character database, and convert the fields into pinyin characters. The server may use the found pinyin characters as the pinyin characters corresponding to the respective fields, or may use the first letters of the found pinyin characters as the pinyin characters corresponding to the respective fields. For example, the pinyin character corresponding to the field "list page" is searched for as "liebaioyye" from the field-character database, the "liebaioyye" or "LBY" can be used as the pinyin character corresponding to the field list page, and the "liebaioyye" or "LBY" can also be used as the pinyin character of the field list page in other embodiments. The invention does not limit the case and the expression form of the pinyin characters.
And the server adds the acquired standard description field into the routing file and associates the standard description field with the routing website. When the route identifier received by the server is the standard description field, the server can search the route website corresponding to the standard description field in the route database.
In this embodiment, the standard description field corresponding to each routing file is customized, so that the routing file can be matched with the standard description field, and then the routing file can be matched according to the standard description field, thereby achieving the effect of rapidly acquiring the routing file.
In one embodiment, the step of searching a routing file matched with the route identifier from a routing database, where the route identifier is a description field to be matched, includes: searching a standard description field corresponding to each routing file from a routing database, and calculating the matching degree of the description field to be matched and each standard description field; and acquiring the routing file corresponding to the standard description field with the maximum matching degree.
The description field to be matched may be a field input by the user terminal, and when the user terminal wants to acquire a routing file related to the description field to be matched, the standard description field whose matching degree with the description field to be matched is greater than a preset threshold may be searched from the routing database by inputting the description field to be matched. When the description field to be matched input by the user terminal is the same as the standard description field in the routing database, only one standard description field matched with the matching description field is matched from the routing database, and the routing file corresponding to the standard description field is extracted. And when the description fields to be matched are different from the standard description fields, matching at least one standard description field which is not completely matched with the matching description fields from the routing database, calculating the matching degree of each description field to be matched and each standard description field, and extracting the routing file corresponding to the standard description field with the maximum matching degree.
The method for calculating the matching degree between the description field to be matched and the standard description field can be a full fuzzy matching algorithm, and can be applied to searching the roughly matched routing file from the routing database by the server through inputting the description field to be matched which has the same or similar keywords or is short with the standard description field when the user terminal cannot know the standard description field corresponding to the routing file. Further, one route file is extracted from the plurality of approximately matched route files according to the matching degree. The full fuzzy matching algorithm can be a VLOOKUP function wildcard algorithm, a LOOKUP function algorithm, or a word segmentation method based on character string matching, etc.
In the embodiment, the description field to be matched is used for matching the routing file from the routing database, so that the effect that the routing file can still be matched under the condition that the standard description field is not known is realized, and the capability of obtaining the routing file is improved.
In one embodiment, updating the route identifier and/or the route website address in the route file according to the operation method includes: acquiring the sequence number of each routing file in a routing database; generating standard serial number identifications of the routing files according to the serial numbers; and adding each standard serial number mark to each corresponding routing file.
When storing the routing file into the routing database, the routing file may be inserted into the routing database in a form of a table, and when receiving the routing file, the routing database assigns a corresponding sequence number to the routing file in the routing database according to a position of the routing file in the routing database, where the sequence number may be generated when inserting the routing file into the routing database. And recording the serial number corresponding to each routing file as a standard serial number identifier of the routing file, adding each standard serial number identifier to the corresponding routing file, and uniquely identifying the routing file.
In this embodiment, when the routing file is inserted into the routing database, a standard serial number identifier is automatically assigned to the routing file, so that a unique identifier for the routing file is realized, and the efficiency and accuracy of identifying the routing file are improved by automatically assigning the identifier.
In one embodiment, the searching for the routing file matching with the route identifier from the routing database includes: and searching a corresponding routing file from the routing database according to the serial number identifier to be inquired and the standard serial number identifier.
The serial number identification to be queried can be an identification input by the user terminal, and when the user terminal wants to acquire the routing file corresponding to the serial number identification to be queried, the routing file corresponding to the serial number identification to be queried can be searched from the routing database by inputting the serial number identification to be queried. The serial number identification to be inquired is used for uniquely identifying the routing files, and the routing files searched from the routing database according to the serial number identification to be inquired are unique one.
In this embodiment, the user terminal searches for the only matching routing file from the routing database by using the obtained standard serial number identifier, so that the routing file is accurately matched, and the efficiency and accuracy of obtaining the routing file are improved.
Referring to fig. 4, a schematic flow chart of acquiring a routing website is provided, which includes a step of acquiring a routing website by using a precise matching algorithm and a fuzzy matching algorithm. The method comprises the following steps:
step 420, obtain the route identification. Specifically, the server obtains a route identifier input by the user terminal.
Step 440, determine the route identification category. Specifically, the server determines the type of the routing identifier according to the character type of the routing identifier, and goes to step 462 when the type corresponding to the routing identifier is the serial number identifier to be queried, and goes to step 452 when the type corresponding to the routing identifier is the description field to be queried.
Step 452, a fuzzy matching algorithm is obtained. When the user terminal inputs the description field to be queried, the matching algorithm obtained by the server is a fuzzy matching algorithm, that is, one description field to be queried is input into the fuzzy matching algorithm, and at least one routing file can be obtained. And when the number of the obtained routing files is multiple, go to step 454, and when the obtained routing file is one, go to step 464.
Step 454, a plurality of routing files are obtained. Proceed to step 456.
In step 456, the routing file with the maximum matching degree is extracted. Specifically, the server extracts standard description fields corresponding to the queried routing files, and calculates matching degrees between the standard description fields and the description fields to be queried. Proceed to step 458.
In step 458, the server extracts the routing file with the maximum matching degree. Specifically, the server compares the size of each matching degree value, and extracts the routing file corresponding to the standard description field with the maximum matching degree with the description field to be matched. Step 480 is performed.
In step 464, a routing file is obtained, and step 480 is executed.
Step 462, obtain the exact match algorithm. That is, a serial number identifier to be queried is input to obtain a unique corresponding routing file, and step 480 is executed.
Step 480, extracting the routing website in the routing file. Specifically, the server extracts the routing website corresponding to the routing file with the maximum matching degree.
For example, when a user terminal wants to acquire a website corresponding to a certain network plane, one or more routing files associated with the network plane can be acquired only by inputting a description field to be queried corresponding to the network plane for fuzzy query, and then a correct routing file is selected from the multiple routing files to realize the selection of the routing website. For example, the user terminal queries the website corresponding to the "list page", and may fuzzy match the corresponding vehicle list page and the order list page from the routing database by searching the "list page", and then may query the routing website corresponding to the vehicle list page by manually selecting or extracting the vehicle list page with the largest matching degree.
If no description language exists in each routing configuration in the database, the ID number corresponding to the webpage can be provided by front-end personnel, and the webpage is inquired according to the ID number.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a routing configuration processing apparatus including:
an interface identifier obtaining module 520, configured to receive a trigger instruction, where the trigger instruction carries a service interface identifier.
And the routing file searching module 540 is configured to obtain a corresponding routing identifier according to the service interface identifier, and search for a routing file matched with the routing identifier from the updated routing database.
And the update file generation module 560 is configured to extract a routing website from the routing file, replace the routing configuration in the source code according to the routing website, and generate an update routing configuration file according to the replaced routing configuration.
In one embodiment, the routing configuration processing apparatus may further include:
and the route configuration file acquisition module is used for acquiring the route configuration file corresponding to the service interface identifier from a source code database.
And the mapping relation acquisition module is used for traversing the routing configuration file to obtain the mapping relation between the routing identifier and the routing website.
And the routing database generation module is used for generating a routing file according to the mapping relation and storing the routing file to a routing database.
In one embodiment, the routing configuration processing apparatus may further include:
and the updating instruction receiving module is used for receiving an updating instruction of the routing file in the routing database.
And the operation method searching module is used for extracting the updating type identifier carried by the updating instruction and searching the operation method corresponding to the updating type identifier.
And the updating module is used for updating the route identifier and/or the route website in the route file according to the operation method.
In one embodiment, the update module includes:
and the description field adding unit is used for extracting the standard description field from the updating instruction and adding the standard description field into the corresponding routing file.
In one embodiment, the routing configuration processing apparatus may further include:
and the standard field searching module is used for searching the standard description field corresponding to each routing file from a routing database.
And the matching degree calculation module is used for calculating the matching degree of the description field to be matched and each standard description field.
And the routing file acquisition module is used for acquiring the routing file corresponding to the standard description field with the maximum matching degree.
In one embodiment, the update module includes:
and the sequence number acquisition unit is used for acquiring the sequence number of each routing file in the routing database.
And the standard identifier generating unit is used for generating the standard serial number identifier of each routing file according to each serial number.
And the serial number adding unit is used for adding each standard serial number identifier to each corresponding routing file.
In one embodiment, the routing configuration processing apparatus may further include:
and the routing file searching module is used for searching the corresponding routing file from the routing database according to the serial number identification to be inquired and the standard serial number identification.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for searching application data processing related data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a route configuration processing method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: receiving a trigger instruction, wherein the trigger instruction carries a service interface identifier; acquiring a corresponding routing identifier according to the service interface identifier, and searching a routing file matched with the routing identifier from an updated routing database; and extracting a routing website from the routing file, replacing the routing configuration in the source code according to the routing website, and generating an updated routing configuration file according to the replaced routing configuration.
In one embodiment, the step of implementing the manner of generating the routing database when the processor executes the computer program is further configured to: acquiring a routing configuration file corresponding to the service interface identifier from a source code database; traversing the routing configuration file to obtain a mapping relation between a routing identifier and a routing website; and generating a routing file according to the mapping relation, and storing the routing file to a routing database.
In one embodiment, the step of implementing the update mode of the routing database when the processor executes the computer program is further configured to: receiving an updating instruction of the routing file in the routing database; extracting an updating type identifier carried by the updating instruction, and searching an operation method corresponding to the updating type identifier; and updating the route identifier and/or the route website in the route file according to the operation method.
In one embodiment, the step of updating the route identifier and/or the route website in the route file according to the operation method when the processor executes the computer program is further configured to: and extracting a standard description field from the updating instruction, and adding the standard description field into a corresponding routing file.
In one embodiment, the processor, when executing the computer program, implements the route identifier as a description field to be matched, and the step of searching the route database for the route file matching the route identifier is further configured to: searching a standard description field corresponding to each routing file from a routing database, and calculating the matching degree of the description field to be matched and each standard description field; and acquiring the routing file corresponding to the standard description field with the maximum matching degree.
In one embodiment, the step of updating the route identifier and/or the route website in the route file according to the operation method when the processor executes the computer program is further configured to: acquiring the serial number of each routing file in the routing database; generating a standard serial number identifier of each routing file according to each serial number; and adding each standard serial number identification to each corresponding routing file.
In one embodiment, the processor, when executing the computer program, implements the route identifier as a sequence number identifier to be queried, and the step of searching the route database for the route file matching the route identifier is further configured to: and searching a corresponding routing file from a routing database according to the serial number identifier to be inquired and the standard serial number identifier.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a trigger instruction, wherein the trigger instruction carries a service interface identifier; acquiring a corresponding routing identifier according to the service interface identifier, and searching a routing file matched with the routing identifier from an updated routing database; and extracting a routing website from the routing file, replacing the routing configuration in the source code according to the routing website, and generating an updated routing configuration file according to the replaced routing configuration.
In one embodiment, the computer program when executed by the processor performs the steps of generating the routing database further comprises: acquiring a routing configuration file corresponding to the service interface identifier from a source code database; traversing the routing configuration file to obtain a mapping relation between a routing identifier and a routing website; and generating a routing file according to the mapping relation, and storing the routing file to a routing database.
In one embodiment, the computer program when executed by the processor performs the step of updating the routing database further comprises: receiving an updating instruction of the routing file in the routing database; extracting an updating type identifier carried by the updating instruction, and searching an operation method corresponding to the updating type identifier; and updating the route identifier and/or the route website in the route file according to the operation method.
In one embodiment, the computer program when executed by the processor performs the step of updating the route identifier and/or the route address in the route file according to the operation method further configured to: and extracting a standard description field from the updating instruction, and adding the standard description field into a corresponding routing file.
In one embodiment, the computer program when executed by the processor implements the route identifier as a description field to be matched, and the step of searching the route database for a route file matching the route identifier further comprises: searching a standard description field corresponding to each routing file from a routing database, and calculating the matching degree of the description field to be matched and each standard description field; and acquiring the routing file corresponding to the standard description field with the maximum matching degree.
In one embodiment, the computer program when executed by the processor, when implementing the step of updating the route identifier and/or the route website in the route file according to the operation method, is further configured to: acquiring the serial number of each routing file in the routing database; generating a standard serial number identifier of each routing file according to each serial number; and adding each standard serial number identification to each corresponding routing file.
In one embodiment, the computer program when executed by the processor implements the route identifier as a serial number identifier to be queried, and the step of searching the route database for a route file matching the route identifier further comprises: and searching a corresponding routing file from a routing database according to the serial number identifier to be inquired and the standard serial number identifier.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of route configuration processing, the method comprising:
receiving a trigger instruction, wherein the trigger instruction carries a service interface identifier;
acquiring a corresponding routing identifier according to the service interface identifier, and searching a routing file matched with the routing identifier from an updated routing database;
and extracting a routing website from the routing file, replacing the routing configuration in the source code according to the routing website, and generating an updated routing configuration file according to the replaced routing configuration.
2. The method of claim 1, wherein the generating of the routing database comprises:
acquiring a routing configuration file corresponding to the service interface identifier from a source code database;
traversing the routing configuration file to obtain a mapping relation between a routing identifier and a routing website;
and generating a routing file according to the mapping relation, and storing the routing file to a routing database.
3. The method of claim 1, wherein the updating of the routing database comprises:
receiving an updating instruction of the routing file in the routing database;
extracting an updating type identifier carried by the updating instruction, and searching an operation method corresponding to the updating type identifier;
and updating the route identifier and/or the route website in the route file according to the operation method.
4. The method according to claim 3, wherein the updating the route identifier and/or the route website in the route file according to the operation method comprises:
and extracting a standard description field from the updating instruction, and adding the standard description field into a corresponding routing file.
5. The method of claim 4, wherein the route identifier is a description field to be matched, and the searching the route database for the route file matching the route identifier comprises:
searching a standard description field corresponding to each routing file from a routing database;
calculating the matching degree of the description field to be matched and each standard description field;
and acquiring the routing file corresponding to the standard description field with the maximum matching degree.
6. The method according to claim 3, wherein the updating the route identifier and/or the route website in the route file according to the operation method comprises:
acquiring the serial number of each routing file in the routing database;
generating a standard serial number identifier of each routing file according to each serial number;
and adding each standard serial number identification to each corresponding routing file.
7. The method according to claim 6, wherein the route identifier is a sequence number identifier to be queried, and the searching for the route file matching the route identifier from the route database comprises:
and searching a corresponding routing file from a routing database according to the serial number identifier to be inquired and the standard serial number identifier.
8. A routing configuration processing apparatus, the apparatus comprising:
an interface identifier obtaining module, configured to receive a trigger instruction, where the trigger instruction carries a service interface identifier;
the routing file searching module is used for acquiring a corresponding routing identifier according to the service interface identifier and searching a routing file matched with the routing identifier from an updated routing database;
and the update file generation module is used for extracting a routing website from the routing file, replacing the routing configuration in the source code according to the routing website, and generating an update routing configuration file according to the replaced routing configuration.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201911118517.XA 2019-11-15 2019-11-15 Route configuration processing method and device, computer equipment and storage medium Active CN111083054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911118517.XA CN111083054B (en) 2019-11-15 2019-11-15 Route configuration processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911118517.XA CN111083054B (en) 2019-11-15 2019-11-15 Route configuration processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111083054A true CN111083054A (en) 2020-04-28
CN111083054B CN111083054B (en) 2021-11-30

Family

ID=70311153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911118517.XA Active CN111083054B (en) 2019-11-15 2019-11-15 Route configuration processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111083054B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111596902A (en) * 2020-05-26 2020-08-28 牛津(海南)区块链研究院有限公司 Method, device, equipment and storage medium for building front-end and back-end development framework
CN114253630A (en) * 2021-12-23 2022-03-29 上海新炬网络信息技术股份有限公司 Method for realizing log storage by modifying Form change information based on Java section
CN115348169A (en) * 2022-08-24 2022-11-15 大陆汽车研发(重庆)有限公司 Route configuration method, device, equipment and storage medium for vehicle-mounted gateway

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038356A (en) * 2013-03-04 2014-09-10 阿里巴巴集团控股有限公司 Execution method, configuration apparatus and processing apparatus for data route
WO2015076794A1 (en) * 2013-11-20 2015-05-28 Empire Technology Development, Llc Network injected storage redirection for embedded applications
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN108037927A (en) * 2017-12-29 2018-05-15 有米科技股份有限公司 Kit packaging method, system, readable storage medium storing program for executing and computer equipment
CN108829459A (en) * 2018-05-31 2018-11-16 康键信息技术(深圳)有限公司 Configuration method, device, computer equipment and storage medium based on Nginx server
CN109039751A (en) * 2018-08-14 2018-12-18 深圳壹账通智能科技有限公司 Configure method, apparatus, computer equipment and the storage medium of routing
CN109639572A (en) * 2018-12-06 2019-04-16 网易(杭州)网络有限公司 Route management method, device and micro services system
CN110347942A (en) * 2019-05-31 2019-10-18 深圳壹账通智能科技有限公司 Method for page jump, device, storage medium and computer equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038356A (en) * 2013-03-04 2014-09-10 阿里巴巴集团控股有限公司 Execution method, configuration apparatus and processing apparatus for data route
WO2015076794A1 (en) * 2013-11-20 2015-05-28 Empire Technology Development, Llc Network injected storage redirection for embedded applications
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN108037927A (en) * 2017-12-29 2018-05-15 有米科技股份有限公司 Kit packaging method, system, readable storage medium storing program for executing and computer equipment
CN108829459A (en) * 2018-05-31 2018-11-16 康键信息技术(深圳)有限公司 Configuration method, device, computer equipment and storage medium based on Nginx server
CN109039751A (en) * 2018-08-14 2018-12-18 深圳壹账通智能科技有限公司 Configure method, apparatus, computer equipment and the storage medium of routing
CN109639572A (en) * 2018-12-06 2019-04-16 网易(杭州)网络有限公司 Route management method, device and micro services system
CN110347942A (en) * 2019-05-31 2019-10-18 深圳壹账通智能科技有限公司 Method for page jump, device, storage medium and computer equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BELIEVE6: ""可能比文档还详细--VueRouter完全指北"", 《HTTPS://WWW.CNBLOGS.COM/ZHANGYCUN/P/9547255.HTML》 *
MANA: ""How to update vue-router"", 《HTTPS://STACKOVERFLOW.COM/QUESTIONS/52968516/HOW-TO-UPDATE-VUE-ROUTER》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111596902A (en) * 2020-05-26 2020-08-28 牛津(海南)区块链研究院有限公司 Method, device, equipment and storage medium for building front-end and back-end development framework
CN111596902B (en) * 2020-05-26 2023-03-28 牛津(海南)区块链研究院有限公司 Method, device, equipment and storage medium for building front-end and back-end development framework
CN114253630A (en) * 2021-12-23 2022-03-29 上海新炬网络信息技术股份有限公司 Method for realizing log storage by modifying Form change information based on Java section
CN114253630B (en) * 2021-12-23 2023-07-25 上海新炬网络信息技术股份有限公司 Method for realizing log storage based on Java section modification Form change information
CN115348169A (en) * 2022-08-24 2022-11-15 大陆汽车研发(重庆)有限公司 Route configuration method, device, equipment and storage medium for vehicle-mounted gateway
CN115348169B (en) * 2022-08-24 2023-09-22 大陆汽车研发(重庆)有限公司 Route configuration method, device, equipment and storage medium for vehicle-mounted gateway

Also Published As

Publication number Publication date
CN111083054B (en) 2021-11-30

Similar Documents

Publication Publication Date Title
CN110069449B (en) File processing method, device, computer equipment and storage medium
CN110290212B (en) Service call recording method, device, computer equipment and storage medium
CN111083054B (en) Route configuration processing method and device, computer equipment and storage medium
CN110866198B (en) Static resource caching method, system, device, computer equipment and storage medium
CN110688598B (en) Service parameter acquisition method and device, computer equipment and storage medium
CN109814854B (en) Project framework generation method, device, computer equipment and storage medium
CN111258989A (en) Database migration evaluation method and device, storage medium and computer equipment
CN110263317B (en) Method and device for generating document template
CN111310427A (en) Service data configuration processing method and device, computer equipment and storage medium
CN109325042B (en) Processing template acquisition method, form processing method, device, equipment and medium
CN108984612B (en) Method and device for acquiring target SQL statement, computer equipment and storage medium
CN108415998B (en) Application dependency relationship updating method, terminal, device and storage medium
CN111367595B (en) Data processing method, program running method, device and processing equipment
CN110659938A (en) Method and device for determining promotion channel, computer equipment and storage medium
CN111984659B (en) Data updating method, device, computer equipment and storage medium
CN108399125B (en) Automatic testing method and device, computer equipment and storage medium
CN112685475A (en) Report query method and device, computer equipment and storage medium
CN111008022A (en) Relationship graph generation method and device, computer equipment and storage medium
CN113254470A (en) Data change method and device, computer equipment and storage medium
US9411618B2 (en) Metadata-based class loading using a content repository
CN111597422A (en) Buried point mapping method and device, computer equipment and storage medium
CN108897772B (en) Data source supplementing method and device, computer equipment and storage medium
CN114238334A (en) Heterogeneous data encoding method and device, heterogeneous data decoding method and device, computer equipment and storage medium
CN112860567A (en) Buried point identification method and device, computer equipment and storage medium
CN113051299A (en) Proxy information processing method, proxy information processing device, computer equipment and storage medium

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