The content of the invention
The method and device of sync cap configuration under a kind of multi-environment that the application is provided, to solve to exist in the prior art
Sync cap configuration less efficient problem.
According to the method that sync cap under a kind of multi-environment that the embodiment of the present application is provided is configured, methods described includes:
After one interface of new typing in any one environment X, environment Y to be synchronized is determined, wherein, the environment Y is
Any environment in the multi-environment in addition to the environment X;
Environment configurations to be synchronized by the environment X are the address of the environment Y, and the interface of the environment Y is configured
The address that environment configurations are the environment X is pulled, so as to set up the contact of the environment X and environment Y;
The environment X sends the synchronization request of the interface to environment Y to be synchronized;
The environment Y pulls environment X and initiates pulling for interface configuration after the synchronization request is received, to interface configuration
Request;
The environment X after request is pulled described in receiving, match somebody with somebody by the interface for returning to the new typing interface to the environment Y
Put;
The environment Y is receiving the interface of return with postponing, and the interface configuration is recorded, for the environment Y
Gateway use.
Optionally, the environment X returns to the new typing interface after request is pulled described in receiving to the environment Y
Interface configuration, specifically include:
The environment X receives described after pulling request, obtains described from the corresponding core configuration systems of the environment X
The interface configuration of new typing interface, and the interface configuration is returned to the environment Y, wherein, the core configuration system is used for
Record interface is configured;
The environment Y is receiving the interface of return with postponing, and records the interface configuration, specifically includes:
The environment Y is receiving the interface of return with postponing, and interface configuration recorded into environment Y pairs
In the core configuration system answered.
Optionally, the request is HTTP request.
According to the method that sync cap under a kind of multi-environment that the embodiment of the present application is provided is configured, methods described includes:
After one interface of new typing in environment X, environment Y to be synchronized is determined, wherein, the environment Y is described polycyclic
Any environment in border in addition to the environment X;
By the address that environment configurations to be synchronized are the environment Y;
The synchronization request of the interface is sent to environment Y to be synchronized;
Receive the interface configuration that the environment Y is initiated pull request after, return to the new typing to the environment Y
The interface configuration of interface.
Optionally, it is described receive the interface configuration that the environment Y is initiated pull request after, returned to the environment Y
The interface configuration of the new typing interface is returned, is specifically included:
Receive that the environment Y initiates pull request after, obtained from the corresponding core configuration systems of the environment X
The interface configuration of the new typing interface, and the interface configuration is returned to the environment Y, wherein, the core configuration system
For record interface configuration.
Optionally, the request is HTTP request.
According to the method that sync cap under a kind of multi-environment that the embodiment of the present application is provided is configured, methods described includes:
It is determined that after environment Y to be synchronized, it is new typing interface that the interface configuration of the environment Y is pulled into environment configurations
The address of environment X;
After the synchronization request for the new typing interface that the environment X sends is received, configured to the interface
Pull environment X initiation interface configurations pulls request;
The interface of the environment X returns is being received with postponing, the interface configuration is being recorded, for the net of the environment Y
Pass uses.
Optionally, it is described to record the interface configuration, specifically include:
During interface configuration recorded into the corresponding core configuration systems of the environment Y;Wherein, the core configuration system
Unite for record interface configuration.
Optionally, the request is HTTP request.
According to the device that sync cap under a kind of multi-environment that the embodiment of the present application is provided is configured, described device includes:
Environment determining unit to be synchronized, after one interface of new typing in environment X, determines environment Y to be synchronized, wherein,
The environment Y is any environment in addition to the environment X in the multi-environment;
Environment configurations unit to be synchronized, by the address that environment configurations to be synchronized are the environment Y;
Synchronization request transmitting element, the synchronization request of the interface is sent to environment Y to be synchronized;
Interface configures returning unit, receive the interface configuration that the environment Y is initiated pull request after, to the ring
Border Y returns to the interface configuration of the new typing interface.
Optionally, interface configuration returning unit, specifically includes:
Interface configuration returns to subelement, receive that the environment Y initiates pull request after, from environment X correspondences
Core configuration system in obtain the interface configuration of the new typing interface, and return to the interface to the environment Y and configure, its
In, the core configuration system is configured for record interface.
Optionally, the request is HTTP request.
According to the device that sync cap under a kind of multi-environment that the embodiment of the present application is provided is configured, described device includes:
Environment configurations unit is pulled, it is determined that after environment Y to be synchronized, the interface configuration of the environment Y is pulled into environment
It is configured to the address of the environment X of new typing interface;
Request initiating cell is pulled, the synchronization request for the new typing interface that the environment X sends is being received
Afterwards, to the interface configuration pull environment X initiate interface configure pull request;
Interface configures recording unit, is receiving the interface of the environment X returns with postponing, and records the interface configuration,
So that the gateway of the environment Y is used.
Optionally, the interface configuration recording unit, specifically includes:
Interface configuration record subelement, is receiving the interface of the environment X returns with postponing, and the interface is configured and is remembered
In recording the corresponding core configuration systems of the environment Y, so that the gateway of the environment Y is used;Wherein, the core configuration system
Unite for record interface configuration.
Optionally, the request is HTTP request.
It is the address of environment Y by by the environment configurations to be synchronized of environment X in the embodiment of the present application, and by environment Y's
Interface configuration pulls the address that environment configurations are environment X, so as to set up the contact of environment X and environment Y, can so bypass difference
Isolation between environment, and then any one environment X is realized under multi-environment newly after one interface of configuration, automatically by the interface
Configuration is synchronized in other environment Y, substantially increases the efficiency of sync cap configuration;Avoid manual mode easily malfunction,
Human cost problem high;And, the uniformity of the interface configuration for being easy to safeguard in varying environment.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment
Described in implementation method do not represent all implementation methods consistent with the application.Conversely, they be only with it is such as appended
The example of the consistent apparatus and method of some aspects described in detail in claims, the application.
It is the purpose only merely for description specific embodiment in term used in this application, and is not intended to be limiting the application.
" one kind ", " described " and " being somebody's turn to do " of singulative used in the application and appended claims is also intended to include majority
Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wraps
May be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application
A little information should not necessarily be limited by these terms.These terms are only used for being distinguished from each other open same type of information.For example, not departing from
In the case of the application scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determining ".
In order to solve the above problems, Fig. 1 is referred to, sync cap configuration under the multi-environment provided for the embodiment of the application one
Method flow chart, the described method comprises the following steps:
Step 110:After one interface of new typing in any one environment X, environment Y to be synchronized is determined, wherein, it is described
Environment Y is any environment in addition to the environment X in the multi-environment.
In the present embodiment, the interface be software sense on interface, typically some application or program by itself
All or part of service is supplied to the particular invocation specification of outside, can call form including various, and such as HTTP is called, js
Call, sdk is called.
Determine that the quantity of environment Y to be synchronized can be for 1 or multiple.
For example, it may be other all environment in the multi-environment in addition to the environment X are defined as to be synchronized
Environment Y.
Or, can, according to user instruction, determine 1 or multiple environment Y to be synchronized.
Step 120:Environment configurations to be synchronized by the environment X are the address of the environment Y, and by the environment Y's
Interface configuration pulls the address that environment configurations are the environment X, so as to set up the contact of the environment X and environment Y.
In the present embodiment, the address of the environment Y can be the http address of the environment Y, or HTTPs addresses;
Similar, the address of the environment X can be the http address of the environment X, or HTTPs addresses.
By by the address that the environment configurations to be synchronized of environment X are the environment Y, so that the environment X can
Initiated with to the environment Y
Step 130:The environment X sends the synchronization request of the interface to environment Y to be synchronized.
In the present embodiment, due in step 120 by the address that the environment configurations to be synchronized of environment X are the environment Y so that
Can cause that the environment X sends the synchronization request of the interface to environment Y to be synchronized.
The synchronization request, for pointing out environment Y, one interface of new typing, can pull to environment X in i environment X
The interface configuration of the interface, so as to complete the purpose of sync cap configuration.
General, the synchronization request can be such as HTTP request, or HTTPs requests etc..
Step 140:The environment Y pulls environment X initiation interfaces and matches somebody with somebody after the synchronization request is received, to interface configuration
That puts pulls request.
In the present embodiment, due to the interface configuration of environment Y is pulled into the ground that environment configurations are the environment X in step 120
Location, so that the environment Y is pulled after the interface synchronization request that the environment X sends is received to interface configuration
What environment X initiation interfaces were configured pulls request.
Described to pull request, the interface for pulling its new typing interface to the environment X is configured, so as to complete synchronous connecing
The purpose of mouth configuration.
It is general, it is described to pull request, can be such as HTTP request, or HTTPs is asked etc..
Step 150:The environment X returns to the new typing interface after request is pulled described in receiving to the environment Y
Interface configuration.
Step 160:The environment Y is receiving the interface of return with postponing, and the interface configuration is recorded, for institute
The gateway for stating environment Y is used.
In the present embodiment, the interface configuration includes basic configuration and distribution configuration etc..
The basic configuration can including interface name, parameter, type etc. essential information;
The distribution configuration can include providing address, the mode of interface service route.
Generally, gateway can be routed to corresponding interface business system, the interface business system according to the distribution configuration
It is the system for providing interface service to unite.
The embodiment of the present application, is the address of environment Y, and connecing environment Y by by the environment configurations to be synchronized of environment X
Mouth configuration pulls the address that environment configurations are environment X, so as to set up the contact of environment X and environment Y, can so bypass different rings
Isolation between border, and then realize under multi-environment that any one environment X newly after one interface of configuration, automatically matches somebody with somebody the interface
Put and be synchronized in other environment Y, substantially increase the efficiency of sync cap configuration;Avoid manual mode easily malfunction, people
The problem of power high cost;And, the uniformity of the interface configuration for being easy to safeguard in varying environment.
In actual applications, each environment can be to that should have a core configuration system for record interface configuration
System.
Therefore, above-mentioned steps 150, can specifically include:
The environment X receives described after pulling request, obtains described from the corresponding core configuration systems of the environment X
The interface configuration of new typing interface, and return to the interface configuration to the environment Y.
Correspondingly, above-mentioned steps 160, can specifically include:
The environment Y is receiving the interface of return with postponing, and interface configuration recorded into environment Y pairs
In the core configuration system answered.
The application based on the embodiment of the method for environment X is introduced below in conjunction with Fig. 2, the embodiment can be with corresponding diagram 1:
Step 210:After one interface of new typing in environment X, environment Y to be synchronized is determined, wherein, the environment Y is
Any environment in multi-environment in addition to the environment X;
Step 220:By the address that environment configurations to be synchronized are the environment Y;
Step 230:The synchronization request of the interface is sent to environment Y to be synchronized;
Step 240:Receive the interface configuration that the environment Y is initiated pull request after, return to institute to the environment Y
State the interface configuration of new typing interface.
Same as the previously described embodiments, in the present embodiment, the address of the environment Y can be the HTTP ground of the environment Y
Location, or HTTPs addresses.
Determine that the quantity of environment Y to be synchronized is for 1 or multiple.
The synchronization request, can be such as HTTP request, or HTTPs requests etc..
In one specifically embodiment, the step 240 can specifically include:
Receive that the environment Y initiates pull request after, obtained from the corresponding core configuration systems of the environment X
The interface configuration of the new typing interface, and the interface configuration is returned to the environment Y, wherein, the core configuration system
For record interface configuration.
The application based on the embodiment of the method for environment Y is introduced below in conjunction with Fig. 3, the embodiment can be with corresponding diagram 1:
Step 310:It is determined that after environment Y to be synchronized, it is new record that the interface configuration of the environment Y is pulled into environment configurations
The address of the environment X of incoming interface;
Step 320:After the synchronization request for the new typing interface that the environment X sends is received, to described
Interface configuration pull environment X initiate interface configuration pull request;
Step 330:The interface of the environment X returns is being received with postponing, the interface configuration is being recorded, for the ring
The gateway of border Y is used.
Same as the previously described embodiments, in the present embodiment, the address of the environment X can be the HTTP ground of the environment X
Location, or HTTPs addresses.
It is described to pull request, can be such as HTTP request, or HTTPs requests etc..
It is described to record the interface configuration in one specifically embodiment, can specifically include:
During interface configuration recorded into the corresponding core configuration systems of the environment Y;Wherein, the core configuration system
Unite for record interface configuration.
It is corresponding with the embodiment of the method that sync cap under foregoing multi-environment is configured, present invention also provides a kind of multi-environment
The embodiment of the device of lower sync cap configuration.
The embodiment of the device of sync cap configuration can be applied in environment X under the application multi-environment.Device embodiment can
Realized with by software, it is also possible to realized by way of hardware or software and hardware combining.As a example by implemented in software, as one
Device on logical meaning, is to be referred to corresponding computer program in nonvolatile memory by the processor of equipment where it
Order runs what is formed in reading internal memory.From for hardware view, as shown in figure 4, under the application multi-environment sync cap match somebody with somebody
A kind of hardware structure diagram of equipment where the device put, except the processor shown in Fig. 4, network interface, internal memory and non-volatile
Property memory outside, equipment in embodiment where device generally according to sync cap configuration under the multi-environment actual functional capability,
Other hardware can also be included, this is repeated no more.
Referring to Fig. 5, the module map of the device of sync cap configuration, described under the multi-environment provided for the embodiment of the application one
Device includes:Environment determining unit 410 to be synchronized, environment configurations unit 420 to be synchronized, synchronization request transmitting element 430 and
Interface configures returning unit 440.
Wherein, environment determining unit 410 to be synchronized, after one interface of new typing in environment X, determines environment to be synchronized
Y, wherein, the environment Y is any environment in addition to the environment X in the multi-environment;
Environment configurations unit 420 to be synchronized, by the address that environment configurations to be synchronized are the environment Y;
Synchronization request transmitting element 430, the synchronization request of the interface is sent to environment Y to be synchronized;
Interface configures returning unit 440, receive the interface configuration that the environment Y is initiated pull request after, to institute
State the interface configuration that environment Y returns to the new typing interface.
In an optional implementation method:
Interface configures returning unit, specifically includes:
Interface configuration returns to subelement, receive that the environment Y initiates pull request after, from environment X correspondences
Core configuration system in obtain the interface configuration of the new typing interface, and return to the interface to the environment Y and configure, its
In, the core configuration system is configured for record interface.
In an optional implementation method:
The request is HTTP request.
It is corresponding with the embodiment of the method that sync cap under foregoing multi-environment is configured, present invention also provides a kind of multi-environment
The embodiment of the device of lower sync cap configuration.
The embodiment of the device of sync cap configuration can be applied in environment Y under the application multi-environment.Device embodiment can
Realized with by software, it is also possible to realized by way of hardware or software and hardware combining.As a example by implemented in software, as one
Device on logical meaning, is to be referred to corresponding computer program in nonvolatile memory by the processor of equipment where it
Order runs what is formed in reading internal memory.From for hardware view, as shown in fig. 6, under the application multi-environment sync cap match somebody with somebody
A kind of hardware structure diagram of equipment where the device put, except the processor shown in Fig. 6, network interface, internal memory and non-volatile
Property memory outside, equipment in embodiment where device generally according to sync cap configuration under the multi-environment actual functional capability,
Other hardware can also be included, this is repeated no more.
Referring to Fig. 7, the module map of the device of sync cap configuration, described under the multi-environment provided for the embodiment of the application one
Device includes:Pull environment configurations unit 510, pull request initiating cell 520 and interface configuration recording unit 530.
Environment configurations unit 510 is pulled, it is determined that after environment Y to be synchronized, the interface configuration of the environment Y is pulled into ring
Border is configured to the address of the environment X of new typing interface;
Request initiating cell 520 is pulled, please in the synchronization for the new typing interface for receiving the environment X transmissions
After asking, to the interface configuration pull environment X initiate interface configure pull request;
Interface configures recording unit 530, is receiving the interface of the environment X returns with postponing, and records the interface and matches somebody with somebody
Put, so that the gateway of the environment Y is used.
In an optional implementation method:
The interface configures recording unit, specifically includes:
Interface configuration record subelement, is receiving the interface of the environment X returns with postponing, and the interface is configured and is remembered
In recording the corresponding core configuration systems of the environment Y, so that the gateway of the environment Y is used;Wherein, the core configuration system
Unite for record interface configuration
In an optional implementation method:
The request is HTTP request.
System, device, module or unit that above-described embodiment is illustrated, can specifically be realized by computer chip or entity,
Or realized by the product with certain function.A kind of typically to realize equipment for computer, the concrete form of computer can
Being personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet PC, wearable device or these equipment
The combination of any several equipment.
The function of unit and the implementation process of effect correspond to step in specifically referring to the above method in said apparatus
Implementation process, will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is referring to method reality
Apply the part explanation of example.Device embodiment described above is only schematical, wherein described as separating component
The unit of explanation can be or may not be physically separate, and the part shown as unit can be or can also
It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality
Selection some or all of module therein is needed to realize the purpose of application scheme.Those of ordinary skill in the art are not paying
In the case of going out creative work, you can to understand and implement.
Those skilled in the art will readily occur to its of the application after considering specification and putting into practice invention disclosed herein
Its embodiment.The application is intended to any modification, purposes or the adaptations of the application, these modifications, purposes or
Person's adaptations follow the general principle of the application and including the undocumented common knowledge in the art of the application
Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the application and spirit are by following
Claim is pointed out.
It should be appreciated that the application is not limited to the precision architecture for being described above and being shown in the drawings, and
And can without departing from the scope carry out various modifications and changes.Scope of the present application is only limited by appended claim.