CN107291567A - A kind of data calling method, device and system - Google Patents

A kind of data calling method, device and system Download PDF

Info

Publication number
CN107291567A
CN107291567A CN201710470061.8A CN201710470061A CN107291567A CN 107291567 A CN107291567 A CN 107291567A CN 201710470061 A CN201710470061 A CN 201710470061A CN 107291567 A CN107291567 A CN 107291567A
Authority
CN
China
Prior art keywords
data
data call
called side
target service
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710470061.8A
Other languages
Chinese (zh)
Inventor
贾思辉
曾超
沈学师
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Inspur Genersoft Information Technology Co Ltd
Original Assignee
Shandong Inspur Genersoft Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Inspur Genersoft Information Technology Co Ltd filed Critical Shandong Inspur Genersoft Information Technology Co Ltd
Priority to CN201710470061.8A priority Critical patent/CN107291567A/en
Publication of CN107291567A publication Critical patent/CN107291567A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]

Abstract

The invention provides a kind of data calling method, device and system, this method includes:Interface standard is set, by affiliated interface standard, sets up be connected with outside called side and at least one operation system of outside respectively;Receive the data call request that the called side is sent;In at least one described operation system, determine that at least one corresponding target service system is asked in the data call;Data call request is forwarded to each target service system;Obtain each target service system feedback with the corresponding data of data call request;Each described data is sent to the called side.The scheme that the present invention is provided can reduce the probability that operation system during data call is changed.

Description

