CN104767835A - System and method for configuring URL (Uniform Resource Locator) address - Google Patents

System and method for configuring URL (Uniform Resource Locator) address Download PDF

Info

Publication number
CN104767835A
CN104767835A CN201410002676.4A CN201410002676A CN104767835A CN 104767835 A CN104767835 A CN 104767835A CN 201410002676 A CN201410002676 A CN 201410002676A CN 104767835 A CN104767835 A CN 104767835A
Authority
CN
China
Prior art keywords
url
text
nodal information
address
url address
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
CN201410002676.4A
Other languages
Chinese (zh)
Other versions
CN104767835B (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.)
Shanghai Ctrip Business Co Ltd
Original Assignee
Ctrip Computer Technology Shanghai 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 Ctrip Computer Technology Shanghai Co Ltd filed Critical Ctrip Computer Technology Shanghai Co Ltd
Priority to CN201410002676.4A priority Critical patent/CN104767835B/en
Publication of CN104767835A publication Critical patent/CN104767835A/en
Application granted granted Critical
Publication of CN104767835B publication Critical patent/CN104767835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a system and a method for configuring a URL (Uniform Resource Locator) address. The method comprises the following steps of S1 defining node information of the URL address, which conforms to an ASP.NET MVC (Model View Controller) mechanism, in a text; S2 splitting a target URL address, resolving the node information of the target URL address and configuring the resolved node information in the text; S3 when a WEB application program is started, carrying out ASP.NET deserialization on the configured text and converting the node information configured in the text into parameters of a URL routing address class structure of the WEB application program; and S4 registering the parameters into the WEB application program through a URL routing list registration mechanism. According to the system and the method, the URL address can be quickly configured and managed, and a developer does not need to recompile a source code, so that the dependence on the code is reduced, the workload of the developer is relieved and the configuration is more flexible.

Description

