CN116661906A - Transaction data processing method and device and electronic equipment - Google Patents
Transaction data processing method and device and electronic equipment Download PDFInfo
- Publication number
- CN116661906A CN116661906A CN202310637990.9A CN202310637990A CN116661906A CN 116661906 A CN116661906 A CN 116661906A CN 202310637990 A CN202310637990 A CN 202310637990A CN 116661906 A CN116661906 A CN 116661906A
- Authority
- CN
- China
- Prior art keywords
- target
- class
- interface
- data processing
- transaction data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/73—Program documentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Library & Information Science (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- General Business, Economics & Management (AREA)
- Stored Programmes (AREA)
Abstract
The specification provides a transaction data processing method, a transaction data processing device and electronic equipment, which can be used in the financial field. Based on the method, after receiving a target transaction data processing request, firstly collecting a transaction type identifier in the target transaction data processing request as a target entry parameter; determining a target factory Bean object corresponding to a target interface class of the target interface; sending the target entry to the target factory Bean object; providing the target input parameters to corresponding method interceptors through the target factory Bean objects; the interceptor executes the target implementation class matched with the target entry parameters in a dynamic injection mode based on a preset application program framework according to the target entry parameters so as to realize target transaction data processing aiming at the target transaction data processing request. Therefore, a dynamic injection mode can be flexibly adopted in the operation process, and transaction data processing aiming at different transaction types can be efficiently completed by using the same interface.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a transaction data processing method, a transaction data processing device, and an electronic device.
Background
In the financial field, for transaction data processing requests of different transaction types in the same business scene, different data processing modes are often required to be adopted for targeted processing.
Based on the prior method, before implementation, a technician is required to write related if/else or Switch branch judgment code statements in advance. Correspondingly, in the specific implementation, the branch judgment statement needs to be executed to carry out branch judgment, then a corresponding processing mode is selected according to a branch judgment result, and then specific transaction data processing is carried out based on the processing mode.
Based on the method, the implementation process is relatively complicated. In addition, the universality and the expandability are relatively poor, for example, when a transaction type needs to be newly added to the interface, the design logic of the previous code statement is required to be known, and the original branch judgment code statement comprising if/else or Switch and the like is rewritten again, so that the workload of technicians is relatively large.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The specification provides a transaction data processing method, a device and an electronic device, which can efficiently and automatically complete transaction data processing aiming at different transaction types by using the same interface by effectively utilizing the characteristics of a preset application program framework on the premise of not needing external dependence and adopting a dynamic injection mode.
The specification provides a transaction data processing method, which comprises the following steps:
receiving a target transaction data processing request directed to a target interface of a target application; wherein, the target transaction data processing request at least carries a transaction type identifier;
collecting a transaction type identifier in a target transaction data processing request as a target entry; determining a target factory Bean object corresponding to a target interface class of the target interface;
sending the target entry to a target factory Bean object;
providing the target entry to a corresponding method interceptor by a target factory Bean object;
the interceptor executes the target implementation class matched with the target entry parameters in a dynamic injection mode based on a preset application program framework according to the target entry parameters so as to realize target transaction data processing aiming at the target transaction data processing request.
In one embodiment, the preset application framework includes: a spring framework; correspondingly, the plant Bean object includes: factoryBean object based on spring framework.
In one embodiment, the method interceptor is used for executing a target implementation class matched with the target entry in a dynamic injection mode based on a preset application program framework according to the target entry, and the method comprises the following steps:
Determining a target implementation class matched with the target entry parameter from implementation classes of the target interface class according to the target entry parameter by using a method interceptor;
acquiring a target implementation class according to the application front-back relation;
and executing the target implementation class through reflection based on a preset application program framework.
In one embodiment, the implementation class of the target interface class includes a plurality of implementation classes; wherein each implementation class corresponds to at least one transaction type.
In one embodiment, the method interceptor is configured to determine, from the implementation classes of the target interface classes, a target implementation class that matches the target entry according to the target entry, including:
retrieving a name field of an implementation class of the target interface class by using a method interceptor; and determining the implementation class of which the field matched with the target entry exists in the name field as the target implementation class matched with the target entry.
In one embodiment, the method further comprises:
retrieving annotation data of the implementation class of the target interface class by using a method interceptor; and determining the implementation class of the field matched with the target entry in the annotation data as the target implementation class matched with the target entry.
In one embodiment, prior to receiving the target transaction data processing request directed to the target interface of the target application, the method further comprises:
Receiving a dynamic annotation request for a target application;
responding to the dynamic annotation request, and determining a target interface needing dynamic injection in a target application program;
annotating the target interface with the specified characteristic characters according to a preset processing rule; the target interface class corresponding to the target interface and the realization class of the target interface class are customized; wherein one implementation class corresponds to at least one transaction type of data processing mode.
In one embodiment, the target interface is annotated with specified feature characters according to preset processing rules; after the target interface class corresponding to the target interface and the implementation class of the target interface class are customized, the method further comprises:
receiving a new transaction type setting request about a target interface of a target application program;
responding to the newly added transaction type setting request, and determining a target interface class of a target interface according to the characteristic characters;
and adding an implementation class corresponding to the newly added transaction type into the implementation class of the target interface class according to the newly added transaction mode setting request and a preset processing rule.
In one embodiment, the target interface is annotated with specified feature characters according to preset processing rules; after the target interface class corresponding to the target interface and the implementation class of the target interface class are customized, the method further comprises:
Receiving and responding to the initialization instruction, and scanning an interface class under the current running environment class path of the target application program to obtain an interface class scanning result;
determining a target interface class of a target interface to be dynamically injected according to the interface class scanning result;
generating at least one method interceptor;
creating a factory Bean object corresponding to the target interface class; a method interceptor is obtained and placed in the factory Bean object.
In one embodiment, scanning for interface classes under the current run-environment class path of the target application includes:
and scanning interface classes under the current running environment class path of the target application program based on the corresponding screening rules by using a class path scanning function module of the Spring framework.
In one embodiment, after the target implementation class matched with the target entry is executed by the method interceptor according to the target entry in a dynamic injection manner based on a preset application framework to implement target transaction data processing for the target transaction data processing request, the method further includes:
obtaining a corresponding target play parameter as a target transaction data processing result;
and sending the target transaction data processing result to the next interface in the target application program.
The present specification also provides a transaction data processing apparatus comprising:
a receiving module for receiving a target transaction data processing request directed to a target interface of a target application; wherein, the target transaction data processing request at least carries a transaction type identifier;
the acquisition module is used for acquiring a transaction type identifier in the target transaction data processing request as a target entry parameter; determining a target factory Bean object corresponding to a target interface class of the target interface;
the sending module is used for sending the target entering parameters to a target factory Bean object;
the providing module is used for providing the target incoming parameters to the corresponding method interceptors through the target factory Bean object;
the execution module is used for executing the target implementation class matched with the target entry by using the method interceptor according to the target entry and based on a preset application program framework in a dynamic injection mode so as to realize target transaction data processing aiming at the target transaction data processing request.
The present specification also provides an electronic device comprising a processor and a memory for storing processor-executable instructions which, when executed by the processor, implement the relevant steps of the transaction data processing method.
The present specification also provides a computer readable storage medium having stored thereon computer instructions which when executed by a processor perform the steps of: receiving a target transaction data processing request directed to a target interface of a target application; wherein, the target transaction data processing request at least carries a transaction type identifier; collecting a transaction type identifier in a target transaction data processing request as a target entry; determining a target factory Bean object corresponding to a target interface class of the target interface; sending the target entry to a target factory Bean object; providing the target entry to a corresponding method interceptor by a target factory Bean object; the interceptor executes the target implementation class matched with the target entry parameters in a dynamic injection mode based on a preset application program framework according to the target entry parameters so as to realize target transaction data processing aiming at the target transaction data processing request.
The present specification also provides a computer program product comprising a computer program which when executed by a processor performs the relevant steps of the transaction data processing method.
Based on the transaction data processing method, the device and the electronic equipment provided by the specification, after receiving the target transaction data processing request, the transaction type identifier in the target transaction data processing request can be collected as a target entry parameter; and determining a target factory Bean object corresponding to a target interface class of the target interface; sending the target entry to the target factory Bean object; providing the target input parameters to corresponding method interceptors through the target factory Bean objects; the interceptor executes the target implementation class matched with the target entry parameters in a dynamic injection mode based on a preset application program framework according to the target entry parameters so as to realize target transaction data processing aiming at the target transaction data processing request. Therefore, the method can effectively and automatically complete transaction data processing aiming at different transaction types by using the same interface in a dynamic injection mode in the program running process on the premise of not needing external dependence by effectively utilizing the frame characteristics of the preset application program frame, and improves the overall transaction data processing efficiency; meanwhile, the code sentences used for the related code sentences are simpler, and the code sentences have better universality and expandability. Furthermore, based on the method, when the transaction type is needed to be newly added to the interface, the implementation class corresponding to the newly added transaction type in the definition interface class is only needed to be added to the original code statement, the processing logic of the original code statement is not needed to be known, and other existing code statements are not needed to be additionally adjusted and modified, so that the related workload of technicians can be effectively reduced, the operation threshold of the technicians is reduced, and the diversified scene demands are better met.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure, the drawings that are required for the embodiments will be briefly described below, and the drawings described below are only some embodiments described in the present disclosure, and other drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a flow diagram of a transaction data processing method provided by one embodiment of the present disclosure;
FIG. 2 is a schematic diagram of one embodiment of a transaction data processing method provided by embodiments of the present disclosure, in one example scenario;
FIG. 3 is a schematic diagram of one embodiment of a transaction data processing method provided by embodiments of the present disclosure, in one example scenario;
FIG. 4 is a schematic diagram of one embodiment of a transaction data processing method provided by embodiments of the present disclosure, in one example scenario;
FIG. 5 is a schematic diagram of one embodiment of a transaction data processing method provided by embodiments of the present disclosure, in one example scenario;
FIG. 6 is a schematic diagram of one embodiment of a transaction data processing method provided by embodiments of the present disclosure, in one example scenario;
FIG. 7 is a schematic diagram of the structural composition of a server according to one embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a transaction data processing device according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
Referring to fig. 1, an embodiment of the present disclosure provides a transaction data processing method. In particular implementations, the method may include the following:
s101: receiving a target transaction data processing request directed to a target interface of a target application; wherein, the target transaction data processing request at least carries a transaction type identifier;
s102: collecting a transaction type identifier in a target transaction data processing request as a target entry; determining a target factory Bean object corresponding to a target interface class of the target interface;
S103: sending the target entry to a target factory Bean object;
s104: providing the target entry to a corresponding method interceptor by a target factory Bean object;
s105: the interceptor executes the target implementation class matched with the target entry parameters in a dynamic injection mode based on a preset application program framework according to the target entry parameters so as to realize target transaction data processing aiming at the target transaction data processing request.
The above interface class may be specifically understood as a declaration of an abstract method for an interface in an application based on a corresponding programming language (for example, JAVA language, etc.), and may generally include data such as a method name, an entry parameter, a return value, etc. The implementation class concrete can be understood as rule logic for processing and implementing abstract method concrete of interface class.
Based on the above embodiment, after receiving the target transaction data processing request, by fully utilizing the characteristics of the preset application program framework, the method interceptor in the target factory Bean object of the target interface can automatically determine and execute the matched target implementation class by adopting a dynamic injection mode on the premise of not needing external dependence, so that the transaction data processing aiming at different transaction types can be efficiently completed by using the same interface, and the overall transaction data processing efficiency is improved.
The target transaction data processing request may specifically be a transaction data processing request received when the target application program is started and runs. The transaction type identifier is used to indicate a transaction type to which the target transaction data processing request relates.
In some embodiments, the target application may be an application written and executed based on a preset application framework. Specifically, the target application may be a financial transaction type application, for example, a client application of XX banking, or a YY financial application, or the like. Of course, it should be noted that the above-listed target application is only a schematic illustration. In specific implementation, the target application program may also include other types of application programs, such as a navigation application program, a shopping application program, and the like, according to specific application scenarios and processing requirements. The present specification is not limited to this.
In the case where the target application includes a financial transaction type application (e.g., a client application of XX banking), referring to fig. 2, a user may initiate transaction data processing requests of different business scenarios, such as a loan application request, a transfer processing request, an account inquiry request, etc., to a corresponding system server through the target application installed on the terminal device.
The transaction data processing request of each business scene can be subdivided into a plurality of different types of transaction data processing requests. For example, the loan application request may specifically include: a loan application request involving trade financing, a loan application request involving flowing funds, etc. Since there may be differences in the service content involved in the different types of transaction data processing requests, the data processing modes for the different types of transaction data processing requests are correspondingly different.
After receiving a target transaction data processing request initiated by a user, the system server can determine a target service scene corresponding to the target transaction data processing request; and distributing the target transaction data processing request to a target interface corresponding to the target service scene to perform specific processing.
After receiving the target transaction data processing request, the target interface can acquire a transaction type identifier in the target transaction data processing request as a target entry through a method interceptor of a target factory Bean object of a target interface class according to a corresponding code statement based on a preset application program framework, and find a matched target implementation class in an implementation class of the target interface class according to the target entry, so as to perform dynamic injection; executing the target realization class through reflection, and performing target transaction data processing based on the corresponding data processing mode to obtain a corresponding target transaction data processing result as a target reference; then, the system server can feed back the target play parameter as a target transaction data processing result to the terminal equipment of the user; or based on corresponding processing logic, to the next interface for further processing.
Specifically, referring to fig. 2, for example, a request for a loan application involving a trade financing class is initiated by a user via a terminal device. After receiving the loan application request, the system server may distribute the loan application request to a target interface responsible for the loan application service, for example, loanApplyInterface. A target factory Bean object (e.g., a FactoryBean) of a target interface class that interfaces with a target may extract a transaction type identification in a loan application request involving a trade financing class for indicating the trade financing class as a target participation parameter and provide to a corresponding method interceptor (e.g., method Interceptor). The interceptor can search the realization class of the target interface class according to the target entry so as to determine the target realization class matched with the trade financing class; executing the target implementation class through reflection, and checking the application condition of the trade financing class for the user to respond to the loan application request related to the trade financing class, so as to complete corresponding target transaction data processing and obtain a corresponding application condition checking result; then the application condition verification result is sent to the terminal equipment; and the terminal equipment displays the application condition verification result to the user.
In this embodiment, the system server may specifically include a background server applied to a side of a financial transaction service platform and capable of implementing functions such as data transmission and data processing. Specifically, the system server may be, for example, an electronic device having data operation, storage function and network interaction function. Alternatively, the system server may be a software program running in the electronic device that provides support for data processing, storage, and network interactions. In the present embodiment, the number of servers included in the system server is not particularly limited. The system server may be one server, several servers, or a server cluster formed by several servers.
In this embodiment, the terminal device may specifically include a front end applied to a user side and capable of implementing functions such as data acquisition and data transmission. Specifically, the terminal device may be, for example, an electronic device such as a desktop computer, a tablet computer, a notebook computer, or a smart phone. Alternatively, the terminal device may be a software application capable of running in the above-mentioned electronic device. For example, it may be a financial transaction APP running on a smart phone, etc.
In some embodiments, the target transaction data processing request may specifically further carry a service scenario identifier. Correspondingly, a target interface for transaction data processing of the service scene can be determined according to the service scene identifier; and then the target interface class corresponding to the target interface can be determined.
In some embodiments, the preset application framework may include: spring framework. The Spring Framework (Spring Framework) may specifically refer to an open-source J2EE application Framework, which is a lightweight container capable of managing a life cycle of a Spring Bean.
Specifically, the Spring frame used in this embodiment may specifically be Spring 5, or another version of Spring frame with a version lower than Spring 5.
The Spring Bean (or called Spring Bean, bean object, or simply Bean, object) may specifically be an object managed by a Spring framework during operation, where the Spring framework is responsible for management such as creation, dependency injection, section programming, destruction, and the like of the Bean object. The area in the Spring framework for managing Bean objects may be referred to as a Spring IOC container.
The IOC (Inversion of Control, control inversion) may be a design principle of object-oriented programming, and may be used to reduce the coupling degree between computer codes. Among them, the most common way is called dependency injection (Dependency Injection, DI for short), and another way is called dependency lookup (Dependency Lookup). By controlling the inversion, the object is created while the external entities of all objects in a regulatory system pass the references of the objects it depends on to it, also known as dependencies are injected into the object. The dependency injection (Dependency Injection) may specifically refer to a design mode for eliminating dependency relationships between classes, which is one of core concepts of the Spring framework, and one implementation way for controlling inversion.
The preset application program framework comprises the following steps: in the case of spring frames; correspondingly, the plant Bean object may specifically include: factoryBean object based on spring framework.
The above-mentioned factor Bean object based on the Spring framework may also be referred to as a Spring factory Bean (FactoryBean) (may be simply referred to as a factory Bean). There can be two types of beans in a Spring IOC container in general: common beans and factory beans. Specifically, a common Bean can be directly managed by a Spring IOC container; the factory Bean may specifically be a Bean object that is programmatically generated as needed.
Based on the existing method, static injection can only be realized by utilizing a spring framework, namely interface dependence (for example, realization class) to be injected can be appointed in advance only by a configuration mode when a code program is written; once the application based on the Spring framework is started, the dependence on the interface cannot be dynamically modified in the running process of the application, so that the implementation class of the interface cannot be flexibly changed in the running process of the application.
Based on the method provided by the description, the self characteristics of the spring framework can be fully utilized, and the dynamic injection of interface dependence can be realized in the running process of the application, namely, the realization class of the interface can be flexibly and dynamically changed in the running process of the application by combining the FactoryBean object based on the spring framework and the method interceptor.
Based on the above embodiment, by fully utilizing the self characteristics of the spring framework, under the condition that external dependence is not required to be introduced, the method interceptor of the FactoryBean object is utilized for dynamic injection, so that the implementation class of the interface can be flexibly changed in the application running process, and the transaction data processing aiming at different transaction types can be efficiently completed by utilizing the same interface.
In some embodiments, when the target application program runs, a corresponding target factory Bean object is created for the target interface class determined before, so that the Spring framework can directly automatically inject the created target factory Bean object into the target interface class, and dynamic injection can be automatically realized when needed in the running process.
In some embodiments, referring to fig. 3, the method interceptor executes, according to the target entry, a target implementation class matched with the target entry in a dynamic injection manner based on a preset application framework, and when implemented, may include the following:
s1: determining a target implementation class matched with the target entry parameter from implementation classes of the target interface class according to the target entry parameter by using a method interceptor;
s2: acquiring a target implementation class according to the application context (for example, application context);
s3: and executing the target implementation class through reflection based on a preset application program framework.
Based on the embodiment, the self characteristics of the preset application program framework can be fully utilized, and the matched target implementation class is determined in the application running process through the use method interceptor; and dynamically changing the dependence of the target interface into a target implementation class so as to realize target transaction data processing matched with the target transaction data processing request by executing the target implementation class.
In some embodiments, the implementation class of the target interface class may specifically include a plurality of implementation classes; wherein each implementation class corresponds to at least one transaction type. Each implementation class contains data processing patterns corresponding to at least one transaction type.
Specifically, each implementation class includes a specific execution instance of the data processing mode of the corresponding transaction type, and transaction data processing of the corresponding data processing mode can be implemented by executing the implementation class.
Before implementation, the information such as the target interface class of the target interface, the specific implementation class of the target interface class and the like can be written and defined according to preset processing rules. The specific process will be described later.
Based on the above embodiment, a plurality of implementation classes corresponding to a plurality of transaction types may be laid out in advance for the target interface class of the target interface, so that the implementation class of the target interface may be flexibly replaced according to specific situations in the subsequent operation process.
In some embodiments, the method interceptor determines, according to the target entry, a target implementation class that matches the target entry from implementation classes of the target interface class, where the method interceptor may include:
Retrieving a name field of an implementation class of the target interface class by using a method interceptor; and determining the implementation class of which the field matched with the target entry exists in the name field as the target implementation class matched with the target entry.
Before specific implementation, when defining the implementation class of the target interface class according to a preset processing rule, a field capable of representing the type of the implementation class can be used for naming. Accordingly, the method interceptor may find a matching implementation class by retrieving whether the name of the implementation class contains a field that is the same as or similar to the target entry.
Based on the above embodiment, the method interceptor can quickly find the matched target implementation class according to the field in the name of the implementation class.
In some embodiments, the method may further include the following when implemented: retrieving annotation data of the implementation class of the target interface class by using a method interceptor; and determining the implementation class of the field matched with the target entry in the annotation data as the target implementation class matched with the target entry.
Before implementation, according to a preset processing rule, when defining the implementation class of the target interface class, the implementation class can be annotated by using characters capable of describing the type of the implementation class, so as to obtain annotation data of the implementation class. Accordingly, the method interceptor may also find matching implementation classes by retrieving whether there are characters in the annotation data that are related to the target entry.
Based on the embodiment, the method interceptor can quickly find the matched target implementation class according to the characters in the annotation data of the implementation class.
In some embodiments, referring to fig. 4, before receiving the target transaction data processing request directed to the target interface of the target application, the method may further include, when implemented, the following:
s1: receiving a dynamic annotation request for a target application;
s2: responding to the dynamic annotation request, and determining a target interface needing dynamic injection in a target application program;
s3: annotating the target interface with the specified characteristic characters according to a preset processing rule; the target interface class corresponding to the target interface and the realization class of the target interface class are customized; wherein one implementation class corresponds to at least one transaction type of data processing mode.
The preset processing rule can be specifically understood as a writing rule of a code statement which can support dynamic injection during program running based on a preset application program framework.
Based on the above embodiment, before implementation, relevant code statements of the target application program may be written according to preset processing rules, so as to complete dynamic annotation for the target interface that needs to be dynamically injected in the running process. Based on the writing mode, related code sentences of the target application program are relatively simpler, and the method has better universality and expandability.
In some embodiments, when the method is implemented, a target interface which needs to be dynamically injected in the annotation operation process can be customized according to a dynamic annotation request about a target application program; the interface class of the target interface and one or more specific implementation classes possibly related to the interface class can be further customized.
In the specific annotation process, a character 'custom interface' can be used as a specified characteristic character to annotate a target interface which needs to be dynamically injected in the operation process. Further, while annotating the target interface, the annotation may also be kept to runtime so that the annotation is validated at program runtime. Specifically, a code statement public@interface custom interface annotation interface may be used; the method type of the interface can be annotated with the code statement @ Target ({ elementtype. Type }); the code statement @ Retention (Retention policy) annotation may also be used to be reserved to (and in effect at) the program runtime.
In some embodiments, the target interface is annotated with the specified feature characters in accordance with preset processing rules; after the target interface class corresponding to the target interface and the implementation class of the target interface class are customized, referring to fig. 5, when the method is implemented, the method may further include the following:
S1: receiving a new transaction type setting request about a target interface of a target application program;
s2: responding to the newly added transaction type setting request, and determining a target interface class of a target interface according to the characteristic characters;
s3: and adding an implementation class corresponding to the newly added transaction type into the implementation class of the target interface class according to the newly added transaction mode setting request and a preset processing rule.
The new transaction type setting request at least can carry a transaction type identifier of the new transaction type.
Correspondingly, according to the newly added transaction type, in the related code statement of the original target application program, the implementation class corresponding to the newly added transaction type can be directly added in the implementation class of the target interface under the premise of not modifying and adjusting the existing code statement.
Based on the embodiment, the operation threshold of the technician can be effectively simplified, the technician does not need to know the original code statement logic or additionally modify the existing code statement, and only needs to directly add the definition and annotation of the implementation class corresponding to the newly added transaction type in the implementation class of the target interface class, so that the workload of the technician is effectively reduced, and the target application program has better expansibility.
In some embodiments, the above-mentioned additional transaction type setting request may further carry a processing rule of a processing mode corresponding to the additional transaction type. Correspondingly, in the specific implementation, a corresponding execution instance capable of running directly can be generated according to the processing rule of the processing mode corresponding to the newly added transaction type, so as to obtain a corresponding implementation class.
In some embodiments, the method may also receive a transaction type delete request regarding a target interface of a target application when the method is embodied. Similarly, the technicians do not need to know the original code statement logic or otherwise modify the existing code statement, and only need to directly define and annotate the implementation class corresponding to the injury in the implementation class of the target interface class, so that the maintenance and modification of the target interface are more flexible and convenient.
In some embodiments, referring to FIG. 6, the target interface is annotated with specified feature characters according to preset processing rules; after the target interface class corresponding to the target interface and the implementation class of the target interface class are customized, the method can further comprise the following when being implemented in particular:
S1: receiving and responding to the initialization instruction, and scanning an interface class under the current running environment class path of the target application program to obtain an interface class scanning result;
s2: determining a target interface class of a target interface to be dynamically injected according to the interface class scanning result;
s3: generating at least one method interceptor;
s4: creating a factory Bean object corresponding to the target interface class; a method interceptor is obtained and placed in the factory Bean object.
Based on the above embodiment, the initialization operation can be performed according to the code statement related to the target application program, so that the pre-preparation is made, and the dynamic injection to the target interface can be smoothly realized by utilizing the self-characteristics of the preset application program framework in the subsequent operation process.
The initialization instruction may specifically be an instruction generated when the target application program is started.
In some embodiments, the scanning the interface class under the current running environment class path of the target application program may specifically include: and scanning interface classes under the current running environment class path of the target application program based on the corresponding screening rules by using a class path scanning function module of the Spring framework.
In the implementation, by using a class path scanning function module of a Spring framework, scanning all Java classes in the whole project related to the target application program, and based on the corresponding screening rule, screening out the target interface class of the target interface needing dynamic injection by judging whether a 'custom interface' annotation exists on the Java class, thereby obtaining the corresponding interface class scanning result
Based on the embodiment, the characteristics of the Spring framework can be fully utilized to rapidly and conveniently complete the interface type scanning so as to accurately determine the target interface needing dynamic injection.
In some embodiments, in the implementation, the interface class scanning under the current running environment class path can be automatically completed by calling the ClassPathScanningCandidateComponentProvider class of the Spring framework as a class path scanning function module based on the characteristics of the Spring framework.
Specifically, the class of classification pathscaning candidatecomponentprovider (e.g., org. Springpath work. Context. Analysis. Classification scaning candidatecomponentprovider) based on the Spring framework can implement the interface class scan of the target interface requiring dynamic injection by reloading both of its isccandidatecomponent (e.g., annotatedBeanDefinition beanDefinition) and protected boolean isCandidateComponent (e.g., metadataReader metadataReader). Specifically, the following code statement may be employed to implement the process public class CustomInterfaceScanner extends ClassPathScanningCandidateComponentProvider { public CustomInterfaceScanner (boolean useDefaultFilters) { super (useDefaultFilters) about the interface class by filtering and identifying rules of the reload class scan; }. Where usedefaultfilters indicates whether filtering of class scan uses filtering rules within Spring framework, usually the default filtering rules built in Spring framework are for all Spring beans. Further, the following code statement may be used to enter a specified class packet path, and interface class packet path scan CustomInterfaceScanner provider = new CustomInterfaceScanner (false) may be performed.
In some embodiments, in implementation, a Method interceptor may be generated by implementing a Method interceptor (e.g., org. Spring framework. Cglib. Proxy. Method interceptor) based on a Spring framework, i.e., by implementing a public Object intercept (e.g., object o, method, object [ ] objects, methodProxy methodProxy) Method, and setting the Method interceptor accordingly so that the corresponding interface implementation class can be obtained by the Spring container in the interrupt Method based on the Method interceptor later, to call and execute the interface implementation class by reflection. Based on the set method interceptor, the method can enter the corresponding interface realization class according to the method query objects when in specific operation; obtaining a corresponding interface implementation class Bean through an application context; finally, the class beans are implemented through reflection execution.
In some embodiments, in implementation, an agent class may be generated for a target interface class of a target interface that needs to be dynamically injected, and the method interceptor may be assigned to the agent class. Specifically, the following code statement public class CommonFactoryBean implements FactoryBean may be used to determine the interface class that needs to be dynamically injected; and determines the corresponding method interceptor using the following code statement private Class customInterfaceClass.
Specifically, based on the Spring framework, a corresponding factory Bean object (e.g., a factor Bean) can be generated for a target interface class of a target interface that needs to be dynamically injected, and can be used as a proxy class of the injection band method interceptor. In specific implementation, the interface class of the target interface needing dynamic injection can be determined by scanning corresponding code sentences, for example, public void postProcessBeanDefinitionRegistry (BeanDefinitionRegistry beanDefinitionRegistry) throws BeansException; all dynamically injected interface classes are traversed through relevant code statements (e.g., set < Class <. Further, a corresponding method interceptor may be obtained from the Spring container by a corresponding code statement and set into a common interceptor bean, for example, beans definition, getstructtorangutentvalues (). AddGenericArgumentValue (interfaceClass), to obtain a proxy class with a method interceptor.
In addition, the priority of the dependence injection of the CommonFactoryBean can also be set by the corresponding code statement. For example, by application context, getband ("custominterface method integrator")); string beanname=interfaceclass.getname () may set the priority of the dependency injection of the interface class to the highest priority.
After the writing and the initializing operation are completed, the target application program based on the preset application program framework can be enabled to flexibly adjust and execute matched target implementation classes in a dynamic injection mode in the running process, so that transaction data processing aiming at a plurality of different transaction types is realized. Therefore, the realization of various internal classes of the interface can be realized based on the characteristics of the Spring frame by carrying out dependent dynamic injection on the interface based on the Spring frame, other external dependence is not needed, and the universality is strong; and the interface class scanning, the dynamic proxy and the method interceptor during starting can dynamically call the interface method of the required implementation class by receiving and entering the parameters according to the target in the running process, so that the method has higher flexibility.
In some embodiments, after the target interceptor executes the target implementation class matched with the target entry by using a dynamic injection manner according to the target entry based on a preset application framework to implement the target transaction data processing of the target transaction data processing request, when the method is implemented, the method may further include the following:
S1: obtaining a corresponding target play parameter as a target transaction data processing result;
s2: and sending the target transaction data processing result to the next interface in the target application program.
Based on the above embodiment, after the target interface finishes the responsible target transaction data processing, the target transaction data processing result can be automatically and timely distributed to the next interface for further transaction data processing, so as to finally finish the complete transaction data processing under the service scene.
In some embodiments, after obtaining the corresponding target parameter as the target transaction data processing result, the target transaction data processing result may also be directly fed back to the terminal device held by the user according to the specific service scenario requirement.
From the above, based on the transaction data processing method provided in the embodiments of the present disclosure, after receiving the target transaction data processing request, the transaction type identifier in the target transaction data processing request is collected as the target entry parameter; determining a target factory Bean object corresponding to a target interface class of the target interface; sending the target entry to the target factory Bean object; providing the target input parameters to corresponding method interceptors through the target factory Bean objects; the interceptor executes the target implementation class matched with the target entry parameters in a dynamic injection mode based on a preset application program framework according to the target entry parameters so as to realize target transaction data processing aiming at the target transaction data processing request. Therefore, the transaction data processing aiming at different transaction types can be efficiently completed by using the same interface in a dynamic injection mode on the premise of not needing external dependence by effectively utilizing the characteristics of the preset application program framework, and the overall transaction data processing efficiency is improved; meanwhile, the method and the device have the advantages that the related code sentences are simpler, and the universality and the expandability are better. Furthermore, based on the method, when the transaction type is needed to be newly added to the interface, the implementation class corresponding to the newly added transaction type in the defined interface class is only needed to be added to the original code statement, and other existing code statements are not needed to be additionally adjusted, so that the workload of technicians can be effectively reduced, and the operation threshold of the technicians is reduced.
Referring to fig. 7, the embodiment of the present disclosure further provides a specific electronic device, where the electronic device includes a network communication port 701, a processor 702, and a memory 703, where the foregoing structures are connected by an internal cable, so that each structure may perform specific data interaction.
Wherein, the network communication port 701 may be specifically configured to receive a target transaction data processing request directed to a target interface of a target application program; wherein the target transaction data processing request carries at least a transaction type identifier.
The processor 702 may be specifically configured to collect a transaction type identifier in the target transaction data processing request as a target entry; determining a target factory Bean object corresponding to a target interface class of the target interface; sending the target entry to a target factory Bean object; providing the target entry to a corresponding method interceptor by a target factory Bean object; the interceptor executes the target implementation class matched with the target entry parameters in a dynamic injection mode based on a preset application program framework according to the target entry parameters so as to realize target transaction data processing aiming at the target transaction data processing request.
The memory 703 may be used for storing a corresponding program of instructions.
In this embodiment, the network communication port 701 may be a virtual port that binds with different communication protocols, so that different data may be sent or received. For example, the network communication port may be a port responsible for performing web data communication, a port responsible for performing FTP data communication, or a port responsible for performing mail data communication. The network communication port may also be an entity's communication interface or a communication chip. For example, it may be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it may also be a Wifi chip; it may also be a bluetooth chip.
In this embodiment, the processor 702 may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor, and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable logic controller, and an embedded microcontroller, among others. The description is not intended to be limiting.
In this embodiment, the memory 703 may include a plurality of layers, and in a digital system, the memory may be any memory as long as it can hold binary data; in an integrated circuit, a circuit with a memory function without a physical form is also called a memory, such as a RAM, a FIFO, etc.; in the system, the storage device in physical form is also called a memory, such as a memory bank, a TF card, and the like.
The embodiments of the present specification also provide a computer readable storage medium based on the transaction data processing method described above, the computer readable storage medium storing computer program instructions that when executed implement: receiving a target transaction data processing request directed to a target interface of a target application; wherein, the target transaction data processing request at least carries a transaction type identifier; collecting a transaction type identifier in a target transaction data processing request as a target entry; determining a target factory Bean object corresponding to a target interface class of the target interface; sending the target entry to a target factory Bean object; providing the target entry to a corresponding method interceptor by a target factory Bean object; the interceptor executes the target implementation class matched with the target entry parameters in a dynamic injection mode based on a preset application program framework according to the target entry parameters so as to realize target transaction data processing aiming at the target transaction data processing request.
In the present embodiment, the storage medium includes, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read-Only Memory (ROM), a Cache (Cache), a Hard Disk (HDD), or a Memory Card (Memory Card). The memory may be used to store computer program instructions. The network communication unit may be an interface for performing network connection communication, which is set in accordance with a standard prescribed by a communication protocol.
In this embodiment, the functions and effects of the program instructions stored in the computer readable storage medium may be explained in comparison with other embodiments, and are not described herein.
The present specification also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of: receiving a target transaction data processing request directed to a target interface of a target application; wherein, the target transaction data processing request at least carries a transaction type identifier; collecting a transaction type identifier in a target transaction data processing request as a target entry; determining a target factory Bean object corresponding to a target interface class of the target interface; sending the target entry to a target factory Bean object; providing the target entry to a corresponding method interceptor by a target factory Bean object; the interceptor executes the target implementation class matched with the target entry parameters in a dynamic injection mode based on a preset application program framework according to the target entry parameters so as to realize target transaction data processing aiming at the target transaction data processing request.
Referring to fig. 8, on a software level, the embodiment of the present disclosure further provides a transaction data processing apparatus, which may specifically include the following structural modules:
a receiving module 801, specifically configured to receive a target transaction data processing request directed to a target interface of a target application; wherein, the target transaction data processing request at least carries a transaction type identifier;
the collection module 802 may be specifically configured to collect a transaction type identifier in the target transaction data processing request as a target entry parameter; determining a target factory Bean object corresponding to a target interface class of the target interface;
the sending module 803 may be specifically configured to send the target join to a target plant Bean object;
the providing module 804 may be specifically configured to provide the target in-parameters to the corresponding method interceptor through the target factory Bean object;
the execution module 805 may be specifically configured to execute, by using a method interceptor, a target implementation class matching with a target entry according to the target entry, based on a preset application framework, by using a dynamic injection manner, so as to implement target transaction data processing for a target transaction data processing request.
In some embodiments, the preset application framework may specifically include: a spring framework; accordingly, the plant Bean object may include: factoryBean object based on spring framework.
In some embodiments, when the execution module 805 is specifically implemented, the method interceptor may be used to execute, according to the target entry, the target implementation class matched with the target entry in a dynamic injection manner based on a preset application framework according to the following manner: determining a target implementation class matched with the target entry parameter from implementation classes of the target interface class according to the target entry parameter by using a method interceptor; acquiring a target implementation class according to the application front-back relation; and executing the target implementation class through reflection based on a preset application program framework.
In some embodiments, the implementation class of the target interface class may specifically include a plurality of implementation classes; wherein each implementation class corresponds to at least one transaction type.
In some embodiments, when the execution module 805 is specifically implemented, the method interceptor may be used to determine, according to the target entry, a target implementation class that matches the target entry from implementation classes of the target interface class according to the following manner: retrieving a name field of an implementation class of the target interface class by using a method interceptor; and determining the implementation class of which the field matched with the target entry exists in the name field as the target implementation class matched with the target entry.
In some embodiments, the execution module 805 may further use the method interceptor to retrieve annotation data for an implementation class of the target interface class when implemented in particular; and determining the implementation class of the field matched with the target entry in the annotation data as the target implementation class matched with the target entry.
In some embodiments, the apparatus may be further configured to receive a dynamic annotation request for the target application when the apparatus is embodied prior to receiving a target transaction data processing request directed to a target interface of the target application; responding to the dynamic annotation request, and determining a target interface needing dynamic injection in a target application program; annotating the target interface with the specified characteristic characters according to a preset processing rule; the target interface class corresponding to the target interface and the realization class of the target interface class are customized; wherein one implementation class corresponds to at least one transaction type of data processing mode.
In some embodiments, the target interface is annotated with the specified feature characters in accordance with preset processing rules; after the target interface class corresponding to the target interface and the implementation class of the target interface class are customized, the device can also be used for receiving a new transaction type setting request of the target interface of the target application program when being embodied; responding to the newly added transaction type setting request, and determining a target interface class of a target interface according to the characteristic characters; and adding an implementation class corresponding to the newly added transaction type into the implementation class of the target interface class according to the newly added transaction mode setting request and a preset processing rule.
In some embodiments, the target interface is annotated with the specified feature characters in accordance with preset processing rules; after the target interface class corresponding to the target interface and the implementation class of the target interface class are customized, the device can be used for receiving and responding to the initialization instruction when being embodied, scanning the interface class under the current running environment class path of the target application program, and obtaining the interface class scanning result; determining a target interface class of a target interface to be dynamically injected according to the interface class scanning result; generating at least one method interceptor; creating a factory Bean object corresponding to the target interface class; a method interceptor is obtained and placed in the factory Bean object.
In some embodiments, the apparatus, when embodied, may scan the interface class under the current running environment class path of the target application in the following manner: and scanning interface classes under the current running environment class path of the target application program based on the corresponding screening rules by using a class path scanning function module of the Spring framework.
In some embodiments, after the target interceptor executes the target implementation class matched with the target entry by using a dynamic injection mode according to the target entry based on a preset application framework to implement the target transaction data processing of the target transaction data processing request, the device may be further used to obtain a corresponding target exit parameter as a target transaction data processing result when the device is implemented; and sending the target transaction data processing result to the next interface in the target application program.
It should be noted that, the units, devices, or modules described in the above embodiments may be implemented by a computer chip or entity, or may be implemented by a product having a certain function. For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, when the present description is implemented, the functions of each module may be implemented in the same piece or pieces of software and/or hardware, or a module that implements the same function may be implemented by a plurality of sub-modules or a combination of sub-units, or the like. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
From the above, based on the transaction data processing device provided in the embodiments of the present disclosure, a dynamic injection manner is adopted, and the same interface is utilized to efficiently complete transaction data processing for different transaction types, so as to improve overall transaction data processing efficiency; meanwhile, the method and the device have the advantages that the related code sentences are simpler, and the universality and the expandability are better.
Although the present description provides method operational steps as described in the examples or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented by an apparatus or client product in practice, the methods illustrated in the embodiments or figures may be performed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even in a distributed data processing environment). The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, it is not excluded that additional identical or equivalent elements may be present in a process, method, article, or apparatus that comprises a described element. The terms first, second, etc. are used to denote a name, but not any particular order.
Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller can be regarded as a hardware component, and means for implementing various functions included therein can also be regarded as a structure within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
From the above description of embodiments, it will be apparent to those skilled in the art that the present description may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solutions of the present specification may be embodied essentially in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and include several instructions to cause a computer device (which may be a personal computer, a mobile terminal, a server, or a network device, etc.) to perform the methods described in the various embodiments or portions of the embodiments of the present specification.
Various embodiments in this specification are described in a progressive manner, and identical or similar parts are all provided for each embodiment, each embodiment focusing on differences from other embodiments. The specification is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
Although the present specification has been described by way of example, it will be appreciated by those skilled in the art that there are many variations and modifications to the specification without departing from the spirit of the specification, and it is intended that the appended claims encompass such variations and modifications as do not depart from the spirit of the specification.
Claims (15)
1. A transaction data processing method, comprising:
receiving a target transaction data processing request directed to a target interface of a target application; wherein, the target transaction data processing request at least carries a transaction type identifier;
Collecting a transaction type identifier in a target transaction data processing request as a target entry; determining a target factory Bean object corresponding to a target interface class of the target interface;
sending the target entry to a target factory Bean object;
providing the target entry to a corresponding method interceptor by a target factory Bean object;
the interceptor executes the target implementation class matched with the target entry parameters in a dynamic injection mode based on a preset application program framework according to the target entry parameters so as to realize target transaction data processing aiming at the target transaction data processing request.
2. The method of claim 1, wherein the pre-set application framework comprises: a spring framework; correspondingly, the plant Bean object includes: factoryBean object based on spring framework.
3. The method of claim 1, wherein executing, with the method interceptor, a target implementation class matching the target entry based on a preset application framework by dynamic injection according to the target entry, comprises:
determining a target implementation class matched with the target entry parameter from implementation classes of the target interface class according to the target entry parameter by using a method interceptor;
Acquiring a target implementation class according to the application front-back relation;
and executing the target implementation class through reflection based on a preset application program framework.
4. A method according to claim 3, wherein the implementation class of the target interface class comprises a plurality of implementation classes; wherein each implementation class corresponds to at least one transaction type.
5. The method of claim 4, wherein determining, by the method interceptor from the target entry, a target implementation class from implementation classes of the target interface class that matches the target entry comprises:
retrieving a name field of an implementation class of the target interface class by using a method interceptor; and determining the implementation class of which the field matched with the target entry exists in the name field as the target implementation class matched with the target entry.
6. The method according to claim 4, wherein the method further comprises:
retrieving annotation data of the implementation class of the target interface class by using a method interceptor; and determining the implementation class of the field matched with the target entry in the annotation data as the target implementation class matched with the target entry.
7. The method of claim 1, wherein prior to receiving the target transaction data processing request directed to the target interface of the target application, the method further comprises:
Receiving a dynamic annotation request for a target application;
responding to the dynamic annotation request, and determining a target interface needing dynamic injection in a target application program;
annotating the target interface with the specified characteristic characters according to a preset processing rule; the target interface class corresponding to the target interface and the realization class of the target interface class are customized; wherein one implementation class corresponds to at least one transaction type of data processing mode.
8. The method of claim 7, wherein the target interface is annotated with specified feature characters according to a preset processing rule; after the target interface class corresponding to the target interface and the implementation class of the target interface class are customized, the method further comprises:
receiving a new transaction type setting request about a target interface of a target application program;
responding to the newly added transaction type setting request, and determining a target interface class of a target interface according to the characteristic characters;
and adding an implementation class corresponding to the newly added transaction type into the implementation class of the target interface class according to the newly added transaction mode setting request and a preset processing rule.
9. The method of claim 7, wherein the target interface is annotated with specified feature characters according to a preset processing rule; after the target interface class corresponding to the target interface and the implementation class of the target interface class are customized, the method further comprises:
Receiving and responding to the initialization instruction, and scanning an interface class under the current running environment class path of the target application program to obtain an interface class scanning result;
determining a target interface class of a target interface to be dynamically injected according to the interface class scanning result;
generating at least one method interceptor;
creating a factory Bean object corresponding to the target interface class; a method interceptor is obtained and placed in the factory Bean object.
10. The method of claim 9, wherein scanning for interface classes under the current run-environment class path of the target application comprises:
and scanning interface classes under the current running environment class path of the target application program based on the corresponding screening rules by using a class path scanning function module of the Spring framework.
11. The method of claim 1, wherein after performing, by the method interceptor, a target implementation class matching the target entry based on a preset application framework in a dynamic injection manner according to the target entry to implement target transaction data processing for the target transaction data processing request, the method further comprises:
obtaining a corresponding target play parameter as a target transaction data processing result;
And sending the target transaction data processing result to the next interface in the target application program.
12. A transaction data processing device, comprising:
a receiving module for receiving a target transaction data processing request directed to a target interface of a target application; wherein, the target transaction data processing request at least carries a transaction type identifier;
the acquisition module is used for acquiring a transaction type identifier in the target transaction data processing request as a target entry parameter; determining a target factory Bean object corresponding to a target interface class of the target interface;
the sending module is used for sending the target entering parameters to a target factory Bean object;
the providing module is used for providing the target incoming parameters to the corresponding method interceptors through the target factory Bean object;
the execution module is used for executing the target implementation class matched with the target entry by using the method interceptor according to the target entry and based on a preset application program framework in a dynamic injection mode so as to realize target transaction data processing aiming at the target transaction data processing request.
13. An electronic device comprising a processor and a memory for storing processor-executable instructions, the processor, when executing the instructions, implementing the steps of the method of any one of claims 1 to 11.
14. A computer readable storage medium, having stored thereon computer instructions which, when executed by a processor, implement the steps of the method of any of claims 1 to 11.
15. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any one of claims 1 to 11.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310637990.9A CN116661906A (en) | 2023-05-31 | 2023-05-31 | Transaction data processing method and device and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310637990.9A CN116661906A (en) | 2023-05-31 | 2023-05-31 | Transaction data processing method and device and electronic equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116661906A true CN116661906A (en) | 2023-08-29 |
Family
ID=87723736
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310637990.9A Pending CN116661906A (en) | 2023-05-31 | 2023-05-31 | Transaction data processing method and device and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116661906A (en) |
-
2023
- 2023-05-31 CN CN202310637990.9A patent/CN116661906A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8122292B2 (en) | Debugging of business flows deployed in production servers | |
| CN109951547B (en) | Transaction request parallel processing method, device, equipment and medium | |
| CN112118565A (en) | Multi-tenant service gray level publishing method and device, computer equipment and storage medium | |
| CN104346148B (en) | Obtain method, the apparatus and system of program feature consumption information | |
| KR20210076882A (en) | Functions-as-a-Service (FAAS) system enhancements | |
| CN110830234B (en) | User traffic distribution method and device | |
| US8893272B2 (en) | Method and device for recombining runtime instruction | |
| US20210173665A1 (en) | Bootstrapping Profile-Guided Compilation and Verification | |
| KR20110124732A (en) | Software conditional dynamic instrumentation in specified transaction context | |
| US8973117B2 (en) | Propagating security identity information to components of a composite application | |
| CN110968437A (en) | Method, device, equipment and medium for parallel execution of single contract based on Java intelligent contract | |
| US20190102279A1 (en) | Generating an instrumented software package and executing an instance thereof | |
| CN101727475A (en) | Method, device and system for acquiring database access process | |
| CN114064712A (en) | Data access method and device, electronic equipment and computer readable storage medium | |
| CN110781505A (en) | System construction method and device, retrieval method and device, medium and equipment | |
| Pérez‐Díaz et al. | Wirebrush4SPAM: a novel framework for improving efficiency on spam filtering services | |
| CN107391539B (en) | Transaction processing method, server and storage medium | |
| CN116661906A (en) | Transaction data processing method and device and electronic equipment | |
| CN113220403A (en) | Method and device for h5 intercepting Android return event and electronic equipment | |
| CN116755719A (en) | Data processing method, device and data processing system of application component | |
| CN112379945B (en) | Method, apparatus, device and storage medium for running application | |
| CN116800848A (en) | A service calling method, device and client | |
| CN110377401B (en) | Transaction request processing method, device, server and storage medium based on IDEA | |
| CN111950770A (en) | Method and device for managing resource return auxiliary strategy and electronic equipment | |
| CN113821750B (en) | Page data processing method and system, electronic equipment and readable storage medium |
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 |