CN110347374B - Rich client business service packaging and calling system, method and device - Google Patents

Rich client business service packaging and calling system, method and device Download PDF

Info

Publication number
CN110347374B
CN110347374B CN201910517934.5A CN201910517934A CN110347374B CN 110347374 B CN110347374 B CN 110347374B CN 201910517934 A CN201910517934 A CN 201910517934A CN 110347374 B CN110347374 B CN 110347374B
Authority
CN
China
Prior art keywords
data
client
request
processing program
module
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.)
Active
Application number
CN201910517934.5A
Other languages
Chinese (zh)
Other versions
CN110347374A (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

Images

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 rich client business service packaging and calling system, a method and a device, comprising an interoperation system, wherein the interoperation system comprises a data interface generation platform and a data interface operation platform, and the system is based on an information protocol of interaction between a client and a server as well as between the client and a data source; the data interface generation platform further comprises: the system driving monitoring module is used for recording a calling request of the client to the data; the system driving arrangement module is used for assisting a developer to quickly position one or a plurality of continuous requests; the data interface operation platform further comprises: the system driving default processing program module is used for adopting a template method design mode and providing a framework method of a processing process except a specific access data source; the system driving customizing processing program module is used for finishing specific work of accessing the data source; the invention can obtain the access mode of the service data service in the service end and provide the Web API for access.

Description

Rich client business service packaging and calling system, method and device
Technical Field
The invention relates to a computer information technology, in particular to a rich client business service packaging and calling system, a rich client business service packaging and calling method and a rich client business service packaging and calling device.
Background
In recent years, the internet and novel network platforms such as mobile internet and internet of things which are extended from the internet are rapidly developed, so that an information system, a user and the physical world are mutually fused, and conditions and requirements are provided for opening and sharing data. Meanwhile, the cloud computing enables computing resources to be easily acquired and used, and provides favorable conditions for data analysis and mining. The opening and sharing of data allows the data to be accessed from systems other than the system, in other ways. The multiple systems are connected with the same data source, so that the utilization rate of data is improved, and the risk of data inconsistency and the management cost when the multiple systems are connected with different data sources in the prior art are greatly reduced.
For example, a certain wharf business system includes functions of ship management, yard management, and the like, and can query relevant business data of ships and goods according to query conditions such as ship names, arrival time, departure time, and the like. Similar systems and data exist across the country in terminals. If the service data can be opened and shared, the service data can be accessed in a mobile mode, so that workers can conveniently check the wharf condition at any time and any place; data in a plurality of systems can be integrated, so that unified monitoring and management can be performed.
The opening and sharing of data is also the basis for data analysis and mining. The analysis and mining of data can discover new information from the open and shared data, thereby improving the value of the data. Still take the dock service subsystem as an example. By analyzing historical data of ships arriving at and ships leaving a port in the wharf system, the trend of wharf throughput can be obtained, and thus the change of wharf scale is guided; by analyzing arrival and departure time of ships at the wharf, the time interval of the busiest wharf can be obtained, so that the arrangement optimization of personnel is guided; statistical information of wharf cargos can be obtained by analyzing the categories of the cargos arriving at the wharf and the cargos leaving the wharf, so that the modification of the wharf cargo compartment is guided; valuable information is obtained through data analysis and mining, so that the real-world work is guided, and the phenomenon is countless.
The service is a better solution to the data open problem recognized at present. However, a large number of legacy information systems do not consider the service requirement when designing and implementing, and the original system developers often do not provide technical support any more, so that the service operation is often difficult for the system owners. Therefore, how to assist the system owner to extract business data from the legacy information system and serve the business data has become a key issue in the big data era. In particular, for a large number of legacy Windows applications, since the client is a closed executable program, the business data service thereof faces the following challenges: although the server may have a programmatic access interface to the service data in the data source, it is difficult to directly obtain the access mode of the interface from the client.
Disclosure of Invention
The invention mainly aims to provide a rich client business service packaging and calling system, a rich client business service packaging and calling method and a rich client business service packaging and calling device, so as to overcome the technical problems and obtain an interface access mode from a client, thereby realizing the servitization of legacy Windows application business data.
The invention is realized by the following technical scheme:
in order to solve the technical problem, the invention discloses a rich client service encapsulation and calling system, which comprises an interoperation system, wherein the interoperation system comprises a data interface generation platform and a data interface operation platform, and the system is based on an information protocol of interaction between a client, a server and a data source;
the data interface generation platform further comprises:
the system driving monitoring module is used for recording a calling request of the client to the data;
the system driving arrangement module is used for assisting a developer to quickly locate one or a plurality of continuous requests;
the data interface operation platform further comprises:
the system driving default processing program module is used for adopting a template method design mode and providing a framework method of a processing process except a specific access data source;
the system drives a customized processing program module for completing the specific work of accessing the data source.
In order to solve the technical problem, the invention discloses a rich client service packaging and calling method, which is based on an information protocol of interaction between a client, a server and a data source, and comprises the following steps:
step S1: determining a program library used when the client accesses the data source, and selecting a target monitoring tool;
step S2: monitoring a request and a response of data between the client and the server by using the target monitoring tool;
and step S3: analyzing the request and the response, and positioning a data source of the request and the response;
and step S4: according to the positioning result, a customized processing program and a configuration file of the service system are compiled, wherein the customized processing program inherits a default processing program;
step S5: and acquiring target service data from the server by using the target customized processing program, finishing the request and the arrangement of the target service data, generating a processing result and returning the processing result to a calling party.
Based on the same inventive concept, the invention also discloses a rich client service encapsulation and calling device, which is based on the information protocol of interaction between the client, the server and the data source, and comprises:
a monitoring tool selection module used for determining a program library used when the client accesses the data source and selecting a target monitoring tool;
the data monitoring execution module is used for monitoring the request and the response of the data between the client and the server by using the target monitoring tool;
the data source positioning module is used for analyzing the request and the response and positioning the data source of the request and the response;
the system driver compiling module is used for compiling a customized processing program and a configuration file of the service system according to the positioning result, wherein the customized processing program inherits a default processing program;
and the service data interface module is used for acquiring target service data from the server by using the target customized processing program, finishing the request and the arrangement of the target service data, generating a processing result and returning the processing result to the caller.
An embodiment of the present invention further provides an apparatus, including:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform one or more methods as described in embodiments of the invention.
Embodiments of the invention also provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform one or more of the methods of embodiments of the invention.
Compared with the prior art, the rich client service packaging and calling system, method and device provided by the invention have the advantages that starting from an information protocol of interaction between a client and a server as well as a data source, a processing program and a monitoring program are additionally arranged in a system-driven service process, the calling of the client to the target data can be intercepted, the meaning of the request and the response is obtained, and a Web application program Web API interface is provided for access; the processing program framework of the invention adopts a template method design mode, provides a framework method for the processing process, realizes the complete processing flow except the specific access data source, and the developer of the service finishes the specific work of accessing the data source;
compared with the prior art, the rich client business service packaging and calling system, method and device provided by the invention have the advantages that in a system-driven service process, aiming at the condition that the existing tool cannot meet the requirements to intercept requests and responses, a callback mechanism and a hook mechanism are designed to compile a monitoring tool, the calling of the client to data can be directly intercepted, the meaning of the requests and responses is obtained, so that the access mode of business data services in a server is obtained, and a Web API is provided for access;
compared with the prior art, the rich client business service packaging and calling system, the rich client business service packaging and calling method and the rich client business service packaging and calling device provided by the invention have the advantages that the framework does not need to run the client, and can directly acquire data from the client and the server, so that the space efficiency and the time efficiency of the system-driven service process are higher.
Drawings
FIG. 1 is a schematic diagram of the components of an interoperation system;
FIG. 2 is an architectural diagram of an interoperation system runtime;
FIG. 3 is a schematic diagram of the rich client business service encapsulation and invocation system of the present invention;
FIG. 4 is a flowchart of the steps of a rich client business service encapsulation and invocation method of the present invention;
FIG. 5 is a schematic diagram of the architecture of the rich client business service encapsulation and invocation system operation of the present invention;
FIG. 6 is a block diagram of a rich client business service encapsulation and invocation apparatus of the present invention;
FIG. 7.1 is an operation interface of the wharf system of the city Y according to an embodiment of the invention;
FIG. 7.2 shows query results of the dock system of market Y according to an embodiment of the present invention;
FIG. 7.3 is a schematic diagram of the Ocimotor intercepting the database request of the wharf system in the city Y of the present invention;
FIG. 7.4 is a diagram illustrating the results of the inbound box query service request of the present invention;
FIG. 7.5 is a schematic diagram of the execution result of the inquiry service of the inbound ship of the wharf system of the Y city.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the following embodiments and the accompanying drawings.
The invention is realized based on the existing interoperation system platform, and the composition schematic diagram of the interoperation system is shown in figure 1. The interoperation system comprises three major sub-platforms: a data interface generation Platform (Development Platform), a data interface execution Platform (Runtime Platform), and a data interface Management Platform (Management Platform).
The data interface generation platform provides support for the generation of the data interface and comprises a monitoring module and a monitoring arrangement module. The monitoring module (Request-Response Monitor) intercepts all sent requests and received responses, including all data such as HTML pages, JSON data, javaScript codes, CSS codes and pictures, and provides data viewing and fast retrieval functions to assist developers in quickly positioning the requests.
The data interface operation platform provides support for the operation of the data interface, and mainly comprises an API routing module (API Router), an operation Management module (Runtime Management), a Default Handler module (Default Handler) and a Custom Handler module (Custom Handler) aiming at the data interface. The API routing module is responsible for routing the incoming request, reading a corresponding configuration file according to the request address and the parameters, and selecting a certain customized processing program to process the request. The running platform provides default processing programs, and all the customized processing programs inherit from a certain default processing program. The default processing program adopts a template method design mode, and provides a framework method and a general method for processing the request. The customized processing program is written by a developer of the service, only a specific request method is needed to be realized, and the problems of complete request flow and universality are not needed to be processed. The runtime management module is responsible for relevant management of the runtime, such as managing the request context.
The data interface management platform provides management functions and value-added services of the data interface, wherein the data interface which can be managed comprises but is not limited to a data interface generated by the interoperation platform. The data interface management platform comprises a Cache module (Cache), a Flow Control module (Flow Control) and a statistical module (statistical). The cache module provides cache service for the data interface, and for the data interface with data which does not change frequently, the data access efficiency can be improved by using data cache. The flow control module provides access flow control to the data interfaces to prevent certain data interfaces from occupying a large amount of bandwidth and computing resources. The statistical module is responsible for carrying out statistics on the access of the data interface, and the calling condition of the data interface can be known in real time through the statistical information, and data can be provided for future data analysis work.
According to the above description, the architecture diagram of the original interoperation system when running is shown in fig. 2.
Aiming at the problems in the prior art, the invention provides a business data packaging and accessing system, a business data packaging and accessing method and a business data packaging and accessing device for a rich client. Rich Internet Applications (RIA) utilizes Rich client technology with great interactivity to provide a higher and more comprehensive network experience for users. Client applications connect to existing application servers using an asynchronous C/S architecture, which is a secure, scalable, well-adapted service-oriented model driven by currently deployed Web services. According to the principle, starting from the architecture and the implementation technology of Windows application, the invention firstly designs and implements the legacy Windows application-oriented service data service framework, and mainly explains how to complete the service data service work of the legacy Windows application from the system driving perspective: firstly, the Windows client is regarded as a black box, the internal implementation of the client is not considered, and the expanded interoperation system supports API (application programming interface) of business data in legacy Windows application in a system driving mode.
In the above system-driven-based service process, the difficulty in obtaining the service data access interface of the server is how to obtain the way of the client accessing the server according to the client application program. For the condition that the application layer protocol between the client and the server is known, the access mode of the service data interface of the server can be obtained by analyzing the network request. For the case that the application layer protocol between the client and the server is unknown, how to obtain the access mode of the server interface becomes the key of the problem.
Next, the present invention will be described in detail in embodiments 1 to 3 according to the problems of the prior art and the difficulty of implementation.
Example 1
As shown in fig. 3, a schematic diagram of a rich client service encapsulation and invocation system according to the present invention is shown, where the servization system includes an interoperation system, the interoperation system includes a data interface generation platform and a data interface operation platform, and the system is based on an information protocol of interaction between a client and a server as well as between the client and a data source;
the data interface generation platform further comprises:
the system driving monitoring module is used for recording a calling request of the client to the data;
the system driving arrangement module is used for assisting a developer to quickly position one or a plurality of continuous requests;
the data interface operation platform further comprises:
the system driving default processing program module is used for adopting a template method design mode and providing a framework method of a processing process except a specific access data source;
the system drives a customized processing program module for completing the specific work of accessing the data source.
The service system of the invention is additionally provided with a system driving monitoring module, a system driving arrangement module, a system driving default processing program module and a system driving customized processing program module on the basis of an interoperation system, so that a system framework can provide a system monitoring tool, an arrangement tool and a default processing program, the calling of a client to data is directly intercepted through a callback mechanism and a hook mechanism, the request is analyzed, and the data is acquired through a mode of directly butting the system.
Example 2
FIG. 4 is a flow chart showing the steps of a rich client business service encapsulation and invocation method of the present invention, which is applied to the system described in embodiment 1; the method is based on an information protocol of interaction between a client and a server as well as a data source, and specifically comprises the following steps:
step S1: determining a program library used when the client accesses the data source, and selecting a target monitoring tool;
step S2: monitoring a request and a response of data between the client and the server by using the target monitoring tool;
and step S3: analyzing the request and the response, and positioning a data source of the request and the response;
and step S4: according to the positioning result, a customized processing program and a configuration file of the service system are compiled, wherein the customized processing program inherits a default processing program;
step S5: and acquiring target service data from the server by using the target customized processing program, finishing the request and the arrangement of the target service data, generating a processing result and returning the processing result to a calling party.
There are many current sniffers, and in an alternative embodiment of the present invention, the sniffers are shown to include Wireshark, hypertext transfer protocol (HTTP) sniffer, and SQLTracker.
Wirereshark is a well-known network packet analysis tool that can be used to capture network packets, such as TCP packets and UDP packets, coming in and going out of a computer and display the relevant information of the network packets, including the IP addresses and ports of the sender and receiver of the network packets, the original data of the network packets, etc., in the best possible detail. However, wireshark is a relatively primitive network listening tool, providing only support for the HTTP protocol for the application layer protocol. When the client accesses the server through HTTPS, wirereshark can intercept the TCP packet sent, but does not decrypt it, so that the URL address, parameters of the request, and the returned result cannot be obtained. When accessing the database server, the client sends a network packet to the database server, and the TCP packet can be intercepted by Wireshark, so that the IP address and the port of the database server are obtained, but a plaintext database request and a plaintext return result cannot be obtained.
For some specific cases, higher-level snooping tools such as HTTP snooper and database snooper SQLTracker can be used to snoop the data calls.
Fiddler is a Web debugging agent which can record all HTTP and HTTPS flows sent by a computer and can compare a response with service data so as to obtain an access mode of a data service.
SQLTracker is a submodule in the load software that can listen to all requests sent to the database through the OCI interface, including SQL statements, calls to stored procedures, COMMIT statements, etc.
Although the three tools can solve most problems, under some special conditions, certain vulnerabilities exist, for example, the execution result cannot be obtained for the SQL statement by the SQLTracker.
For data requests, it is not enough to simply obtain the SQL statements sent to the database. When a user performs an operation in a client to obtain data, the client may send a request to the database server multiple times. For the requests with idempotency, operation reproduction can be carried out according to the specific content of the requests, and the re-executed results are used for replacing the previous results and being compared with the business data so as to judge which request or requests return the business data. But for requests without idempotency, such as database addition (INSERT), deletion (DELETE), modification (UPDATE), and some stored procedures, operation recurrence cannot be performed because the result of re-execution is not necessarily the same as the result of the previous execution. So, although all the executed database requests are available, in some cases the database requests cannot be located precisely.
Under the condition that the existing tools cannot meet the requirements, the framework provides a monitoring tool design idea based on a system mechanism, and the tools can be designed and realized according to the monitoring tool design idea, so that the purposes of intercepting requests and responding are achieved. The system level mechanism mainly includes two mechanisms, namely a callback mechanism and a hook mechanism (hooking).
In a preferred embodiment of the present invention, it is shown that the listening tool is implemented based on a callback mechanism, and the implementation steps of the callback mechanism may specifically include:
according to a user-defined callback function mechanism of a third-party library, compiling a target callback function according to the mechanism specification and compiling the target callback function into a dynamic link library; the target callback function is used for intercepting data requests and responses between the client and the server;
and configuring a current environment variable, and automatically loading the dynamic link library and executing the target callback function when the target callback function runs.
The first interception mechanism at the system level is the callback mechanism. The third-party library may be an Oracle database, which provides a callback function. The Oracle database provides a set of interfaces called as OCI (Oracle Call Interface) for clients to access the database server, and all accesses to the database server, including the execution of the processes of adding, deleting, checking, modifying and storing the database, need to Call the OCI interfaces. OCI provides a mechanism for User-Defined Callback functions (User-Defined Callback). The user writes a callback function according to its specification and compiles it into a Dynamic Link Library (DLL). By configuring the environment variables, the OCI function automatically loads the dynamic link libraries and executes the callback function in the dynamic link libraries at the time of running. These user-defined callback functions (target callback functions) may be used to intercept the OCI functions and thereby intercept requests and received responses from clients to the database server.
In another preferred embodiment of the present invention, it is shown that the listening tool is implemented based on a hook mechanism, and the implementation steps of the hook mechanism may specifically include:
determining an objective function provided by the dynamic link library;
loading an executable file PE file of the target function; the PE format file comprises an export table and an import table, wherein the export table is used for storing all symbol names needing exporting and symbol addresses corresponding to the symbol names; the import table is used for storing all symbol names needing to be imported;
according to the loading, determining the position pointed by the address of the target function in the import table/export table;
intercepting parameters and return values of the target function before and/or after executing the target function by one or more of the following substeps;
wherein the substeps comprise:
and a substep A: modifying the export table to enable the address in the export table to point to a new function, and calling the function needing to be exported from the new function;
and a substep B: modifying the import table to enable the address in the import table to point to a new function;
and a substep C: modifying the first few bytes of the target function to enable the address of the target function in the import table to jump to a new address.
The second interception mechanism at the system level is the hook mechanism. Dynamically linked libraries often require some function to be provided to other executables or dynamically linked libraries, a behavior known as symbol derivation. When a program needs to use functions or variables from other dynamically linked libraries, symbol import is required. The file format of the Windows platform Executable program and the dynamic link library is PE (Portable Executable) format. In a PE file, there are two important structures: the Export Table (EAT) and the Import Table (IAT) respectively store all the symbol names to be exported, the corresponding symbol addresses and all the symbol names to be imported. When a PE file is loaded, one of the loader's tasks determines the addresses of all the functions that need to be imported. When a program calls a function provided by the dynamic link library, the function entry is the position pointed by the address in the import table. From the above analysis, it can be seen that the three substeps described above (substeps A, B, C) can be used if we wish to add new functionality before and after execution of some function provided by the dynamically linked library. The three approaches are hook mechanisms in the system mechanism. By the hook mechanism, new functions can be added before and after the function is executed, and parameters and return values of the function are intercepted, so that a calling mode of data is obtained.
Using the callback mechanism and the hook mechanism, a listening tool can be designed and implemented to intercept data requests and responses between the client and the server. And obtaining the mode of the client request data by performing keyword retrieval on the response.
According to the callback mechanism and the hook mechanism, the step S2 may be implemented as follows:
and monitoring a data request and a data response between the client and the server by utilizing the callback mechanism or the hook mechanism.
And then, aiming at the data which cannot be positioned, a callback mechanism and a hook mechanism can be utilized to position the data source of the request and the response.
Parameters may exist in the request address or the request body. Some of the parameters are fixed for the data interface, and some of the parameters are variable, such as the conditions of the query. The data interface is manufactured through the interoperation system, and fixed parameters can be directly coded in a processing program or written in a configuration file; for the changed parameters it needs to be provided in the request address or in the request body. The parameter information in the request and the parameters used in the handler may be configured in the data interface configuration file.
Because the customized processing program inherits the default processing program provided by the running platform and the default processing program provides a complete processing flow, the customized processing program written according to the processing result only needs to send a request to the original system according to one or a plurality of continuous requests obtained by positioning in the customized processing program, and then corresponding processing is carried out after response is obtained, and the result is returned to the default processing program. Wherein the requested parameters are derived from either the configuration file or the parameters in the data interface request.
Finally, a configuration file needs to be written, and the data interface configuration file is associated with the customized processing program, so that the operating platform can obtain parameters and configuration by analyzing the data interface file after receiving the data request, and then find the corresponding customized processing program to complete the processing of the request.
In the above steps, the default handler adopts a template method design mode, and the framework also provides the default handler for the developer to use. The template method design mode defines an algorithm flow in a method of a base class, delays some steps to be realized in a subclass, and provides some general methods for calling the subclass method.
In an alternative embodiment of the invention it is shown that the default handler comprises the following steps:
carrying out preprocessing work to obtain a database or network connection;
processing the request sent by the database or the network and returning to the request object;
serializing the request object and releasing the connection.
In addition, since the opening or closing of the connection in the above steps consumes system performance, an alternative embodiment of the present invention shows a solution, which can reduce consumption of system performance, and specifically may be:
and in the default processing program, establishing a connection pool for each type of connection, and uniformly managing by the default processing program.
When the client accesses resources and services through the network, a tool for monitoring the network can be used for monitoring the network request, all network requests sent by the client and received responses are intercepted while the client is operated, and the received responses and the service data are compared to obtain an access mode of the data service.
Referring to fig. 5, there is shown a schematic diagram of architecture of the rich client business service encapsulation and calling system runtime, and the system of the present invention provides business data services of C/S system in the form of Web API at runtime. The data request firstly arrives at the management center, and arrives at the operation platform after passing through the caching module, the flow control module and the statistic module. The cache module, the flow control module and the statistics module all belong to existing modules in an interoperation system, and are not described herein again. After the access request reaches the operation platform, the API routing module (also belonging to the existing module in the interoperation system) analyzes the parameters of the request, finds out the customized processing program according to the data interface configuration file in the parameters, and calls the customized processing program to process the access. The custom handler inherits the default handler so the request first reaches the default handler, executing the framework logic. The custom processing program requests the original system according to the requested parameters and the configuration of the data interface, arranges the response, returns the result to the default processing program, and returns the result to the upper-layer caller by the default processing program.
In summary, the present invention provides a management function of a service data interface based on functions of a system driver monitoring module, a system driver scheduling module, a system driver default handler module, and a system driver customized handler module, so as to obtain a way for a client to access a server according to a client application; under the condition that an application layer protocol between the client and the server is unknown, the access mode of the server interface can be obtained by utilizing a callback mechanism and a hook mechanism, so that the problem in the prior art is solved, and the service of the legacy Windows application-oriented service data is realized. In the system-driven flow, the framework can directly acquire the service data from the server without operating the client, so that the service system has higher time and space efficiency during operation.
The invention will be further described with reference to a specific example.
Examples are the Y city dock system:
in an embodiment of the present invention, the basic service subsystem of the Y city terminal can input relevant information, such as the name of the incoming ship, the name of the outgoing ship, the number of the bill of lading, the time of the incoming ship, the time of the outgoing ship, etc., in the "incoming box query" interface of the menu bar "4 yard management". The names of the ships entering the port and the ships leaving the port are not directly input, and buttons beside the input boxes are clicked to select in the popped dialog boxes. The operation interface of the 'coming port box query' is shown in figure 7.1, and the query result is shown in figure 7.2.
In order to serve the query result data, we need to trace the source of the data first and then access the system to obtain the data. The application program needs to install a PowerBuilder runtime environment and an Oracle client during running, and can be concluded that the application program is developed through the PowerBuilder and is directly connected with an Oracle database through an OCI (operating System interface) to acquire data. Therefore, the database monitoring tool ocimontitor in the system driving process is used for intercepting SQL requests sent by the application program to the database server as shown in FIG. 7.3. When the operation of 'box query in port' is executed, the client sends 5 SQL requests to the database server, which correspond to 72 to 76 statements in the figure. First, search in Ocimeitor according to the data displayed in the interface, find that the final returned result is derived from the query result of statement 76. Considering the SQL statement of statement 76, the parameter value "61412" appears in the query condition. Continuing to search for "61412" in Ocimetric, the value appears in the query result of statement 72 and statement 73. Statements 74 and 75 are further analyzed, with the query results independent of the final data. It can be concluded that the data for the "incoming box query" results from the sequential execution of the three statements 72, 73, 76. After the data source is located, a database needs to be connected to obtain the data. When connecting a database, the address, user name, password, and database driver class name of the database need to be obtained. Wherein the database driver class name is obtainable by the database type. Because the wharf system in the Y market is developed by using the PowerBuilder, a reverse engineering tool can be used for processing the client, so that other connection information of the database can be obtained. The custom handler inherits txtdbrrspshandler and needs to implement a function in which data is retrieved from a database to achieve the purpose of retrieving data. In the function of the custom handler to get data, statement 72 is executed first, with the resulting query result as the arguments of statement 73 and statement 76. Then, statements 73 and 76 are executed in sequence to obtain the database request result. In the TxtDbRspHandler, before the method for processing the database request is executed, a database connection pool and connection are acquired; after the function of the custom handler for acquiring data is executed, the TxtDbRspHandler serializes the request result, releases the connection and returns the result.
After the handler is deployed, the user can access the data through the Web API. The specific API is https:// localhost:1626/hd/? iw-apikey =123&iw-cmd = inbox, which may be followed by query parameters, and the incoming port box query service request result is shown in fig. 7.4. The parameters and meanings of the interface request are shown in a table 1, and the parameters and meanings of the part of the returned parameters are shown in a table 2.
Table 1: inbound box query service request parameters and meanings
Figure BDA0002095611050000131
Table 2: inbound box query service return parameters and meanings
Figure BDA0002095611050000132
Among the parameters of the incoming box query interface, the incoming number and the outgoing number come from the incoming ship and the outgoing ship dialog boxes, respectively. Similarly, when the dialog boxes of the inbound ship and the outbound ship are opened, the executed SQL statements are captured, the customized processing program is realized and deployed, and a user can access data through the Web API. The specific API is as follows: https:// localhost:1626/hd/? iw-apikey =123 and iw-cmd = inship. The results of the query service execution of the wharf system of Y city are shown in fig. 7.5, and the meanings of part of the return parameters are shown in table 3.
Table 3: y city wharf system inbound ship query service return parameter and meaning
Figure BDA0002095611050000133
Aiming at the real heritage Windows application, the invention realizes the servitization of the port-coming data in the application, makes the query interface, completes the servitization work of the business data by using the framework provided by the text, and provides the Web API for the customer to access the service.
It should be noted that for simplicity of description, the method embodiments are shown as a series of combinations of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Example 3
As shown in fig. 6, based on the same inventive concept, corresponding to the method in embodiment 2 of the present invention, a block diagram of a rich client service encapsulation and invocation device is shown, where the device is based on an information protocol of interaction between a client and a server as well as between the client and a data source, and the device specifically includes the following modules:
a monitoring tool selecting module 601, configured to determine a library used when the client accesses the data source, and select a target monitoring tool;
a data monitoring execution module 602, configured to monitor a request and a response of data between the client and the server using the target monitoring tool;
a data source locating module 603, configured to analyze the request and the response, and locate a data source of the request and the response;
a system driver writing module 604, configured to write a customized processing program and a configuration file of the service system according to the positioning result, where the customized processing program inherits a default processing program;
and the service data interface module 605 is configured to acquire target service data from the server by using the target customized processing program, complete a request and a sorting for the target service data, generate a processing result, and return the processing result to the caller.
An embodiment of the present invention further provides an apparatus, including:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform one or more methods as described in embodiments of the invention.
Embodiments of the invention also provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform one or more of the methods of embodiments of the invention.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are all described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same and similar between the embodiments may be referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "include", "including" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or terminal device including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The rich client business service packaging and calling system, the rich client business service packaging and calling method and the rich client business service packaging and calling device provided by the invention are described in detail, specific examples are applied to explain the principle and the implementation mode of the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A rich client business service packaging and calling method is characterized in that the method is applied to a rich client business service packaging and calling system, the system comprises an interoperation system, the interoperation system comprises a data interface generation platform and a data interface operation platform, and the system is based on an information protocol of interaction between a client and a server as well as between the client and a data source;
the data interface generation platform comprises: the system driving monitoring module is used for recording a calling request of the rich client to the data; the system driving arrangement module is used for assisting a developer to quickly position one or a plurality of continuous requests; the data interface operation platform further comprises: the system driving default processing program module is used for adopting a template method design mode and providing a framework method of a processing process except a specific access data source; the system driving customizing processing program module is used for finishing specific work of accessing the data source;
the method is based on an information protocol of interaction between a client side, a server side and a data source, and comprises the following steps:
step S1: determining a program library used when the rich client accesses the data source, and selecting a target monitoring tool;
step S2: monitoring requests and responses of data between the rich client and the server by utilizing the target monitoring tool;
and step S3: analyzing the request and the response, and positioning a data source of the request and the response;
and step S4: according to the positioning result, a customized processing program and a configuration file of the system are compiled, wherein the customized processing program inherits a default processing program;
step S5: and acquiring target service data from the server by using the customized processing program, finishing the request and the arrangement of the target service data, generating a processing result and returning the processing result to a calling party.
2. The method of claim 1, wherein the listening tools comprise network packet analysis software Wireshark, hypertext transfer protocol (HTTP) listening tool Fiddler, and database listening tool SQLTracker.
3. The method of claim 1, wherein the listening tool is implemented based on a callback mechanism, and wherein the step of implementing the callback mechanism comprises:
according to a user-defined callback function mechanism of a third-party library, compiling a target callback function according to the mechanism specification and compiling the target callback function into a dynamic link library; the target callback function is used for intercepting data requests and responses between the client and the server;
and configuring a current environment variable, and automatically loading the dynamic link library and executing the target callback function when the target callback function runs.
4. The method of claim 3, wherein the listening tool is implemented based on a hooking mechanism, and wherein the hooking mechanism is implemented by:
determining an objective function provided by the dynamic link library;
loading an executable file PE file of the target function; the PE file comprises an export table and an import table, wherein the export table is used for storing all symbol names needing exporting and symbol addresses corresponding to the symbol names; the import table is used for storing all symbol names needing to be imported;
according to the loading, determining the position pointed by the address of the target function in the import table/export table;
before and/or after the target function is executed, intercepting parameters and return values of the target function by utilizing one or more sub-steps;
wherein the substeps comprise:
modifying the export table to enable the address in the export table to point to a new function, and calling the function needing to be exported from the new function;
modifying the import table to enable the address in the import table to point to a new function;
modifying the first few bytes of the target function to enable the address of the target function in the import table to jump to a new address.
5. The method of claim 1, wherein the default handler comprises the steps of:
carrying out preprocessing work to obtain a database or network connection;
processing the request sent by the database or the network and returning to a request object;
serializing the request object and releasing the connection.
6. The method of claim 5, wherein the method comprises:
and in the default processing program, establishing a connection pool for each type of connection, and uniformly managing by the default processing program.
7. A rich client business service packaging and calling device is characterized in that the device is applied to a rich client business service packaging and calling system, the system comprises an interoperation system, the interoperation system comprises a data interface generation platform and a data interface operation platform, and the system is based on an information protocol of interaction between a client and a server as well as between the client and a data source;
the data interface generation platform comprises: the system driving monitoring module is used for recording a data calling request of the rich client; the system driving arrangement module is used for assisting a developer to quickly locate one or a plurality of continuous requests; the data interface operation platform further comprises: the system driving default processing program module is used for adopting a template method design mode and providing a framework method of a processing process except a specific access data source; the system driving customizing processing program module is used for finishing specific work of accessing the data source;
the device is based on the information protocol of interaction between the client side, the server side and the data source, and comprises the following components:
the monitoring tool selection module is used for determining a program library used when the rich client accesses the data source and selecting a target monitoring tool;
the data monitoring execution module is used for monitoring the request and the response of the data between the rich client and the server by utilizing the target monitoring tool;
the data source positioning module is used for analyzing the request and the response and positioning the data source of the request and the response;
the system driving writing module is used for writing a customized processing program and a configuration file of the system according to the positioning result, wherein the customized processing program inherits a default processing program;
and the service data interface module is used for acquiring target service data from the server by using the customized processing program, finishing the request and the arrangement of the target service data, generating a processing result and returning the processing result to the caller.
8. An apparatus, comprising:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform the rich client business service encapsulation and invocation method of any of claims 1-6.
9. A machine-readable medium having stored thereon instructions, which when executed by one or more processors, cause the processors to perform the rich client business service encapsulation and invocation method of any of claims 1-6.
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 CN110347374A (en) 2019-10-18
CN110347374B true 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)