The configuration-system of URL address and method
Technical field
The present invention relates to a kind of configuration-system and method of URL address, particularly relate to a kind of needs by adding, deleting or the configuration-system of URL address that content in amendment URL configuration file just can be managed for configuration URL address and a kind of collocation method of the URL address utilizing described configuration-system to realize.
Background technology
Along with the high speed development of the present computer technology, the Internet has become a very important part in people's life, in internet industry, friendly WEB(webpage) become the direction be more and more taken seriously, and traditional WEB website is to URL(URL(uniform resource locator)) configuration management of routing address do not reach friendly requirement, traditional WEB website is hard coded process to the processing mode of URL routing address, all that developer's a line a line writes code, when the URL address of website needs to change, developer needs the source code of amendment URL address, website and again issues whole website to upgrade.Adopt traditional configuration mode, once need to carry out alter operation frequently to URL address, huge workload can be brought to developer, the too fat to move of system can be caused simultaneously.
Summary of the invention
The technical problem to be solved in the present invention needs manually to write code to overcome the configuration management of WEB website to URL routing address in prior art, cause bringing huge workload to developer and the defect causing system too fat to move, the configuration-system of URL address and a kind of collocation method of the URL address utilizing described configuration-system to realize that a kind of needs just to be managed for configuration URL address by the content in interpolation, deletion or amendment URL configuration file are provided.
The present invention solves above-mentioned technical problem by following technical proposals:
The invention provides a kind of collocation method of URL address, its feature is, it comprises the following steps:
S 1, in a text definition meet a kind of Web page application program framework that official of ASP.NET MVC(Microsoft provides) nodal information of the URL address of mechanism, described nodal information comprises URL and splices form, suffix attribute, controller attribute, action attributes and namespace name;
S 2, a target URL address is split, therefrom parse the nodal information of described target URL address, and the nodal information parsed be configured in described text;
S 3, when WEB application program starts, the server side scripts technology that ASP.NET(mono-kind makes the script in embedded web page can be performed by Internet server is carried out to the described text after configuration) unserializing, the nodal information configured in described text to be converted to the parameter of the URL routing address class formation of described WEB application program;
S 4, by described parameter by ASP.NET MVC URL routing table RegisterRoutes(route registration table) login mechanism is registered in described WEB application program.
Preferably, described text is XML(extend markup language) text.
Preferably, the nodal information of the URL address of each website comprises a unique namespace name.
The object of the invention is to the configuration-system additionally providing a kind of URL address, its feature is, it comprises:
One nodal information definition module, meet the nodal information of the URL address of ASP.NET MVC mechanism for definition in a text, described nodal information comprises URL and splices form, suffix attribute, controller attribute, action attributes and namespace name;
One address dividing module, for splitting a target URL address, therefrom parses the nodal information of described target URL address, and is configured in described text by the nodal information parsed;
One unserializing module, for when WEB application program starts, carries out ASP.NET unserializing, the nodal information configured in described text to be converted to the parameter of the URL routing address class formation of described WEB application program to the described text after configuration;
One Registering modules, for being registered to described parameter in described WEB application program by ASP.NET MVC URL routing table RegisterRoutes login mechanism.
Preferably, described text is XML text.
Preferably, the nodal information of the URL address of each website comprises a unique namespace name.
Positive progressive effect of the present invention is: the present invention can carry out quick configuration management to URL address, does not need developer to recompilate source code again, reduces the dependence to code, alleviates the workload of developer, and configuration is more flexible.
Accompanying drawing explanation
Fig. 1 is the structural representation of the configuration-system of the URL address of a preferred embodiment of the present invention.
Fig. 2 is the flow chart of the collocation method of the URL address of a preferred embodiment of the present invention.
Embodiment
Mode below by embodiment further illustrates the present invention, but does not therefore limit the present invention among described scope of embodiments.
As shown in Figure 1, the configuration-system of the URL address of the present embodiment comprises nodal information definition module 1, address dividing module 2, unserializing module 3 and a Registering modules 4.
First described nodal information definition module 1 defines the nodal information meeting the URL address of ASP.NET MVC mechanism in XML text, wherein have recorded the information comprised in the parameter of URL address in detail, specifically comprise URL and splice form, suffix attribute, controller attribute, action attributes and namespace name.
When a target URL address is revised as in an origin url address by needs, described address dividing module 2 can carry out structure fractionation to described target URL address, follow ASP.NET MVC mechanism and therefrom resolve parameters, comprise concrete URL and splice form, suffix attribute, controller attribute, action attributes and namespace name information, and the above-mentioned nodal information parsed is write input in each nodal information title that described nodal information definition module 1 defines, to realize the parameters information configuring described URL destination address in described XML text.
When WEB application program starts, described unserializing module 3 can carry out ASP.NET unserializing to the described XML text after configuration, the nodal information configured in described XML text to be converted to the parameter of the URL routing address class formation of described WEB application program, the parameters of described target URL address is registered in described WEB application program by ASP.NET MVC URL routing table RegisterRoutes login mechanism by described Registering modules 4.
When WEB server first time starts, IIS(Internet Information Service) mechanism will read out the node parameter information configured in the XML text in website, is combined into ASP.NET route system object.In order to the too fat to move degree of simplified code solution, often the controller of multiple website is combined, because each self-defining routing rule name of different websites may be identical, but content is in fact different, invention introduces the mechanism of a NameSpace in this case, a unique namespace name is given in nodal information namely to the URL address of each website, thus the namespace name adding each website oneself in different XML content of text is for distinguishing, and so just can ensure that different websites naming conflict can not occur.
When user issues a request to WEB server, fuzzy matching is done automatically in the URL address that ASP.NET can ask according to user in system routing object, after completing the fuzzy matching success of URL address, the URL address that user can ask by system splits in detail, URL address will be split as domain name head, port numbers, parameter sets etc.If the rule that the parameters information conforms split out is preset enters the URL address page of user's request.
As shown in Figure 2, the collocation method of the present invention URL address of utilizing the configuration-system of the URL address of the present embodiment to realize comprises the following steps:
Step 101, in an XML text definition meet the nodal information of the URL address of ASP.NET MVC mechanism, described nodal information comprises URL and splices form, suffix attribute, controller attribute, action attributes and namespace name.
Step 102, a target URL address to be split, therefrom parse the nodal information of described target URL address, and the nodal information parsed is configured in described XML text.
Step 103, when WEB application program starts, to configuration after described XML text carry out ASP.NET unserializing, the nodal information configured in described XML text to be converted to the parameter of the URL routing address class formation of described WEB application program.
Step 104, described parameter to be registered in described WEB application program by ASP.NET MVC URL routing table RegisterRoutes login mechanism.
Although the foregoing describe the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, protection scope of the present invention is defined by the appended claims.Those skilled in the art, under the prerequisite not deviating from principle of the present invention and essence, can make various changes or modifications to these execution modes, but these change and amendment all falls into protection scope of the present invention.