A kind of data calling method, device and system
Technical field
The present invention relates to field of computer technology, more particularly to a kind of data calling method, device and system.
Background technology
In the case of internet and Enterprise information integration environmental development, because resource distribution is different or enterprises system Variation, data call turns into a kind of method of universal progress data application.
At present, the mode of data call is usually:Called side determines target service system according to business need, then calls The data that needs are called directly are called into target service system in side.But it is due to the number of called side and each target service system It is different according to specification, may be to data to be called in target service system when called side calls data in target service system It is adjusted.Operation system modification is may result in during adjustment.Therefore, existing mode, during data call The probability that operation system is changed is higher.
The content of the invention
The invention provides a kind of data calling method, device and system, business during data call can be reduced The probability that system is changed.
In a first aspect, the invention provides a kind of data calling method, this method includes:
Interface standard is set, by the interface standard, respectively with outside called side and at least one industry of outside Business system sets up connection, in addition to:
Receive the data call request that the called side is sent;
In at least one described operation system, determine that at least one corresponding target service system is asked in the data call System;
Data call request is forwarded to each target service system;
Obtain each target service system feedback with the corresponding data of data call request;
Each described data is sent to the called side.
Preferably,
The setting interface standard, including:
Sort out mark, mark in operation system of the affiliated project label of interface, interface, required parameter according to belonging to interface At least one of classification is a variety of, sets the interface standard.
Preferably,
Before the data call request for receiving the called side transmission, further comprise:
The user profile of the called side input is obtained using blocker, and verifies the user profile;
When the user profile is verified, verify that the called side whether there is operating right, if it is, performing It is described to receive the data call request that the called side is sent;
When user profile checking not by when, be redirected to login page set in advance, point out the called side Input user profile.
Preferably,
The data call request, including:At least one request path and each described request path it is corresponding please Seek parameter;
It is described to determine that at least one corresponding target service system is asked in the data call, including:
Determine that each described request path distinguishes corresponding operation system in the data call request;
Each operation system of determination is defined as the data call and asks at least one corresponding target service system;
It is described that data call request is forwarded to each target service system, including:
Each described required parameter in the data call request is directed to be performed both by:Determine presently described required parameter Corresponding target service system, the corresponding target service system of presently described required parameter is forwarded to by presently described required parameter System, so that target service system feedback data corresponding with presently described required parameter.
Preferably,
After the corresponding data of data call request of each target service system feedback of acquisition, enter One step includes:
It is judging whether to obtain whole target service system feedbacks with the number when reaching default time point According to the corresponding data of call request,
If it is, execution is described to be sent to the called side by each described data;
Otherwise, alarm.
Preferably,
It is described that each described data is sent to the called side, including:
Each described data is encapsulated as setting to the data of form;
Data after encapsulation are sent to the called side.
Second aspect, the invention provides a kind of data middle layer system, the mid-tier system includes:
Connection unit, for setting interface standard, by the interface standard, respectively with outside called side and outside At least one operation system set up connection;
Receiving unit, for receiving the call request that the data call side is sent;
Determining unit, at least one described operation system, determining the data that the receiving unit is received At least one corresponding target service system of call request;
Retransmission unit, the data call request for the receiving unit to be received is forwarded to each target industry Business system;
Acquiring unit, for obtaining each target service system feedback and the corresponding number of data call request According to;
Transmitting element, each described data for the acquiring unit to be obtained are sent to the called side.
Preferably,
The connection unit, for sorting out mark, the affiliated project label of interface, interface according to belonging to interface in operation system In mark, at least one of required parameter classification or a variety of, the interface standard is set.
Preferably,
Further comprise:Authentication unit;
The authentication unit, for obtaining the user profile of the called side input using blocker, and verifies the use Family information;When the user profile is verified, verify that the called side whether there is operating right, if it is, triggering The receiving unit;When user profile checking not by when, then be redirected to login page set in advance, point out described Called side inputs user profile.
Preferably,
The data call request, including:At least one request path and each described request path it is corresponding please Seek parameter;
The determining unit, for determining that each described request path distinguishes corresponding industry in the data call request Business system;Each operation system of determination is defined as the data call and asks at least one corresponding target service system;
The retransmission unit, is performed both by for being directed to each described required parameter in the data call request:Really Determine the corresponding target service system of presently described required parameter, presently described required parameter is forwarded to presently described required parameter Corresponding target service system, so that target service system feedback data corresponding with presently described required parameter.
Preferably,
Further comprise:Judging unit;
The judging unit, for when reaching default time point, judging whether the acquiring unit obtains acquisition All the target service system feedbacks with the corresponding data of data call request, sent singly if it is, triggering is described Member;Otherwise, alarm.
Preferably,
The transmitting element, including:Encapsulate subelement and transmission sub-unit;
The encapsulation subelement, the data for each described data to be encapsulated as setting to form;
The transmission sub-unit, for the data after encapsulation to be sent into the called side.
The third aspect, the invention provides a kind of data calling system, the system includes:
Any of the above-described described data call mid-tier system, called side and at least one operation system;
The called side is connected with the data call mid-tier system;Each described operation system respectively with the number It is connected according to mid-tier system is called;
The called side, is asked to the data call mid-tier system for sending data call;And receive described Data call mid-tier system send with the corresponding data of data call request;
Each described operation system, the data call request for receiving the data call mid-tier system forwarding; The data call mid-tier system will be given with the corresponding data feedback of data call request.
The embodiments of the invention provide a kind of data calling method, device and system, by the interface standard of setting, point Do not set up and be connected with called side and each operation system.When receiving the data call request of called side transmission, at each Determine that each corresponding target service system is asked in data call in operation system.The data call received is asked again to forward To each target service system, so that each target service system is according to data call request feedback data.When getting each When corresponding data are asked in the data call of target service system feedback, each data is sent to called side, it is whole to complete Data call process.By above-mentioned, during whole data call, called side is not visited operation system directly Ask.Therefore, the scheme that provides of the present invention can reduce the probability that operation system during data call is changed.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of flow chart for data calling method that one embodiment of the invention is provided;
Fig. 2 is a kind of hardware knot of equipment where a kind of data call mid-tier system that one embodiment of the invention is provided Composition;
Fig. 3 is a kind of structural representation for data call mid-tier system that one embodiment of the invention is provided;
Fig. 4 is a kind of structure for data call mid-tier system including authentication unit that one embodiment of the invention is provided Schematic diagram;
Fig. 5 is a kind of structure for data call mid-tier system including judging unit that one embodiment of the invention is provided Schematic diagram;
In a kind of data call for including encapsulating subelement and transmission sub-unit that Fig. 6 is that one embodiment of the invention is provided Between layer system structural representation;
Fig. 7 is a kind of structural representation for data calling system that one embodiment of the invention is provided;
Fig. 8 is a kind of flow chart for data calling method that another embodiment of the present invention is provided.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained on the premise of creative work is not made, belongs to the scope of protection of the invention.
As shown in figure 1, the embodiments of the invention provide a kind of data calling method, this method may comprise steps of:
Step 101:Interface standard is set, by the interface standard, respectively with outside called side and it is outside extremely A few operation system sets up connection;
Step 102:Receive the data call request that the called side is sent;
Step 103:In at least one described operation system, determine that at least one corresponding mesh is asked in the data call Mark operation system;
Step 104:Data call request is forwarded to each target service system;
Step 105:Obtain each target service system feedback with the corresponding data of data call request;
Step 106:Each described data is sent to the called side.
According to embodiment as shown in Figure 1, by the interface standard of setting, respectively with called side and each operation system Set up connection.When receiving the data call request of called side transmission, data call request is determined in each operation system Each corresponding target service system.The data call received request is forwarded to each target service system again, so that respectively Individual target service system is according to data call request feedback data.When the data call for getting each target service system feedback When asking corresponding data, each data is sent to called side, to complete whole data call process.By above-mentioned, During whole data call, called side does not conduct interviews directly to operation system.Therefore, the embodiment that the present invention is provided The probability that operation system during data call is changed can be reduced.
In an embodiment of the invention, setting interface standard involved in flow chart step 101 shown in above-mentioned Fig. 1 can With including:
Sort out mark, mark in operation system of the affiliated project label of interface, interface, required parameter according to belonging to interface At least one of classification is a variety of, sets the interface standard.
In the present embodiment, interface standard can be determined according to business need.Sort out mark wherein according to belonging to interface, connect At least one of mark in operation system of project label, interface, required parameter classification or a variety of belonging to mouthful, set interface Standard is preferred mode.It can also be selected other modes that interface standard is set according to business need.
In the present embodiment, when it is determined that after interface standard, at least two interfaces can be set according to interface standard.Its In, the type of interface can be determined according to business need.Such as, application programming interface api interface.When it is determined that interface standard Afterwards, at least two interfaces can be set according to interface standard.Utilize the first interface at least two interfaces and outside tune Set up and connected with side, and at least one business using at least one second interface at least two interfaces respectively with outside System, which is corresponded, sets up connection.Then the data call request that called side is sent is received by first interface, and in each industry In business system, determine that at least one corresponding target service system is asked in data call.Pass through each target service system pair again The second interface answered, is forwarded to each target service system, so that each target service system is true respectively by data call request Surely the data fed back.Then by each corresponding second interface of target service system, each target service system feedback is obtained With the corresponding data of data call request.And each data is sent to by called side by first interface.
, can be according to business need, by sorting out mark belonging to interface, item target belonging to interface according to above-described embodiment Know, at least one of mark of the interface in operation system, required parameter classification or a variety of, interface standard is set.Therefore, industry Business is with strong applicability.
In an embodiment of the invention, the number that the called side is sent is received in flow chart step 102 shown in above-mentioned Fig. 1 Before call request, it may further include:
The user profile of the called side input is obtained using blocker, and verifies the user profile;
When the user profile is verified, verify that the called side whether there is operating right, if it is, performing It is described to receive the data call request that the called side is sent;
When user profile checking not by when, be redirected to login page set in advance, point out the called side Input user profile.
In the present embodiment, the pattern of blocker can be determined according to business need.Time domain session can such as be selected Blocker.
In the present embodiment, at least one user profile, each of which user profile correspondence one can be prestored User name and a user cipher.When receiving the user profile of called side input, judge the user profile of input advance It whether there is at least one user profile of storage.If it is present user profile is verified.If it does not exist, then with Family Information Authentication does not pass through, and the user profile for illustrating called side input is illegal, then is redirected to login set in advance The page, to point out called side to re-enter user profile in login page.
In the present embodiment, the corresponding authority of each user profile can be pre-set, and sets each user to believe Cease corresponding authorization-duration., it is necessary to verify the authority of called side again after user profile is verified, if checking is logical Cross, when determining that called side has operating right, then perform and receive the data call request that called side is sent, to be counted accordingly According to calling processing.If checking does not pass through, illustrate that called side does not have lawful authority, the data call that called side is not received please Ask.
According to above-described embodiment, it is necessary to verify the use of called side before the data call request that called side is sent is received Family information.When being verified, then continue to verify the authority of called side, only when the user profile and authority of called side are verified By when, just receive called side send data call request, to carry out corresponding data call processing.Therefore, data call Security it is higher.
In an embodiment of the invention, data call involved in flow chart shown in above-mentioned Fig. 1 request can be wrapped Include:At least one request path and the corresponding required parameter of each described request path;
Then flow chart step 103 shown in above-mentioned Fig. 1 determines that at least one corresponding target service is asked in the data call System, can include:
Determine that each described request path distinguishes corresponding operation system in the data call request;
Each operation system of determination is defined as the data call and asks at least one corresponding target service system;
Then data call request is forwarded to each target service system by flow chart step 104 shown in above-mentioned Fig. 1 System, can include:
Each described required parameter in the data call request is directed to be performed both by:Determine presently described required parameter Corresponding target service system, the corresponding target service system of presently described required parameter is forwarded to by presently described required parameter System, so that target service system feedback data corresponding with presently described required parameter.
In the present embodiment, it can include in data call request:At least one request path and each request road The corresponding required parameter in footpath.Such as, data call request includes:Request path 1, request path 2, wherein 1 pair of request path The required parameter answered is that required parameter A, the corresponding required parameter of request path 2 are required parameter B.Then according to the He of request path 1 Request path 2, determines the correspondence of request path 1 operation system 1, the correspondence operation system 2 of request path 2 in each operation system. Operation system 1 and operation system 2 are defined as target service system.Then the corresponding required parameter A of request path 1 is forwarded to Operation system 1, so that the corresponding data of the feedback request parameter A of operation system 1;By the corresponding required parameter B forwardings of request path 2 To operation system 2, so that the corresponding data of the feedback request parameter B of operation system 2.
According to above-described embodiment, each request path please included according to data with request determines each target service system System.Then the corresponding required parameter of each request path is forwarded in its own corresponding target service system, so that each The corresponding data of target service system feedback required parameter.Because the request path please included according to data with request determines mesh Operation system is marked, asks to join for each target service system forwards further according to the corresponding relation of request path and required parameter Number, therefore, the data of target service system feedback are more accurate.
In an embodiment of the invention, each described target service system is obtained in flow chart step 105 shown in above-mentioned Fig. 1 System feedback with after the corresponding data of data call request, may further include:
It is judging whether to obtain whole target service system feedbacks with the number when reaching default time point According to the corresponding data of call request,
If it is, execution is described to be sent to the called side by each described data;
Otherwise, alarm.
In the present embodiment, default time point can determine according to business need.Such as, time point can be according to reception The time asked to data call is configured.The time for such as receiving data call request is 8:00, then by 8:10 are set For time point.
In the present embodiment, such as the time point set is 8:10, it is determined that target service system be operation system 1, industry Business system 2 and operation system 3.8 are reached when the time:When 10, judge whether to obtain operation system 1, operation system 2 and industry Business system 3 feed back with the corresponding data of data call request, if it is, determine whole target service systems feed back With the corresponding data of data call request, illustrate that data call asks corresponding data to be complete, then perform each data It is sent to called side.If it is not, then determining that data call asks corresponding data to be incomplete, lack data, illustrate data There is exception in invoked procedure, alarmed, so that business personnel is handled for alarm.
In the present embodiment, the concrete form of alarm can be determined according to business need.Such as can be using ejection dialogue The form of frame, with the corresponding data of the non-feedback data call request of which target service system of informing business personnel.
It is anti-when judging to obtain target complete operation system when reaching default time point according to above-described embodiment Each data is just sent to called side by when asking corresponding data with data call of feedback.Received with ensureing called side Data are complete data.When judging not obtain target complete operation system feedback and the corresponding data of data call request When, alarmed, to cause business personnel that according to alarm, abnormality processing is carried out in time.
In an embodiment of the invention, each described data is sent to described by flow chart step 106 shown in above-mentioned Fig. 1 Called side, can include:
Each described data is encapsulated as setting to the data of form;
Data after encapsulation are sent to the called side.
In the present embodiment, setting form can be determined according to business need.It should be noted that setting form needs completely The use requirement of sufficient called side.Such as, form is set as JSONP forms.
In the present embodiment, such as, form is set as JSONP forms.The data for receiving the feedback of operation system 1 are XML The data that the data of form, operation system 2 are fed back are that the data that the data of JSON forms, operation system 3 are fed back are JSONP forms Data.The data for the XML format that then operation system 1 is fed back are encapsulated as the data of JSONP forms, feed back operation system 2 The data of JSON forms be encapsulated as the data of JSONP forms, due to the number that the data that operation system 3 is fed back are JSONP forms According to so need not encapsulate.The data of obtained JSONP forms after encapsulation are sent to called side.
According to above-described embodiment, after the data that each data is encapsulated as to setting form, just the data after encapsulation are sent out Give called side.Due to the data that the data that called side is received are unified form, it is not necessary to carry out the transformation of data format again, Therefore it is more convenient using data.
As shown in Figure 2 and Figure 3, the embodiments of the invention provide a kind of data call mid-tier system.Mid-tier system is implemented Example can be realized by software, can also be realized by way of hardware or software and hardware combining.For hardware view, such as scheme It is a kind of hardware structure diagram of equipment where data call mid-tier system provided in an embodiment of the present invention, except Fig. 2 shown in 2 Outside shown processor, internal memory, network interface and nonvolatile memory, the equipment in embodiment where system is usual Other hardware can also be included, be such as responsible for the forwarding chip of processing message.Exemplified by implemented in software, as shown in figure 3, conduct System on one logical meaning, is by corresponding computer program in nonvolatile memory by the CPU of equipment where it Instruction reads what operation in internal memory was formed.The data call mid-tier system that the present embodiment is provided, including:
Connection unit 301, for setting interface standard, by the interface standard, respectively with outside called side and At least one outside operation system sets up connection;
Receiving unit 302, for receiving the call request that the data call side is sent;
Determining unit 303, at least one described operation system, determining the institute that the receiving unit 302 is received State data call and ask at least one corresponding target service system;
Retransmission unit 304, the data call request for the receiving unit 302 to be received is forwarded to described in each Target service system;
Acquiring unit 305, for obtaining the corresponding with data call request of each target service system feedback Data;
Transmitting element 306, each described data for the acquiring unit 305 to be obtained are sent to the called side.
According to embodiment as shown in Figure 3, connection unit is by the interface standard of setting, respectively with called side and at least One operation system sets up connection.Then when receiving unit receives the call request that data call side is sent, determining unit exists In each operation system, determine that corresponding target service system is asked in data call.Retransmission unit asks data call to forward To each target service system, so that each target service system feedback and the corresponding data of data call request.Then obtain Unit obtain each target service system feedback with the corresponding data of data call request, recycle transmitting element by each number According to being sent to called side.By above-mentioned, during whole data call, called side is not carried out directly to operation system Access, but the data call completed by data call mid-tier system.Therefore, the embodiment that the present invention is provided can be reduced The probability that operation system is changed during data call.
In an embodiment of the invention, the form of data call mid-tier system can be determined according to business need.Than It such as can be the data call mid-tier system of global wide area network WEB patterns.The program word that data call mid-tier system is used Speech can also be determined according to business need, such as, can use NodeJS.
In an embodiment of the invention, the connection unit 301 in structural representation shown in above-mentioned Fig. 3, connects for basis At least one in the affiliated mark for sorting out mark, the affiliated project label of interface, interface in operation system of mouth, required parameter classification Plant or a variety of, the interface standard is set.
In an embodiment of the invention, as shown in figure 4, can further include in data call mid-tier system: Authentication unit 401;
The authentication unit 401, for obtaining the user profile of the called side input using blocker, and verifies described User profile;When the user profile is verified, verify that the called side whether there is operating right, if it is, touching Send out receiving unit 302 described;When the user profile checking not by when, then be redirected to login page set in advance, carry Show the called side input user profile.
In an embodiment of the invention, the data call request can include:At least one request path and every The corresponding required parameter of one request path;
The determining unit 303, for determining that each described request path is corresponded to respectively in the data call request Operation system;Each operation system of determination is defined as the data call and asks at least one corresponding target service system System;
The retransmission unit 304, is performed both by for being directed to each described required parameter in the data call request: The corresponding target service system of presently described required parameter is determined, presently described required parameter is forwarded into presently described request joins The corresponding target service system of number, so that target service system feedback data corresponding with presently described required parameter.
In an embodiment of the invention, as shown in figure 5, can further include in data call mid-tier system: Judging unit 501;
The judging unit 501, for when reaching default time point, judging whether the acquiring unit 305 obtains Obtain whole target service system feedbacks with data call request corresponding data, if it is, described in triggering Transmitting element 306;Otherwise, alarm.
In an embodiment of the invention, as shown in fig. 6, can include in the transmitting element 306:Encapsulate subelement 601 and transmission sub-unit 602;
The encapsulation subelement 601, the data for each described data to be encapsulated as setting to form;
The transmission sub-unit 602, for the data after encapsulation to be sent into the called side.
A kind of computer-readable recording medium is provided in one embodiment of the invention, the computer-readable recording medium includes:Execute instruction, when storage control Described in the computing device of device processed during execute instruction, the storage control performs data calling method described in any of the above-described.
A kind of storage control is provided in one embodiment of the invention, the storage control includes:Processor, memory And bus;The memory is used to store execute instruction;The processor is connected with the memory by the bus;Work as institute When stating storage control operation, the execute instruction of memory storage described in the computing device, so that the storage control Device processed performs data calling method described in any of the above-described.
As shown in fig. 7, the embodiments of the invention provide a kind of data calling system, the system can include:
Any of the above-described described data call mid-tier system 701, called side 702 and at least one operation system 703;
The called side 702 is connected with the data call mid-tier system 701;Each described 703 points of operation system It is not connected with the data call mid-tier system 701;
The called side 702, is asked to the data call mid-tier system 701 for sending data call;And connect Receive that the data call mid-tier system 701 sends with the corresponding data of data call request;
Each described operation system 703, for receiving the data call that the data call mid-tier system 701 is forwarded Request;The data call mid-tier system 701 will be given with the corresponding data feedback of data call request.
According to embodiment as shown in Figure 7, the system includes data call mid-tier system, called side and at least one Individual operation system.Called side does not conduct interviews directly, but pass through in the data in calling operation system to operation system Data call mid-tier system completes data call process.Therefore, the embodiment that the present invention is provided can reduce data call The probability that operation system is changed in journey.
The contents such as the information exchange between each unit, implementation procedure in said apparatus and system, due to the present invention Embodiment of the method is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
Called side A, data call mid-tier system and four operation systems are included with data calling system below, its In, using NodeJS data call mid-tier systems, data call mid-tier system sets session blockers, called side hair Rise ajax data calls request exemplified by.Expansion explanation data calling method, as shown in figure 8, the data calling method, can include Following steps:
Step 801:Data call mid-tier system sets interface standard, by interface standard, respectively with called side and At least one operation system sets up connection.
In this step, mark, the affiliated project label of interface, mark of the interface in operation system are sorted out according to belonging to interface Know, interface standard is set, and the interface type set is api interface.5 interfaces are set according to interface standard.Utilize 5 interfaces In interface 1 and called side A set up and be connected, and be connected using interface 2 with the foundation of operation system 1, utilize interface 3 and business system System 2 is set up connection, is connected using interface 4 with the foundation of operation system 3, is connected using interface 5 with the foundation of operation system 4.
Step 802:Called side inputs user profile.
In this step, called side A inputs user profile A, wherein, user profile includes user name A and user cipher A。
Step 803:Data call mid-tier system obtains the user profile of called side input using blocker, and verifies use Family information, when being verified, performs step 804;Verify obstructed out-of-date, perform step 816.
In this step, data call mid-tier system obtains called side A user profile A using session blockers, Judge that user profile A whether there is in each user profile prestored.It is present by judgement, then performs step 804。
In this step, it is necessary to create a Servlet.Wherein, name and interface path are LoginCheck, acquiescence Receive userId (user name) and two parameters of password (password).At least one prestored according to the two parameter queries It whether there is the user profile in individual user profile.If logining successfully, acquiescence returns to json strings, such as { " state ":" success","code":"1",info:" success " }.
The corresponding attribute of return value sets as follows:
It can be realized in this step by following code:
if(checkRole(userId,request,response,out)!=1)
return;
}
Verify user profile:
publicintcheckRole(String userId,HttpServletRequest request, HttpServletResponseresponse,PrintWriter out){
ISecurityProvidersp=SecurityFactory.getISecurityProvider ();
RoleView [] rv=sp.getAssignedRole (userId.toUpperCase ());
ObjectMapper mapper=new ObjectMapper ();
HashMap<String,Object>Map=new HashMap<String,Object>();
If (rv==null | | rv.length==0)
map.put("state","error");
map.put("code","2");
Map.put (" info ", " not inquiring the user profile ");
try{
String json=mapper.writeValueAsString (map);
out.print(json);
out.flush();
out.close();
}catch(Exception e){
out.flush();
out.close();
LogUtil.log.info (" Sys---- user profile is abnormal --- ");
return-1;
}
return-1;
}
return 1;
}
Verify currently logged on user's account number cipher:
if(checkUser(userId,password,request,response,out)!=1)
return;
}
Veritify user account password specific code as follows:
Step 804:Data call mid-tier system is when user profile is verified, and checking called side is with the presence or absence of operation Authority, if it is, performing step 805;Otherwise, step 816 is performed.
In this step, there is operating right in checking called side A, and operating right is before the deadline.Then perform step Rapid 805.
It can be realized in this step by following code:
Step 805:Data call mid-tier system receives the data call request that called side is sent.
In this step, receiving called side A call request includes:Request path 1, request path 2, wherein asking road The corresponding required parameter in footpath 1 is that required parameter A, the corresponding required parameter of request path 2 are required parameter B.Then according to request road Footpath 1 and request path 2, determine the correspondence of request path 1 operation system 1, the corresponding business system of request path 2 in each operation system System 2.
Step 806:Data call mid-tier system determines that each request path difference is corresponding in data call request Operation system.
In this step, determine the correspondence operation system 1 of request path 1 and determine the correspondence operation system 2 of request path 2.
Step 807:Each operation system of determination is defined as data call request correspondence by data call mid-tier system At least one target service system.
In this step, it is that corresponding target service system is asked in data call to determine operation system 1 and operation system 2.
Step 808:Data call mid-tier system selects one in each required parameter that data call is asked successively Required parameter is used as current request parameter.
Step 809:Data call mid-tier system determines the corresponding target service system of current request parameter, will currently ask Parameter is asked to be forwarded to the corresponding target service system of current request parameter, so that target service system feedback and current request parameter Corresponding data.
In this step, when current request parameter is required parameter 1, required parameter 1 is forwarded to the correspondence of required parameter 1 Operation system 1 in so that the corresponding data of 1 feedback request parameter of operation system 1.
In this step, when current request parameter is required parameter 2, required parameter 2 is forwarded to the correspondence of required parameter 2 Operation system 2 in so that the corresponding data of 2 feedback request parameter of operation system 2.
Step 810:Judge current request parameter whether last required parameter of position, if it is, perform step 811, it is no Then, step 808 is performed.
Step 811:The required parameter that each target service system reception data call mid-tier system is sent, and feed back Data corresponding with required parameter.
In this step, operation system 1 receives the required parameter 1 that data call mid-tier system is sent, and request is joined The corresponding data feedback of number 1 gives data call mid-tier system.Operation system 2 receives asking for data call mid-tier system transmission Parameter 2 is sought, and data call mid-tier system is given by the corresponding data feedback of required parameter 2.
Step 812:When reaching default time point, judge whether to obtain target complete operation system feedback with number According to the corresponding data of call request, if it is, performing step 813, otherwise, step 815 is performed.
In this step, such as the time point set is 8:10, it is determined that target service system be operation system 1, business System 2.8 are reached when the time:When 10, judge whether to obtain that operation system 1, operation system 2 feed back is asked with data call Corresponding data, if it is, determine whole target service systems fed back with the corresponding data of data call request, say Bright data call asks corresponding data to be complete, then performs step 814.
Step 813:Each data is encapsulated as setting to the data of form, the data after encapsulation are sent to called side.
In this step, it is necessary to which each data to be encapsulated as to the data of JSONP forms, can by res.jsonp methods, The data conversion of acquisition is sent to called side into the data after JSONP forms, and encapsulation.
It can be realized in this step by following code:
Step 814:Called side receives the data that data call mid-tier system is sent.
In this step, such as when called side use initiate ajax data calls request for query exemplified by, host is number According to the reference address of server where calling mid-tier system, then each data of reception are parsed into by json by eval functions String, and corresponding data processing is carried out according to business need.
It can be realized in this step by following code:
Step 815:Alarm, and terminate current process.
In this step, the concrete form of alarm can be determined according to business need.Pop-up dialogue box can such as be used Form, with the corresponding data of which operation system of informing business personnel position feedback data call request.
Step 816:Data call mid-tier system when user profile verify not by when, be redirected to login page, carry Show that called side inputs user profile.
In this step, user profile checking does not pass through, and the user profile for illustrating called side input is illegal, then will Login page is redirected to, to point out called side to re-enter user profile in login page.
In summary, each embodiment of the invention can at least realize following beneficial effect:
1st, in embodiments of the present invention, by the interface standard of setting, built respectively with called side and each operation system Vertical connection.When receiving the data call request of called side transmission, data call request pair is determined in each operation system Each target service system answered.The data call received request is forwarded to each target service system again, so that each Target service system is according to data call request feedback data.When the data call for getting each target service system feedback please When seeking corresponding data, each data is sent to called side, to complete whole data call process.By above-mentioned, During whole data call, called side does not conduct interviews directly to operation system.Therefore, the embodiment that the present invention is provided can To reduce the probability that operation system during data call is changed.
2nd, in embodiments of the present invention, can be according to business need, by sorting out mark, the affiliated project of interface belonging to interface At least one of mark, mark of the interface in operation system, required parameter classification are a variety of, set interface standard.Therefore, Business is with strong applicability.
3rd, in embodiments of the present invention, it is necessary to verify called side before the data call request that called side is sent is received User profile.When being verified, then continue to verify the authority of called side, only when the user profile and authority of called side are equal When being verified, the data call request that called side is sent just is received, to carry out corresponding data call processing.Therefore, data The security called is higher.
4th, in embodiments of the present invention, each request path please included according to data with request determines each target industry Business system.Then the corresponding required parameter of each request path is forwarded in its own corresponding target service system, so that Each corresponding data of target service system feedback required parameter.Because the request path please included according to data with request is true Set the goal operation system, is asked further according to the corresponding relation of request path and required parameter for each target service system forwards Parameter, therefore, the data of target service system feedback are more accurate.
5th, in embodiments of the present invention, when reaching default time point, when judging to obtain target complete business system Each data is just sent to called side by when asking corresponding data with data call of system feedback.To ensure that called side is received The data arrived are complete data.When judging not obtain the corresponding with data call request of target complete operation system feedback During data, alarmed, to cause business personnel that according to alarm, abnormality processing is carried out in time.
6th, in embodiments of the present invention, each data is encapsulated as after the data of setting form, just by the number after encapsulation According to being sent to called side.Due to the data that the data that called side is received are unified form, it is not necessary to carry out data format again Transformation, thus it is more convenient using data.
7th, in embodiments of the present invention, connection unit is by the interface standard of setting, respectively with called side and at least one Individual operation system sets up connection.Then when receiving unit receives the call request that data call side is sent, determining unit is each In individual operation system, determine that corresponding target service system is asked in data call.Data call request is forwarded to by retransmission unit Each target service system, so that each target service system feedback and the corresponding data of data call request.Then obtain single Member obtain each target service system feedback with the corresponding data of data call request, recycling transmitting element is by each data It is sent to called side.By above-mentioned, during whole data call, called side is not visited operation system directly Ask, but the data call completed by data call mid-tier system.Therefore, the embodiment that the present invention is provided can reduce number The probability changed according to operation system in invoked procedure.
8th, in embodiments of the present invention, the system include data call mid-tier system, called side and at least one Operation system.Called side does not conduct interviews directly, but pass through number in the data in calling operation system to operation system Data call process is completed according to mid-tier system is called.Therefore, the embodiment that the present invention is provided can reduce data call process The probability that middle operation system is changed.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity Or operation makes a distinction with another entity or operation, and not necessarily require or imply exist between these entities or operation Any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant be intended to it is non- It is exclusive to include, so that process, method, article or equipment including a series of key elements not only include those key elements, But also other key elements including being not expressly set out, or also include solid by this process, method, article or equipment Some key elements.In the absence of more restrictions, the key element limited by sentence " including one ", is not arranged Except also there is other identical factor in the process including the key element, method, article or equipment.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through Programmed instruction related hardware is completed, and foregoing program can be stored in the storage medium of embodied on computer readable, the program Upon execution, the step of including above method embodiment is performed;And foregoing storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
It is last it should be noted that:Presently preferred embodiments of the present invention is the foregoing is only, the skill of the present invention is merely to illustrate Art scheme, is not intended to limit the scope of the present invention.Any modification for being made within the spirit and principles of the invention, Equivalent substitution, improvement etc., are all contained in protection scope of the present invention.

Claims (10)

1. a kind of data calling method, it is characterised in that interface standard is set, by the interface standard, respectively with outside Called side and at least one operation system of outside set up connection, in addition to:
Receive the data call request that the called side is sent;
In at least one described operation system, determine that at least one corresponding target service system is asked in the data call;
Data call request is forwarded to each target service system;
Obtain each target service system feedback with the corresponding data of data call request;
Each described data is sent to the called side.
2. according to the method described in claim 1, it is characterised in that
The setting interface standard, including:
Sort out mark, mark, the required parameter classification of the affiliated project label of interface, interface in operation system according to belonging to interface At least one of or it is a variety of, the interface standard is set.
3. according to the method described in claim 1, it is characterised in that
Before the data call request for receiving the called side transmission, further comprise:
The user profile of the called side input is obtained using blocker, and verifies the user profile;
When the user profile is verified, verify that the called side whether there is operating right, if it is, performing described Receive the data call request that the called side is sent;
When user profile checking not by when, be redirected to login page set in advance, point out the called side input User profile.
4. according to the method described in claim 1, it is characterised in that
The data call request, including:At least one request path and the corresponding request ginseng of each described request path Number;
It is described to determine that at least one corresponding target service system is asked in the data call, including:
Determine that each described request path distinguishes corresponding operation system in the data call request;
Each operation system of determination is defined as the data call and asks at least one corresponding target service system;
It is described that data call request is forwarded to each target service system, including:
Each described required parameter in the data call request is directed to be performed both by:Determine presently described required parameter correspondence Target service system, presently described required parameter is forwarded to the corresponding target service system of presently described required parameter, with Make target service system feedback data corresponding with presently described required parameter.
5. according to the method described in claim 1, it is characterised in that
In each target service system feedback of acquisition with after the corresponding data of data call request, entering one Step includes:
When reaching default time point, judge whether to obtain adjusting with the data for whole target service system feedbacks With asking corresponding data,
If it is, execution is described to be sent to the called side by each described data;
Otherwise, alarm;
And/or,
It is described that each described data is sent to the called side, including:
Each described data is encapsulated as setting to the data of form;
Data after encapsulation are sent to the called side.
6. a kind of data call mid-tier system, it is characterised in that including:
Connection unit, for setting interface standard, by the interface standard, respectively with outside called side and it is outside extremely A few operation system sets up connection;
Receiving unit, for receiving the call request that the data call side is sent;
Determining unit, at least one described operation system, determining the data call that the receiving unit is received At least one corresponding target service system of request;
Retransmission unit, the data call request for the receiving unit to be received is forwarded to each target service system System;
Acquiring unit, for obtaining each target service system feedback and the corresponding data of data call request;
Transmitting element, each described data for the acquiring unit to be obtained are sent to the called side.
7. system according to claim 6, it is characterised in that
The connection unit, for sorting out mark, the affiliated project label of interface, interface according to belonging to interface in operation system At least one of mark, required parameter classification are a variety of, set the interface standard.
8. system according to claim 6, it is characterised in that
Further comprise:Authentication unit;
The authentication unit, for obtaining the user profile of the called side input using blocker, and verifies user's letter Breath;When the user profile is verified, verify that the called side whether there is operating right, if it is, triggering is described Receiving unit;When user profile checking not by when, then be redirected to login page set in advance, point out described in call Side's input user profile.
9. system according to claim 6, it is characterised in that
The data call request, including:At least one request path and the corresponding request ginseng of each described request path Number;
The determining unit, for determining that each described request path distinguishes corresponding business system in the data call request System;Each operation system of determination is defined as the data call and asks at least one corresponding target service system;
The retransmission unit, is performed both by for being directed to each described required parameter in the data call request:It is determined that working as The corresponding target service system of the preceding required parameter, presently described required parameter correspondence is forwarded to by presently described required parameter Target service system so that target service system feedback data corresponding with presently described required parameter;
And/or,
Further comprise:Judging unit;
The judging unit, for when reaching default time point, judging whether the acquiring unit obtains acquisition all The target service system feedback with the corresponding data of data call request, if it is, triggering the transmitting element;It is no Then, alarm;
And/or,
The transmitting element, including:Encapsulate subelement and transmission sub-unit;
The encapsulation subelement, the data for each described data to be encapsulated as setting to form;
The transmission sub-unit, for the data after encapsulation to be sent into the called side.
10. a kind of data calling system, it is characterised in that including:
Claim 6 to 9 any described data call mid-tier system, called side and at least one operation system;
The called side is connected with the data call mid-tier system;Each described operation system is adjusted with the data respectively It is connected with mid-tier system;
The called side, is asked to the data call mid-tier system for sending data call;And receive the data Call mid-tier system send with the corresponding data of data call request;
Each described operation system, the data call request for receiving the data call mid-tier system forwarding;Will be with The data call asks corresponding data feedback to the data call mid-tier system.
CN201710470061.8A 2017-06-20 2017-06-20 A kind of data calling method, device and system Pending CN107291567A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710470061.8A CN107291567A (en) 2017-06-20 2017-06-20 A kind of data calling method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710470061.8A CN107291567A (en) 2017-06-20 2017-06-20 A kind of data calling method, device and system

