CN110347374A - A kind of encapsulation of rich client business service and calling system, method and apparatus - Google Patents

A kind of encapsulation of rich client business service and calling system, method and apparatus Download PDF

Info

Publication number
CN110347374A
CN110347374A CN201910517934.5A CN201910517934A CN110347374A CN 110347374 A CN110347374 A CN 110347374A CN 201910517934 A CN201910517934 A CN 201910517934A CN 110347374 A CN110347374 A CN 110347374A
Authority
CN
China
Prior art keywords
data
request
client
module
server
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
Application number
CN201910517934.5A
Other languages
Chinese (zh)
Other versions
CN110347374B (en
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.)
Beijing Shulide Technology Co Ltd
Original Assignee
Beijing Shulide 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 Beijing Shulide Technology Co Ltd filed Critical Beijing Shulide Technology Co Ltd
Priority to CN201910517934.5A priority Critical patent/CN110347374B/en
Publication of CN110347374A publication Critical patent/CN110347374A/en
Application granted granted Critical
Publication of CN110347374B publication Critical patent/CN110347374B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of encapsulation of rich client business service and calling systems, method and apparatus, including inter-operation system, the inter-operation system includes data-interface generating platform and data-interface operation platform, the information protocol that the system is interacted based on client with server-side and data source;The data-interface generating platform further include: system drive monitors module, for recording call request of the client to data;System drive orchestration module quickly navigates to one or continuous several requests for assists developers;The data-interface operation platform further include: system drive default handler module provides the frame method of the treatment process in addition to specifically access data source for using template method design pattern;System drive customized treatment program module specifically accesses data source work for completing;The access mode of business datum service in server-side can be obtained through the invention, and provide Web API for access.

Description