Claims (6)

1. a collocation method for URL address, is characterized in that, it comprises the following steps:
S 1, in a text definition meet the nodal information of the URL address of ASP.NET MVC mechanism, described nodal information comprises URL and splices form, suffix attribute, controller attribute, action attributes and namespace name;
S 2, a target URL address is split, therefrom parse the nodal information of described target URL address, and the nodal information parsed be configured in described text;
S 3, when WEB application program starts, to configuration after described text carry out ASP.NET unserializing, the nodal information configured in described text to be converted to the parameter of the URL routing address class formation of described WEB application program;
S 4, described parameter is registered in described WEB application program by ASP.NET MVC URL routing table RegisterRoutes login mechanism.
2. collocation method as claimed in claim 1, it is characterized in that, described text is XML text.
3. collocation method as claimed in claim 1, it is characterized in that, the nodal information of the URL address of each website comprises a unique namespace name.
4. a configuration-system for URL address, is characterized in that, it comprises:
One nodal information definition module, meet the nodal information of the URL address of ASP.NET MVC mechanism for definition in a text, described nodal information comprises URL and splices form, suffix attribute, controller attribute, action attributes and namespace name;
One address dividing module, for splitting a target URL address, therefrom parses the nodal information of described target URL address, and is configured in described text by the nodal information parsed;
One unserializing module, for when WEB application program starts, carries out ASP.NET unserializing, the nodal information configured in described text to be converted to the parameter of the URL routing address class formation of described WEB application program to the described text after configuration;
One Registering modules, for being registered to described parameter in described WEB application program by ASP.NET MVC URL routing table RegisterRoutes login mechanism.
5. configuration-system as claimed in claim 4, it is characterized in that, described text is XML text.
6. configuration-system as claimed in claim 5, it is characterized in that, the nodal information of the URL address of each website comprises a unique namespace name.
CN201410002676.4A 2014-01-03 2014-01-03 The configuration system and method for the address URL Active CN104767835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410002676.4A CN104767835B (en) 2014-01-03 2014-01-03 The configuration system and method for the address URL

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410002676.4A CN104767835B (en) 2014-01-03 2014-01-03 The configuration system and method for the address URL

Publications (2)

Publication Number Publication Date
CN104767835A true CN104767835A (en) 2015-07-08
CN104767835B CN104767835B (en) 2019-05-31

Family

ID=53649432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410002676.4A Active CN104767835B (en) 2014-01-03 2014-01-03 The configuration system and method for the address URL

Country Status (1)