Publications (1)

Publication Number Publication Date
CN107291567A true CN107291567A (en) 2017-10-24

Family

ID=60096815

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710470061.8A Pending CN107291567A (en) 2017-06-20 2017-06-20 A kind of data calling method, device and system

Country Status (1)

Country Link
CN (1) CN107291567A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848165A (en) * 2018-06-20 2018-11-20 中国平安人寿保险股份有限公司 Service request processing method, device, computer equipment and storage medium
CN110287037A (en) * 2019-05-20 2019-09-27 平安科技(深圳)有限公司 Distributed intelligence API asynchronism callback method and device
CN110535957A (en) * 2019-09-02 2019-12-03 珠海格力电器股份有限公司 The data of service application platform transfer method and service application plateform system
WO2020186773A1 (en) * 2019-03-16 2020-09-24 平安科技(深圳)有限公司 Call request monitoring method, device, apparatus, and storage medium
CN113127109A (en) * 2021-05-12 2021-07-16 平安信托有限责任公司 Interface calling method and device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695076A (en) * 2009-09-21 2010-04-14 中兴通讯股份有限公司 Method and device of unified agent adaptation based on Web service and adaptation system
CN101827302A (en) * 2010-04-19 2010-09-08 中兴通讯股份有限公司 Multi-service unified processing method and unified service platform
CN101989340A (en) * 2009-08-06 2011-03-23 上海杉达学院 Online product control system and method
US20170060651A1 (en) * 2015-08-26 2017-03-02 Palantir Technologies Inc. System for data aggregation and analysis of data from a plurality of data sources
CN106850666A (en) * 2017-03-02 2017-06-13 水禾测绘信息技术有限公司 The shared cloud platform of Forestry Information and monitoring operation system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989340A (en) * 2009-08-06 2011-03-23 上海杉达学院 Online product control system and method
CN101695076A (en) * 2009-09-21 2010-04-14 中兴通讯股份有限公司 Method and device of unified agent adaptation based on Web service and adaptation system
CN101827302A (en) * 2010-04-19 2010-09-08 中兴通讯股份有限公司 Multi-service unified processing method and unified service platform
US20170060651A1 (en) * 2015-08-26 2017-03-02 Palantir Technologies Inc. System for data aggregation and analysis of data from a plurality of data sources
CN106850666A (en) * 2017-03-02 2017-06-13 水禾测绘信息技术有限公司 The shared cloud platform of Forestry Information and monitoring operation system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848165A (en) * 2018-06-20 2018-11-20 中国平安人寿保险股份有限公司 Service request processing method, device, computer equipment and storage medium
CN108848165B (en) * 2018-06-20 2022-10-18 中国平安人寿保险股份有限公司 Service request processing method and device, computer equipment and storage medium
WO2020186773A1 (en) * 2019-03-16 2020-09-24 平安科技(深圳)有限公司 Call request monitoring method, device, apparatus, and storage medium
CN110287037A (en) * 2019-05-20 2019-09-27 平安科技(深圳)有限公司 Distributed intelligence API asynchronism callback method and device
WO2020233012A1 (en) * 2019-05-20 2020-11-26 平安科技(深圳)有限公司 Distributed smart api asynchronous callback method, device, client terminal, service terminal, and storage medium
CN110287037B (en) * 2019-05-20 2023-11-03 平安科技(深圳)有限公司 Distributed intelligent API asynchronous callback method and device
CN110535957A (en) * 2019-09-02 2019-12-03 珠海格力电器股份有限公司 The data of service application platform transfer method and service application plateform system
CN113127109A (en) * 2021-05-12 2021-07-16 平安信托有限责任公司 Interface calling method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN107291567A (en) A kind of data calling method, device and system
KR101662685B1 (en) Deep packet inspection method and device, and coprocessor
CN108173850A (en) A kind of identity authorization system and identity identifying method based on block chain intelligence contract
CN105871838B (en) A kind of log-in control method and customer center platform of third party&#39;s account
CN108829838A (en) A kind of account information batch processing method and server
CN111290742A (en) Parameter verification method and device, electronic equipment and readable storage medium
CN106487560A (en) A kind of acquisition method of server configuration information, apparatus and system
CN110196715A (en) A kind of code generating system and method
US11095518B2 (en) Determining violation of a network invariant
CN110909013B (en) Service list generation method, device, equipment and computer readable storage medium
JP2008506179A (en) Device management system and device management instruction scheduling method in the system
CN110515827A (en) Automated testing method, device, computer equipment and storage medium
US20190073600A1 (en) Skipping maintenance mode of applications
CN111385124A (en) Gateway service implementation method, control device and gateway
CN104348638A (en) Method for identifying service type of session flow and system and equipment thereof
WO2022033079A1 (en) Pico base station configuration method and apparatus, and storage medium and electronic apparatus
CN112070508B (en) Block chain payment processing method based on block chain finance and block chain payment platform
CN113468276A (en) Trusted data acquisition method and device of on-chain prediction machine and electronic equipment
CN109688096A (en) Recognition methods, device, equipment and the computer readable storage medium of IP address
CN112000943A (en) Information verification method based on edge computing and cloud edge fusion and central cloud platform
CN111817878A (en) Networking method and device of intelligent equipment and cloud server
CN108733425B (en) Service change information sending method and device, electronic equipment and storage medium
CN114463002A (en) Method and device for verifying legality of cross-link transaction, computer equipment and medium
CN113472781A (en) Service acquisition method, server and computer readable storage medium
CN112929321B (en) Authentication method, device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20171024

RJ01 Rejection of invention patent application after publication