Families Citing this family (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
CN114546530B (en) * 2022-02-25 2023-10-24 博锐尚格科技股份有限公司 Big data loading method, device, equipment and medium
CN115002180B (en) * 2022-05-26 2024-05-14 上海商米科技集团股份有限公司 Network request operation monitoring method, device and computer readable medium

Citations (5)

* 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10664331B2 (en) * 2016-09-28 2020-05-26 Amazon Technologies, Inc. Generating an application programming interface

Patent Citations (5)

* 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
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

Also Published As

Publication number Publication date
CN110347374A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN110347374B (en) Rich client business service packaging and calling system, method and device
CN112910945B (en) Request link tracking method and service request processing method
US10372596B2 (en) Distributed system test device
CN110381026B (en) Business service packaging and accessing system, method and device for rich client
WO2022016847A1 (en) Automatic test method and device applied to cloud platform
US10922357B1 (en) Automatically mapping natural language commands to service APIs
Baresi et al. Microservices: The evolution and extinction of web services?
US20110137909A1 (en) Location independent execution of user interface operations
CN112612988A (en) Page processing method and device, computer equipment and storage medium
US9563485B2 (en) Business transaction context for call graph
CN114116509A (en) Program analysis method, program analysis device, electronic device, and storage medium
US20180359317A1 (en) System and method for non-intrusive context correlation across cloud services
Akbar et al. The importance of granularity in multiobjective optimization of mobile cloud hybrid applications
US20230118838A1 (en) Advanced agent instrumentation for opentelemetry implementations
US20160241585A1 (en) Analyze code that uses web framework using local parameter model
US20220122038A1 (en) Process Version Control for Business Process Management
US10664378B2 (en) Visualizing a user-centric stack frame graph
CN113407440B (en) Testing system and method for wireless communication module
WO2024066622A1 (en) Cloud system testing method and apparatus
US20240184550A1 (en) Dynamically applying profile-guided optimization to a dbms
CN113946386B (en) Screen capture control method and device, computer equipment and storage medium
EP4409398A1 (en) Advanced agent instrumentation for opentelemetry implementations
CN115904949A (en) Interface simulation method, device, equipment and storage medium
CN117389635A (en) Method and device for safely starting server based on go language
CN118170961A (en) Cloud native environment information processing method, device, equipment, storage medium and program product

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