Country Link
CN (1) CN104767835B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516295A (en) * 2015-12-03 2016-04-20 腾讯科技(深圳)有限公司 Network request processing method and device
CN107707614A (en) * 2017-08-16 2018-02-16 深圳市丰巢科技有限公司 App route implementation methods, equipment and the storage medium of agreement are jumped based on system
CN107895125A (en) * 2017-12-06 2018-04-10 深圳市智享未来科技有限公司 One kind management menu and operating right customizing method
CN110020272A (en) * 2017-08-14 2019-07-16 中国电信股份有限公司 Caching method, device and computer storage medium
CN114143850A (en) * 2021-11-25 2022-03-04 深圳市领创星通科技有限公司 IPv6 address allocation method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1960371A (en) * 2006-08-25 2007-05-09 华为技术有限公司 Method and system for accessing file of Wcb application program
CN101933313A (en) * 2007-12-18 2010-12-29 太阳风环球有限责任公司 Method of resolving network address to host names in network flows for network device
CN102882703A (en) * 2012-08-31 2013-01-16 赛尔网络有限公司 Hyper text transfer protocol (HTTP)-analysis-based uniform resource locator (URL) automatically classifying and grading system and method
CN103036910A (en) * 2013-01-05 2013-04-10 北京网康科技有限公司 Method and device for controlling user web access behaviors

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1960371A (en) * 2006-08-25 2007-05-09 华为技术有限公司 Method and system for accessing file of Wcb application program
CN101933313A (en) * 2007-12-18 2010-12-29 太阳风环球有限责任公司 Method of resolving network address to host names in network flows for network device
CN102882703A (en) * 2012-08-31 2013-01-16 赛尔网络有限公司 Hyper text transfer protocol (HTTP)-analysis-based uniform resource locator (URL) automatically classifying and grading system and method
CN103036910A (en) * 2013-01-05 2013-04-10 北京网康科技有限公司 Method and device for controlling user web access behaviors

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516295A (en) * 2015-12-03 2016-04-20 腾讯科技(深圳)有限公司 Network request processing method and device
CN110020272A (en) * 2017-08-14 2019-07-16 中国电信股份有限公司 Caching method, device and computer storage medium
CN107707614A (en) * 2017-08-16 2018-02-16 深圳市丰巢科技有限公司 App route implementation methods, equipment and the storage medium of agreement are jumped based on system
CN107707614B (en) * 2017-08-16 2022-02-08 深圳市丰巢科技有限公司 System hop protocol-based app routing implementation method, device and storage medium
CN107895125A (en) * 2017-12-06 2018-04-10 深圳市智享未来科技有限公司 One kind management menu and operating right customizing method
CN114143850A (en) * 2021-11-25 2022-03-04 深圳市领创星通科技有限公司 IPv6 address allocation method and device, computer equipment and storage medium
CN114143850B (en) * 2021-11-25 2024-02-23 深圳市领创星通科技有限公司 IPv6 address allocation method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN104767835B (en) 2019-05-31

Similar Documents

Publication Publication Date Title
US10282664B2 (en) Method and device for constructing event knowledge base
KR102185864B1 (en) Server-side rendering method and system of native content for presentation
US20170242934A1 (en) Methods for integrating semantic search, query, and analysis and devices thereof
CN104767835A (en) System and method for configuring URL (Uniform Resource Locator) address
CN104461484B (en) The implementation method and device of front-end template
US11934403B2 (en) Generating training data for natural language search systems
CN104158836A (en) Method for rendering mobile application interface through data
WO2016131311A1 (en) Browser compatibility method and browser
CN106155673B (en) Method, device, server and user equipment for realizing page content editor
CN105824745A (en) Grey level launch method and device
JP2012521608A5 (en) Program for distributing dictionaries
US10416976B2 (en) Deployment device, deployment method, and recording medium
JP6827496B2 (en) Indexing actions on resources
CN110990057B (en) Method, device, equipment and medium for extracting small program subchain information
Lee et al. A multi-tenant web application framework for SaaS
US20160019266A1 (en) Query generating method and query generating device
CN102073662B (en) Method and system for analyzing and creating XML (Extensible Markup Language) data
US20180285444A1 (en) Rewriting contextual queries
CN109766073A (en) The method that voice operating web page contents navigate in TV browser
AU2014209089A1 (en) Systems and methods for semantic URL handling
Utomo Building serverless website on GitHub pages
US20130262662A1 (en) Methods and systems for smart adapters in a social media content analytics environment
CN103823855A (en) Chinese encyclopedic knowledge organization and integration method aiming at semantic network
CN110851678A (en) Method and device for crawling data
CN113110844A (en) Database updating method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20160201

Address after: 200335 Shanghai city Changning District Admiralty Road No. 968 Building No. 16 10 floor

Applicant after: SHANGHAI XIECHENG BUSINESS CO., LTD.

Address before: 200335 Shanghai City, Changning District Fuquan Road No. 99, Ctrip network technology building

Applicant before: Ctrip computer technology (Shanghai) Co., Ltd.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant