CN107729106A - It is a kind of that the method and apparatus quickly redirected are realized between application component - Google Patents

It is a kind of that the method and apparatus quickly redirected are realized between application component Download PDF

Info

Publication number
CN107729106A
CN107729106A CN201710929773.1A CN201710929773A CN107729106A CN 107729106 A CN107729106 A CN 107729106A CN 201710929773 A CN201710929773 A CN 201710929773A CN 107729106 A CN107729106 A CN 107729106A
Authority
CN
China
Prior art keywords
interface
information
component
jump
default
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710929773.1A
Other languages
Chinese (zh)
Inventor
李海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710929773.1A priority Critical patent/CN107729106A/en
Publication of CN107729106A publication Critical patent/CN107729106A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of method and apparatus realized between application component and quickly redirected.One embodiment of this method includes:The routing information that redirects of association is added for each interface of each application component, and the interface jump information at each interface is generated according to each interface and the incidence relation redirected between routing information associated;Total interface jump information is synthesized according to each interface jump information;After application program launching, each interface jump information in total interface jump information is saved in local storage with default storage organization;Receive user jump to the jump request at a default interface after, the interface jump information in local storage judges whether to perform redirecting to default interface, if so, then jumping to default interface, otherwise refusal redirects.The embodiment can obtain the jump information of all component, can be uniformly controlled and redirect, and realize and flexibly quickly redirect between all component, and raising redirects efficiency, and realize inter-module redirecting with returning result.

Description