A kind of encapsulation of rich client business service and calling system, method and apparatus
Technical field
The present invention relates to computer information technology more particularly to a kind of rich client business service encapsulates and calling system, A kind of encapsulation of rich client business service and call method and a kind of encapsulation of rich client business service and calling device.
Background technique
In recent years, internet and its extension and the mobile Internet and the new networks platform such as Internet of Things that come rapidly are sent out Exhibition so that information system, user and physical world mutually merge, for data opening and shared provide condition and demand.With This simultaneously, cloud computing makes computing resource be easily obtained and use, and provides advantageous condition for the analysis and excavation of data.Number According to opening and it is shared allow data from except system other systems, by other means access.Multiple system connections Same data source not only increases the utilization rate of data, data when being greatly reduced previous multiple system connection different data sources The cost of inconsistent risk and management.
For example in some wharfage system, the functions such as ship-handling, yard management are contained, it can be according to ship name Claim, to querying conditions such as ETA estimated time of arrival, Departure airport, inquires the associated traffic data of ship, cargo.Similar system and data It is present among harbour in all parts of the country.If these business datums can be opened and share, so that it may pass through mobile mode It accesses, so that staff be facilitated to check harbour situation whenever and wherever possible;Data in multiple systems can also be collected At to carry out unified monitoring and management.
The basis of the opening of data and shared or data analysis and excavation.The analysis and excavation of data can from open and New information is found in shared data, to promote the value of data.Still by taking wharfage subsystem as an example.Pass through analysis code To the historical data of port ship, ship of departing from port, the trend of available harbour handling capacity, to instruct harbour scale in head system Change;Pass through analysis dock ship to port, Departure airport, the most busy time interval of available harbour, thus instructor The optimization that member arranges;By analyze Hongkong products object, depart from port cargo classification, the statistical information of available harbour cargo, thus Instruct the transformation of harbour freight house;It is analyzed and is excavated by data and obtain valuable information, so that practical work is instructed, it is such existing As too numerous to enumerate.
Serviceization is a kind of preferred version of solution data matter of opening generally acknowledged at present.However, a large amount of heritage information systems System does not consider serviceization demand when designing and realizing, and system original developer often no longer provides technical support, so as to being Service chemical industry is often difficult to carry out for system owner.Therefore, how auxiliary system owner opens from Legacy systems Extraction business datum and serviced have become the critical issue of big data era.Particularly, for a large amount of legacy Windows Using since client is closed executable program, business datum serviceization faces following challenge: although server-side may In the presence of the sequencing access interface to business datum in data source, but it is difficult to directly obtain the access mode of interface from client.
Summary of the invention
Present invention is primarily aimed at providing a kind of encapsulation of rich client business service and calling system, method and apparatus, To overcome above-mentioned technical problem, the access mode of interface is obtained from client, to realize to legacy Windows applied business number According to service.
The present invention is achieved through the following technical solutions:
In order to solve the above technical problems, invention shows a kind of encapsulation of rich client business service and calling system, packet Inter-operation system is included, the inter-operation system includes data-interface generating platform and data-interface operation platform, the system base In the information protocol that client is interacted with server-side and data source;
The data-interface generating platform further include:
System drive monitors module, for recording call request of the client to data;
System drive orchestration module quickly navigates to one or continuous several requests for assists developers;
The data-interface operation platform further include:
System drive default handler module is provided for using template method design pattern except specific access data The frame method for the treatment of process except source;
System drive customized treatment program module specifically accesses data source work for completing.
In order to solve the above technical problems, invention shows a kind of encapsulation of rich client business service and call method, institute The information protocol that method is interacted based on client with server-side and data source is stated, the management method includes:
Step S1: the program library used when the client accesses the data source is determined, and selection target monitors tool;
Step S2: the request that tool monitors the data between the client and the server-side is monitored using the target And response;
Step S3: analyzing the request and response, positions to the data source of the request and response;
Step S4: according to the positioning result, writing the customized treatment program and configuration file of the service system, In, the customized treatment program inherits default handler;
Step S5: target service data, and completion pair are obtained from the server-side using the target customized treatment program The request and arrangement of the target service data generate processing result and return to called side.
Based on the same inventive concept, the present invention also shows a kind of encapsulation of rich client business service and calling device, institute The information protocol that device is interacted based on client with server-side and data source is stated, described device includes:
Monitoring tool selecting module, the program library used when for determining that the client accesses the data source, and select It selects target and monitors tool;
Data decryptor execution module, for using the target monitor tool monitor the client and the server-side it Between data request and response;
Data source locating module, for analyzing the request and response, to it is described request and response data source into Row positioning;
System drive writes module, for writing the customized treatment journey of the service system according to the positioning result Sequence and configuration file, wherein the customized treatment program inherits default handler;
Business datum interface module, for obtaining target service from the server-side using the target customized treatment program Data, and complete request and arrangement to the target service data, generate processing result and return to called side.
The embodiment of the invention also provides a kind of devices, comprising:
One or more processors;With
One or more machine readable medias of instruction are stored thereon with, are executed when by one or more of processors When, so that the method that described device executes one or more described in the embodiment of the present invention.
The embodiment of the invention also provides one or more machine readable medias, are stored thereon with instruction, when by one or When multiple processors execute, so that the method that the processor executes one or more described in the embodiment of the present invention.
Compared with prior art, a kind of rich client business service encapsulation provided by the invention and calling system, method and Device, the information protocol interacted from client with server-side and data source increase newly in the service process of system drive Processing routine and oracle listener, can intercept and capture the client to the calling of the target data, obtain the request and response Meaning, and provide web application Web api interface for access;And processing routine frame of the present invention uses template method Design pattern provides the frame method for the treatment of process, realizes the complete process flow in addition to specifically access data source, service Developer complete specific access data source work;
Compared with prior art, a kind of rich client business service encapsulation provided by the invention and calling system, method and Device is unable to meet demand for existing tool to reach interception request and response in the service process of system drive In the case of, callback mechanism and Hook Mechanism are devised to write monitoring tool, can directly be intercepted and captured client to the calling of data, be obtained To the meaning of request and response, to obtain the access mode of business datum service in server-side, and Web API is provided for visiting It asks;
Compared with prior art, a kind of rich client business service encapsulation provided by the invention and calling system, method and Device, frame do not need operation client, can journey directly obtain data from client and server-side so that present system drives Serviceization process space efficiency and time efficiency it is all higher.
Detailed description of the invention
Fig. 1 is the composition schematic diagram of inter-operation system;
Configuration diagram when Fig. 2 is inter-operation system operation;
Fig. 3 is a kind of composition schematic diagram of rich client business service encapsulation and calling system of the present invention;
Fig. 4 is a kind of step flow chart of rich client business service encapsulation and call method of the present invention;
Configuration diagram when Fig. 5 is a kind of rich client business service encapsulation of the present invention and calling system operation;
Fig. 6 is a kind of structural block diagram of rich client business service encapsulation and calling device of the present invention;
Fig. 7 .1 is the operation interface of the city a specific example Y dock systems of the invention;
Fig. 7 .2 is the query result of the city a specific example Y dock systems of the invention;
Fig. 7 .3 is that OciMonitor of the present invention intercepts and captures the city Y dock systems database request schematic diagram;
Fig. 7 .4 is that the present invention carrys out port case query service request result schematic diagram;
Fig. 7 .5 is that the city Y of the present invention dock systems enter a port ship query service implementing result schematic diagram.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below with reference to embodiment and attached drawing, to this Invention is described in further detail.
The present invention is based on the realizations of existing inter-operation system platform, and the composition schematic diagram of inter-operation system is as shown in Figure 1.Mutually Operating system includes three big sub-platforms: data-interface generating platform (Development Platform), data-interface operation are flat Platform (Runtime Platform) and data interface management platform (Management Platform).
Data-interface generating platform provides support for the generation of data-interface, including monitors module and monitor orchestration module. It monitors module (Request-Response Monitor) and intercepts and captures the request all issued and the response received, including HTML page The total datas such as face, JSON data, JavaScript code, CSS code, picture monitor orchestration module (Request- Response Arrange Tool) it data is provided checks, the function of quick-searching assists developer to carry out request quickly fixed Position.
Data-interface operation platform for data-interface operation when support is provided, mainly include API routing module (API Router), management module (Runtime Management), default handler module (Default Handler) when running And the customized treatment program module (Custom Handler) for data-interface.API routing module is responsible for asking incoming It asks and is routed, corresponding configuration file is read according to request address and parameter, and select to carry out using certain customized treatment program The processing of request.Operation platform provides default handler, and all customized treatment programs are inherited from certain default handler.It is silent Processing routine is recognized using template method design pattern, provides the frame method and universal method of processing request.Customized treatment journey Sequence is write by the developer serviced, only need to realize specific requesting method, without handling complete request process and general Problem.Management module is responsible for related management when running when operation, such as is managed to request contexts.
The management function and value-added service of data interface management platform offer data-interface, wherein the data that can be managed Interface includes but is not limited to the data-interface that interoperable platform generates.Data interface management platform include cache module (Cache), Flow-control module (Flow Control), the big module of statistical module (Statistic) three.Cache module provides for data-interface Data access effect can be improved by using data buffer storage for data infrequently changed data-interface in buffer service Rate.Flow-control module, which provides, controls the flowing of access of data-interface, with prevent certain data-interfaces occupy a large amount of bandwidth, Computing resource.Statistical module is responsible for counting the access of data-interface, by these statistical informations can be real-time skill According to the calling situation of interface, or the data analysis work in future provides data.
According to above-mentioned elaboration, configuration diagram when former inter-operation system is run is as shown in Figure 2.
The present invention is directed to prior art problem, proposes the business datum encapsulation and access system, method and dress of rich client It sets.Rich Internet application program (Rich Internet Applications, RIA) utilizes the rich client with very strong interactivity End technology for user provides a higher and more comprehensive web experience.Client application is tied using asynchronous C/S Structure is connected to existing application server, this is a kind of safe, scalable service-oriented mould with adaptability Type, this model are driven by currently employed Web service.According to principles above, framework that the present invention is applied from Windows and Realization technology is started with, and has designed and Implemented the business datum serviceization frame towards legacy Windows application, master of the present invention first To be made with the angle of system drive to illustrate how that the business datum for completing legacy Windows application services chemical industry: first will Window client is considered as black box, does not consider that the inside of client is realized, mutual after extension is made by way of system drive Operating system is supported the business datum APIization in legacy Windows application.
In the above-mentioned service process based on system drive, the difficult point for obtaining server-side service data visitation interface is How according to client application obtain client access server-side mode.For application layer between client and server-side Situation known to agreement, can be by analyzing network request to obtain the access mode of server-side business datum interface.It is right The unknown situation of application layer protocol between client and server-side, the access mode for how obtaining service end interface become problem Key.
Next, the present invention is according to prior art problem and realizes difficult point, by specific implementation of the invention in reality It applies and is elaborated in example 1~3.
Embodiment 1
As shown in figure 3, a kind of composition schematic diagram of rich client business service encapsulation and calling system of the present invention is shown, The service system includes inter-operation system, and the inter-operation system includes data-interface generating platform and data-interface operation Platform, the information protocol that the system is interacted based on client with server-side and data source;
The data-interface generating platform further include:
System drive monitors module, for recording call request of the client to data;
System drive orchestration module quickly navigates to one or continuous several requests for assists developers;
The data-interface operation platform further include:
System drive default handler module is provided for using template method design pattern except specific access data The frame method for the treatment of process except source;
System drive customized treatment program module specifically accesses data source work for completing.
Service system of the invention increases system drive on the basis of inter-operation system and monitors module, system drive Orchestration module, system drive default handler module and system drive customized treatment program module, can with this system framework Tool, programming facility and default handler are monitored to provide system, realizes through callback mechanism and Hook Mechanism, directly intercepts and captures Client analyzes request the calling of data, and obtains data by way of direct docking system.
Embodiment 2
As shown in figure 4, a kind of step flow chart of rich client business service encapsulation and call method of the present invention is shown, The method is applied to system described in embodiment 1;The information that the method is interacted based on client with server-side and data source Agreement, the method can specifically include following steps:
Step S1: the program library used when the client accesses the data source is determined, and selection target monitors tool;
Step S2: the request that tool monitors the data between the client and the server-side is monitored using the target And response;
Step S3: analyzing the request and response, positions to the data source of the request and response;
Step S4: according to the positioning result, writing the customized treatment program and configuration file of the service system, In, the customized treatment program inherits default handler;
Step S5: target service data, and completion pair are obtained from the server-side using the target customized treatment program The request and arrangement of the target service data generate processing result and return to called side.
Monitoring tool has much at present, and in an alternate embodiment of the present invention, showing the monitoring tool includes network Package analyzes software Wireshark, and hypertext transfer protocol HTTP monitors tool Fiddler and database monitors tool SQLTracker。
Wireshark is a famous network packet analysis tool, it can be used to capture the network packet of disengaging computer, Such as TCP packet, UDP packet, and the relevant information of network packet is shown in detail as far as possible, including network packet sender and recipient IP address and port, the initial data etc. of network packet.However, Wireshark is more original network monitoring tool, for Application layer protocol only provides the support for http protocol.When client accesses server by HTTPS, Wireshark can It to intercept and capture the TCP packet issued, however can't be decrypted, to be unable to get the address URL of request, parameter, and return Result.Client accesses database server Shi Huixiang database server and sends network packet, can be cut by Wireshark TCP packet is obtained, to obtain IP address and the port of database server, however is but unable to get the request of clear data library and plaintext It returns the result.
For certain specific conditions, tool Fiddler is monitored using such as HTTP and database monitors tool SQLTracker It is this that there are the calling that the monitoring tool of higher level can listen to data.
Fiddler is a Web debugging proxy, it can recorde all HTTP, HTTPS flows issued by computer, Response can be compared with business datum, to obtain the access mode of data service.
SQLTracker is the submodule in Toad software, it can monitor it is all by OCI interface to database send Request, including SQL statement, the calling of storing process, COMMIT sentence etc..
Although above-mentioned three kinds of tools can solve most of problem, but in some special cases, there is also certain Loophole can not obtain implementing result if SQLTracker is for SQL statement.
And for request of data, it is inadequate for only obtaining to the SQL statement that database is sent.User is in client When the middle a certain operation of execution is to obtain data, client can repeatedly send to database server and request.For having idempotence Request, operation reproduction can be carried out according to the particular content of request, result and industry before being replaced with the result executed again Business data are compareed, to judge being which time or which secondary request return business datum actually.But for not having power Etc. property request, such as database increase (INSERT), delete (DELETE), modification (UPDATE), stored there are also some Journey can not then execute operation and reappear, because the result and the preceding result once executed that execute again might not be identical.So to the greatest extent Pipe can obtain the database request of all execution, can not still be accurately positioned in some cases to database request.
In the case where existing tool is unable to meet demand, frame, which provides the monitoring tool design based on system mechanism, to be thought Road design tool and can be realized accordingly, achieve the purpose that interception request and response.The mechanism of system level mainly includes two Kind, first is that callback mechanism, second is that Hook Mechanism (hooking).
In a preferred embodiment, it shows the monitoring tool to realize based on callback mechanism, the readjustment machine The realization step of system can specifically include:
According to user's self-defined call back function mechanism of third party library, target call back function is write according to the mechanism specification And compile it as dynamic link library;Wherein, the target call back function is for intercepting and capturing between the client and server-side Request of data and response;
Current environment variable is configured, when target call back function operation, the dynamic link library is loaded automatically and holds The row target call back function.
The first interception mechanism of system level is callback mechanism.Above-mentioned third party library can be oracle database, Oracle database can provide callback function.Oracle database provides one group and is known as OCI (Oracle Call Interface interface) accesses database server, the access of all pairs of database servers, including database for client Increasing, delete, look into, changing, the execution of storing process, be required to call OCI interface.OCI provides user's self-defined call back function The mechanism of (User-Defined Callback).User writes call back function according to its specification and compiles it as dynamic link Library (DLL).By configuration surroundings variable, OCI function can load these dynamic link libraries automatically at runtime, execute therein time Letter of transfer number.These user-defined call back functions (target call back function) can be used to intercept OCI function, to intercept and capture client Hold the request issued to database server and the response received.
In another preferred embodiment of the present invention, shows the monitoring tool and realized based on Hook Mechanism, the hook The realization step of mechanism can specifically include:
Determine the objective function that the dynamic link library provides;
Load the executable file PE file of the objective function;Wherein, the PE formatted file includes derived table and leads Enter table, the derived table derived symbolic name in need, symbolic address corresponding with the symbolic name for storing;It is described to lead Enter table for store importing in need symbolic name;
According to the load, the position that address of the objective function in the importing table/derived table is directed toward is determined;
Before or after executing the objective function, using following one or more sub-steps, the target is intercepted and captured The parameter and return value of function;
Wherein, the sub-step includes:
Sub-step A: modifying the derived table, so that the address in the derived table is directed toward some new function, in new function It calls and needs derived function;
Sub-step B: modifying the importing table, and the address in the importing table is made to be directed toward some new function;
Sub-step C: modifying preceding several bytes of the objective function, jumps address of the objective function in importing table Toward some new address.
Second of interception mechanism of system level is Hook Mechanism.Dynamic link library generally requires for some functions to be supplied to Other executable files or dynamic link library use, and this behavior is referred to as symbol export.When some program needs use to come from When the function or variable of other dynamic link libraries, need to carry out symbol importing.Windows platform executable program, dynamic link The file format in library is all PE (Portable Executable) format.In PE file, there are two important structures: export Table (Export Address Table, EAT) and importing table (Import Address Table, IAT), house all respectively Need derived symbolic name and its corresponding symbolic address and importing in need symbolic name.When some PE file is loaded When, one of task of loader be determine the function of importing in need address.When some routine call dynamic link library mentions When the function of confession, function entrance is the position that the address imported in table is directed toward.As can be seen from the above analysis, if we are uncommon It hopes and increases new function before and after certain function that dynamic link library provides executes, then above-mentioned three kinds of sub-steps can be used Suddenly (sub-step A, B, C).Above-mentioned three kinds of means are the Hook Mechanism in system mechanism.It, can be in function by Hook Mechanism Increase new function before and after execution, intercepts and captures the parameter and return value of function, the method for calling of data is obtained with this.
Monitoring tool can be designed and Implemented using above-mentioned callback mechanism and Hook Mechanism, to intercept client and server Between request of data and response.By carrying out key search to response, the mode of client request data can be obtained.
According to callback mechanism and Hook Mechanism, the step S2 can comprise the following steps that when realizing
The data between the client and the server-side are monitored using the callback mechanism or the Hook Mechanism to ask Summation response.
Then for the data that can not be positioned, using callback mechanism and Hook Mechanism to the request and response Data source is positioned.
There may be parameters in above-mentioned request address or request body.Wherein, some parameters are fixed for data-interface, And some parameters are variation, such as the condition of inquiry.Data-interface is made by inter-operation system, it can for fixed parameter To be directly encoded in processing routine, can also be programmed in configuration file;The parameter of variation is then needed in request address Or it is provided in request body.Parameter used in parameter information and processing routine in request can configure text in data-interface It is configured in part.
Since customized treatment program inherits the default handler that operation platform provides, default handler provides complete Process flow, then the customized treatment program write according to above-mentioned processing result only need to be according to positioning in customized treatment program Obtain one or it is continuous it is several request to issue to original system request, performed corresponding processing after being responded, result returned Back to the processing routine of default.Wherein, the parameter of request or derive from configuration file, or from data-interface request in Parameter.
Finally, needing to write configuration file, the processing routine of data-interface configuration file and customization is associated, so that fortune Row platform can be by parsing data-interface file acquisition parameter and configuration, to find corresponding after receiving request of data Customized treatment program completes the processing of request.
In above-mentioned steps, default handler uses template method design pattern, this frame will also provide the processing of default Program is for developer's use.Template method design pattern defines algorithm flow in the method for base class, and some steps are prolonged It is realized in late subclass, while certain universal methods being provided and are called for subclass methods.
The default handler is shown in an alternate embodiment of the present invention the following steps are included:
Pretreatment work is carried out, database or network connection are obtained;
The request that the database or network are sent is handled, and is back to request object;
By the request object serialization, and discharge connection.
In addition, since the connection that opens or closes in above-mentioned steps very consumes system performance, in an optional reality of the invention It applies and shows a kind of settling mode in example, the consumption of system performance can be reduced, concretely:
In the default handler, a connection pool is established for every a kind of connection, and by the default handler Unified management.
When client accesses resource and service by network, the tool monitoring network request for monitoring network can be used, While operating client, the all-network request of its sending and the response that receives are intercepted and captured, by by the response received and industry Business data compare, to obtain the access mode of data service.
Referring to Fig. 5, framework when showing a kind of rich client business service encapsulation of the present invention and calling system operation shows It is intended to, system of the invention at runtime, provides the business datum service of C/S system in the form of Web API.Request of data is first Administrative center is first reached, operation platform is reached after caching, flow control, statistical module.Above-mentioned caching, flow control, Statistical module belongs to existing module in inter-operation system, not described here any more.After access request reaches operation platform, API Routing module (also belonging to existing module in inter-operation system) parses the parameter of request, is connect according to the data in parameter Mouth configuration file finds customized treatment program, and customized treatment program is called to handle access.Customized treatment program is inherited silent The processing routine recognized, therefore request arrives first at default handler, executes frame logic.Customized treatment program will be according to request The configuring request original system of parameter and data-interface, and response is arranged, default handler is returned result to later, Upper layer caller is returned to by default handler again.
To sum up, the present invention is based on system drives to monitor module, system drive orchestration module, system drive default handler The function of module and system drive customized treatment program module provides the management function of business datum interface, with this according to client End application program can obtain the mode of client access server-side;When the feelings that application layer protocol between client and server-side is unknown Condition obtains the access mode of service end interface using callback mechanism and Hook Mechanism, overcomes existing technical problem with this, realizes The service of business datum towards legacy Windows application.In the process of system drive, frame does not need operation client End directly can obtain business datum to the server-side, when so that service system of the invention is with higher at runtime Between and space efficiency.
For inventive point of the invention, next, being further described using a specific example.
Example is the city Y dock systems:
The basic service subsystem of the city a specific example Y harbour of the invention, " carrys out port case in menu bar " 4 yard management " Inquiry " can input relevant information in interface, such as the name of vessel that enters a port, the name of vessel that leaves the port, bill of landing number, enter ETA estimated time of arrival, Departure airport etc. Deng.Wherein, it enters a port name of vessel and the name of vessel that leaves the port does not directly input, but click the button beside input frame, in the dialogue of pop-up It is selected in frame.The operation interface of " carrying out the inquiry of port case " is shown in that Fig. 7 .1, query result are shown in Fig. 7 .2.
In order to by this query result data service, it would be desirable to trace to the source first data, then access system is therefrom Obtain data.Above-mentioned application program needs to install PowerBuilder runtime environment and Oracle client at runtime, can To conclude that above procedure is developed by PowerBuilder, oracle database is directly connected to by OCI interface and obtains data.By This, we monitor tool OciMonitor using the database in system drive process and intercept and capture application program to database server The SQL request of transmission such as Fig. 7 .3.Wherein, when executing " carrying out the inquiry of port case " operation, client has sent 5 to database server A SQL request corresponds to 72 to 76 sentences in figure.Firstly, searched in OciMonitor according to the data shown in interface, It was found that the result finally returned that derives from the query result of sentence 76.Consider the SQL statement of sentence 76, occurs in querying condition Parameter value " 61412 ".Continue to search for " 61412 " in OciMonitor, which appears in the query result and sentence of sentence 72 In 73.Further anolytic sentence 74 and 75, query result is unrelated with final data.It can thus be concluded that, " carrying out the inquiry of port case " Data source in successively execute 72,73,76 3 sentences.After it located data source, need to connect database to obtain Access evidence.When connecting database, need to obtain address, the user name, password, database-driven class name of database.Wherein, number It can be obtained by type of database according to library driving class name.Since the city Y dock systems are developed using PowerBuilder, therefore can make Client is handled with reverse engineering tools, to obtain other link informations of database.Customized treatment program is inherited TxtDbRspHandler needs to realize the function that data are wherein obtained from database, to realize the purpose for obtaining data.? Customized treatment program obtains in the function of data, sentence 72 is first carried out, resulting query result is as sentence 73 and sentence 76 Parameter.Sentence 73 and sentence 76 are successively executed later, obtain database request result.In TxtDbRspHandler, locating Before the method for managing database request executes, database connection pool and connection will acquire;The letter of data is obtained in customized treatment program After number executes, TxtDbRspHandler will serialize request results, and release is connected and returned the result.
After processing routine deployment, user can pass through Web API Access data.Specific API is https: // Localhost:1626/hd/? iw-apikey=123&iw-cmd=inbox can be attached to thereafter query argument, carry out port case and look into It askes service request result and sees Fig. 7 .4.Wherein, interface requests parameter and meaning are shown in Table 1, and part return parameters and meaning are shown in Table 2.
Table 1: come port case query service request parameter and meaning
Table 2: come port case query service return parameters and meaning
In the parameter for carrying out port case query interface, the number of entering a port and the number of leaving the port are respectively from enter a port ship and ship dialogue of leaving the port Frame.Similarly, open enter a port ship and leave the port ship dialog box when capture execute SQL statement, realize customized treatment program simultaneously Deployment, user can pass through Web API Access data.Specific API are as follows: https: //localhost:1626/hd/? iw- Apikey=123&iw-cmd=inship.Dock systems ship query service implementing result of entering a port in the city Y is shown in Fig. 7 .5, and part returns The meaning of parameter is shown in Table 3.
The city table 3:Y dock systems enter a port ship query service return parameters and meaning
The present invention is applied for true legacy Windows, realizes serviceization to the port data of coming in application, is made Query interface is made using the service chemical industry that frame proposed in this paper completes its business datum, provides Web API disappearing for service The person's of expense access.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method It closes, but those skilled in the art should understand that, embodiment of that present invention are not limited by the describe sequence of actions, because according to According to the embodiment of the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and the related movement not necessarily present invention is implemented Necessary to example.
Embodiment 3
As shown in fig. 6, based on the same inventive concept, the method in the corresponding embodiment of the present invention 2 shows a kind of rich client Hold the structural block diagram of business service encapsulation and calling device, the letter that described device is interacted based on client with server-side and data source Agreement is ceased, described device can specifically include with lower module:
Monitoring tool selecting module 601, the program library used when for determining that the client accesses the data source, and Selection target monitors tool;
Data decryptor execution module 602 monitors the client and the service for monitoring tool using the target The request and response of data between end;
Data source locating module 603, for analyzing the request and response, to the data source of the request and response It is positioned;
System drive writes module 604, for writing the customized treatment of the service system according to the positioning result Program and configuration file, wherein the customized treatment program inherits default handler;
Business datum interface module 605, for obtaining target from the server-side using the target customized treatment program Business datum, and complete request and arrangement to the target service data, generate processing result and return to called side.
The embodiment of the invention also provides a kind of devices, comprising:
One or more processors;With
One or more machine readable medias of instruction are stored thereon with, are executed when by one or more of processors When, so that the method that described device executes one or more described in the embodiment of the present invention.
The embodiment of the invention also provides one or more machine readable medias, are stored thereon with instruction, when by one or When multiple processors execute, so that the method that the processor executes one or more described in the embodiment of the present invention.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can provide as method, apparatus or calculate Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention be referring to according to the method for the embodiment of the present invention, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Above to a kind of rich client business service encapsulation provided by the present invention and calling system, a kind of rich client industry Business service encapsulation and call method and a kind of encapsulation of rich client business service and calling device are described in detail, this Apply that a specific example illustrates the principle and implementation of the invention in text, the explanation of above example is only intended to It facilitates the understanding of the method and its core concept of the invention;At the same time, for those skilled in the art, think of according to the present invention Think, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as pair Limitation of the invention.

Claims (10)

1. a kind of rich client business service encapsulation and calling system, including inter-operation system, the inter-operation system include number According to interface generating platform and data-interface operation platform, which is characterized in that the system is based on client and server-side and data The information protocol of source interaction;
The data-interface generating platform further include:
System drive monitors module, for recording call request of the client to data;
System drive orchestration module quickly navigates to one or continuous several requests for assists developers;
The data-interface operation platform further include:
System drive default handler module, for using template method design pattern, provide except specific access data source it The frame method of outer treatment process;
System drive customized treatment program module specifically accesses data source work for completing.
2. a kind of rich client business service encapsulation and call method, which is characterized in that the method is applied to claim 1 institute The system stated, the information protocol that the method is interacted based on client with server-side and data source, the management method include:
Step S1: the program library used when the client accesses the data source is determined, and selection target monitors tool;
Step S2: request and the sound that tool monitors the data between the client and the server-side are monitored using the target It answers;
Step S3: analyzing the request and response, positions to the data source of the request and response;
Step S4: according to the positioning result, the customized treatment program and configuration file of the service system are write, wherein The customized treatment program inherits default handler;
Step S5: target service data are obtained from the server-side using the target customized treatment program, and are completed to described The request and arrangement of target service data generate processing result and return to called side.
3. according to the method described in claim 2, it is characterized in that, the monitoring tool includes network package analysis software Wireshark, hypertext transfer protocol HTTP monitor tool Fiddler and database monitors tool SQLTracker.
4. according to the method described in claim 2, it is characterized in that, the monitoring tool based on callback mechanism realize, described time The realization step of tune mechanism includes:
According to user's self-defined call back function mechanism of third party library, target call back function is write according to the mechanism specification and is incited somebody to action It is compiled as dynamic link library;Wherein, the target call back function is used to intercept and capture the data between the client and server-side Request and response;
Current environment variable is configured, when target call back function operation, the dynamic link library is loaded automatically and executes institute State target call back function.
5. according to the method described in claim 4, it is characterized in that, the monitoring tool is based on Hook Mechanism realization, the hook The realization step of handset includes:
Determine the objective function that the dynamic link library provides;
Load the executable file PE file of the objective function;Wherein, the PE formatted file includes derived table and importing table, The derived table derived symbolic name in need, symbolic address corresponding with the symbolic name for storing;The importing table For store importing in need symbolic name;
According to the load, the position that address of the objective function in the importing table/derived table is directed toward is determined;
Before or after executing the objective function, using following one or more sub-steps, the objective function is intercepted and captured Parameter and return value;
Wherein, the sub-step includes:
The derived table is modified, the address in the derived table is made to be directed toward some new function, is called in new function and needs to export Function;
The importing table is modified, the address in the importing table is made to be directed toward some new function;
The preceding several bytes for modifying the objective function jump address of the objective function in importing table toward some newly Location.
6. according to the method described in claim 2, it is characterized in that, the default handler the following steps are included:
Pretreatment work is carried out, database or network connection are obtained;
The request that the database or network are sent is handled, and is back to request object;
By the request object serialization, and discharge connection.
7. according to the method described in claim 6, it is characterized in that, which comprises
In the default handler, a connection pool is established for every a kind of connection, and unified by the default handler Management.
8. a kind of rich client business service encapsulation and calling device, which is characterized in that described device is applied to claim 1 institute The system stated, the information protocol that described device is interacted based on client with server-side and data source, described device include:
Monitoring tool selecting module, the program library used when for determining that the client accesses the data source, and select mesh Mark monitoring tool;
Data decryptor execution module is monitored between the client and the server-side for monitoring tool using the target The request and response of data;
Data source locating module determines the data source of the request and response for analyzing the request and response Position;
System drive writes module, for according to the positioning result, write the service system customized treatment program and Configuration file, wherein the customized treatment program inherits default handler;
Business datum interface module, for obtaining target service number from the server-side using the target customized treatment program According to, and complete the request and arrangement to the target service data, generate processing result and return to called side.
9. a kind of device characterized by comprising
One or more processors;With
One or more machine readable medias of instruction are stored thereon with, when being executed by one or more of processors, are made The methods for obtaining the one or more that described device is executed as described in claim 1-7.
10. one or more machine readable medias, which is characterized in that instruction is stored thereon with, when by one or more processors When execution, so that the processor executes one or more methods as described in claim 1-7.
CN201910517934.5A 2019-06-14 2019-06-14 Rich client business service packaging and calling system, method and device Active CN110347374B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910517934.5A CN110347374B (en) 2019-06-14 2019-06-14 Rich client business service packaging and calling system, method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910517934.5A CN110347374B (en) 2019-06-14 2019-06-14 Rich client business service packaging and calling system, method and device

Publications (2)

Publication Number Publication Date
CN110347374A true CN110347374A (en) 2019-10-18
CN110347374B CN110347374B (en) 2023-01-13

Family

ID=68182082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910517934.5A Active CN110347374B (en) 2019-06-14 2019-06-14 Rich client business service packaging and calling system, method and device

Country Status (1)

Country Link
CN (1) CN110347374B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112633851A (en) * 2020-12-30 2021-04-09 中国农业银行股份有限公司 Method and device for controlling idempotent
CN112711628A (en) * 2020-12-30 2021-04-27 北京楚梵基业科技有限公司 Data interaction method, device and central station
CN114546530A (en) * 2022-02-25 2022-05-27 博锐尚格科技股份有限公司 Big data loading method, device, equipment and medium
CN115002180A (en) * 2022-05-26 2022-09-02 上海商米科技集团股份有限公司 Network request operation monitoring method and device and computer readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727475A (en) * 2009-10-12 2010-06-09 奇智(上海)信息科技有限公司 Method, device and system for acquiring database access process
CN103023906A (en) * 2012-12-20 2013-04-03 北京奇虎科技有限公司 Method and system aiming at remote procedure calling conventions to perform status tracking
CN103036895A (en) * 2012-12-20 2013-04-10 北京奇虎科技有限公司 Method and system for state tracking
CN106411907A (en) * 2016-10-13 2017-02-15 广西咪付网络技术有限公司 Data transmission method and system
CN106648920A (en) * 2016-09-29 2017-05-10 山东浪潮云服务信息科技有限公司 Interface-based data communication method
US20180089005A1 (en) * 2016-09-28 2018-03-29 Amazon Technologies, Inc. Generating an Application Programming Interface

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727475A (en) * 2009-10-12 2010-06-09 奇智(上海)信息科技有限公司 Method, device and system for acquiring database access process
CN103023906A (en) * 2012-12-20 2013-04-03 北京奇虎科技有限公司 Method and system aiming at remote procedure calling conventions to perform status tracking
CN103036895A (en) * 2012-12-20 2013-04-10 北京奇虎科技有限公司 Method and system for state tracking
US20180089005A1 (en) * 2016-09-28 2018-03-29 Amazon Technologies, Inc. Generating an Application Programming Interface
CN106648920A (en) * 2016-09-29 2017-05-10 山东浪潮云服务信息科技有限公司 Interface-based data communication method
CN106411907A (en) * 2016-10-13 2017-02-15 广西咪付网络技术有限公司 Data transmission method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112633851A (en) * 2020-12-30 2021-04-09 中国农业银行股份有限公司 Method and device for controlling idempotent
CN112711628A (en) * 2020-12-30 2021-04-27 北京楚梵基业科技有限公司 Data interaction method, device and central station
CN114546530A (en) * 2022-02-25 2022-05-27 博锐尚格科技股份有限公司 Big data loading method, device, equipment and medium
CN114546530B (en) * 2022-02-25 2023-10-24 博锐尚格科技股份有限公司 Big data loading method, device, equipment and medium
CN115002180A (en) * 2022-05-26 2022-09-02 上海商米科技集团股份有限公司 Network request operation monitoring method and device and computer readable medium
CN115002180B (en) * 2022-05-26 2024-05-14 上海商米科技集团股份有限公司 Network request operation monitoring method, device and computer readable medium

