CN107968841A - Dynamic routing method, device, storage medium and the client of Webpage - Google Patents

Dynamic routing method, device, storage medium and the client of Webpage Download PDF

Info

Publication number
CN107968841A
CN107968841A CN201711386239.7A CN201711386239A CN107968841A CN 107968841 A CN107968841 A CN 107968841A CN 201711386239 A CN201711386239 A CN 201711386239A CN 107968841 A CN107968841 A CN 107968841A
Authority
CN
China
Prior art keywords
client
network address
configuration table
routing configuration
redirects
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
CN201711386239.7A
Other languages
Chinese (zh)
Other versions
CN107968841B (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.)
Shenzhen Lexin Software Technology Co Ltd
Original Assignee
Shenzhen Lexin 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 Shenzhen Lexin Software Technology Co Ltd filed Critical Shenzhen Lexin Software Technology Co Ltd
Priority to CN201711386239.7A priority Critical patent/CN107968841B/en
Publication of CN107968841A publication Critical patent/CN107968841A/en
Application granted granted Critical
Publication of CN107968841B publication Critical patent/CN107968841B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/148Migration or transfer of sessions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present application discloses a kind of dynamic routing method of Webpage, device, storage medium and client.This method includes:Client sends the request of routing configuration table to server-side, for obtaining routing configuration table;Client obtains and redirects network address, and the network address that redirects is matched according to the routing configuration table;Client redirects the Webpage unfolding mode of network address according to determining matching result.The technical solution provided by using the embodiment of the present application, it is possible to achieve the routing configuration table according to being got from server-side determines the effect of the unfolding mode of jump page.

Description