It is a kind of that the method and apparatus quickly redirected are realized between application component
Technical field
The present invention relates to field of computer technology, more particularly to a kind of the side quickly redirected is realized between application component Method and device, electronic equipment, computer-readable medium.
Background technology
With abundant and the scale of construction the increase of Android (Android) application function, increasing company takes modularization Development mode, the problem of bringing is exactly to be completely independent between component, without any association, how to be realized mutual between them Mutually call and redirect.Airbnb has introduced the concept of DeepLink (deep linking), it is possible to achieve using URL, (unified resource is fixed Position symbol) App (application program) application interface is accessed, but have more limitation when inter-module redirects use.
The step of technical scheme that Airbnb is provided, is as follows:
To Activity (an Android basic module) interface addition annotation (Annotation) of application;
Parsed during compiling using Annotation processing routine DeepLinkProcessor and generate one and include jump The java class file of transfering the letter breath;
When user is accessed by URL, by DeepLinkActivity transfers, load and travel through the class comprising jump information File, then jump to the Activity interfaces of target.
In process of the present invention is realized, inventor has found that at least there are the following problems in the prior art:
Multiple Components Developments, each component are preserved java class file in assembly, without one in compilation process The individual center that redirects is able to know that all jump informations redirect to be uniformly controlled;
It is less efficient that all jump informations of matching are circulated by the way of List is circulated;
It can not realize in inter-module and be redirected with what result returned.
The content of the invention
In view of this, offer of the embodiment of the present invention is a kind of realizes the method quickly redirected and dress between application component Put, electronic equipment, computer-readable medium, the jump information of all component can be obtained, can be uniformly controlled and redirect, realize all Inter-module it is flexible, quickly redirect, simple to operate, raising redirects efficiency, and realizes that inter-module redirecting with returning result, no With in middle-agent Activity then directly searching simultaneously jump target interface.
To achieve the above object, one side according to embodiments of the present invention, there is provided one kind is between application component Realize the method quickly redirected.
It is a kind of to realize the method quickly redirected between application component, including:For each boundary of each application component Face addition association redirects routing information, and generates institute with the incidence relation redirected between routing information associated according to each interface State the interface jump information at each interface;Total interface jump information is synthesized according to each interface jump information;When application program opens After dynamic, each interface jump information in total interface jump information is saved in local storage with default storage organization; Receive user jump to the jump request at a default interface after, the interface jump information in the local storage is sentenced It is disconnected whether to perform redirecting to the default interface, if so, then jumping to the default interface, otherwise redirected described in refusal.
Alternatively, the form of the interface jump information and total interface jump information is Json file formats, according to The step of each interface jump information synthesizes total interface jump information, including:Merge each interface jump information to obtain always Interface jump information, and the component name of the interface owning application component for each interface jump information addition association Claim.
Alternatively, the interface jump information redirects routing information including described, and the routing information that redirects includes association Interface owning application component component mark, the default storage organization be the secondary storage structure based on Map, general The step of each interface jump information in total interface jump information is saved in local storage with default storage organization, bag Include:Step 1, circulation is read and parses each interface jump information in total interface jump information, to redirect road described in acquisition Component mark in the information of footpath;Step 2, judge in the Map of local storage to whether there is and component mark one by one Corresponding major key, if in the presence of, step 3 is performed, otherwise, first creates the major key that the component mark is corresponded in the Map, then Perform step 3;Step 3, the routing information that redirects identified including the component is converted into regular expression, to generate storage Object, and the storage object is stored in storage table corresponding with the major key of component mark.
Alternatively, the jump request redirects routing information including the default interface, according to the local storage In interface jump information judge whether to perform redirecting to the default interface, it is no if so, then jump to the default interface The step of then being redirected described in refusal, including:Parse the default interface redirects routing information to obtain the default interface institute Belong to the component mark of component;Judge that the component in the major key of the Map with the presence or absence of the default affiliated component in interface identifies, if It is no, then redirected described in refusal, if so, then traveling through the major key pair for the component mark that the affiliated component in interface is preset described in the Map The storage table answered, with judge whether with the default interface redirect that routing information matches redirect routing information, if depositing The default interface is then being jumped to, if being not present, is being redirected described in refusal.
Alternatively, what the jump request included indicating whether returning result data redirects parameter, jumps to described default The step of interface, including:Determine to redirect mode to the default interface according to the instruction for redirecting parameter, and according to described The mode that redirects determined performs described redirect.
Alternatively, the routing information that redirects of the association is added to each application component in the form of annotation information Each interface.
Another aspect according to embodiments of the present invention, there is provided a kind of that the dress quickly redirected is realized between application component Put.
It is a kind of to realize the device quickly redirected between application component, including:Information generating module, for for each application Each interface addition association of program assembly redirects routing information, and is redirected according to each interface with what is associated between routing information Incidence relation generate the interface jump information at each interface;Information synthesis module, for redirecting letter according to each interface Breath synthesizes total interface jump information;Information preserving module, for when the application program launching after, by total interface jump information Each interface jump information local storage is saved in default storage organization;Execution module is redirected, for receiving user Jump to the jump request at a default interface after, the interface jump information in the local storage judges whether to perform To redirecting for the default interface, if so, then jumping to the default interface, otherwise redirected described in refusal.
Alternatively, the form of the interface jump information and total interface jump information is Json file formats, described Information synthesis module is additionally operable to:Merge each interface jump information and obtain total interface jump information, and be each interface The component Name of the interface owning application component of jump information addition association.
Alternatively, the interface jump information redirects routing information including described, and the routing information that redirects includes association Interface owning application component component mark, the default storage organization is the secondary storage structure based on Map, institute Information preserving module is stated to be additionally operable to:Step 1, each interface that circulation is read and parsed in total interface jump information redirect letter Breath, to redirect the mark of the component in routing information described in acquisition;Step 2, judge one by one be in the Map of local storage No be present and the corresponding major key of component mark, if in the presence of performing step 3, otherwise, first create and institute is corresponded in the Map The major key of component mark is stated, then performs step 3;Step 3, the routing information that redirects identified including the component is converted into just Then expression formula, to generate storage object, and the storage object is stored in storage corresponding with the major key of component mark In table.
Alternatively, the jump request includes the routing information that redirects at the default interface, described to redirect execution module also For:Parse the default interface redirects routing information to obtain the component of the affiliated component in default interface mark;Judge Component in the major key of the Map with the presence or absence of the default affiliated component in interface identifies, if it is not, then redirected described in refusal, if It is then to travel through storage table corresponding to the major key for the component mark that the affiliated component in interface is preset described in the Map, to judge whether In the presence of with the default interface redirect that routing information matches redirect routing information, if in the presence of jumping to the default boundary Face, if being not present, redirected described in refusal.
Alternatively, the jump request includes the parameter that redirects for indicating whether returning result data, described to redirect execution mould Block is additionally operable to:The mode that redirects to the default interface is determined according to the instruction for redirecting parameter, and according to the determination The mode of redirecting performs described redirect.
Alternatively, the routing information that redirects of the association is added to by described information generation module in the form of annotation information Each interface of each application component.
Another aspect according to embodiments of the present invention, there is provided a kind of electronic equipment.
A kind of electronic equipment, including:One or more processors;Memory, for storing one or more programs, work as institute When stating one or more programs by one or more of computing devices so that one or more of processors, which are realized, is answering The method quickly redirected with being realized between program assembly.
A kind of another aspect according to embodiments of the present invention, there is provided computer-readable medium.
A kind of computer-readable medium, computer program is stored thereon with, is realized when described program is executed by processor The method quickly redirected is realized between application component.
One embodiment in foregoing invention has the following advantages that or beneficial effect:For each boundary of each application component Face addition association redirects routing information, and is generated respectively with the incidence relation redirected between routing information associated according to each interface The interface jump information at interface;Total interface jump information is synthesized according to each interface jump information;, will be total after application program launching Each interface jump information in the jump information of interface is saved in local storage with default storage organization;Receiving the jump of user After going to the jump request at a default interface, the interface jump information in local storage judges whether to perform to default boundary Face redirects, if so, then jumping to default interface, otherwise refusal redirects.The jump information of all component can be obtained, can be unified Control skip, realize between all component it is flexible, quickly redirect, simple to operate, raising redirects efficiency, and realizes that inter-module carries Returning result redirects, without searching in middle-agent Activity then directly simultaneously jump target interface.
Further effect adds hereinafter in conjunction with embodiment possessed by above-mentioned non-usual optional mode With explanation.
Brief description of the drawings
Accompanying drawing is used to more fully understand the present invention, does not form inappropriate limitation of the present invention.Wherein:
Fig. 1 is that the key step of the method according to embodiments of the present invention realized between application component and quickly redirected is shown It is intended to;
Fig. 2 is according to embodiments of the present invention the Json files jump.json of total interface jump information to be read into internal memory An exemplary flow schematic diagram;
Fig. 3 is that the main modular of the device according to embodiments of the present invention realized between application component and quickly redirected is shown It is intended to;
Fig. 4 is that the embodiment of the present invention can apply to exemplary system architecture figure therein;
Fig. 5 is adapted for the structural representation of the computer system of the terminal device for realizing the embodiment of the present invention.
Embodiment
The one exemplary embodiment of the present invention is explained below in conjunction with accompanying drawing, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize Arrive, various changes and modifications can be made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, the description to known function and structure is eliminated in following description.
Fig. 1 is that the key step of the method according to embodiments of the present invention realized between application component and quickly redirected is shown It is intended to.
As shown in figure 1, the embodiment of the present invention realizes that the method quickly redirected is mainly included such as between application component Under step S101 to step S104.
Step S101:Routing information is redirected for each interface addition association of each application component, and according to all circles Face generates the interface jump information at each interface with the incidence relation redirected between routing information associated.
Interface can be the Activity interfaces of application component.
Association is redirected routing information and can be specifically added in the form of annotation information (Annotation) and each apply journey Each interface of sequence component.
Annotation (annotation), annotation letter can be added in the target Activity classes inside application component in advance The form of breath is for example:@DeepLink(“schema://host/path/{param}”).Annotation attribute is ElementType.TYPE (is added for class and annotated), and RetentionPolicy.SOURCE is (for source-code level, in compilation process Delete the annotation).Wherein, it can be URI (Uniform Resource Identifier) to redirect routing information, for example upper example of form “schema://host/path/{param}”.The caller of application component need to only use the URI that can be matched just can The Activity interfaces of association are accessed, the URI of the association of for example, a certain Activity interfaces addition is " schema://host/ path/dataKey=value ".Redirect the component for the interface owning application component that can include association in routing information Mark, such as " host " in above-mentioned URI.
The form of interface jump information can be Json (JavaScript Object Notation, JS object tag) texts Part form.
In the compilation process of application component, before source code and resource compiling, it can be added in advance by code analysis It is added to the Annotation at an Activity interfaces, and is redirected according to the Activity interfaces with what is associated between routing information The Json files of the interface jump information of incidence relation generation application component are simultaneously saved in assets catalogues (for Android The path of middle storage resource file, the generally unrelated resource of the display with application program in itself all deposit in the catalogue) in.
Interface jump information includes redirecting routing information, and interface jump information particular content is as shown in table 1 below:
Table 1
Step S102:Total interface jump information is synthesized according to each interface jump information.
The form of total interface jump information can be Json file formats.
The step of synthesizing total interface jump information according to each interface jump information, can specifically include:Merge each interface to jump Transfering the letter breath obtains total interface jump information, and adds the interface owning application component associated for each interface jump information Component Name.
In the application program entirety compilation phase, all application components that this application program includes are traveled through, and encode solution The Json files of the interface jump information included in each application component are analysed, merge each interface jump information, comprehensive generation The Json files of total interface jump information are simultaneously saved in the assets catalogues of application program.
Relative to the Json file formats of the interface jump information of single application component, total interface in application program Increase a bundle field in the Json file formats of jump information, for identifying the component Name belonging to target interface, mesh Be when application component does not load first actively load this application component.Added for each interface jump information Bundle fields, such as:bundle1:assets/jump.json;bundle2:assets/jump.json;…… bundleN:Assets/jump.json (N is natural number), wherein, each bundle fields (bundle1, bundle2 ... BundleN) correspond to storage is the component Name of the interface owning application component of each interface jump information association, wherein Bundle1, bundle2 ... bundleN represent field name.
Step S103:After application program launching, by each interface jump information in total interface jump information with default Storage organization is saved in local storage.
Default storage organization can be the secondary storage structure based on Map.
When application program is installed on the mobile devices such as the mobile phone of user, in the startup stage of application program, it is main enter Start in journey and redirect preloading flow, that is, the Json files for the total interface jump information that will be created in assets catalogues Jump.json reads internal memory (i.e. local storage), and Fig. 2 is shown the Json files of total interface jump information Jump.json reads an exemplary flow schematic diagram of internal memory.
On the premise of application component and interface jump information increase, if all interface jump informations are all protected It is stored under single List (i.e. storage table), by the way of whole List is circulated, is matched one by one using regular expression It is less efficient.Design of the embodiment of the present invention uses the data structure Map of secondary storage<String, List<JumpInfo>>, Wherein, Map major key key assignments is that the component redirected contained by the jump information of interface in routing information identifies host, and List storages are corresponding All interface jump informations under the host, JumpInfo represent to be converted into including the routing information URI that redirects that component identifies Regular expression and the storage object generated, JumpInfo include URI character strings, target Activity interface informations, component Title.
Each interface jump information in total interface jump information is saved in local storage with default storage organization Step, it can specifically include:
Step 1, circulation are read and parse each interface jump information in total interface jump information jump.json, to obtain Redirect the component mark host in routing information URI;
Specifically, each interface jump information in total interface jump information jump.json is read in circulation, and is parsed and redirected road Footpath information URI, obtain component mark host.
Step 2, judge to whether there is major key corresponding with component mark host in the Map of local storage one by one, if depositing Step 3 is then being performed, otherwise, is first creating the major key that component mark host is corresponded in Map, then perform step 3;
Step 3, the routing information URI that redirects that host is identified including component is converted into regular expression, to generate storage Object JumpInfo, and storage object JumpInfo is stored in storage table List corresponding with component mark host major key In.
Step S104:Receive user jump to the jump request at a default interface after, according in local storage Interface jump information judges whether to perform redirecting to default interface, if so, then jumping to default interface, otherwise refusal redirects.
Jump request can redirect routing information including default interface, can also include indicating whether returning result data Redirect parameter.
Interface jump information in local storage judges whether to perform redirecting to default interface, if so, then jumping Default interface is gone to, the step of otherwise refusing to redirect, can specifically be included:
The default interface of parsing redirects routing information to obtain the component mark of the default affiliated component in interface;Judge Map's With the presence or absence of the component mark of the default affiliated component in interface in major key, if it is not, then refusal redirects, preset if so, then traveling through in Map Storage table corresponding to the major key of the component mark of the affiliated component in interface, to judge whether that the path that redirects with default interface is believed Breath matching redirect routing information, if in the presence of, jump to default interface, if being not present, refusal redirect.
The mode that redirects to default interface can specifically be determined according to the instruction for redirecting parameter by jumping to default interface, and be pressed Perform and redirect according to the mode that redirects of determination, i.e. if parameter instruction returning result data are redirected, according to corresponding returning result The mode of data, which performs, redirects (specific usable startActivityForResult mode, which performs, to be redirected), otherwise, according to The mode of returning result data, which does not perform, redirects (specific usable startActivity mode, which performs, to be redirected).
After application program receives the jump request for jumping to a target Activity interfaces of user, by using URI jumps to the target Activity interfaces of application component, the parameter redirected can be placed in URI in advance, can also deposited It is put in Bundle (Bundle is the container that data are deposited in Android, can be used for the communication between application component), Specifically, a target Activity interfaces are jumped to according to jump request, public component can be called to redirect interface JumpUtil.jump (String uri, Bundle extras, bool forResult ...), wherein passing through parameter It can specify whether to need returning result in forResult.
After the jump request of user is received, an exemplary redirect procedure is specific as follows:
The URI of user is parsed, obtains host information therein (component mark), while judge whether according to the URI of user With parameter, if URI carries parameter, it is also necessary to parse parameter therein;
Search whether this host information be present into Map using host information, if it does not exist, then redirecting failure;If In the presence of the List (storage table) of this host information, then cyclic J umpInfo (storage object), matching regular expressions are utilized one by one The URI, if matching redirects failure less than the URI;
After obtaining final JumpInfo (including the JumpInfo of URI character strings matched with the URI), one is generated Intent (Intent is used for inter-module in Android and communicated), and call setcomponent (new ComponentName (...)) method sets the target of the Intent.If URI also needs to set to Intent with parameter non-NULL in parameter or extras Put corresponding parameter;
Component Name in JumpInfo performs to corresponding application component to be redirected, wherein, if the application Program assembly, which does not load, to be needed to load the application component first, also, if parameter forResult instructions need to perform From target Activity interfaces returning result (i.e. forResult is true) after redirecting, use StartActivityForResult mode, which performs, to be redirected, and otherwise, is directly redirected and (i.e. need not using startActivity Target Activity interfaces returning result).
Each interface jump information is synthesized total interface jump information by above-mentioned step S102 and step S103, and is being worked as After application program launching, each interface jump information in total interface jump information is saved in local deposit with default storage organization Reservoir, in step S104, application component can call unified jump method to be redirected, target Activity interfaces URI and internal memory in the interface jump information (presence in the form of storage object) that stores carry out matching regular expressions, if The match is successful by URI, starts target interface by the way of direct specified target CompnentName (component Name).So as to reality Now it is uniformly controlled and redirects, in the scene of multiple Components Developments, overcomes each component of prior art in compilation process Java class file is stored in this component, the defects of center is able to know that all jump informations is redirected without one.
Fig. 3 is that the main modular of the device according to embodiments of the present invention realized between application component and quickly redirected is shown It is intended to.
As shown in figure 3, the embodiment of the present invention realizes that the device 300 quickly redirected mainly wraps between application component Include:Information generating module 301, information synthesis module 302, information preserving module 303, redirect execution module 304.
Information generating module 301, routing information is redirected for each interface addition association for each application component, And the interface jump information at each interface is generated with the incidence relation redirected between routing information associated according to each interface.
The form of interface jump information is Json file formats.
Redirecting routing information may include the component mark of interface owning application component of association.
Interface jump information redirects routing information including this.
The routing information that redirects of association can be added to each application program by information generating module 301 in the form of annotation information Each interface of component.
Information synthesis module 302, for synthesizing total interface jump information according to each interface jump information.
The form of total interface jump information is Json file formats.
Information synthesis module 302 can specifically merge each interface jump information and obtain total interface jump information, and be The component Name of the interface owning application component of each interface jump information addition association.
Information preserving module 303, for when the application program launching after, each interface in total interface jump information to be redirected into letter Breath is saved in local storage with default storage organization.
Default storage organization can be the secondary storage structure based on Map.
Information preserving module 303 can specifically perform after application program launching:Step 1, circulation are read and parsed total Each interface jump information in the jump information of interface, identified with obtaining the component redirected in routing information;Step 2, judge one by one Whether there is in the Map of local storage with the corresponding major key of component mark, if in the presence of performing step 3, otherwise, first create The major key of component mark is corresponded in Map, then performs step 3;Step 3, routing information conversion is redirected by what is identified including component Into regular expression, to generate storage object, and storage object is stored in storage table corresponding with the major key of component mark.
Redirect execution module 304, for receive user jump to the jump request at a default interface after, according to local Interface jump information in memory judges whether to perform redirecting to default interface, if so, then jumping to default interface, otherwise Refusal redirects.
What jump request may include default interface redirects routing information, may also include the jump for indicating whether returning result data Turn parameter.
Redirect that execution module 304 can specifically parse default interface redirects routing information to obtain default affiliated group of interface The component mark of part, then judge with the presence or absence of the component mark of the default affiliated component in interface in Map major key, if it is not, then refusing Redirect absolutely, if so, storage table corresponding to the major key for the component mark that the affiliated component in interface is preset in Map is then traveled through, to judge to be It is no exist with default interface redirect that routing information matches redirect routing information, if in the presence of default interface being jumped to, if not In the presence of then refusal redirects.
Also, redirect execution module 304 according to the instruction (indicating whether returning result data) for redirecting parameter determine to Default interface redirects mode, and performs and redirect according to the mode that redirects of determination.
By above-mentioned information synthesis module 302 and information preserving module 303, each interface jump information is synthesized one always Interface jump information, and after when application program launching, by each interface jump information in total interface jump information with default Storage organization is saved in local storage, and by redirecting execution module 304, application component can call unified jump method Redirected, the interface jump information stored in the URI and internal memory target Activity interfaces (is deposited in the form of storage object ) matching regular expressions are carried out, if the match is successful by URI, using directly specified target CompnentName (component Name) Mode start target interface.Redirected so as to realize to be uniformly controlled, in the scene of multiple Components Developments, overcome existing skill Each component of art is stored in java class file in this component in compilation process, and redirecting center without one can know The defects of all jump information in road.
Fig. 4 show can apply the embodiment of the present invention realized between application component the method that quickly redirects or The exemplary system architecture 400 of the device quickly redirected is realized between application component.
As shown in figure 4, system architecture 400 can include terminal device 401,402,403, network 404 and server 405. Network 404 between terminal device 401,402,403 and server 405 provide communication link medium.Network 404 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted with using terminal equipment 401,402,403 by network 404 with server 405, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 401,402,403 (merely illustrative) such as the application of page browsing device, searching class application, JICQ, mailbox client, social platform softwares.
Terminal device 401,402,403 can have a display screen and a various electronic equipments that supported web page browses, bag Include but be not limited to smart mobile phone, tablet personal computer, pocket computer on knee and desktop computer etc..
Server 405 can be to provide the server of various services, such as utilize terminal device 401,402,403 to user The shopping class website browsed provides the back-stage management server supported.Back-stage management server can be believed the product received The data such as breath inquiry request are carried out the processing such as analyzing, and result (such as product information) is fed back into terminal device.
It should be noted that the embodiment of the present invention provided the method one quickly redirected is realized between application component As by terminal device 401,402,403 perform, correspondingly, realize that the device quickly redirected is typically set between application component In terminal device 401,402,403.
It should be understood that the number of the terminal device, network and server in Fig. 4 is only schematical.According to realizing need Will, can have any number of terminal device, network and server.
Below with reference to Fig. 5, it illustrates suitable for for realizing the computer system 500 of the terminal device of the embodiment of the present application Structural representation.Terminal device shown in Fig. 5 is only an example, to the function of the embodiment of the present application and should not use model Shroud carrys out any restrictions.
As shown in figure 5, computer system 500 includes CPU (CPU) 501, it can be read-only according to being stored in Program in memory (ROM) 502 or be loaded into program in random access storage device (RAM) 503 from storage part 508 and Perform various appropriate actions and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data. CPU 501, ROM 502 and RAM 503 are connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to always Line 504.
I/O interfaces 505 are connected to lower component:Importation 506 including keyboard, mouse etc.;Penetrated including such as negative electrode The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage part 508 including hard disk etc.; And the communications portion 509 of the NIC including LAN card, modem etc..Communications portion 509 via such as because The network of spy's net performs communication process.Driver 510 is also according to needing to be connected to I/O interfaces 505.Detachable media 511, such as Disk, CD, magneto-optic disk, semiconductor memory etc., it is arranged on as needed on driver 510, in order to read from it Computer program be mounted into as needed storage part 508.
Especially, according to embodiment disclosed by the invention, may be implemented as counting above with reference to the process of flow chart description Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product, it includes being carried on computer Computer program on computer-readable recording medium, the computer program include the program code for being used for the method shown in execution flow chart. In such embodiment, the computer program can be downloaded and installed by communications portion 509 from network, and/or from can Medium 511 is dismantled to be mounted.When the computer program is performed by CPU (CPU) 501, the system that performs the application The above-mentioned function of middle restriction.
It should be noted that the computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer-readable recording medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, system, device or the device of infrared ray or semiconductor, or it is any more than combination.Meter The more specifically example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more wires, just Take formula computer disk, hard disk, random access storage device (RAM), read-only storage (ROM), erasable type and may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In this application, computer-readable recording medium can any include or store journey The tangible medium of sequence, the program can be commanded the either device use or in connection of execution system, device.And at this In application, computer-readable signal media can include in a base band or as carrier wave a part propagation data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium beyond storage medium is read, the computer-readable medium, which can send, propagates or transmit, to be used for By instruction execution system, device either device use or program in connection.Included on computer-readable medium Program code can be transmitted with any appropriate medium, be included but is not limited to:Wirelessly, electric wire, optical cable, RF etc., or it is above-mentioned Any appropriate combination.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, a part for above-mentioned module, program segment or code include one or more For realizing the executable instruction of defined logic function.It should also be noted that some as replace realization in, institute in square frame The function of mark can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actual On can perform substantially in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also It is noted that the combination of each square frame and block diagram in block diagram or flow chart or the square frame in flow chart, can use and perform rule Fixed function or the special hardware based system of operation are realized, or can use the group of specialized hardware and computer instruction Close to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part is realized.Described module can also be set within a processor, for example, can be described as:A kind of processor bag Include information generating module 301, information synthesis module 302, information preserving module 303, redirect execution module 304.Wherein, these moulds The title of block does not form the restriction to the module in itself under certain conditions, for example, information generating module 301 can also be retouched State for " be used for be each application component the addition of each interface associate redirect routing information, and according to each interface with associating The incidence relation that redirects between routing information generate each interface interface jump information module ".
As on the other hand, present invention also offers a kind of computer-readable medium, the computer-readable medium can be Included in equipment described in above-described embodiment;Can also be individualism, and without be incorporated the equipment in.Above-mentioned calculating Machine computer-readable recording medium carries one or more program, when said one or multiple programs are performed by the equipment, makes Obtaining the equipment includes:Redirect routing information for each interface addition association of each application component, and according to each interface with The incidence relation redirected between routing information of association generates the interface jump information at each interface;Closed according to each interface jump information Into total interface jump information;After application program launching, by each interface jump information in total interface jump information with default Storage organization is saved in local storage;Receive user jump to the jump request at a default interface after, deposited according to local Interface jump information in reservoir judges whether to perform redirecting to default interface, if so, then jumping to default interface, otherwise refused Redirect absolutely.
Technical scheme according to embodiments of the present invention, for each application component each interface addition association redirect road Footpath information, and letter is redirected with the interface at each interface of the incidence relation redirected between routing information generation associated according to each interface Breath;Total interface jump information is synthesized according to each interface jump information;After application program launching, by total interface jump information Each interface jump information is saved in local storage with default storage organization;At the default interface of jumping to for receiving user After jump request, the interface jump information in local storage judges whether to perform redirecting to default interface, if so, then Default interface is jumped to, otherwise refusal redirects.The jump information of all component can be obtained, can be uniformly controlled and redirect, realizes institute Have inter-module it is flexible, quickly redirect, simple to operate, raising redirects efficiency, and realizes that inter-module redirecting with returning result, Without searching in middle-agent Activity then directly simultaneously jump target interface.
Above-mentioned embodiment, does not form limiting the scope of the invention.Those skilled in the art should be bright It is white, depending on design requirement and other factors, various modifications, combination, sub-portfolio and replacement can occur.It is any Modifications, equivalent substitutions and improvements made within the spirit and principles in the present invention etc., should be included in the scope of the present invention Within.

Claims (14)

1. a kind of realize the method quickly redirected between application component, it is characterised in that including:
Routing information is redirected for each interface addition association of each application component, and is redirected according to each interface with what is associated Incidence relation between routing information generates the interface jump information at each interface;
Total interface jump information is synthesized according to each interface jump information;
After application program launching, each interface jump information in total interface jump information is protected with default storage organization It is stored to local storage;
Receive user jump to the jump request at a default interface after, the interface in the local storage redirects letter Breath judges whether execution redirecting to the default interface, if so, then jumping to the default interface, otherwise refuses the jump Turn.
2. according to the method for claim 1, it is characterised in that the interface jump information and total interface jump information Form be Json file formats,
The step of total interface jump information is synthesized according to each interface jump information, including:
Merge each interface jump information and obtain total interface jump information, and be each interface jump information addition association Interface owning application component component Name.
3. according to the method for claim 1, it is characterised in that the interface jump information includes the path that redirects and believed Breath, the component mark for redirecting routing information and including the interface owning application component of association, the default storage knot Structure is the secondary storage structure based on Map,
Each interface jump information in total interface jump information is saved in local storage with default storage organization Step, including:
Step 1, circulation is read and parses each interface jump information in total interface jump information, to be redirected described in acquisition Component mark in routing information;
Step 2, judge one by one in the Map of local storage whether there is with the corresponding major key of component mark, if depositing Step 3 is then being performed, otherwise, is first creating the major key that the component mark is corresponded in the Map, then perform step 3;
Step 3, the routing information that redirects identified including the component is converted into regular expression, to generate storage object, and The storage object is stored in storage table corresponding with the major key of component mark.
4. according to the method for claim 3, it is characterised in that the jump request redirects road including the default interface Footpath information,
Interface jump information in the local storage judges whether execution redirecting to the default interface, if so, The default interface is then jumped to, the step of otherwise being redirected described in refusal, including:
Parse the default interface redirects routing information to obtain the component of the affiliated component in default interface mark;
Judge that the component in the major key of the Map with the presence or absence of the default affiliated component in interface identifies, if it is not, then described in refusal Redirect, if so, storage table corresponding to the major key for the component mark that the affiliated component in interface is preset described in the Map is then traveled through, with Judge whether with the default interface redirect that routing information matches redirect routing information, if in the presence of jumping to institute Default interface is stated, if being not present, is redirected described in refusal.
5. according to the method for claim 1, it is characterised in that the jump request includes indicating whether returning result data Redirect parameter,
The step of jumping to the default interface, including:
The mode that redirects to the default interface is determined according to the instruction for redirecting parameter, and according to the side of redirecting of the determination Formula redirects described in performing.
6. according to the method for claim 1, it is characterised in that the association redirects routing information with the shape of annotation information Formula is added to each interface of each application component.
7. a kind of realize the device quickly redirected between application component, it is characterised in that including:
Information generating module, for the routing information that redirects of each interface addition association for each application component, and according to Each interface generates the interface jump information at each interface with the incidence relation redirected between routing information associated;
Information synthesis module, for synthesizing total interface jump information according to each interface jump information;
Information preserving module, for when the application program launching after, by each interface jump information in total interface jump information Local storage is saved in default storage organization;
Redirect execution module, for receive user jump to the jump request at a default interface after, deposited according to the local Interface jump information in reservoir judges whether to perform redirecting to the default interface, if so, then jumping to the default boundary Face, otherwise redirected described in refusal.
8. device according to claim 7, it is characterised in that the interface jump information and total interface jump information Form be Json file formats,
Described information synthesis module is additionally operable to:
Merge each interface jump information and obtain total interface jump information, and be each interface jump information addition association Interface owning application component component Name.
9. device according to claim 7, it is characterised in that the interface jump information includes the path that redirects and believed Breath, the component mark for redirecting routing information and including the interface owning application component of association, the default storage knot Structure is the secondary storage structure based on Map,
Described information preserving module is additionally operable to:
Step 1, circulation is read and parses each interface jump information in total interface jump information, to be redirected described in acquisition Component mark in routing information;
Step 2, judge one by one in the Map of local storage whether there is with the corresponding major key of component mark, if depositing Step 3 is then being performed, otherwise, is first creating the major key that the component mark is corresponded in the Map, then perform step 3;
Step 3, the routing information that redirects identified including the component is converted into regular expression, to generate storage object, and The storage object is stored in storage table corresponding with the major key of component mark.
10. device according to claim 9, it is characterised in that the jump request includes redirecting for the default interface Routing information,
The execution module that redirects is additionally operable to:
Parse the default interface redirects routing information to obtain the component of the affiliated component in default interface mark;
Judge that the component in the major key of the Map with the presence or absence of the default affiliated component in interface identifies, if it is not, then described in refusal Redirect, if so, storage table corresponding to the major key for the component mark that the affiliated component in interface is preset described in the Map is then traveled through, with Judge whether with the default interface redirect that routing information matches redirect routing information, if in the presence of jumping to institute Default interface is stated, if being not present, is redirected described in refusal.
11. device according to claim 7, it is characterised in that the jump request includes indicating whether returning result number According to redirect parameter,
The execution module that redirects is additionally operable to:
The mode that redirects to the default interface is determined according to the instruction for redirecting parameter, and according to the side of redirecting of the determination Formula redirects described in performing.
12. device according to claim 7, it is characterised in that described information generation module redirects road by the association Footpath information is added to each interface of each application component in the form of annotation information.
13. a kind of electronic equipment, it is characterised in that including:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are by one or more of computing devices so that one or more of processors Realize the method as described in any in claim 1-6.
14. a kind of computer-readable medium, is stored thereon with computer program, it is characterised in that described program is held by processor The method as described in any in claim 1-6 is realized during row.
CN201710929773.1A 2017-10-09 2017-10-09 It is a kind of that the method and apparatus quickly redirected are realized between application component Pending CN107729106A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710929773.1A CN107729106A (en) 2017-10-09 2017-10-09 It is a kind of that the method and apparatus quickly redirected are realized between application component

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710929773.1A CN107729106A (en) 2017-10-09 2017-10-09 It is a kind of that the method and apparatus quickly redirected are realized between application component

Publications (1)

Publication Number Publication Date
CN107729106A true CN107729106A (en) 2018-02-23

Family

ID=61208715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710929773.1A Pending CN107729106A (en) 2017-10-09 2017-10-09 It is a kind of that the method and apparatus quickly redirected are realized between application component

Country Status (1)

Country Link
CN (1) CN107729106A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629048A (en) * 2018-05-14 2018-10-09 链家网(北京)科技有限公司 A kind of routing parameter transmits optimization method and system
CN108829477A (en) * 2018-05-31 2018-11-16 康键信息技术(深圳)有限公司 Interface jump method, device, computer equipment and storage medium
CN108897612A (en) * 2018-07-17 2018-11-27 北京京东金融科技控股有限公司 Route the method and apparatus jumped
CN110308958A (en) * 2019-05-08 2019-10-08 北京字节跳动网络技术有限公司 Component jump method, device, electronic equipment and storage medium
CN110347942A (en) * 2019-05-31 2019-10-18 深圳壹账通智能科技有限公司 Method for page jump, device, storage medium and computer equipment
CN110688173A (en) * 2019-09-29 2020-01-14 北京金山安全软件有限公司 Positioning method and device of components in cross-platform interface framework and electronic equipment
CN110888690A (en) * 2019-12-12 2020-03-17 北京爱奇艺科技有限公司 Application starting method and device, electronic equipment and storage medium
CN111008012A (en) * 2019-12-06 2020-04-14 上海米哈游网络科技股份有限公司 Prototype design method, prototype design device, electronic product and storage medium
CN111324333A (en) * 2018-12-17 2020-06-23 中移(杭州)信息技术有限公司 Software development method and device based on componentization
WO2020238092A1 (en) * 2019-05-24 2020-12-03 深圳壹账通智能科技有限公司 Link shell adding and jumping method and apparatus, and electronic device and storage medium
CN113069769A (en) * 2021-04-20 2021-07-06 腾讯科技(深圳)有限公司 Cloud game interface display method and device, electronic equipment and storage medium
CN113326199A (en) * 2021-06-18 2021-08-31 杭州萤石软件有限公司 Debugging method and debugging platform device for application program of mobile operating system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514223A (en) * 2012-06-28 2014-01-15 阿里巴巴集团控股有限公司 Data synchronism method and system of database
CN106844019A (en) * 2015-12-04 2017-06-13 阿里巴巴集团控股有限公司 Application control method, application program redirect associated configuration method and device
CN107133053A (en) * 2017-06-05 2017-09-05 上海鋆创信息技术有限公司 Method for page jump and device, the storage medium and terminal of a kind of application program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514223A (en) * 2012-06-28 2014-01-15 阿里巴巴集团控股有限公司 Data synchronism method and system of database
CN106844019A (en) * 2015-12-04 2017-06-13 阿里巴巴集团控股有限公司 Application control method, application program redirect associated configuration method and device
CN107133053A (en) * 2017-06-05 2017-09-05 上海鋆创信息技术有限公司 Method for page jump and device, the storage medium and terminal of a kind of application program

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
CTOLIB码库: "《https://python.ctolib.com/HongJun2046-OkDeepLink.html》", 17 June 2017 *
FMDN: "《https://www.cnblogs.com/fengmin/p/5377286.html》", 11 April 2016, 博客园 *
MOCHIU程序人生: "《https://www.cnblogs.com/ZC_Mo-Blog/p/5526776.html》", 25 May 2016, 博客园 *
总李写代码: "《https://www.cnblogs.com/whoislcj/p/5853393.html》", 9 September 2016, 博客园 *
总李写代码: "《https://www.cnblogs.com/whoislcj/p/5860138.html》", 13 September 2016, 博客园 *
王清,李光明,李永勤编著: "《计算机操作系统》", 31 March 2003, 冶金工业出版社 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108629048A (en) * 2018-05-14 2018-10-09 链家网(北京)科技有限公司 A kind of routing parameter transmits optimization method and system
CN108829477A (en) * 2018-05-31 2018-11-16 康键信息技术(深圳)有限公司 Interface jump method, device, computer equipment and storage medium
CN108829477B (en) * 2018-05-31 2023-08-18 康键信息技术(深圳)有限公司 Interface jump method, device, computer equipment and storage medium
CN108897612A (en) * 2018-07-17 2018-11-27 北京京东金融科技控股有限公司 Route the method and apparatus jumped
WO2020015562A1 (en) * 2018-07-17 2020-01-23 京东数字科技控股有限公司 Routing jump method and apparatus
CN111324333B (en) * 2018-12-17 2022-08-30 中移(杭州)信息技术有限公司 Software development method and device based on componentization
CN111324333A (en) * 2018-12-17 2020-06-23 中移(杭州)信息技术有限公司 Software development method and device based on componentization
CN110308958A (en) * 2019-05-08 2019-10-08 北京字节跳动网络技术有限公司 Component jump method, device, electronic equipment and storage medium
WO2020238092A1 (en) * 2019-05-24 2020-12-03 深圳壹账通智能科技有限公司 Link shell adding and jumping method and apparatus, and electronic device and storage medium
CN110347942A (en) * 2019-05-31 2019-10-18 深圳壹账通智能科技有限公司 Method for page jump, device, storage medium and computer equipment
CN110688173A (en) * 2019-09-29 2020-01-14 北京金山安全软件有限公司 Positioning method and device of components in cross-platform interface framework and electronic equipment
CN110688173B (en) * 2019-09-29 2023-01-20 北京金山安全软件有限公司 Positioning method and device of components in cross-platform interface framework and electronic equipment
CN111008012A (en) * 2019-12-06 2020-04-14 上海米哈游网络科技股份有限公司 Prototype design method, prototype design device, electronic product and storage medium
CN111008012B (en) * 2019-12-06 2024-05-03 上海米哈游网络科技股份有限公司 Prototype design method, device, electronic product and storage medium
CN110888690A (en) * 2019-12-12 2020-03-17 北京爱奇艺科技有限公司 Application starting method and device, electronic equipment and storage medium
CN113069769B (en) * 2021-04-20 2022-07-29 腾讯科技(深圳)有限公司 Cloud game interface display method and device, electronic equipment and storage medium
CN113069769A (en) * 2021-04-20 2021-07-06 腾讯科技(深圳)有限公司 Cloud game interface display method and device, electronic equipment and storage medium
CN113326199A (en) * 2021-06-18 2021-08-31 杭州萤石软件有限公司 Debugging method and debugging platform device for application program of mobile operating system

Similar Documents

Publication Publication Date Title
CN107729106A (en) It is a kind of that the method and apparatus quickly redirected are realized between application component
CN106980508A (en) Method and apparatus for generating the page
CN103049271A (en) Method and device for automatically generating description document of API (application program interface)
CN109933752A (en) A kind of method and apparatus exporting electronic document
CN110472207A (en) List generation method and device
US20140115442A1 (en) Conversion of a presentation to darwin information typing architecture (dita)
CN107844371A (en) Task processing method, system and electronic equipment
CN109062563A (en) Method and apparatus for generating the page
CN110020329A (en) For generating the methods, devices and systems of webpage
CN109766082A (en) The method and apparatus that the application program page jumps
CN107256206A (en) The method and apparatus of character stream format conversion
CN103827778B (en) Enterprise tools strengthen
CN106896937A (en) Method and apparatus for being input into information
CN107844324A (en) Customer terminal webpage redirects treating method and apparatus
CN109981322A (en) The method and apparatus of cloud resource management based on label
CN107908615A (en) A kind of method and apparatus for obtaining search term corresponding goods classification
CN108846753A (en) Method and apparatus for handling data
CN107491382A (en) Log-output method and device
CN109981719A (en) Information processing method and its system, computer system and computer readable medium
CN107590252A (en) Method and device for information exchange
CN103778128B (en) The method for drafting and device of a kind of list information
CN109815107A (en) The method and apparatus of automatic test
CN109656744A (en) The method and apparatus for realizing data check and injection are explained based on Java
CN109308201A (en) Method and apparatus for output information
CN107463406A (en) Issue the method and electronic equipment of Mobile solution

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180223

RJ01 Rejection of invention patent application after publication