Summary of the invention
In view of the above technical problems, this specification embodiment provides a kind of side that sandbox debugging is realized based on shadow link
Method, device and service server, technical solution are as follows:
According to this specification embodiment in a first aspect, provide it is a kind of based on shadow link realize sandbox debugging method,
The described method includes:
Receive the business interface call request that client is sent, wherein the business interface call request at least carries
Interface message, the caller mark of business interface to be called, the caller mark are used for identifying to log in the client
The user identity at family, the user identity are following one of them: user on sandbox test user, true line;
The caller carried in the business interface call request is identified;
If recognition result indicates that the user identity of login user in the client is sandbox test user, and described wait adjust
It has been contracted with business interface, has then called the business interface to be called using preconfigured shadow link, wherein the shadow
Link simulations are and mutually isolated with the true line uplink in true line uplink;
The call result for being directed to the business interface to be called is returned to the client.
According to the second aspect of this specification embodiment, a kind of device that sandbox debugging is realized based on shadow link is provided,
Described device includes:
First receiving module, for receiving the business interface call request of client transmission, wherein the business interface tune
Interface message, the caller mark of business interface to be called are at least carried with request, the caller mark is for identifying
The user identity of login user in client is stated, the user identity is following one of them: on sandbox test user, true line
User;
Identification module is identified, for knowing to the caller carried in the business interface call request
Not;
Interface calling module, if indicating the user identity of login user in the client for sandbox survey for recognition result
Family on probation, and the business interface to be called has been contracted, then calls the business to be called using preconfigured shadow link
Interface, wherein the shadow link simulations are in true line uplink, and isolation related to the true line uplink;
First return module, for returning to the call result for being directed to the business interface to be called to the client.
According to the third aspect of this specification embodiment, a kind of service server is provided, including memory, processor and deposit
Store up the computer program that can be run on a memory and on a processor, wherein the processor is realized when executing described program
Any method that sandbox debugging is realized based on shadow link that this specification embodiment provides.
Technical solution provided by this specification embodiment, the business interface call request sent by receiving client,
Wherein, which at least carries the interface message of business interface to be called, caller mark, the caller
The user identity for identifying login user in client is identified, which is that sandbox tests user or true line
Upper user;The caller carried in business interface call request is identified;If recognition result indicates to step in client
The user identity for employing family is that sandbox tests user, and business interface to be called has been contracted, then utilizes preconfigured shadow chain
Call business interface to be called in road, wherein shadow link simulations in true line uplink, and with true line uplink mutually every
From;The call result for being directed to the business interface to be called is returned to client, is realized using environment on line and network and is mentioned
For sandbox testing service, to improve the stability of sandbox testing service, also just it has been effectively ensured based on sandbox testing service
Carry out the effect of business interface debugging.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
This specification embodiment can be limited.
In addition, any embodiment in this specification embodiment does not need to reach above-mentioned whole effects.
Embodiment one:
Fig. 2 is referred to, shadow link is based on for one kind that one exemplary embodiment of this specification provides and realizes sandbox debugging
Method embodiment flow chart, method includes the following steps:
Step 202: receiving the business interface call request that client is sent, wherein business interface call request is at least taken
Interface message, caller mark with business interface to be called, the caller are identified for identifying login user in client
User identity, which is following one of them: sandbox tests user, user in true line.
In this specification embodiment, aol server cluster 120 exemplified by Fig. 1 can handle normal business simultaneously and connect
Mouth call request and the business interface call request for sandbox test, in order to distinguish the two classes business interface call request, industry
Interface call request be engaged in addition to the interface message (such as interface name) for carrying business interface to be called, can also carry
Caller mark, which identifies the user identity for identifying login user in client, wherein the user identity can be with
User on user or true line is tested for sandbox.
In this specification embodiment, above-mentioned business interface to be called has been contracted, that is, has opened debugging permission, so that
Sandbox test user can debug the business interface to be called.
In one embodiment, above-mentioned caller mark may include the user account of login user in client, this field
It is understood that the user account is that sandbox tests the pre- first to file of user, specific application process refers to technical staff
Associated description in following embodiments two is not described further first herein.
Based on foregoing description it is found that can distinguish sandbox by caller mark tests user in user and true line, that
, sandbox tests user can be with different from the respective user account of user in true line.In one embodiment, sandbox is tested
It may include in the character string of specified format, such as the user account of sandbox test user in the user account of user including "@
The character string of this specified format of test ", in another example sandbox test user user account in most end two for letter.
Step 204: the caller carried in business interface call request is identified.
Based on the associated description in above-mentioned steps 202, in this step, then it can identify that the business interface received calls
Whether include the character string of specified format in the user account carried in request, it, can be with if including the character string of specified format
Show that the user identity for indicating login user in client is the recognition result that sandbox tests user;Conversely, if not including
The character string of specified format is, it is concluded that the user identity for indicating login user in client is the identification of user in true line
As a result.
Based on application scenarios exemplified by Fig. 1, can the gateway of example as shown in Figure 1 execute the step.
Step 206: if recognition result indicates that the user identity of login user in client is sandbox test user, and described
Business interface to be called has been contracted, then calls the business interface to be called using preconfigured shadow link, wherein shadow chain
Road is simulation in true line uplink, and the link mutually isolated with the true line uplink.
In this specification embodiment, if the recognition result of step 204 indicates the user identity of login user in client
User is tested for sandbox, and when business interface to be called has been contracted, then can use that preconfigured shadow link calls should be to
Call business interface.
Shadow link simulations true line uplink in this specification embodiment, the major function with true line uplink
And main logic, although being also based on the realization of online service cluster, it is mutually isolated with true line uplink, from
And data on true line can be avoided pollution.
Based on application scenarios exemplified by Fig. 1, can the operation system of example as shown in Figure 1 execute the step.
It should be noted that in this specification embodiment, in order to realize test data in true line data it is complete
Isolation can will be called caused by business interface to be called using shadow link and data is called to be stored in preconfigured shadow
In tables of data, the shadow tables of data can tables of data be mutually isolated on the line of calling data in true line with for storing.
It in one embodiment, can be by the way that two class tables of data be deposited in different databases, to realize the correlation of the two
Isolation.
It in another embodiment, can be by by the storage of two class tables of data and same database, but in the form of different tables
Realize the related isolation of the two.
Step 208: the call result for being directed to business interface to be called is returned to client.
In addition, crossing multiprocessing in this specification embodiment in order to avoid aol server cluster 120 and being tested from sandbox
The business interface call request of user, and business on true line is influenced, it proposes to lay monitoring in server cluster 120 on line
System and operational system (not shown in figure 1), to pass through the monitoring system and operational system to the industry for testing user from sandbox
Business interface call request carries out security control or cuts stream process work, specifically, can be for what is received, sandbox tests user
The business interface call request that the client logged in is sent is counted;If statistical result meets pre-set control strip
Part, then when newly receiving the business interface call request that the client that is logged in of sandbox test user is sent, according to setting in advance
The control strategy set handles the business interface call request newly received.
In one embodiment, above-mentioned pre-set control condition can be with are as follows: in preset time period, receive from sand
The quantity of the business interface call request of case test user reaches certain amount rank, such as reaches preset threshold.
In one embodiment, above-mentioned pre-set control strategy can be with are as follows: at the appointed time in section, refusal processing is newly connect
The business interface call request from sandbox test user received;Either, what delay process newly received surveys from sandbox
The business interface call request at family on probation.
It will be appreciated by persons skilled in the art that above-mentioned about pre-set control condition, pre-set control
The associated description of strategy is as just citing, in practical applications, pre-set control condition, pre-set control strategy
Can also be other forms, this specification embodiment to this with no restriction.
Technical solution provided by this specification embodiment, the business interface call request sent by receiving client,
Wherein, which at least carries the interface message of business interface to be called, caller mark, the caller
The user identity for identifying login user in client is identified, which is that sandbox tests user or true line
Upper user;The caller carried in business interface call request is identified;If recognition result indicates to step in client
The user identity for employing family is that sandbox tests user, and business interface to be called has been contracted, then utilizes preconfigured shadow chain
Call business interface to be called in road, wherein shadow link simulations in true line uplink, and with true line uplink mutually every
From;The call result for being directed to the business interface to be called is returned to client, is realized using environment on line and network and is mentioned
For sandbox testing service, to improve the stability of sandbox testing service, also just it has been effectively ensured based on sandbox testing service
Carry out the effect of business interface debugging.
So far, the associated description of embodiment one is completed.
Embodiment two:
Illustrate first, on the basis of the above embodiment 1, to sandbox, test user carries out user's registration to the embodiment two
Entire flow to finishing service interface debugging is illustrated.
Fig. 3 is referred to, shadow link is based on for the another kind that one exemplary embodiment of this specification provides and realizes sandbox tune
The embodiment flow chart of the method for examination, method includes the following steps:
Step 302: receiving the sandbox test account application request that client is sent, which tests account application request and use
Apply for user account in testing user for sandbox, and account application is tested according to the sandbox and requests to return to user's account to client
Number, wherein the user account returned includes the character string of specified format.
In this specification embodiment, sandbox tests user can be by the client 110 and aol server collection exemplified by Fig. 1
System platform in group 120 sends sandbox test account application request, aol server cluster to aol server cluster 120
Operation system in 120 is then handled sandbox test account application request, specifically, testing account according to the sandbox
Application request generates user account, and returns to the user account to client 110 by system platform.
It should be noted that including the character string of specified format in the user account of the return, to identify the use of the return
Family account belongs to sandbox test user.
The detailed process that account application request generates user account, art technology are tested according to sandbox as operation system
Personnel may refer to associated description in the prior art, this is no longer described in detail in this specification embodiment.
Step 304: receiving the gateway code key application request that client is sent, gateway code key application request is for being sandbox
It tests user and applies for gateway code key, and requested to return to gateway code key to client according to the gateway code key application.
In this specification embodiment, in order to ensure the safety of follow-up business interface calling, sandbox test user may be used also
To pass through client 110 exemplified by Fig. 1 and the system platform in aol server cluster 120, to aol server cluster 120
It sends the application of gateway code key to request, which requests to be used for test user's application gateway code key for the sandbox, on line
Gateway in server cluster 120 is then handled gateway code key application request, specifically, according to the gateway code key Shen
It please request to generate gateway code key, and the gateway code key is returned to client 110 by system platform.
The detailed process of generation gateway code key is requested according to the gateway code key application as gateway, those skilled in the art can
With referring to associated description in the prior art, this is no longer described in detail in this specification embodiment.
Step 306: receiving the business interface test request that client is sent, wherein business interface test request is at least taken
Interface message with business interface to be called.
In this specification embodiment, sandbox test user can utilize the use applied in above-mentioned steps 302 and step 304
Family account logs in the system platform of aol server cluster 120, sends industry to aol server cluster 120 by the system platform
Business interface testing request, the business interface test request at least carry the interface message of business interface to be called, such as interface
Title.
Step 308: determining whether business interface to be called has contracted, if unsigned, then follow the steps 310;If having contracted,
Then follow the steps 312;
It, can be in advance to certain during being pre-configured to aol server cluster 120 in this specification embodiment
A little business interfaces are contracted, namely open the debugging permission of the business interface.
It is subsequent, after receiving business interface test request, it can first determine whether indicated by the business interface test request
Whether business interface to be called has contracted, if so, step 312 can be executed directly;If unsigned, 310 are thened follow the steps.
Step 310: contracting to business interface to be called, to open the debugging permission of business interface to be called.
Step 312: returning to client for indicating the application result for allowing to debug business interface to be called.
Step 314: the business interface call request that client is sent is received, to the tune carried in business interface call request
User identifies, if recognition result indicates that the user identity of login user in client is that sandbox tests user, benefit
Business interface to be called is called with preconfigured shadow link, the calling knot for being directed to business interface to be called is returned to client
Fruit.
In this specification embodiment, client 110 receives allowing for expression for the return of aol server cluster 120
After the application result debugged to business interface to be called, this application can be tested user to sandbox as the result is shown, so as to sand
Case test user continues through client 110 and the system platform of aol server cluster 120 is sent out to aol server cluster 120
Business interface call request is sent, aol server cluster 120 then can be found in based on the processing that the business interface call request is done
Description in above-described embodiment one is not repeated to describe herein.
It should be noted that can also carry the net applied in above-mentioned steps 204 in the business interface call request
Code key is closed, then, the gateway in aol server cluster 120 is then secret to the gateway carried in the business interface call request first
Key is verified, and after verification passes through, then turns the shadow link calling business interface to be called of operation system.
Technical solution provided by above-described embodiment realizes using environment on line and network and provides sandbox test clothes
Business has also just been effectively ensured to improve the stability of sandbox testing service and has carried out business interface based on sandbox testing service
The effect of debugging.
So far, the associated description of embodiment two is completed.
Corresponding to above method embodiment, this specification embodiment also provides a kind of based on the realization sandbox debugging of shadow link
Device, refer to Fig. 4, for one exemplary embodiment of this specification provide it is a kind of based on shadow link realize sandbox debugging
The embodiment block diagram of device, the apparatus may include: the first receiving module 41, mark identification module 42, interface calling module 43,
And first return module 44.
Wherein, the first receiving module 41 can be used for receiving the business interface call request of client transmission, wherein institute
It states business interface call request and at least carries the interface message of business interface to be called, caller mark, the caller mark
Know the user identity for identifying login user in the client, the user identity is following one of them: sandbox test
User on user, true line;
Identify identification module 42, can be used for identifying the caller carried in the business interface call request into
Row identification;
Interface calling module 43, if can be used for recognition result indicates that the user identity of login user in the client is
Sandbox tests user, and the business interface to be called has been contracted, then is called using preconfigured shadow link described wait adjust
With business interface, wherein the shadow link simulations are in true line uplink, and isolation related to the true line uplink;
First return module 44 can be used for returning to the calling knot for being directed to the business interface to be called to the client
Fruit.
In one embodiment, described device can also include (being not shown in Fig. 4):
Second receiving module, for receiving the business interface test request of client transmission, wherein the business interface is surveyed
Examination request at least carries the interface message of business interface to be called;
Determining module, for determining whether the business interface to be called has contracted;
Module of contracting signs the business interface to be called if unsigned for the business interface to be called
About, to open the debugging permission of the business interface to be called.
In one embodiment, described device can also include (being not shown in Fig. 4):
Memory module calls data for that will call using the shadow link caused by the business interface to be called
It is stored in preconfigured shadow tables of data;
Wherein, tables of data is mutually isolated on the line of calling data in true line with for storing for the shadow tables of data.
In one embodiment, described device can also include (being not shown in Fig. 4):
Statistical module, for for what is received, sandbox to test the business interface tune that the client that user is logged in is sent
It is counted with request;
Processing module, if meeting pre-set control condition for statistical result, when the sandbox test newly received
When the business interface call request that the client that user is logged in is sent, newly connect according to the processing of pre-set control strategy is described
The business interface call request received.
In one embodiment, the caller mark includes: user account;
The mark identification module 42 is specifically used for:
Identify in the user account carried in the business interface call request whether include specified format character string;If
Character string in the user account including specified format is, it is concluded that for indicating user's body of login user in the client
Part is the recognition result that sandbox tests user;If not including the character string of specified format in the user account, it is concluded that being used for
The user identity for indicating login user in the client is the recognition result of user in true line.
In one embodiment, the business interface call request also carries gateway code key;
The interface calling module 43 is specifically used for:
The gateway code key carried in the business interface call request is verified;If verification passes through, using in advance
The shadow link of configuration calls the business interface to be called.
In one embodiment, described device can also include (being not shown in Fig. 4):
Third receiving module, for receiving the sandbox test account application request of client transmission, the sandbox tests account
Number application request for for sandbox test user apply user account;
Second return module requests to return to user's account to the client for testing account application according to the sandbox
Number, wherein the user account returned includes the character string of specified format;
4th receiving module, for receiving the gateway code key application request of client transmission, the gateway code key application is asked
It asks and applies for gateway code key for testing user for the sandbox;
Third return module returns to gateway code key to the client for requesting according to the gateway code key application.
It is understood that the first receiving module 41, mark identification module 42, interface calling module 43 and first return
Module of the module 44 as four kinds of functional independences is returned, can both have been configured simultaneously as shown in Figure 4 in a device, it can also be individually
It configures in a device, therefore structure shown in Fig. 4 should not be construed as the restriction to this specification example scheme.
In addition, the function of modules and the realization process of effect are specifically detailed in the above method corresponding step in above-mentioned apparatus
Rapid realization process, details are not described herein.
This specification embodiment also provides a kind of service server, includes at least memory, processor and is stored in
On reservoir and the computer program that can run on a processor, wherein processor realizes one kind above-mentioned when executing described program
Based on the method that shadow link realizes sandbox debugging, this method is included at least: being received the business interface calling that client is sent and is asked
It asks, wherein the business interface call request at least carries the interface message of business interface to be called, caller mark, institute
It states caller and identifies user identity for identifying login user in the client, the user identity is following wherein one
: user on sandbox test user, true line;The caller mark carried in the business interface call request is carried out
Identification;If recognition result indicates that the user identity of login user in the client is sandbox test user, and described to be called
Business interface has been contracted, then calls the business interface to be called using preconfigured shadow link, wherein the shadow chain
Road is simulated in true line uplink, and mutually isolated with the true line uplink;To the client return for it is described to
Call the call result of business interface.
Fig. 5 shows one kind provided by this specification embodiment, and more specifically service server hardware configuration is illustrated
Figure, the service server may include: processor 510, memory 520, input/output interface 530, communication interface 540 and total
Line 550.Wherein processor 510, memory 520, input/output interface 530 and communication interface 540 realize that by bus 550
Communication connection between this inside equipment.
Processor 510 can use general CPU (Central Processing Unit, central processing unit), micro process
Device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one or
The modes such as multiple integrated circuits are realized, for executing relative program, to realize technical solution provided by this specification embodiment.
Memory 520 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 520 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 520, and execution is called by processor 510.
Input/output interface 530 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration and (be not shown in Fig. 5) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 540 is used for connection communication module (being not shown in Fig. 5), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 550 includes an access, in various components (such as the processor 510, memory 520, input/output of equipment
Interface 530 and communication interface 540) between transmit information.
It should be noted that although above equipment illustrates only processor 510, memory 520, input/output interface
530, communication interface 540 and bus 550, but in the specific implementation process, which can also include realizing to operate normally
Necessary other assemblies.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising realizing in above equipment
Component necessary to this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
It realizes that the method above-mentioned for realizing sandbox debugging based on shadow link, this method include at least when sequence is executed by processor: receiving
The business interface call request that client is sent, wherein the business interface call request at least carries business to be called and connects
Interface message, the caller mark of mouth, the caller identify the user identity for identifying login user in the client,
The user identity is following one of them: user on sandbox test user, true line;To in the business interface call request
The caller carried is identified;If recognition result indicates the user identity of login user in the client for sand
Case tests user, and the business interface to be called has been contracted, then is called using preconfigured shadow link described to be called
Business interface, wherein the shadow link simulations are and mutually isolated with the true line uplink in true line uplink;To
The client returns to the call result for being directed to the business interface to be called.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description
Module may or may not be physically separated, can be each module when implementing this specification example scheme
Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or
Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor
Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.