Dynamic routing method, device, storage medium and the client of Webpage
Technical field
The invention relates to mobile Internet field, more particularly to a kind of dynamic routing method of Webpage, dress Put, storage medium and client.
Background technology
Mobile Internet is in eruptive growth in recent years, changes the life of people from clothing, food, lodging and transportion -- basic necessities of life various aspects.Intelligence Terminal APP (Application, application program) technology has obtained sufficient development in this stage, and all trades and professions develop APP type and quantity be all exponentially increased.Thing followed data collection and statistical work also become product and decision-making level The work that can not evade.
All the time, the primary page and the H5 page under intelligent terminal operation system (abbreviation of the HTML5 pages, wherein HTML5 is HyperText Markup Language, HTML using hypertext markup language, the 5th material alteration) gather around There are separate code modules, and back-end data request method, it is also independent that both data, which report,.But intelligent terminal operation system The primary page and the H5 page of system has very strong coupling in business in itself, and the data that both are highly desirable in business are beaten It is logical.
The existing mode of getting through is to provide JS API (JavaScript Application by the App in intelligent terminal Programming Interface, application programming interface call function) give the H5 pages, the process shown for the H5 pages The middle primary page of opening, meanwhile, the primary page can open the H5 pages by way of WebView (network view).
However, there are following defect for the prior art:
(1) H5 page codes need to do compatibility to APP and browser, to realize and open some page, JS need to be called on APP API, or the corresponding H5 pages are redirected by way of WebView in browser;
(2) H5 page codes need to do edition compatibility, such as the JS API are not implemented in some version APP, then need to redirect H5 pages Face;
(3) route of the primary page is embedded in client, it is impossible to which some page of the change of mobilism is to open primary version Or H5 versions;
(4) logic that redirects between the H5 pages and the primary page couples seriously.
The content of the invention
The embodiment of the present application provides a kind of dynamic routing method of Webpage, device, storage medium and client, with reality The effect of the unfolding mode of jump page is now determined according to the routing configuration table got from server-side.
In a first aspect, the embodiment of the present application provides a kind of dynamic routing method of Webpage, including:
Client sends the request of routing configuration table to server-side, for obtaining routing configuration table;
Client obtains and redirects network address, and the network address that redirects is matched according to the routing configuration table;
Client redirects the Webpage unfolding mode of network address according to determining matching result.
Further, the client obtains and redirects network address, and the network address that redirects is carried out according to the routing configuration table Matching, including:
Client obtains and redirects network address;
Client by the regular expression in the routing configuration table with it is described redirect network address do circulation match.
Further, the client circulates the regular expression in the routing configuration table and the network address that redirects Matching, including:
Client judges whether the regular expression iterator in routing configuration table is empty;
If it is not, then read out next regular expression in the regular expression iterator with it is described redirect network address into Row matching;
If match the regular expression in routing configuration table, it is determined that matching result is successful match;
Correspondingly, client redirects the Webpage unfolding mode of network address according to determining matching result, including:
After successful match, client obtains the page unique mark of the regular expression of successful match;
Client judges whether the page unique mark includes specific webpage label;
If so, then client jumps to the specific webpage.
Further, after client judges whether the page unique mark includes specific webpage label, further include:
If it is not, then the field of regular expression of the client in routing configuration table controls the opening for the page to be redirected Mode.
Further, the client redirects the Webpage unfolding mode of network address according to determining matching result, bag Include:
If it fails to match, client jumps to network view, and the net for redirecting network address is opened in a manner of the H5 pages The network page.
Further, client sends the request of routing configuration table to server-side, for obtaining routing configuration table, including:
When client is activated, whether detection client can network success;
If so, then client sends the request of routing configuration table to server-side, for obtaining routing configuration table;
If it is not, the then routing configuration table in client reading terminals local cache, and parse the canonical in routing configuration table Expression formula.
Second aspect, the embodiment of the present application additionally provide a kind of dynamic routing device of Webpage, including:
Routing configuration table acquisition module, is configured at client, for sending the request of routing configuration table to server-side, for obtaining Take routing configuration table;
Network address matching module is redirected, is configured at client, network address is redirected for obtaining, according to the routing configuration table to institute State and redirect network address and matched;
Unfolding mode determining module, is configured at client, for redirecting the network of network address described in being determined according to matching result Page open mode.
Further, it is described to redirect network address matching module, including:
Network address acquiring unit is redirected, network address is redirected for obtaining;
Network address matching unit is redirected, for the regular expression in the routing configuration table and the network address that redirects to be followed Ring matches.
Further, it is described to redirect network address matching unit, it is specifically used for:
Client judges whether the regular expression iterator in routing configuration table is empty;
If it is not, then read out next regular expression in the regular expression iterator with it is described redirect network address into Row matching;
If match the regular expression in routing configuration table, it is determined that matching result is successful match;
Correspondingly, the unfolding mode determining module, is specifically used for:
After successful match, client obtains the page unique mark of the regular expression of successful match;
Client judges whether the page unique mark includes specific webpage label;
If so, then client jumps to the specific webpage.
The third aspect, the embodiment of the present application provide a kind of computer-readable recording medium, are stored thereon with computer journey Sequence, the method for the dynamic routing method of Webpage of the realization as described in the embodiment of the present application when which is executed by processor.
Fourth aspect, the embodiment of the present application provide a kind of client, and the client is connected with server communication, bag Include:Processor;For storing the memory of the processor-executable instruction;Wherein, the processor is configured as:
The request of routing configuration table is sent to server-side, for obtaining routing configuration table;
Acquisition redirects network address, and the network address that redirects is matched according to the routing configuration table;
The Webpage unfolding mode of network address is redirected according to determining matching result.
The technical solution that the embodiment of the present application is provided, sends routing configuration table to server-side by client and asks, use In acquisition routing configuration table;Client obtains and redirects network address, and the network address that redirects is matched according to the routing configuration table; Client redirects the Webpage unfolding mode of network address according to determining matching result, it is possible to achieve is obtained according to from server-side To routing configuration table determine jump page unfolding mode effect.
Brief description of the drawings
Fig. 1 is the flow chart of the dynamic routing method for the Webpage that the embodiment of the present application one provides;
Fig. 2 is the flow chart of the dynamic routing method for the Webpage that the embodiment of the present application two provides;
Fig. 3 is the structure diagram of the dynamic routing device for the Webpage that the embodiment of the present application three provides.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the application, rather than the restriction to the application.It also should be noted that in order to just It illustrate only part relevant with the application rather than entire infrastructure in description, attached drawing.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing described as flow chart or method.Although each step is described as the processing of order, many of which by flow chart Step can be implemented concurrently, concomitantly or at the same time.In addition, the order of each step can be rearranged.When its operation The processing can be terminated during completion, it is also possible to the additional step being not included in attached drawing.The processing can be with Corresponding to method, function, code, subroutine, subprogram etc..
Embodiment one
Fig. 1 is the flow chart of the dynamic routing method for the Webpage that the embodiment of the present application one provides, and the present embodiment can fit With open Webpage situation, this method can by the dynamic routing device for the Webpage that the embodiment of the present application is provided Lai Perform, which can be realized by the mode of software and/or hardware, and can be integrated in terminal.
As shown in Figure 1, the dynamic routing method of the Webpage includes:
S101, client send the request of routing configuration table to server-side, for obtaining routing configuration table.
Wherein, client can be run in Windows systems, IOS systems and android system, client and clothes End be engaged in by network connection, the information that can be returned by network connection to server-side transmission request and reception server-side, and The instruction that server-side is sent can be performed.What deserves to be explained is in the embodiment of the present application, route refers to the row of page jump For, order and logical relation etc..
When client need to open it is a certain redirect network address when, it is necessary to which the regular expression in routing configuration table determines to jump Turn to redirect logic when network address is opened.Such as, in certain shopping application program, the commodity of certain commodity are opened from the shopping cart of client During details page, it can obtain needing the network address redirected by the commodity icon in click shopping car.Obtaining redirecting network address When, it is necessary to which regular expression in routing configuration table determines whether to open the commodity details in the application Page, if the commodity details page does not support that current application program is opened, can determine to correspond to therewith from routing configuration table Mode open, the commodity details page is opened by the way of the H5 pages such as with browser.
Wherein, in routing configuration table, one or more routing configuration item can be included.The data of each routing configuration item Structure can include:Key, url, weex, regular, start_version, end_version, h5_enable and One or more in status etc..Wherein, key can be with representation page unique mark, and url representation pages are corresponding to redirect net Location, weex, such as weex containers, can be played a role with the weex configuration fields of representation page in android system, Regular is meant that the regular expression of the identification page, and start_version represents the beginning version of configuration take-effective, end_ Version represents the cut-off version of configuration take-effective, and h5_enable is meant that whether the page opens h5 versions, status then tables Show whether this configuration item is opened, if if status does not come into force, server can not return to corresponding configuration item.
S102, client, which obtain, redirects network address, and the network address that redirects is matched according to the routing configuration table.
Wherein, can be according to each configuration item in routing configuration table to redirecting after client gets and redirects network address The page is matched.
In the present embodiment, optionally, the client obtains and redirects network address, according to the routing configuration table to the jump Turn network address to be matched, including:Client obtains and redirects network address;Client by the regular expression in the routing configuration table with The network address that redirects does circulation matching.Wherein, circulation matching can be understood as to multiple regular expressions in route allocation list Matched, if successful match, do not continued to respectively, if matching is unsuccessful, need to continue to match, until will route All regular expressions all travel through completion in allocation list.The benefit so set is can to determine to jump according to circulation matching principle Turn the unfolding mode and routing mode of network address, can open or redirect in the correct way for network address can be redirected, avoid beating Open or mistake occur when redirecting.
S103, client redirect the Webpage unfolding mode of network address according to determining matching result.
In the present embodiment, the unfolding mode of Webpage can include with primary page open or be beaten with the H5 pages Open, can also include other unfolding modes, the unfolding mode in the present embodiment for jump page is also achieved that for mesh The mark page redirects.
By taking above-mentioned technical proposal, solve H5 page codes needs to do compatibility to APP and browser the present embodiment Afterwards, to realize and open some page, JS API need to be called on APP, or correspondence is redirected by way of WebView in browser The H5 pages this problem.It is to be understood that by obtaining routing configuration table in server-side, can be by routing configuration table spirit The unfolding mode of the definite page living and redirect logic.Such as when needing to open commodity details page in shopping cart, and the business , it is necessary to call JS API on APP when product details page does not support the version of current APP, the commodity details page can be opened View, and after routing configuration table is obtained from server-side, can directly be determined according to the regular expression of routing configuration table will The unfolding mode of the commodity details page, which is determined as opening this in the form of the H5 pages by browser, redirects network address.
For the present embodiment by taking above-mentioned technical proposal, edition compatibility, such as some version need to be done by solving H5 page codes The JS API are not implemented in this APP, then the problem of needing to redirect the H5 pages.That is, it is necessary to do compatible place to APP in browser end Reason so that APP can call browser and open this and redirect network address when the JS API are not implemented.And in above-mentioned technical proposal In, it can directly be determined to redirect logic completely according to the regular expression in routing configuration table, without the JS API further according to APP Call result further finds the unfolding mode of the page, improves the stability of the efficiency and page jump of page open in logic.
For the present embodiment by taking above-mentioned technical proposal, the route for also solving the primary page is embedded in client, it is impossible to Some page of the change of mobilism is to open primary version or H5 versions.The route of the primary page is embedded in client, can be with It is to be write in client dead to be interpreted as this routing configuration table, and logic is solidificated in client, it is not possible to changes, is merely able to upgrading visitor The version at family end, can change the page redirects logic.The benefit so set be can page jump flexibility, without Redirected according still further to the mode of operation for writing dead, the unfolding mode of the page can be determined according to the url for redirecting website, solved Unfolding mode to the page it is many-sided consider caused by coding difficulty the problem of.
The present embodiment also solves by taking above-mentioned technical proposal and redirects logic coupling between the H5 pages and the primary page Close the problem of serious.The technical solution that the embodiment of the present application is provided is transparent to H5 exploitations, without paying close attention to the route implementing of App, Need not write code compatible, and can be with dynamic configuration some page with the primary page or with H5 page renderings, the page it Between redirect logic decoupling.
The technical solution of the present embodiment, sends routing configuration table to server-side by client and asks, route for obtaining Allocation list;Client obtains and redirects network address, and the network address that redirects is matched according to the routing configuration table;Client according to Matching result determines the Webpage unfolding mode for redirecting network address, it is possible to achieve the route according to being got from server-side is matched somebody with somebody Put the effect that table determines the unfolding mode of jump page.
Based on the above technical solutions, optionally, the client redirects network address according to determining matching result Webpage unfolding mode, including:If it fails to match, client jumps to network view, is opened in a manner of the H5 pages The Webpage for redirecting network address.The advantages of this arrangement are as follows one kind can be set to guarantee the minimum scheme, i.e., obtained in client Network address is redirected, the network address that redirects is matched according to the routing configuration table, when whole canonical tables in routing configuration table When up to formula being successful match, then it can determine to open the Webpage for redirecting network address in a manner of the H5 pages, to redirect Network address can normally be opened and provide safeguard.
Based on the above technical solutions, optionally, client sends the request of routing configuration table to server-side, for obtaining Routing configuration table is taken, including:When client is activated, whether detection client can network success;If so, then client to Server-side sends the request of routing configuration table, for obtaining routing configuration table;If it is not, then in client reading terminals local cache Routing configuration table, and parse the regular expression in routing configuration table.Wherein, on the routing configuration table in local cache can be When one time client is successfully networked, the allocation list that is got by server-side or the standby configuration of client is preset in Table.And when client is activated, detect whether to network successfully, it is ensured that the allocation list accessed by client is all every time It is last updated, avoid causing because allocation list updates, and nothing in routing procedure is still caused using original allocation list Method opens the phenomenon for redirecting network address.
Embodiment two
Fig. 2 is the flow chart of the dynamic routing method for the Webpage that the embodiment of the present application two provides.The present embodiment is upper On the basis of stating embodiment, further optimization has been carried out.
As shown in Fig. 2, the dynamic routing method of the Webpage includes:
S201, client send the request of routing configuration table to server-side, for obtaining routing configuration table.
S202, client, which obtain, redirects network address.
S203, judge whether the regular expression iterator in client routing configuration table is empty;If it is not, then perform S204;If so, then perform S210.
Wherein, the regular expression iterator can be used for storing all regular expressions in routing configuration table, and For by all regular expressions respectively to being matched to redirecting network address.
S204, the next regular expression read out in the regular expression iterator redirect network address progress with described Matching.
Whether S205, the regular expression for judging to match in routing configuration table succeed;If so, then perform S206;If it is not, then Repeat S203.
If not matching the regular expression in routing configuration table, S203 is repeated, to judge current regular expressions Whether formula iterator has all traversed.
After S206, successful match, client obtains the page unique mark of the regular expression of successful match.
S207, judge whether page unique mark described in client includes specific webpage label;If so, then perform S208; If it is not, then perform S209.
Wherein, specific webpage can be the homepage page, the homepage of APP, or shopping cart homepage etc..Wherein, page is redirected The display mode in face can be the primary page or the H5 pages, the embodiment of the present application do not limit this.
S208, client jump to the specific webpage.
S209, carry out further matching and determining that the page redirects mode.
Wherein, further matching can be to h5_enable, weex_enable and whether with the corresponding primary page Matched, if it is possible to match, then open jump page in the corresponding way.What deserves to be explained is the application can be with Other guide is further matched, and matching order can also be replaced mutually, not repeat here.
S210, redirect network address to this with the H5 pages and render.
The present embodiment is on the basis of above-described embodiment, there is provided one kind specifically carries out redirecting net according to routing configuration table The matched process in location, the benefit so set are can to determine to redirect net according to the matching result for redirecting network address and routing configuration table The unfolding mode of location, can not have to encode to redirecting network address according to fixed routing mode so that redirect network address and encoding During it is more succinct, while also ensure that all pages can normally be shown in routing procedure.
Embodiment three
Fig. 3 is the structure diagram of the dynamic routing device for the Webpage that the embodiment of the present application three provides.Such as Fig. 3 institutes Show, the dynamic routing device of the Webpage, including:
Routing configuration table acquisition module 301, is configured at client, for sending the request of routing configuration table to server-side, uses In acquisition routing configuration table;
Network address matching module 302 is redirected, is configured at client, network address is redirected for obtaining, according to the routing configuration table The network address that redirects is matched;
Unfolding mode determining module 303, is configured at client, for redirecting the net of network address described in being determined according to matching result Network page open mode.
The technical solution that the embodiment of the present application is provided, sends routing configuration table to server-side by client and asks, use In acquisition routing configuration table;Client obtains and redirects network address, and the network address that redirects is matched according to the routing configuration table; Client redirects the Webpage unfolding mode of network address according to determining matching result, it is possible to achieve is obtained according to from server-side To routing configuration table determine jump page unfolding mode effect.
It is optionally, described to redirect network address matching module 302 on the basis of the various embodiments described above, including:
Network address acquiring unit is redirected, network address is redirected for obtaining;
Network address matching unit is redirected, for the regular expression in the routing configuration table and the network address that redirects to be followed Ring matches.
It is optionally, described to redirect network address matching unit on the basis of the various embodiments described above, it is specifically used for:
Client judges whether the regular expression iterator in routing configuration table is empty;
If it is not, then read out next regular expression in the regular expression iterator with it is described redirect network address into Row matching;
If match the regular expression in routing configuration table, it is determined that matching result is successful match;
Correspondingly, the unfolding mode determining module 303, is specifically used for:
After successful match, client obtains the page unique mark of the regular expression of successful match;
Client judges whether the page unique mark includes specific webpage label;
If so, then client jumps to the specific webpage.
The said goods can perform the method that the application any embodiment is provided, and possess the corresponding function module of execution method And beneficial effect.
Example IV
The embodiment of the present application also provides a kind of storage medium for including computer executable instructions, and the computer can perform When being performed by computer processor for performing a kind of dynamic routing method of Webpage, this method includes for instruction:
Client sends the request of routing configuration table to server-side, for obtaining routing configuration table;
Client obtains and redirects network address, and the network address that redirects is matched according to the routing configuration table;
Client redirects the Webpage unfolding mode of network address according to determining matching result.
Storage medium --- any various types of memory devices or storage device.Term " storage medium " is intended to wrap Include:Install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, blue Bath (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetizing mediums (such as hard disk or optical storage);Memory component of register or other similar types etc..Storage medium can further include other The memory of type or its combination.In addition, storage medium can be located at program in the computer system being wherein performed, or It can be located in different second computer systems, second computer system is connected to computer by network (such as internet) System.Second computer system can provide programmed instruction and be used to perform to computer.Term " storage medium " can include can To reside in diverse location two or more storage mediums of (such as in different computer systems by network connection). Storage medium can store the programmed instruction (such as being implemented as computer program) that can be performed by one or more processors.
Certainly, a kind of storage medium for including computer executable instructions that the embodiment of the present application is provided, its computer The dynamic routing operation for the Webpage that executable instruction is not limited to the described above, can also carry out the application any embodiment institute Relevant operation in the dynamic routing method of the Webpage of offer.
Embodiment five
The application also provides a kind of client, including:Processor;For storing the storage of the processor-executable instruction Device.Wherein, the processor is configured as:
The request of routing configuration table is sent to server-side, for obtaining routing configuration table;
Acquisition redirects network address, and the network address that redirects is matched according to the routing configuration table;
The Webpage unfolding mode of network address is redirected according to determining matching result.
The technical solution that the embodiment of the present application is provided, sends routing configuration table to server-side by client and asks, use In acquisition routing configuration table;Client obtains and redirects network address, and the network address that redirects is matched according to the routing configuration table; Client redirects the Webpage unfolding mode of network address according to determining matching result, it is possible to achieve is obtained according to from server-side To routing configuration table determine jump page unfolding mode effect.
The present embodiment is based on the above technical solutions, it is also proposed that following prioritization scheme:
Further, the client obtains and redirects network address, and the network address that redirects is carried out according to the routing configuration table Matching, including:
Client obtains and redirects network address;
Client by the regular expression in the routing configuration table with it is described redirect network address do circulation match.
Further, the client circulates the regular expression in the routing configuration table and the network address that redirects Matching, including:
Client judges whether the regular expression iterator in routing configuration table is empty;
If it is not, then read out next regular expression in the regular expression iterator with it is described redirect network address into Row matching;
If match the regular expression in routing configuration table, it is determined that matching result is successful match;
Correspondingly, client redirects the Webpage unfolding mode of network address according to determining matching result, including:
After successful match, client obtains the page unique mark of the regular expression of successful match;
Client judges whether the page unique mark includes specific webpage label;
If so, then client jumps to the specific webpage.
Further, after client judges whether the page unique mark includes specific webpage label, further include:
If it is not, then the field of regular expression of the client in routing configuration table controls the opening for the page to be redirected Mode.
Further, the client redirects the Webpage unfolding mode of network address according to determining matching result, bag Include:
If it fails to match, client jumps to network view, and the net for redirecting network address is opened in a manner of the H5 pages The network page.
Further, client sends the request of routing configuration table to server-side, for obtaining routing configuration table, including:
When client is activated, whether detection client can network success;
If so, then client sends the request of routing configuration table to server-side, for obtaining routing configuration table;
If it is not, the then routing configuration table in client reading terminals local cache, and parse the canonical in routing configuration table Expression formula.
Note that it above are only preferred embodiment and the institute's application technology principle of the application.It will be appreciated by those skilled in the art that The application is not limited to specific embodiment described here, can carry out for a person skilled in the art various obvious changes, The protection domain readjusted and substituted without departing from the application.Therefore, although being carried out by above example to the application It is described in further detail, but the application is not limited only to above example, in the case where not departing from the application design, also It can include other more equivalent embodiments, and scope of the present application is determined by scope of the appended claims.

Claims (11)

  1. A kind of 1. dynamic routing method of Webpage, it is characterised in that including:
    Client sends the request of routing configuration table to server-side, for obtaining routing configuration table;
    Client obtains and redirects network address, and the network address that redirects is matched according to the routing configuration table;
    Client redirects the Webpage unfolding mode of network address according to determining matching result.
  2. 2. according to the method described in claim 1, it is characterized in that, the client, which obtains, redirects network address, according to the route Allocation list matches the network address that redirects, including:
    Client obtains and redirects network address;
    Client by the regular expression in the routing configuration table with it is described redirect network address do circulation match.
  3. 3. according to the method described in claim 2, it is characterized in that, the client is by the canonical table in the routing configuration table Up to formula with it is described redirect network address do circulation match, including:
    Client judges whether the regular expression iterator in routing configuration table is empty;
    If it is not, the next regular expression then read out in the regular expression iterator redirects network address progress with described Match somebody with somebody;
    If match the regular expression in routing configuration table, it is determined that matching result is successful match;
    Correspondingly, client redirects the Webpage unfolding mode of network address according to determining matching result, including:
    After successful match, client obtains the page unique mark of the regular expression of successful match;
    Client judges whether the page unique mark includes specific webpage label;
    If so, then client jumps to the specific webpage.
  4. 4. according to the method described in claim 3, it is characterized in that, judge whether the page unique mark includes in client After specific webpage label, further include:
    If it is not, then the field of regular expression of the client in routing configuration table controls the opening side for the page to be redirected Formula.
  5. 5. according to the method described in claim 1, it is characterized in that, the client redirects net according to determining matching result The Webpage unfolding mode of location, including:
    If it fails to match, client jumps to network view, and the Network page for redirecting network address is opened in a manner of the H5 pages Face.
  6. 6. according to the method described in claim 1, it is characterized in that, client sends the request of routing configuration table, use to server-side In acquisition routing configuration table, including:
    When client is activated, whether detection client can network success;
    If so, then client sends the request of routing configuration table to server-side, for obtaining routing configuration table;
    If it is not, the then routing configuration table in client reading terminals local cache, and parse the regular expressions in routing configuration table Formula.
  7. A kind of 7. dynamic routing device of Webpage, it is characterised in that including:
    Routing configuration table acquisition module, is configured at client, for sending the request of routing configuration table to server-side, for obtaining road By allocation list;
    Network address matching module is redirected, is configured at client, network address is redirected for obtaining, according to the routing configuration table to the jump Turn network address to be matched;
    Unfolding mode determining module, is configured at client, for redirecting the Webpage of network address described in being determined according to matching result Unfolding mode.
  8. 8. device according to claim 7, it is characterised in that it is described to redirect network address matching module, including:
    Network address acquiring unit is redirected, network address is redirected for obtaining;
    Network address matching unit is redirected, for the regular expression in the routing configuration table and the network address that redirects to be done circulation Match somebody with somebody.
  9. 9. according to the method described in claim 8, it is characterized in that, described redirect network address matching unit, it is specifically used for:
    Client judges whether the regular expression iterator in routing configuration table is empty;
    If it is not, the next regular expression then read out in the regular expression iterator redirects network address progress with described Match somebody with somebody;
    If match the regular expression in routing configuration table, it is determined that matching result is successful match;
    Correspondingly, the unfolding mode determining module, is specifically used for:
    After successful match, client obtains the page unique mark of the regular expression of successful match;
    Client judges whether the page unique mark includes specific webpage label;
    If so, then client jumps to the specific webpage.
  10. 10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor The method as described in any in claim 1-6 is realized during execution.
  11. 11. a kind of client, the client is connected with server communication, it is characterised in that including:Processor;For storing The memory of the processor-executable instruction;Wherein, the processor is configured as:
    The request of routing configuration table is sent to server-side, for obtaining routing configuration table;
    Acquisition redirects network address, and the network address that redirects is matched according to the routing configuration table;
    The Webpage unfolding mode of network address is redirected according to determining matching result.
CN201711386239.7A 2017-12-20 2017-12-20 Dynamic routing method, device, storage medium and client of network page Active CN107968841B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711386239.7A CN107968841B (en) 2017-12-20 2017-12-20 Dynamic routing method, device, storage medium and client of network page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711386239.7A CN107968841B (en) 2017-12-20 2017-12-20 Dynamic routing method, device, storage medium and client of network page

Publications (2)

Publication Number Publication Date
CN107968841A true CN107968841A (en) 2018-04-27
CN107968841B CN107968841B (en) 2021-03-09

Family

ID=61994664

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711386239.7A Active CN107968841B (en) 2017-12-20 2017-12-20 Dynamic routing method, device, storage medium and client of network page

Country Status (1)

Country Link
CN (1) CN107968841B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110515683A (en) * 2019-07-15 2019-11-29 平安普惠企业管理有限公司 A kind of method, apparatus and storage medium of front end Vue page visual configuration
CN111158802A (en) * 2018-11-08 2020-05-15 阿里巴巴集团控股有限公司 Audio playing method and equipment, client device and electronic equipment
CN111159615A (en) * 2019-12-31 2020-05-15 北大方正集团有限公司 Webpage processing method and device
CN111475138A (en) * 2019-01-23 2020-07-31 阿里巴巴集团控股有限公司 Routing method and device based on weex framework, electronic equipment and readable medium
CN113821193A (en) * 2020-11-26 2021-12-21 北京京东振世信息技术有限公司 Information generation method and device and storage medium
WO2022033055A1 (en) * 2020-08-12 2022-02-17 深圳前海微众银行股份有限公司 Page rendering method, apparatus, and device, and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9549038B1 (en) * 2013-08-14 2017-01-17 Amazon Technologies, Inc. Cacheable resource location selection
CN106775751A (en) * 2016-12-30 2017-05-31 深圳中顺易金融服务有限公司 A kind of web front-end frame system and framework method
CN106815276A (en) * 2015-11-27 2017-06-09 阿里巴巴集团控股有限公司 Method for page jump and device
CN106874035A (en) * 2017-01-11 2017-06-20 深圳中顺易金融服务有限公司 One kind is applied for updating(app)The method and its framework of built-in H5
CN107329978A (en) * 2017-05-31 2017-11-07 北京京东尚科信息技术有限公司 The method for routing and device of multi-platform fusion

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9549038B1 (en) * 2013-08-14 2017-01-17 Amazon Technologies, Inc. Cacheable resource location selection
CN106815276A (en) * 2015-11-27 2017-06-09 阿里巴巴集团控股有限公司 Method for page jump and device
CN106775751A (en) * 2016-12-30 2017-05-31 深圳中顺易金融服务有限公司 A kind of web front-end frame system and framework method
CN106874035A (en) * 2017-01-11 2017-06-20 深圳中顺易金融服务有限公司 One kind is applied for updating(app)The method and its framework of built-in H5
CN107329978A (en) * 2017-05-31 2017-11-07 北京京东尚科信息技术有限公司 The method for routing and device of multi-platform fusion

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158802A (en) * 2018-11-08 2020-05-15 阿里巴巴集团控股有限公司 Audio playing method and equipment, client device and electronic equipment
CN111158802B (en) * 2018-11-08 2023-06-09 阿里巴巴集团控股有限公司 Audio playing method, equipment, client device and electronic equipment
CN111475138A (en) * 2019-01-23 2020-07-31 阿里巴巴集团控股有限公司 Routing method and device based on weex framework, electronic equipment and readable medium
CN111475138B (en) * 2019-01-23 2023-04-25 阿里巴巴集团控股有限公司 Routing method and device based on weex framework, electronic equipment and readable medium
CN110515683A (en) * 2019-07-15 2019-11-29 平安普惠企业管理有限公司 A kind of method, apparatus and storage medium of front end Vue page visual configuration
CN110515683B (en) * 2019-07-15 2022-12-13 平安普惠企业管理有限公司 Method and device for visual configuration of front-end Vue page and storage medium
CN111159615A (en) * 2019-12-31 2020-05-15 北大方正集团有限公司 Webpage processing method and device
CN111159615B (en) * 2019-12-31 2024-01-02 新方正控股发展有限责任公司 Webpage processing method and device
WO2022033055A1 (en) * 2020-08-12 2022-02-17 深圳前海微众银行股份有限公司 Page rendering method, apparatus, and device, and computer readable storage medium
CN113821193A (en) * 2020-11-26 2021-12-21 北京京东振世信息技术有限公司 Information generation method and device and storage medium
CN113821193B (en) * 2020-11-26 2023-09-26 北京京东振世信息技术有限公司 Information generation method, device and storage medium

Also Published As

Publication number Publication date
CN107968841B (en) 2021-03-09

Similar Documents

Publication Publication Date Title
CN107968841A (en) Dynamic routing method, device, storage medium and the client of Webpage
CN105138340A (en) Interaction method and system for Native and Web pages
JP6614756B2 (en) Transaction system error detection method, apparatus, storage medium, and computer device
CN104375808B (en) interface display method and device
CN101689112A (en) Late bound programmatic assistance
CN108419089A (en) Module data processing method, device, equipment and storage medium
US20190362142A1 (en) Electronic form identification using spatial information
CN104246762A (en) HTML51I-FRAME extension
CN104168250B (en) Business Process Control method and device based on CGI frames
CN101965561A (en) Declarative support for asynchronous methods
US8201147B2 (en) Generic XAD processing model
CN109960491A (en) Application program generation method, generating means, electronic equipment and storage medium
CN105868096A (en) Methods and apparatuses used for displaying web page test result in browser and device
US8010891B2 (en) Coordinated XML data parsing and processing from within separate computing processes
CN109740083A (en) A kind of method and device of page jump
US8677314B1 (en) Modifying a source code file to reduce dependencies included therein
CN110045956A (en) Configuration method, device, equipment and the readable storage medium storing program for executing of component
CN110213105A (en) It is a kind of cross-platform micro- using creation method
CN110032694A (en) Form of general use control implementation method suitable for network auditing system
US10282398B1 (en) Editing tool for domain-specific objects with reference variables corresponding to preceding pages
CN108427580A (en) Configure detection method, storage medium and the smart machine repeated to name
CN110020370B (en) Method and device for realizing animation in client application and framework of animation script
CN103034481A (en) Financial self-service terminal and interface realizing method thereof
CN107832088A (en) Control application method and device, computing device, computer-readable storage medium
US8549485B2 (en) Method and system for concise expression of optional code snippets in interrepted languages

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