Specific embodiment
Embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the certain of the disclosure in attached drawing
Embodiment, it should be understood that, the disclosure can be realized by various forms, and should not be construed as being limited to this
In the embodiment that illustrates, providing these embodiments on the contrary is in order to more thorough and be fully understood by the disclosure.It should be understood that
It is that being given for example only property of the accompanying drawings and embodiments effect of the disclosure is not intended to limit the protection scope of the disclosure.
It should be appreciated that each step recorded in disclosed method embodiment can execute in a different order,
And/or parallel execution.In addition, method implementation may include additional step and/or omit the step of execution is shown.This public affairs
The range opened is not limited in this respect.
Terms used herein " comprising " and its deformation are that opening includes, i.e., " including but not limited to ".Term "based"
It is " being based at least partially on ".Term " one embodiment " expression " at least one embodiment ";Term " another embodiment " indicates
" at least one other embodiment ";Term " some embodiments " expression " at least some embodiments ".The correlation of other terms is fixed
Justice provides in will be described below.
It is noted that the concepts such as " first " that refers in the disclosure, " second " are only used for different devices, module or list
Member distinguishes, and is not intended to limit the sequence or relation of interdependence of function performed by these devices, module or unit.
It is noted that referred in the disclosure "one", the modification of " multiple " be schematically and not restrictive this field
It will be appreciated by the skilled person that being otherwise construed as " one or more " unless clearly indicate otherwise in context.
The being merely to illustrate property of title of the message or information that are interacted between multiple devices in disclosure embodiment
Purpose, and be not used to limit the range of these message or information.
The alternative embodiment of the disclosure is described in detail with reference to the accompanying drawing.
To the first embodiment that the disclosure provides, i.e., a kind of embodiment of the method for dynamic adjustment routing.
The embodiment of the present disclosure is described in detail below with reference to Fig. 1, wherein Fig. 1 provides dynamic for the embodiment of the present disclosure
The flow chart of the method for state adjustment routing.
Step S101 obtains uniform resource locator and multiple routing indexs.
Uniform resource locator (full name in English Uniform Resource Locator, abbreviation URL;Or positioning address, or
The address URL), it is the expression succinct to the position for the resource that can be obtained from internet and one kind of access method, is interconnection
The address of online standard resource.Each file on internet has a unique URL, and the information that it includes points out file
How position and browser should handle it.
The purpose of the embodiment of the present disclosure is just to provide a kind of method that routing degrades, and terminal can be made to obtain by this method
The page info for being suitble to it to show.
In order to be quickly found out the routing iinformation to match with uniform resource locator, present disclose provides a kind of routing ropes
Draw.The corresponding uniform resource locator of each routing index.
For example, the routing index includes index data structure information:
Wherein, the index data structure information includes defining path (such as path) and index type (such as in type
Under, comprising: Flutter type, Native type and Web type;In order to adapt to different operating system, the Native page
Type further include: Android system Native type or iOS system Native type);
The path that defines includes the regular expression for indicating to call path;
The path for calling path to refer to the corresponding page info of the index type;For example, the tune of Flutter type
With path be " learning/search/one.index ", Native type calling path be " learning/search/
The calling path of tow.index " and Web type is " learning/search/three.index ", then regular expression is
“learning/search/*”。
And the sequence that the namely dynamic adjustment that puts in order of index type routes in routing index.
Dynamic adjustment routing, that is, when the page info of the first seed type of selection is not suitable for terminal display, just select
The page info ... ... for second of the type selected.Until terminal normally can show a type of page info.Its
In, the page info and subsequent a plurality of types of page infos of the page info of the first seed type and second of type, he
Display content it is same or similar.
Under Flutter frame, optionally, putting in order for the index type is Flutter type, Native type
With Web type.
It is when some terminals can not show the page info of Flutter type, then adjustable for display Native type
Page info, if still be not suitable for display Native type page info, be adjusted to display Web type the page letter
Breath.
The unified management to routing index, the embodiment of the present disclosure provide the login mechanism to routing index for convenience.
It is optionally, described to obtain multiple routing indexs, comprising:
Step S101-1 obtains multiple routing indexs being registered in page routing.
Page routing can be a file, include multiple files in file, and each file is a routing index,
The filename of each file can be named according to registion time, can also be named according to the sequence number of registration, the disclosure does not limit
System;Page routing is also possible to a file, includes the routing index arranged according to registration order in file.
Step S102, according to the registration order of routing index successively judge the uniform resource locator whether with the road
Matched by the definition path in index.
Due to multiple routing indexs, it is therefore desirable to match uniform resource locator with each routing index.
Step S103, if so, successively calling institute according to putting in order for index type in the corresponding routing index
The corresponding page info of index type is stated, until showing first page info.
It is described until show first page info then stop exactly when display terminal normally can show page info
Only call the corresponding page info of subsequent index type
It is described that the index type pair is successively called according to putting in order for index type in the corresponding routing index
The page info answered, until showing first page info, comprising the following steps:
Step S103-1 successively obtains the index according to putting in order for index type in the corresponding routing index
Type.
When the definition route matching in the uniform resource locator and the routing index, the corresponding routing rope
Draw the namely matched routing index.
Putting in order for index type namely obtains the sequence of the corresponding page info of index type.
In the embodiments of the present disclosure, under Flutter frame, routing drop can be achieved using putting in order for index type
Grade, so that terminal can show suitable page info, to improve user experience.
Step S103-2 obtains corresponding routing component according to the index type.
The unified management to routing component, the embodiment of the present disclosure provide the login mechanism to routing component for convenience.
It is optionally, described that corresponding routing component is obtained according to the index type, comprising:
Step S103-2-1 obtains the corresponding routing component being registered in enrolled set according to the index type.
The corresponding routing component of each index type in each routing index.Each routing component includes at least unified money
Source finger URL.
Under Flutter frame, the routing component, comprising: corresponding with Flutter type in the routing index
Flutter routing component, Native routing component corresponding with Native type in the routing index and with the routing rope
Draw the corresponding Web routing component of middle Web type.
Step S103-3 calls corresponding page info according to the uniform resource locator in the routing component, and obtains
Take invoking page return information.
Step S103-4, judges whether the invoking page return information meets default display condition.
Step S103-5, if so, stopping obtaining the index type.
Namely the page info is shown successfully, does not recall subsequent page info.
Step S103-6, if it is not, then repeating step S103-1.
All route-types can not all be shown in the terminal in order to prevent, can be in the last one index class of routing index
Type is set as type of error, corresponding setting erroneous components, and the uniform resource locator in erroneous components is directed toward prompt mistake
Page info.
In order to meet the constantly continually changing needs of page info, the embodiment of the present disclosure additionally provides a kind of information update machine
System.The method also includes following steps:
Step 104, it when networking, obtains and updates the routing index and routing component.
Using the update mechanism, batch may be implemented and degrade.For example, under Flutter frame, the index type, packet
Include Native type and Web type.To no longer show the corresponding page info of Flutter type, it is ensured that online to carry out
To the debugging efforts of the corresponding page info of Flutter type.
The embodiment of the present disclosure provides a kind of support android system and iOS system Double tabletop routing degradation schemes, solves
The technology degradation schemes of Flutter frame stability output routing, can provide different group of routes according to different terminals platform
Part improves user experience.
Corresponding with the first embodiment that the disclosure provides, the disclosure additionally provides second embodiment, i.e., a kind of dynamic tune
The device of whole routing.Since second embodiment is substantially similar to first embodiment, so describe fairly simple, relevant part
Refer to the corresponding explanation of first embodiment.Installation practice described below is only schematical.
Fig. 2 shows the embodiments for the device that a kind of dynamic adjustment that the disclosure provides routes.Fig. 2 is the embodiment of the present disclosure
The unit block diagram of the device of the dynamic adjustment routing of offer.
Shown in Figure 2, the disclosure provides a kind of device of dynamic adjustment routing, comprising: acquiring unit 201, judgement
Unit 202 shows page info unit 203.
Acquiring unit 201, for obtaining uniform resource locator and multiple routing indexs;
Judging unit 202, for whether successively judging the uniform resource locator according to the registration order of routing index
Match with the definition path in the routing index;
Page info unit 203 is shown, if the output result for the judging unit is "Yes", according to corresponding institute
It states putting in order for index type in routing index and successively calls the corresponding page info of the index type, until display first
A page info.
Optionally, in the acquiring unit 201, comprising:
Routing index subelement is registered, for obtaining multiple routing indexs being registered in page routing.
Optionally, in the display page info unit 203, comprising:
Index type subelement is obtained, for putting in order successively according to index type in the corresponding routing index
Obtain the index type;
Routing component subelement is obtained, for obtaining corresponding routing component according to the index type;
Subelement is called, for calling corresponding page info according to the uniform resource locator in the routing component,
And obtain invoking page return information;
Judgment sub-unit, for judging whether the invoking page return information meets default display condition;
Stop subelement, if the output result for the judgment sub-unit is "Yes", stops obtaining the index class
Type.
Optionally, in the acquisition routing component subelement, comprising:
Routing component subelement is registered, for obtaining the corresponding road being registered in enrolled set according to the index type
By component.
Optionally, described device further include:
Updating unit, for being obtained according to operating system and updating the routing index and routing component when networking.
Optionally, the routing index includes index data structure information;
The index data structure information includes defining path and index type.
Optionally, the path that defines includes the regular expression for indicating to call path;The calling path refers to described
The path of the corresponding page info of index type.
Optionally, the index type, comprising: Flutter type, Native type and Web type;Described Native pages
Noodles type includes: Android system Native type or iOS system Native type.
Optionally, putting in order for the index type is Flutter type, Native type and Web type.
Optionally, the routing component, comprising: Flutter routing corresponding with Flutter type in the routing index
Component, Native routing component corresponding with Native type in the routing index and with Web type in the routing index
Corresponding Web routing component.
The embodiment of the present disclosure provides a kind of support android system and iOS system Double tabletop routing degradation schemes, solves
The technology degradation schemes of Flutter frame stability output routing, can provide different group of routes according to different terminals platform
Part improves user experience.
The embodiment of the present disclosure provides 3rd embodiment, i.e. a kind of electronic equipment, which adjusts routing for dynamic
Method, the electronic equipment, comprising: at least one processor;And the storage being connect at least one described processor communication
Device;Wherein,
The memory is stored with the instruction that can be executed by one processor, and described instruction is by described at least one
It manages device to execute, so that the method that at least one described processor is able to carry out dynamic adjustment routing as in the first embodiment.
The embodiment of the present disclosure provides fourth embodiment, i.e., a kind of computer storage medium of dynamic adjustment routing, described
Computer storage medium is stored with computer executable instructions, and the computer executable instructions are executable such as institute in first embodiment
The method for stating dynamic adjustment routing.
Below with reference to Fig. 3, it illustrates the structural schematic diagrams for the electronic equipment for being suitable for being used to realize the embodiment of the present disclosure.This
Terminal device in open embodiment can include but is not limited to such as mobile phone, laptop, digit broadcasting receiver,
PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle mounted guidance
Terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.Electronic equipment shown in Fig. 3
An only example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 3, electronic equipment may include processing unit (such as central processing unit, graphics processor etc.) 301,
Random access storage device can be loaded into according to the program being stored in read-only memory (ROM) 302 or from storage device 308
(RAM) program in 303 and execute various movements appropriate and processing.In RAM 303, it is also stored with electronic device institute
The various programs and data needed.Processing unit 301, ROM 302 and RAM 303 are connected with each other by bus 304.Input/defeated
(I/O) interface 305 is also connected to bus 304 out.
In general, following device can connect to I/O interface 305: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph
As the input unit 306 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration
The output device 307 of dynamic device etc.;Storage device 308 including such as tape, hard disk etc.;And communication device 309.Communication device
309, which can permit electronic equipment, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 3, which is shown, to be had respectively
The electronic equipment of kind device, it should be understood that being not required for implementing or having all devices shown.It can be alternatively real
Apply or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising being carried on non-transient computer can
The computer program on medium is read, which includes the program code for method shown in execution flow chart.At this
In the embodiment of sample, which can be downloaded and installed from network by communication device 309, or be filled from storage
It sets 308 to be mounted, or is mounted from ROM 302.When the computer program is executed by processing unit 301, the disclosure is executed
The above-mentioned function of being limited in the method for embodiment.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated,
In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to
Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit
Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned
Any appropriate combination.
In some embodiments, client, server can use such as HTTP (HyperText Transfer
Protocol, hypertext transfer protocol) etc the network protocols of any currently known or following research and development communicated, and can
To be interconnected with the digital data communications (for example, communication network) of arbitrary form or medium.The example of communication network includes local area network
(" LAN "), wide area network (" WAN "), Internet (for example, internet) and ad-hoc network are (for example, the end-to-end net of ad hoc
Network) and any currently known or following research and development network.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not
It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity
When sub- equipment executes, so that the electronic equipment: obtaining at least two internet protocol addresses;Send to Node evaluation equipment includes institute
State the Node evaluation request of at least two internet protocol addresses, wherein the Node evaluation equipment is internet from described at least two
In protocol address, chooses internet protocol address and return;Receive the internet protocol address that the Node evaluation equipment returns;Its
In, the fringe node in acquired internet protocol address instruction content distributing network.
Alternatively, above-mentioned computer-readable medium carries one or more program, when said one or multiple programs
When being executed by the electronic equipment, so that the electronic equipment: receiving the Node evaluation including at least two internet protocol addresses and request;
From at least two internet protocol address, internet protocol address is chosen;Return to the internet protocol address selected;Wherein,
The fringe node in internet protocol address instruction content distributing network received.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof
Machine program code, above procedure design language include but is not limited to object oriented program language-such as Java,
Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language
Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence
Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or
It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet
It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit
It is connected with ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard
The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, the
One acquiring unit is also described as " obtaining the unit of at least two internet protocol addresses ".
Function described herein can be executed at least partly by one or more hardware logic components.Example
Such as, without limitation, the hardware logic component for the exemplary type that can be used include: field programmable gate array (FPGA), specially
With integrated circuit (ASIC), Application Specific Standard Product (ASSP), system on chip (SOC), complex programmable logic equipment (CPLD) etc.
Deng.
In the context of the disclosure, machine readable media can be tangible medium, may include or is stored for
The program that instruction execution system, device or equipment are used or is used in combination with instruction execution system, device or equipment.Machine can
Reading medium can be machine-readable signal medium or machine-readable storage medium.Machine readable media can include but is not limited to electricity
Son, magnetic, optical, electromagnetism, infrared or semiconductor system, device or equipment or above content any conjunction
Suitable combination.The more specific example of machine readable storage medium will include the electrical connection of line based on one or more, portable meter
Calculation machine disk, hard disk, random access memory (RAM), read-only memory (ROM), Erasable Programmable Read Only Memory EPROM (EPROM
Or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage facilities or
Any appropriate combination of above content.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure
Can technical characteristic replaced mutually and the technical solution that is formed.
Although this is not construed as requiring these operations with institute in addition, depicting each operation using certain order
The certain order that shows executes in sequential order to execute.Under certain environment, multitask and parallel processing may be advantageous
's.Similarly, although containing several specific implementation details in being discussed above, these are not construed as to this public affairs
The limitation for the range opened.Certain features described in the context of individual embodiment can also be realized in combination single real
It applies in example.On the contrary, the various features described in the context of single embodiment can also be individually or with any suitable
The mode of sub-portfolio is realized in various embodiments.
Although having used specific to this theme of the language description of structure feature and/or method logical action, answer
When understanding that theme defined in the appended claims is not necessarily limited to special characteristic described above or movement.On on the contrary,
Special characteristic described in face and movement are only to realize the exemplary forms of claims.