Also Published As

Publication number Publication date
CN110347374B (en) 2023-01-13

Similar Documents

Publication Publication Date Title
US11561774B2 (en) Composition of pattern-driven reactions in real-time dataflow programming
CN110347374A (en) A kind of encapsulation of rich client business service and calling system, method and apparatus
US10528454B1 (en) Intelligent automation of computer software testing log aggregation, analysis, and error remediation
US7475406B2 (en) Event notification structure for dynamically aggregated logical components
EP3690640B1 (en) Event stream processing cluster manager
Baresi et al. Microservices: The evolution and extinction of web services?
CN107743616A (en) The end points management system of API agency service is provided
CN110381026A (en) A kind of the business service encapsulation and access system, method and apparatus of rich client
GB2494027A (en) Enabling a web application to call at least one native function of a mobile device
CN109885624A (en) Data processing method, device, computer equipment and storage medium
CN106686021B (en) Service calling method and gateway
US11593188B2 (en) Method and apparatus for providing asynchronicity to microservice application programming interfaces
CN109271359A (en) Log information processing method, device, electronic equipment and readable storage medium storing program for executing
US9280321B2 (en) Distributing UI control events from a single event producer across multiple systems event consumers
CN114830080B (en) Data distribution flow configuration method and device, electronic equipment and storage medium
WO2021244644A1 (en) Method for dynamically integrating application, and software system and machine therefor
CN111552901B (en) H5 cross-engine client data automation updating method and storage medium
US9201938B2 (en) Parameter driven data format conversion in client/server architectures
CN114117190A (en) Data processing method, data processing device, storage medium and electronic equipment
CN113760262A (en) Task processing method, device, computer system and computer readable storage medium
Lin et al. A web services status monitoring technology for distributed system management in the cloud
US20230376363A1 (en) Framework for digital workers
CN114844957B (en) Link message conversion method, device, equipment, storage medium and program product
US8898621B2 (en) Methods and systems for implementing a logical programming model
US10664378B2 (en) Visualizing a user-centric stack frame graph

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