Specific embodiment
To make the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and
Corresponding accompanying drawing is clearly and completely described to technical scheme.Obviously, described embodiment is only the application one
Section Example, rather than whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Go out the every other embodiment obtained under the premise of creative work, belong to the scope of the application protection.
Below in conjunction with accompanying drawing, the scheme to the application is illustrated.
The schematic flow sheet of the network environment partition method that Fig. 1 is provided for the embodiment of the present application.
The executive agent of the flow in Fig. 1 can be the machine in network.The scope of the network can be predetermined
Or determine again when the flow is performed, the application is not limited the range size of the network.Such as, the network
Can be the part or all of of certain distributed network, the network can also be certain LAN partly or entirely, etc..
Many machines are included in the network, during the machine can be specifically personal computer, big-and-middle-sized computer, computer cluster
Equipment, mobile phone, panel computer, intelligent watch, vehicle-mounted mobile platform etc..The executive agent does not constitute the limit to the application
It is fixed.
In occurring mainly in distributed network due to the problem mentioned in background technology, therefore, following examples mainly with
The network be predetermined distributed network it is part or all of as a example by illustrate.
Flow in Fig. 1 may comprise steps of:
S101:The corresponding domain name of each machine in network is obtained, environmental tag information is included in domain name.
In the embodiment of the present application, can in advance for each machine in network configures corresponding domain name, in order to lead to
The corresponding machine of the domain name access domain name is crossed, and then the service of machine offer can be provided.
Compared to prior art, a big feature of the scheme of the application is to include environment in the domain name configured for machine
Flag information, the environmental tag information may be used to indicate that the environment (environment divided can be finished) belonging to the machine, or
Person, for showing the environment that the machine will be divided to (environment can not yet be divided and finished).
In the embodiment of the present application, domain name is usually by " point " separator between at least two labels and adjacent label
Composition, label is the character string of English alphabet and/or numeral and/or "-" character composition.Environmental tag information is included in domain name
Can be the predetermined portions of the domain name.
So that certain described network is the distributed network for payment as an example.For in the network 6 (respectively A, B,
C, D, E, F) machine, it is configured with following information:
A machines provide chargeable service, and corresponding domain name is " charge.d001.a.com ";
B machines provide chargeable service, and corresponding domain name is " charge.d002.a.com ";
C machines provide inquiry into balance service, and corresponding domain name is " acctrans.d001.a.com ";
D machines provide inquiry into balance service, and corresponding domain name is " acctrans.d002.a.com ";
E machines have demand to chargeable service, and corresponding domain name is " trade.d001.a.com ";
F machines have demand to inquiry into balance service, and corresponding domain name is " trade.d002.a.com ";
Wherein, the environmental tag information that second label is included for domain name in this 6 domain names of machine.
It can be seen that, environmental tag information " d001 " is all included in the corresponding domain name of A, C, E, then it is considered that A, C, E
Belong to the environment that " d001 " is mark, or, for showing that A, C, E will be divided to ring that " d001 " is mark
Border;Similarly, B, D, F include environmental tag information " d002 ", then it is considered that B, D, F belong to " d002 " be mark
Environment, or, for showing that B, D, F will be divided to environment that " d002 " is mark.
S102:According to the environmental tag information included in the corresponding domain name of each machine, ring is carried out to each machine
Border isolates.
In the embodiment of the present application, described being environmentally isolated can be realized by running predetermined policy.The predetermined plan
Software can be slightly primarily based upon, such as, obtains strategy, fire wall of service etc.;The predetermined policy can also be main
It is hardware based, such as, and physically-isolated strategy, hardware switch etc..It should be noted that above-named these modes are rings
The example of the specific implementation of border isolation, and not to the restriction of the application.
The application is not also limited the degree that is specifically isolated being environmentally isolated, and can at least be realized to not by being environmentally isolated
With the isolation of the part or all of service between environment.Specifically, after being environmentally isolated, for isolate the part or
All services, the machine in any one environment can obtain the part or all of clothes from the machine in the environment belonging to the machine
Business, without partly or entirely being serviced from described in the machine in other environment beyond the environment.
By the above method, the network can be distributed network, can in advance using environmental tag information as distribution
A part for the corresponding domain name of machine in formula network, then can automatically based on the ring included in the corresponding domain name of each machine
Border flag information, network environment isolation is carried out to each machine, and is not necessarily based on manual configuration address of service, and net is carried out to each machine
Network is environmentally isolated, and can improve network environment efficiency of isolation, therefore, it can partly or entirely solve of the prior art asking
Topic.
Further, based on carried out in Fig. 1 network environment isolation, for distributed network in have demand for services machine
Device, the machine automatically according to the environmental tag information included in itself corresponding domain name, and can automatically determine
The corresponding domain name of the machine (that is, address of service) that the service is provided in environment belonging to itself, and existing skill need not be used
The mode of manual configuration address of service in art, therefore, it can save manpower, cost-effective.
Moreover, from for user perspective, the corresponding domain name of machine is visual, the environment mark included in domain name directly perceived
Will information is also directly perceived visual, and user's naked eyes can intuitively determine whether wantonly two machines in the network belong to same
One environment, convenience preferably, can improve Consumer's Experience.
Based on the above method, the embodiment of the present application additionally provides some specific embodiments of the method in Fig. 1, Yi Jikuo
Exhibition scheme, is illustrated below.
In the embodiment of the present application, for step S101, obtain in network after the corresponding domain name of each machine, if right in advance
Each machine divides environment and finishes, then can be directly environmentally isolated, and otherwise first can divide environment to each machine, then carry out ring
Border isolates.In the case of the latter, for step S102, according to the environmental mark letter included in the corresponding domain name of each machine
Breath, is environmentally isolated to each machine, can specifically include:According to the environment included in the corresponding domain name of each machine
Flag information, at least two environment are divided into by each machine, and each environment to marking off is isolated.
In the embodiment of the present application, above-mentioned " each machine is divided into at least two environment " can have various specific
Implementation method.Two kinds are enumerated herein as an example:
The first, when domain name is configured, can give and want the machine for being divided to same environment configuration comprising equivalent environment
The domain name of flag information, in this case, when environment is divided, can be according to the environment included in the corresponding domain name of each machine
Flag information, is divided to same environment, wherein it is possible to divide by machine of the corresponding domain name comprising equivalent environment flag information
Go out at least two environment.
For example, in the example of previous step S101, identical environmental mark letter is all included in the corresponding domain name of A, C, E
Breath " d001 ", then can will be divided to A, C, E to same environment.
Second, when domain name is configured, infull phase is included though can give and want the machine for being divided to same environment configuration
The domain name of same but with incidence relation environmental tag information, in this case, when environment is divided, can be according to each machine
The environmental tag information included in corresponding domain name, by machine of the corresponding domain name comprising the environmental tag information with incidence relation
Device is divided to same environment, wherein it is possible to mark off at least two environment.The incidence relation can be anti-by predetermined policy
Reflect.
For example, in actual applications, identical environmental mark can also not be included in the corresponding domain name of A, C, E in upper example
Information " d001 ", but respectively comprising relevant environmental tag information is pre-build, such as, and can in the corresponding domain names of A
Comprising environmental tag information " d00A ", environmental tag information " d00C ", the corresponding domain names of E can be included in the corresponding domain names of C
In can with environmental tag information " d00E ", if then " d00A ", " d00C ", " d00E " these three environmental tag informations have association close
System, when environment is divided, it is also possible to which A, C, E are divided into same environment.
Described " division " is illustrated.The application is not limited the specific embodiment of " division " this action,
Such as, each machine being divided into at least two environment can be specifically:Each machine is divided at least two groups, the machine in each group
Device belongs to same environment;Or, each machine is divided at least two domains, the machine in each domain belongs to same environment;Or
Person, the incidence relation set up between each machine sets up relevant machine and belongs to same environment, at least two rings
Border;Etc..
Further, each environment for marking off is isolated, can be specifically included:By running predetermined policy, to drawing
Each environment for separating is isolated, so that machine in each environment after isolation is when will obtain the service that each machine is provided
When, according to the environmental tag information included in the corresponding domain name of the machine, institute is obtained from the machine in the environment belonging to the machine
State service.
The example of continuation previous step S101 is illustrated.Environment is carried out to A, B, C, D, E, F using the method in Fig. 1
After isolation, two environment, the respectively environment comprising A, C, E, the environment comprising B, D, F are isolated.Then when E will obtain charge clothes
During business, chargeable service can be obtained, without being not belonging to from E from the A for belonging to same environment with E according to environmental tag information
The B of same environment obtains chargeable service;Similarly, when F will obtain inquiry into balance to be serviced, can be believed according to environmental mark
Breath, chargeable service is obtained from the D for belonging to same environment with F, without obtaining charge clothes from the C that same environment is not belonging to F
Business.
In the embodiment of the present application, as it was previously stated, environmental tag information can be the predetermined portions of corresponding domain name.In reality
In the application of border, in order to improve the ease for use (such as, checking environmental tag information for the ease of user) of environmental tag information, can be with
By the whole or predetermined portions of the preset label (can be specifically one or more labels) in domain name (in generally being domain name
Some label), as the environmental tag information included in the domain name.
It is by second label in domain name, as the environment included in the domain name in the example of previous step S101
Flag information, it is necessary to explanation, the position of environmental tag information in upper example in domain name is a kind of example, is not
Restriction to the application.Environmental tag information can also be in domain name other positions, such as, for A, C, E, it is also possible to will
" d001 " and " a " as environmental tag information, in this case, be by second in domain name and the 3rd label,
As the environmental tag information included in the domain name, etc..
A kind of network environment partition method that the embodiment of the present application is provided is illustrated above.By explanation above
Understand, carrying out the purpose of network environment isolation is:Allow the machine ring automatically belonging to the machine for needing to service
Machine in border obtains the service, and need not rely on manual configuration address of service of the prior art.The embodiment of the present application is also carried
A kind of service acquisition method is supplied, in actual applications, can have been isolated by the network environment carried out in Fig. 1 and be realized that the service is obtained
Method is taken, Fig. 2 is a kind of schematic flow sheet of service acquisition method.
The executive agent of the flow in Fig. 2 can be the machine in the network, when machinery requirement is obtained to be serviced, can be with
Perform the flow in Fig. 2.Flow in Fig. 2 may comprise steps of:
S201:According to the environmental tag information included in itself corresponding domain name, the environment belonging to itself, the ring are determined
Border be each machine in network domain name in the environmental tag information that includes divide.
In the embodiment of the present application, " itself " be the executive agent of the flow in Fig. 2.
S202:Obtain the corresponding domain name of machine that the service is provided in the environment.
In the embodiment of the present application, according to the environmental tag information included in itself corresponding domain name, itself can be obtained
The corresponding domain name of each machine in affiliated environment.It is possible to further according to service mark information, in the domain of each machine
In name, it is determined that the corresponding domain name of the machine for providing the service, specific embodiment is the application do not limit.
Wherein, service mark information may be used to indicate that what kind of service corresponding machine provides.Such as, in previous step
In the example of S101, the label " charge " in the corresponding domain name of A, B can be as service mark information, for showing that A, B are carried
For chargeable service, the label " acctrans " in the corresponding domain name of C, D can be as service mark information, for showing that C, D are carried
For inquiry into balance service.Certainly, in actual applications, service mark information can also be not included in domain name, and can be use
Single field is recorded.
S203:According to the domain name for obtaining, the machine that the service is provided from the environment obtains the service.
By the method in Fig. 2, without manual configuration address of service of the prior art, and can be based on being wrapped in domain name
The environmental tag information for containing, automatically obtains address of service (domain name obtained in as step S202), therefore, it can save
Manpower, it is cost-effective.
Environmental tag information in Fig. 2 can be the whole or predetermined portions of the preset label in corresponding domain name, in Fig. 2
Network can be predetermined distributed network.
Based on same thinking, the embodiment of the present application additionally provides another service acquisition method, and Fig. 3 is the another kind
The schematic flow sheet of service acquisition method.
The executive agent of the flow in Fig. 3 can be the machine in network, when machinery requirement is obtained to be serviced, can perform
Flow in Fig. 3.Flow in Fig. 3 may comprise steps of:
S301:The corresponding domain name of machine of the service is provided in acquisition network.
In the embodiment of the present application, the corresponding domain name of machine that the service is provided in network can be by executive agent one
One obtain, or be supplied to executive agent after being obtained by another machine in the network.
S302:According to the environmental tag information included in each domain name for obtaining, and included in itself corresponding domain name
Environmental tag information, the corresponding domain name of machine that determination belongs to equivalent environment with itself in each domain name
S303:The service is obtained from the corresponding machine of domain name for determining.
By the method in Fig. 3, without manual configuration address of service of the prior art, and can be based on being wrapped in domain name
The environmental tag information for containing, automatically obtains address of service (domain name determined in as step S302), therefore, it can save
Manpower, it is cost-effective.
Network environment partition method above to the embodiment of the present application offer, service acquisition method are illustrated.In order to
Further aid understands the advantage of the scheme compared to prior art of the application, and the example of previous step S101 is continued to use below,
The scheme of the application and prior art are compared explanation.
A kind of practical application scene (the as scene of the example of previous step S101) that Fig. 4 is provided for the embodiment of the present application
Under network diagram, A~F and configuration center are all the machines in the network.
In the prior art, when E needs chargeable service, chargeable service address can be obtained (as from configuration center:A
Domain name, the domain name of B), to for E provide service address of service be customized if, then need be E manual configurations service
Address (being such as, the domain name of A by address of service manual configuration), then E can be obtained and receive according to the address of service of manual configuration from A
Take service, without obtaining chargeable service from B, by manual configuration address of service, indeed achieve the isolation of network environment, than
Such as, behind manual configuration address of service, E and A is belonging to same environment, and the environment is isolated with the environment belonging to B.
But, this several machines in Fig. 4, and the clothes for providing may be provided in actual applications, in the network
Business is also far above chargeable service and inquiry into balance services both, to the mechanical hand for all Demand and services in the network
Work configuration service address, to realize that network environment is isolated, then workload is very big, and high cost, efficiency is low.
And when carrying out Network Isolation and obtaining service using the scheme of the application, can be according to the ring included in domain name
Border flag information, automatically to the network in each machine be environmentally isolated, to cause that the machine of Demand and service can be with
According to environmental tag information, automatically determine address of service and obtain service, and need not use and match somebody with somebody by hand in the prior art
The mode of address of service is put, therefore, compared to prior art, manpower can be saved, it is cost-effective, improve efficiency.
It should be noted that in the prior art, the environment mark not comprising such as " d001 ", " d002 " etc in each domain name
Will information.
In the embodiment of the present application, the specific framework to the network is not limited, and the network can be towards clothes
The network of business framework (Service-Oriented Architecture, SOA), or the network of other frameworks.
It is above network environment partition method, service acquisition method that the embodiment of the present application is provided, based on same thinking,
The embodiment of the present application also provides corresponding network environment isolating device, service acquisition square law device, as shown in Fig. 5, Fig. 6, Fig. 7.
The network environment isolating device structural representation corresponding to Fig. 1 that Fig. 5 is provided for the embodiment of the present application, including:
Acquisition module 501, obtains the corresponding domain name of each machine in network, and environmental tag information is included in domain name;
Isolation module 502, according to the environmental tag information included in the corresponding domain name of each machine, to each machine
It is environmentally isolated.
Alternatively, isolation module 502, according to the environmental tag information included in the corresponding domain name of each machine, by institute
State each machine and be divided at least two environment, and each environment to marking off is isolated.
Alternatively, isolation module 502, by running predetermined policy, each environment to marking off is isolated, so that isolation
The machine in each environment afterwards is included when to obtain the service that each machine is provided according in the corresponding domain name of the machine
Environmental tag information, obtain the service from the machine in the environment belonging to the machine.
Alternatively, the environmental tag information is the preset label in corresponding domain name.
Alternatively, the network is predetermined distributed network.
Device in Fig. 5 specifically may be located on the machine in the network.
The service acquisition apparatus structure schematic diagram corresponding to Fig. 2 that Fig. 6 is provided for the embodiment of the present application, including:
Environment determination module 601, according to the environmental tag information included in itself corresponding domain name, determines belonging to itself
Environment, the environment is that the environmental tag information included in the corresponding domain name of each machine in network is divided;
Domain Name acquisition module 602, determines to provide the corresponding domain name of machine of the service in the environment;
Service acquisition module 603, according to the domain name for determining, the machine that the service is provided from the environment obtains described
Service.
Alternatively, the environmental tag information is the preset label in corresponding domain name.
Alternatively, the network is predetermined distributed network.
Device in Fig. 6 specifically may be located on the machine in the network.
The service acquisition apparatus structure schematic diagram corresponding to Fig. 3 that Fig. 7 is provided for the embodiment of the present application, including:
Domain Name acquisition module 701, provides the corresponding domain name of machine of the service in acquisition network;
Domain name determining module 702, according to the environmental tag information included in each domain name for obtaining, and itself corresponding domain
The environmental tag information that includes in name, the corresponding domain name of determination belongs to equivalent environment with itself in each domain name machine;
Service acquisition module 703, the service is obtained from the corresponding machine of domain name for determining.
Alternatively, the environmental tag information is the preset label in corresponding domain name.
Alternatively, the network is predetermined distributed network.
Device in Fig. 7 specifically may be located on the machine in the network.
The method that the device that the application is provided is with the application is provided is one-to-one, therefore, device also have with it is corresponding
The similar Advantageous Effects of method, because the Advantageous Effects above to each method have been described in detail, because
This, repeats no more the Advantageous Effects of corresponding each device here.
It should be understood by those skilled in the art that, embodiments of the invention are provided as method, system or computer program producing
Product.Therefore, the present invention can be using the implementation in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
The form of example.And, the present invention can be used can in one or more computers for wherein including computer usable program code
With the computer program product implemented on storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Form.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram are described.It should be understood that every first-class during flow chart and/or block diagram can be realized by computer program instructions
The combination of flow and/or square frame in journey and/or square frame and flow chart and/or block diagram.These computer programs are provided to refer to
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is made to produce
One machine so that produced for realizing by the instruction of computer or the computing device of other programmable data processing devices
The device of predetermined function in one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy
In determining the computer-readable memory that mode works so that instruction of the storage in the computer-readable memory is produced and include finger
Make the manufacture of device, the command device realize in one flow of flow chart or multiple one square frame of flow and/or block diagram or
Predetermined function in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented treatment, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
In individual square frame or multiple square frames the step of predetermined function.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium
Example.
Computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be by any method
Or technology realizes information Store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, can be used to store the information that can be accessed by a computing device.Defined according to herein, calculated
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
Also, it should be noted that term " including ", "comprising" or its any other variant be intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of key elements not only include those key elements, but also wrapping
Include other key elements being not expressly set out, or also include for this process, method, commodity or equipment is intrinsic wants
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described
Also there is other identical element in process, method, commodity or the equipment of element.
It will be understood by those skilled in the art that embodiments herein is provided as method, system or computer program product.Cause
This, the application can be using the shape of the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Formula.And, the application can be used can use storage in one or more computers for wherein including computer usable program code
The form of the computer program product implemented on medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.).
Embodiments herein is the foregoing is only, the application is not limited to.For those skilled in the art
For, the application can have various modifications and variations.It is all any modifications made within spirit herein and principle, equivalent
Replace, improve etc., within the scope of should be included in claims hereof.