CN109818836A - Service cut-in method, device, computer equipment and computer storage medium - Google Patents
Service cut-in method, device, computer equipment and computer storage medium Download PDFInfo
- Publication number
- CN109818836A CN109818836A CN201811325359.0A CN201811325359A CN109818836A CN 109818836 A CN109818836 A CN 109818836A CN 201811325359 A CN201811325359 A CN 201811325359A CN 109818836 A CN109818836 A CN 109818836A
- Authority
- CN
- China
- Prior art keywords
- service
- client
- request
- background
- side information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Abstract
This application discloses a kind of service cut-in method, device, computer equipment and computer storage mediums, are related to micro services framework field, can save service turn-on time more easily from the service for reading calling needed for client in relevant database.The described method includes: background service is disassembled in the form of fields, the service element after being disassembled;The mapping relations between service element and client-side information after obtaining dismantling store the mapping relations between the service element and client-side information after the dismantling into relevant database according to default binding rule;When receiving the background service access request of client transmission, searched from the relevant database according to the client-side information carried in the background service access request and multiple service elements of the client-side information phase mapping;The corresponding background service of service request is determined for compliance with according to multiple service elements with the client-side information phase mapping;The service element met after service request corresponding background service dismantling is pushed into client, so that client carries out service access.
Description
Technical field
The present invention relates to micro services framework fields, particularly with regard to service cut-in method, device, computer equipment and meter
Calculation machine storage medium.
Background technique
API gateway is a server, the internal system framework that has been the sole inlet of system its enclosed inside, is each visitor
Family end provides a customization API, can provide API Access for the end Web, the end APP, can also provide API to internet of things equipment and connect
Mouthful.
As the sole inlet of all clients, API gateway can summarize each background service of application program together,
After the request that all client is sent such as will be authenticated by unified API gateway, be checked at the operation, then will request forwarding
To background service, so that API gateway calls correlation background service API to be back to client, to realize that the service of client connects
Enter.
In actual application, the access serviced for the ease of client, API gateway can be in advance by each backstages
Service configuration calls corresponding background service API to be back to client in default file, and according to the request content of client
End.However, increasing with quantity of service, the service content that the default file in API gateway is carried also increases therewith, so that
Reading from numerous service content needs the service API called than relatively time-consuming, is also easy to appear mistake, enhances the maintenance of service
Difficulty.
Summary of the invention
In view of this, the present invention provides the storages of a kind of service cut-in method, device, computer equipment and computer to be situated between
Matter, main purpose are to solve the problems, such as to service that access procedure is time-consuming and fallibility in presently relevant technology.
According to the present invention on one side, a kind of service cut-in method is provided, comprising:
Background service is disassembled in the form of fields, the service element after being disassembled;
The mapping relations between service element and client-side information after obtaining dismantling, will be described according to default binding rule
The mapping relations between service element and client-side information after dismantling are stored into relevant database;
When receiving the background service access request of client transmission, carried according in the background service access request
Client-side information searched from the relevant database with multiple service elements of the client-side information phase mapping;
According to multiple service elements with the client-side information phase mapping be determined for compliance with service request it is corresponding after
Platform service;
The service element met after service request corresponding background service dismantling is pushed into client, so as to client
End carries out service access.
Further, described to disassemble background service in the form of fields, the service element after being disassembled includes:
It is defined according to the property parameters of the background service and splits field;
The background service is disassembled according to the fractionation field, the service element after being disassembled.
Further, the mapping relations between the service element and client-side information obtained after disassembling, comprising:
By whether there is binding service in inquiry background service, the mapping between background service and client-side information is determined
Relationship;
Service element and client according to the mapping relations between described service and client-side information, after obtaining dismantling
Mapping relations between information.
Further, the service request carry request service unique identification, it is described according to the client
Multiple service elements of client information phase mapping are determined for compliance with the corresponding background service of service request
The request access service is searched only from multiple service elements with the client-side information phase mapping
One mark;
It is corresponding as service request is met that the unique identification of the request access service is serviced into corresponding background service
Background service.
Further, the service element met after service request corresponding background service dismantling is pushed to described
Client, before carrying out service access so as to client, the method also includes:
Pre-generated safety information table is sent to the client and carries out safety verification, is recorded in the safety information table
The security information that oriented client is asked for;
According to the security information of the client feedback received, Xiang Suoshu client sends asking for background service access
Ask response.
Further, the security information for the client feedback that the basis receives, after Xiang Suoshu client is sent
The request of platform service access, which responds, includes:
When the security information of the client feedback meets default safety condition, then sent to the client after agreeing to
The request response of platform service access;
When the security information of the client feedback does not meet default safety condition, then sends and refuse to the client
The request response of background service access.
Further, background service is disassembled in the form of fields described, the service element after being disassembled it
Before, the method also includes:
Field division is carried out to background service according to background service corresponding business scope, obtains the backstage clothes of different field
Business.
According to the present invention on the other hand, a kind of service access device is provided, described device includes:
Disassemble unit, for disassembling background service in the form of fields, the service element after being disassembled;
Acquiring unit, for obtaining the mapping relations between the service element and client-side information after disassembling, according to default
Binding rule stores the mapping relations between the service element and client-side information after the dismantling into relevant database;
Searching unit, for when receive client transmission background service access request when, according to the background service
The client-side information carried in access request is searched more with the client-side information phase mapping from the relevant database
A service element;
Determination unit, for being determined for compliance with service according to multiple service elements with the client-side information phase mapping
Request corresponding background service;
Access unit, for the service element met after service request corresponding background service dismantling to be pushed to visitor
Family end, so that client carries out service access.
Further, the dismantling unit includes:
Definition module splits field for defining according to the property parameters of the background service;
Disassemble module, for disassembling according to the fractionation field to the background service, the service after being disassembled
Element.
Further, the acquiring unit includes:
First determining module, for determining background service and visitor by whether there is binding service in inquiry background service
Mapping relations between the client information of family;
Module is obtained, for the clothes according to the mapping relations between described service and client-side information, after obtaining dismantling
The mapping relations being engaged between element and client-side information.
Further, the service request carries the unique identification of request service, and the determination unit includes:
Searching module, for searching the request from multiple service elements with the client-side information phase mapping
The unique identification of access service;
Second determining module, for the unique identification of the request access service to be serviced corresponding background service as symbol
Close the corresponding background service of service request.
Further, described device further include:
First transmission unit, for meeting the service unit after the corresponding background service of service request is disassembled for described described
Element pushes to client, and before carrying out service access so as to client, Xiang Suoshu client sends pre-generated security information
Table carries out safety verification, records the security information that oriented client is asked in the safety information table;
Second transmission unit, for the security information according to the client feedback received, Xiang Suoshu client hair
The request response for sending background service to access.
Further, second transmission unit meets default specifically for the security information when the client feedback
When safety condition, then the request response for agreeing to that background service accesses is sent to the client;
Second transmission unit is specifically also used to preset safe item when the security information of the client feedback is not met
When part, then the request response that refusal background service accesses is sent to the client.
Further, described device further include:
Division unit, for background service to be disassembled in the form of fields described, the service unit after being disassembled
Before element, field division is carried out to background service according to the corresponding business scope of background service, obtains the backstage clothes of different field
Business.
Another aspect according to the present invention provides a kind of computer equipment, including memory and processor, the storage
The step of device is stored with computer program, and the processor realizes service cut-in method when executing the computer program.
Another aspect according to the present invention provides a kind of computer storage medium, is stored thereon with computer program, institute
State the step of service cut-in method is realized when computer program is executed by processor.
By above-mentioned technical proposal, a kind of service cut-in method and device provided by the invention, and in the prior art in advance
By the configuration of each background service in default file, and according to the request content of client, the side of corresponding background service is called
Formula is compared, and the embodiment of the present invention by disassembling into service element for background service in the form of fields, due to service unit after dismantling
Element has mapping relations with background service, client respectively, and according to the regular service element and visitor by after dismantling of default binding
Mapping relations between the client information of family are stored into relevant database, realize the dynamic configuration of different clients and background service
Mapping relations reduce the maintenance difficulties of background service, when receiving the background service access request of client, by from relationship
Multiple service elements that client identification information phase mapping corresponding with background service access request is searched in type database, thus really
Surely meet the corresponding background service of service request, API gateway is allowed more easily to read visitor from relevant database
The background service called needed for the end of family, and the service element after background service is disassembled pushes to client, so as to client into
Row service access, saves service turn-on time.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of service cut-in method flow diagram provided in an embodiment of the present invention;
Fig. 2 shows another service cut-in method flow diagrams provided in an embodiment of the present invention;
Fig. 3 shows a kind of structural schematic diagram for servicing access device provided in an embodiment of the present invention;
Fig. 4 shows the structural schematic diagram of another service access device provided in an embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
The embodiment of the invention provides a kind of service cut-in method, dynamic configuration different clients may be implemented and backstage takes
Mapping relations between business, as shown in Figure 1, this method comprises:
101, background service is disassembled in the form of fields, the service element after being disassembled.
It is each during application program operation since background service is equivalent to the necessary program of support system operation
Background service, which cooperates to operate, realizes different functions, and background service is more, and the degree of coupling of system is higher, after subsequent calls
Platform service is more time-consuming, wherein service element can be the property parameters that background service defines, for example, business scope, request ground
Location, return type, parameter name etc..
For the embodiment of the present invention, background service can specifically be disassembled into field form according to the property parameters of definition
Service element, for example, the background service about purchasing management belongs to purchase, sales and stock management field, the core supported according to purchasing management
Heart business inquires the dismantling of the background service about purchasing management for newly-increased purchase order, purchase order, buying is returned goods and adopted
Purchase detail list etc..
102, the mapping relations between service element and client-side information after obtaining dismantling, will according to default binding rule
The mapping relations between service element and client-side information after the dismantling are stored into relevant database.
Since the service element after dismantling is the property parameters that define of background service, thus a background service can correspond to it is more
Service element after a dismantling.Service element after each dismantling may be corresponding with multiple background services, and if after dismantling
Service element is the unique identification of background service, then the service element is corresponding with a background service.
For the embodiment of the present invention, specifically can by check in background service whether deposit with the binding service of client come
The mapping relations between background service and client-side information are obtained, since background service is corresponding with the service unit after multiple dismantlings
Element, the mapping relations between service element and client-side information after further obtaining dismantling, will tear open according to default binding rule
The mapping relations between service element and client-side information after solution are stored into relevant database.
Wherein, the mapping relations that binding rule is equivalent between the service element and client-side information after dismantling, visitor are preset
Family client information mainly includes the unique identification of client, can also include certainly the information such as client name, client address, close
Be type database can for ORACLE, Sybase, SQL Server etc., the embodiment of the present invention to the selection of relevant database not
It is limited.
What needs to be explained here is that the main foundation of mapping relations between service element and client-side information after dismantling
It is client unique identification, due to the uniqueness of client identification, just can establish service element after a client and dismantling
Between mapping relations, if client identification is not unique, can not be obtained from relevant database accurately mapping close
System may influence the accuracy of service access.
For example, the service name for the background service that intelligent terminal M can be accessed is A1, A2, A3 etc. or the end PC N
The background server request address that can be accessed is B1, B2, B3 etc., and the embodiment of the present invention is to specific binding rule without limit
It is fixed.
It, will dismantling according to default binding rule after background service is disassembled into service element for the embodiment of the present invention
The mapping relations between service element and client-side information afterwards are stored into relevant database.Pass through the relevant database
Foundation, dynamic configuration client and background service mapping relations may be implemented, reduce the maintenance difficulties of background service.
103, when receiving the background service access request of client transmission, according in the background service access request
The client-side information of carrying is searched and multiple service elements of the client-side information phase mapping from the relevant database.
Wherein, background service access request is the request for the access background service that client is sent to API gateway, is carried
Client-side information, such as client name, client address can be identified for that the information of client identity and client are uniquely marked
Know.
For the embodiment of the present invention, which can be found from relevant database by client unique identification
Tables of data where information further searches for multiple service elements with client-side information phase mapping, for example, user is in movement
After initiating logging request on APP, mobile APP sends the logging request background service on access backstage to API gateway, due to relationship type
The mapping being stored between the unique identification of mobile APP and the service element after the dismantling of logging request background service in database is closed
System, then after searching the logging request background service dismantling with the unique identification phase mapping of mobile APP in the relevant database
Multiple service elements, can specifically include user's registering service, the IP address of login service and return type etc..
104, to be determined for compliance with service request with multiple service elements of the client-side information phase mapping according to described corresponding
Background service.
For the embodiment of the present invention, due to multiple service elements with client-side information phase mapping may be corresponding with it is multiple after
Platform service needs to be determined for compliance with the corresponding background service of service request from multiple background services,
105, the service element met after service request corresponding background service dismantling is pushed into client, so as to
Client carries out service access.
For the embodiment of the present invention, due to the background service and client-side information being stored in relevant database after disassembling
Between mapping relations, further found from relevant database and entrained client-side information requested in backstage access service
After multiple service elements of phase mapping, the corresponding background service of multiple service elements is searched, corresponding background service is pushed
To client, the information of the background service may include the interface of background service or the access way of background service etc., according to
The interface or access way of the background service, so that client be made to access background service.
The present invention provides a kind of service cut-in method, is presetting text in the prior art in advance each background service is configured
In part, and according to the request content of client, the mode of corresponding background service is called to compare, the embodiment of the present invention by will after
Service element is disassembled into platform service in the form of fields, since service element has with background service, client respectively after dismantling
Mapping relations, and according to default binding rule by the mapping relations between the service element and client-side information after dismantling store to
In relevant database, realizes the dynamic configuration mapping relations of different clients and background service, reduce the maintenance of background service
Difficulty is connect by searching from relevant database with background service when receiving the background service access request of client
Enter the multiple service elements for requesting corresponding client identification information phase mapping, so that it is determined that meeting the corresponding backstage clothes of service request
Business allows API gateway more easily from the background service for reading calling needed for client in relevant database, and will
Service element after background service dismantling pushes to client, so that client carries out service access, when saving service access
Between.
The embodiment of the invention provides another kinds to service cut-in method, can more easily read from relevant database
To the service of calling needed for client, realizes and saves service turn-on time, as shown in Figure 2, which comprises
201, it is defined according to the property parameters of the background service and splits field.
Wherein, the property parameters of background service can for background service return parameter type, service name, request address,
Version etc., here without limiting.
202, the background service is disassembled according to the fractionation field, the service element after being disassembled.
For the embodiment of the present invention, specifically during being disassembled according to fractionation field to background service, Mei Gehou
Platform service all has respective fractionation field, can disassemble into multiple service elements for different background services, here after difference
The service element possibility that platform service is disassembled out is identical may not also be identical, for example, unique mark of background service A and background service B
Know certainly not identical, background service A and background service B both version having the same.
It should be noted that since the background service in same services field has similitude on certain service elements,
Background service is disassembled for convenience, it can also be corresponding according to background service before being disassembled to background service
Business scope carries out field division to background service, the background service of different field is obtained, for the background service of same area
It is disassembled, improves the dismantling speed of background service.
For the embodiment of the present invention, can also the process between service interface and relational data database open up one piece
Memory, service element is loaded by backstage caching according to the caching function of relevant database configuration for example, using redis or
The public caching such as memcache stores the service element of field form to corresponding caching section.Specifically, when client tune
When sending background service access request with service interface, service interface directly inquires corresponding service element in redis, if
There is the service element in redis, then directly return, no longer inquiry relevant database;If there is no the service unit in redis
Element is then searched in relevant database, and the service element found is stored in redis.By service interface with
Cache layer is increased between relevant database, the response speed for accessing client significantly improves.
203, it by whether there is binding service in inquiry background service, determines between background service and client-side information
Mapping relations.
During client calls background service every time, service access is carried out in order to facilitate client, it can be in visitor
Family end creates binding service during calling background service for the first time, which is used to providing client and server
The interface interacted takes so that client realizes that background service calls by interface for example, defining a weather forecast backstage
Business, the background service can provide binding service to multiple client, if not creating binding service, client can not be accessed
To the background service.
Wherein, client-side information includes the information such as the type of client and the unique identification of client.Due to different visitors
The background service quantity and permission that family end can be accessed are different, are further tied up by whether there is in inquiry background service
Fixed service, obtains the mapping relations between client-side information and background service, is connect with guaranteeing that client can accurately complete service
Enter operation, access failure will not be led to because of more than accessing quantity or not having access authority.
For the embodiment of the present invention, specifically can by check in background service whether deposit with the binding service of client come
It determines the mapping relations between background service and client-side information, if there is binding service, then illustrates background service and client
There are mapping relations between end, if there is no binding service, then illustrate that there is no mappings to close between background service and client
System.
204, service element and visitor according to the mapping relations between described service and client-side information, after obtaining dismantling
Mapping relations between the client information of family, will be between the service element and client-side information after the dismantling according to default binding rule
Mapping relations store into relevant database.
Since background service is corresponding with the service element after multiple dismantlings, according to reflecting between platform service and client-side information
Relationship is penetrated, the mapping relations between service element and client after obtaining dismantling, for example, the movement of client identification information
The service name for the background service that the end APP can be accessed is A1, what the end PC of A2, A3 etc. or client identification can be accessed
Background server request address is B1, B2, B3 etc., here without limiting.
It should be noted that being operated in real time to the background service in relevant database for the ease of user, specifically
Service element can be imported in visualization tool, selection later needs visual service element, and determines corresponding visual
Change effect, it will be after the dismantling that stored in relevant database by big data witch mirror cloud or big data analysis cloud service tool
Service element is visualized, in order to real-time update, the visual service element of observation.
205, when receiving the background service access request of client transmission, according in the background service access request
The client-side information of carrying is searched and multiple service elements of the client-side information phase mapping from the relevant database.
Since client-side information may be mapped with multiple background services, each background service is disassembled again to be deposited for service element
It stores up to relevant database, then the service element after multiple background services dismantlings can be found in relevant database, thus
Obtain multiple service elements with client-side information phase mapping.
206, the request access service is searched from multiple service elements with the client-side information phase mapping
Unique identification.
For the embodiment of the present invention, client after transmission platform service access requests when, the background service access request meeting
Carry request access background service content, such as request data information, request check merchandise news, and in order to guarantee after
The accuracy of platform service access, requesting the background service content of access further includes requesting the unique identification of access service, further
The unique identification of request access service is extracted from the background service content of request access.Due to including service in service element
Title, address of service, and the unique identification of service etc., further from multiple service elements with client-side information phase mapping
The unique identification of search request access service.
207, the unique identification of the request access service is serviced into corresponding background service as meeting service request pair
The background service answered.
For the embodiment of the present invention, by requesting the unique identification of access service that can determine background service, which is taken
Business is the background service of client request access.
208, Xiang Suoshu client sends pre-generated safety information table and carries out safety verification, in the safety information table
Record the security information that oriented client is asked for.
Wherein, the peaces such as client identification information, client configuration channel, client request parameter are included in safety information table
Full information.Client access background service before, in order to guarantee background service access safety, it usually needs client with
And background service carries out both sides' verifying, to improve the reliability in entire service access procedure.
For the embodiment of the present invention, pre-generated safety information table progress safety verification is specifically being sent to client
In the process, firstly, API gateway can pre-generate security information by algorithm after the service request for receiving client transmission
Table, which is used to ask for security information to client, and the safety information table is sent to client;Later, objective
The trust of family end background service in order to obtain can be provided according to safety information table to API gateway after receiving safety information table
The security information such as client identification information, client configuration channel, client request parameter.
It should be noted that in order to guarantee safety in safety information table transmission process, client can be in transmission safety
Safety information table is encrypted or endorsed before information table, the meeting pair after receiving safety information table of another aspect API gateway
Safety information table is decrypted or solves label, after safety certification has passed through, searches from relevant database and takes with backstage
Business access request corresponds to the associated service element of client identification information.
209, according to the security information of the client feedback received, Xiang Suoshu client sends background service access
Request response.
Lead to after the safety information table for receiving client feedback filling security information, the security information returned according to client
The security information such as client identification information, client configuration channel, client request parameter can be got, client is carried out
Safety verification, further according to the security information of client feedback, the request for sending background service access to client is corresponding,
For the embodiment of the present invention, when the security information of client feedback meets default safety condition, sent out to client
Send the request response for agreeing to background service access;When the peace area information of client feedback does not meet default safety condition, to visitor
Family end sends the request response of refusal background service access.Here default safety condition can be configured, and such as require to return
Security information in all security information must be mutually matched, or require the security information returned that cannot have null value etc.
Deng.
210, the service element met after service request corresponding background service dismantling is pushed into client, so as to
Client carries out service access.
The present invention provides a kind of service cut-in method, is presetting text in the prior art in advance each background service is configured
In part, and according to the request content of client, the mode of corresponding background service is called to compare, the embodiment of the present invention by will after
Service element is disassembled into platform service in the form of fields, since service element has with background service, client respectively after dismantling
Mapping relations, and according to default binding rule by the mapping relations between the service element and client-side information after dismantling store to
In relevant database, realizes the dynamic configuration mapping relations of different clients and background service, reduce the maintenance of background service
Difficulty is connect by searching from relevant database with background service when receiving the background service access request of client
Enter the multiple service elements for requesting corresponding client identification information phase mapping, so that it is determined that meeting the corresponding backstage clothes of service request
Business allows API gateway more easily from the background service for reading calling needed for client in relevant database, and will
Service element after background service dismantling pushes to client, so that client carries out service access, when saving service access
Between.
Further, the specific implementation as Fig. 1 the method, the embodiment of the invention provides a kind of service accesses to fill
It sets, as shown in figure 3, described device includes: dismantling unit 31, acquiring unit 32, searching unit 33, determination unit 34, access list
Member 35.
Unit 31 is disassembled, can be used in the form of fields disassembling background service, the service unit after being disassembled
Element;
Acquiring unit 32, the mapping relations between service element and client-side information after can be used for obtaining dismantling, is pressed
The mapping relations between the service element and client-side information after the dismantling are stored to relationship type number according to default binding rule
According in library;
Searching unit 33 can be used for when receiving the background service access request of client transmission, after described
The client-side information carried in platform service access requests is searched from the relevant database to set each other off with the client-side information
The multiple service elements penetrated;
Determination unit 34 can be used for determining symbol according to multiple service elements with the client-side information phase mapping
Close the corresponding background service of service request;
Access unit 35 can be used for pushing away the service element met after service request corresponding background service dismantling
It send to client, so that client carries out service access.
The present invention provides a kind of service access device, is presetting text in the prior art in advance each background service is configured
In part, and according to the request content of client, the mode of corresponding background service is called to compare, the embodiment of the present invention by will after
Service element is disassembled into platform service in the form of fields, since service element has with background service, client respectively after dismantling
Mapping relations, and according to default binding rule by the mapping relations between the service element and client-side information after dismantling store to
In relevant database, realizes the dynamic configuration mapping relations of different clients and background service, reduce the maintenance of background service
Difficulty is connect by searching from relevant database with background service when receiving the background service access request of client
Enter the multiple service elements for requesting corresponding client identification information phase mapping, so that it is determined that meeting the corresponding backstage clothes of service request
Business allows API gateway more easily from the background service for reading calling needed for client in relevant database, and will
Service element after background service dismantling pushes to client, so that client carries out service access, when saving service access
Between.
As the further explanation for servicing access device shown in Fig. 3, Fig. 4 is another service according to embodiments of the present invention
The structural schematic diagram of access device, as shown in figure 4, described device further include:
Division unit 36 can be used for disassembling background service in the form of fields described, after being disassembled
Before service element, field division is carried out to background service according to the corresponding business scope of background service, obtains different field
Background service;
First transmission unit 37, can be used for it is described by it is described meet service request corresponding background service dismantling after
Service element pushes to client, and before carrying out service access so as to client, Xiang Suoshu client sends pre-generated peace
Full information table carries out safety verification, records the security information that oriented client is asked in the safety information table;
Second transmission unit 38 can be used for the security information according to the client feedback received, to the visitor
Family end sends the request response of background service access.
Further, second transmission unit 36 specifically can be used for according with when the security information of the client feedback
When closing default safety condition, then the request response for agreeing to that background service accesses is sent to the client;
Second transmission unit 36 specifically can be used for not meeting default peace when the security information of the client feedback
When full condition, then the request response that refusal background service accesses is sent to the client.
Further, the dismantling unit 31 includes:
Definition module 311 can be used for defining fractionation field according to the property parameters of the background service;
Module 312 is disassembled, can be used for disassembling the background service according to the fractionation field, after obtaining dismantling
Service element.
Further, the acquiring unit 32 includes:
First determining module 321 can be used for by, with the presence or absence of binding service, determining that backstage takes in inquiry background service
Mapping relations between business and client-side information;
Module 322 is obtained, can be used for obtaining dismantling according to the mapping relations between described service and client-side information
The mapping relations between service element and client-side information afterwards.
Further, the service request carries the unique identification of request service, and the determination unit 34 includes:
Searching module 341 can be used for from multiple service elements with the client-side information phase mapping searching
The unique identification of the request access service;
Second determining module 342 can be used for the unique identification of the request access service servicing corresponding backstage clothes
Business, which is used as, meets the corresponding background service of service request.
It should be noted that other of each functional unit involved by a kind of service access device provided in an embodiment of the present invention
Corresponding description, can be with reference to the corresponding description in Fig. 1 and Fig. 2, and details are not described herein.
Based on above-mentioned method as depicted in figs. 1 and 2, correspondingly, the embodiment of the invention also provides a kind of storage equipment,
On be stored with computer program, which realizes above-mentioned service cut-in method as depicted in figs. 1 and 2 when being executed by processor.
Based on above-mentioned method as depicted in figs. 1 and 2, the embodiment of virtual bench as shown in Figure 3 and Figure 4, on realizing
Purpose is stated, the embodiment of the invention also provides a kind of entity apparatus of service access, which includes storage equipment and place
Manage device;The storage equipment, for storing computer program;The processor, for executing the computer program to realize
Above-mentioned service cut-in method as depicted in figs. 1 and 2.
By applying the technical scheme of the present invention, background service is disassembled, realizes different clients and background service
Dynamic configuration mapping relations, reduce the maintenance difficulties of background service, allow API gateway more easily from relational data
Service element after reading the background service dismantling called needed for client in library, so that client carries out service access, section
Save service turn-on time.
Through the above description of the embodiments, those skilled in the art can be understood that the application can lead to
Hardware realization is crossed, the mode of necessary general hardware platform can also be added to realize by software.Based on this understanding, this Shen
Technical solution please can be embodied in the form of software products, which can store in a non-volatile memories
In medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions are used so that a computer equipment (can be
Personal computer, server or network equipment etc.) execute method described in each implement scene of the application.
It will be appreciated by those skilled in the art that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, module in attached drawing or
Process is not necessarily implemented necessary to the application.
It will be appreciated by those skilled in the art that the module in device in implement scene can be described according to implement scene into
Row is distributed in the device of implement scene, can also be carried out corresponding change and is located at the one or more dresses for being different from this implement scene
In setting.The module of above-mentioned implement scene can be merged into a module, can also be further split into multiple submodule.
Above-mentioned the application serial number is for illustration only, does not represent the superiority and inferiority of implement scene.
Disclosed above is only several specific implementation scenes of the application, and still, the application is not limited to this, Ren Heben
What the technical staff in field can think variation should all fall into the protection scope of the application.
Claims (10)
1. a kind of service cut-in method characterized by comprising
Background service is disassembled in the form of fields, the service element after being disassembled;
The mapping relations between service element and client-side information after obtaining dismantling, it is regular by the dismantling according to default binding
The mapping relations between service element and client-side information afterwards are stored into relevant database;
When receiving the background service access request of client transmission, according to the visitor carried in the background service access request
Family client information is searched and multiple service elements of the client-side information phase mapping from the relevant database;
Service request corresponding backstage clothes are determined for compliance with according to multiple service elements with the client-side information phase mapping
Business;
The service element met after service request corresponding background service dismantling is pushed into client, so as to client into
Row service access.
2. the method according to claim 1, wherein described disassemble background service in the form of fields,
Service element after being disassembled includes:
It is defined according to the property parameters of the background service and splits field;
The background service is disassembled according to the fractionation field, the service element after being disassembled.
3. the method according to claim 1, wherein the service element and client-side information obtained after dismantling
Between mapping relations, comprising:
By whether there is binding service in inquiry background service, determine that the mapping between background service and client-side information is closed
System;
According to the mapping relations between described service and client-side information, service element and client-side information after obtaining dismantling
Between mapping relations.
4. the method according to claim 1, wherein the service request carries unique mark of request service
Know, it is described to be determined for compliance with the corresponding backstage of service request with multiple service elements of the client-side information phase mapping according to
Service includes:
Unique mark of the request access service is searched from multiple service elements with the client-side information phase mapping
Know;
The unique identification of the request access service is serviced into corresponding background service as meeting the corresponding backstage of service request
Service.
5. the method according to claim 1, wherein the corresponding backstage of service request that meets is taken described
Service element after business dismantling pushes to client, before carrying out service access so as to client, the method also includes:
Pre-generated safety information table is sent to the client and carries out safety verification, is recorded in the safety information table oriented
The security information that client is asked for;
According to the security information of the client feedback received, the request that Xiang Suoshu client sends background service access is rung
It answers.
6. according to the method described in claim 5, it is characterized in that, the safety for the client feedback that the basis receives
Information, the request response that Xiang Suoshu client sends background service access include:
When the security information of the client feedback meets default safety condition, is then sent to the client and agree to that backstage takes
The request response of business access;
When the security information of the client feedback does not meet default safety condition, then refusal backstage is sent to the client
The request response of service access.
7. method according to claim 1 to 6, which is characterized in that it is described by background service with the shape of field
Formula is disassembled, before the service element after being disassembled, the method also includes:
Field division is carried out to background service according to background service corresponding business scope, obtains the background service of different field.
8. a kind of service access device, which is characterized in that described device includes:
Disassemble unit, for disassembling background service in the form of fields, the service element after being disassembled;
Acquiring unit, for obtaining the mapping relations between the service element and client-side information after disassembling, according to default binding
Rule stores the mapping relations between the service element and client-side information after the dismantling into relevant database;
Searching unit, for being accessed according to the background service when receiving the background service access request of client transmission
The client-side information carried in request is searched and multiple clothes of the client-side information phase mapping from the relevant database
Business element;
Determination unit, for being determined for compliance with service request according to multiple service elements with the client-side information phase mapping
Corresponding background service;
Access unit, for the service element met after service request corresponding background service dismantling to be pushed to client
End, so that client carries out service access.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer storage medium, is stored thereon with computer program, which is characterized in that the computer program is located
The step of reason device realizes method described in any one of claims 1 to 7 when executing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811325359.0A CN109818836B (en) | 2018-11-08 | 2018-11-08 | Service access method, device, computer equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811325359.0A CN109818836B (en) | 2018-11-08 | 2018-11-08 | Service access method, device, computer equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109818836A true CN109818836A (en) | 2019-05-28 |
CN109818836B CN109818836B (en) | 2021-12-14 |
Family
ID=66601881
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811325359.0A Active CN109818836B (en) | 2018-11-08 | 2018-11-08 | Service access method, device, computer equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109818836B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112256452A (en) * | 2020-10-21 | 2021-01-22 | 上海商汤智能科技有限公司 | Service item determination method, device, equipment and storage medium of cloud service platform |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060179153A1 (en) * | 2004-03-22 | 2006-08-10 | Nam-Yul Lee | Streaming based contents distribution network system and methods for splitting, merging and retrieving files |
CN102427480A (en) * | 2011-12-31 | 2012-04-25 | 北京新媒传信科技有限公司 | Application access method in a plurality of application service platform systems |
US20150112999A1 (en) * | 2011-06-27 | 2015-04-23 | Amazon Technologies, Inc. | System and method for implementing a scalable data storage service |
CN107404508A (en) * | 2016-05-20 | 2017-11-28 | 阿里巴巴集团控股有限公司 | Access method, client and the electronic equipment of customer terminal webpage |
CN107612950A (en) * | 2016-07-11 | 2018-01-19 | 阿里巴巴集团控股有限公司 | A kind of method, apparatus, system, electronic equipment that service is provided |
CN107645508A (en) * | 2017-10-16 | 2018-01-30 | 深圳市买买提乐购金融服务有限公司 | A kind of data handling system, method, client and server |
CN107819861A (en) * | 2017-11-16 | 2018-03-20 | 中国银行股份有限公司 | Business data processing method, apparatus and system |
CN108306877A (en) * | 2018-01-30 | 2018-07-20 | 泰康保险集团股份有限公司 | Verification method, device and the storage medium of subscriber identity information based on NODE JS |
-
2018
- 2018-11-08 CN CN201811325359.0A patent/CN109818836B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060179153A1 (en) * | 2004-03-22 | 2006-08-10 | Nam-Yul Lee | Streaming based contents distribution network system and methods for splitting, merging and retrieving files |
US20150112999A1 (en) * | 2011-06-27 | 2015-04-23 | Amazon Technologies, Inc. | System and method for implementing a scalable data storage service |
CN102427480A (en) * | 2011-12-31 | 2012-04-25 | 北京新媒传信科技有限公司 | Application access method in a plurality of application service platform systems |
CN107404508A (en) * | 2016-05-20 | 2017-11-28 | 阿里巴巴集团控股有限公司 | Access method, client and the electronic equipment of customer terminal webpage |
CN107612950A (en) * | 2016-07-11 | 2018-01-19 | 阿里巴巴集团控股有限公司 | A kind of method, apparatus, system, electronic equipment that service is provided |
CN107645508A (en) * | 2017-10-16 | 2018-01-30 | 深圳市买买提乐购金融服务有限公司 | A kind of data handling system, method, client and server |
CN107819861A (en) * | 2017-11-16 | 2018-03-20 | 中国银行股份有限公司 | Business data processing method, apparatus and system |
CN108306877A (en) * | 2018-01-30 | 2018-07-20 | 泰康保险集团股份有限公司 | Verification method, device and the storage medium of subscriber identity information based on NODE JS |
Non-Patent Citations (2)
Title |
---|
杨俊伟等: "基于微服务架构的电力云服务平台", 《电力信息与通信技术》 * |
王卫国等: "智能终端运营管理系统之微服务架构改造实践", 《信息技术与网络安全》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112256452A (en) * | 2020-10-21 | 2021-01-22 | 上海商汤智能科技有限公司 | Service item determination method, device, equipment and storage medium of cloud service platform |
Also Published As
Publication number | Publication date |
---|---|
CN109818836B (en) | 2021-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10868865B2 (en) | System and apparatus to manage data using a peer-to-peer network and the blockchain | |
CN102622675B (en) | Method and system for realizing interoperation of enterprises under cluster supply chain environment | |
US7200806B2 (en) | System and method for generating pre-populated forms | |
US8032485B2 (en) | Rapid caching and data delivery system and method | |
TWI473029B (en) | Extensible and programmable multi-tenant service architecture | |
US20150120822A1 (en) | Cloud federation as a Service | |
US20150347554A1 (en) | Shard Determination Logic for Scalable Order and Inventory Management Architecture with a Sharded Transactional Database | |
CN104506487B (en) | The credible execution method of privacy policy under cloud environment | |
CN103957248A (en) | Public real-time data management cloud service platform based on Internet of Things | |
US20050257197A1 (en) | Role-based object models | |
CN105530293B (en) | Using dissemination method and device | |
US9275112B2 (en) | Filtering views with predefined query | |
US9330140B1 (en) | Transient virtual single tenant queries in a multi-tenant shared database system | |
US20140173693A1 (en) | Cookie Optimization | |
US10140347B2 (en) | Exposing data to query generating applications using usage profiles | |
US9652740B2 (en) | Fan identity data integration and unification | |
CN106302428B (en) | A kind of automatic deployment method and device of encryption level | |
KR20180048011A (en) | System and method for providing customer matching service | |
CN109815259A (en) | The configuration method of service field, device, computer equipment and computer storage medium in gateway | |
CN113535335B (en) | Virtual resource allocation method and device based on block chain and electronic equipment | |
CN109818836A (en) | Service cut-in method, device, computer equipment and computer storage medium | |
CN105656979A (en) | Method for processing unstructured message, client, server, and platform | |
CN102299945A (en) | Gateway configuration page registration method, system thereof and portal certificate server | |
US10410169B2 (en) | Smart inventory management and database sharding | |
US10951600B2 (en) | Domain authentication |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |