A corporate credit data processing system, method, device, medium and product

By introducing the architecture of control layer, service layer, policy layer and command layer into the corporate credit system, the problems of high code maintenance difficulty and high business and technology coupling caused by hard coding in existing technologies are solved. Automatic adaptation and interaction between the corporate credit system and product accounting components are achieved, which improves the flexibility and scalability of the system.

CN114971552BActive Publication Date: 2025-09-19CCB FINTECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210589349.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2025-09-19
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

The existing corporate credit system and product accounting components interact through hard coding, which makes code maintenance difficult, makes it impossible to automatically correct data inconsistencies, and leads to code redundancy and high coupling between business and technology.

Method used

It adopts an architecture of sequentially connected control layer, service layer, strategy layer and command layer, obtains contract type strategy through component strategy enumeration class, generates pre-packaged commands and transaction command fields, and realizes automatic adaptation and interaction of accounting components of different products.

Benefits of technology

It achieves decoupling between the corporate credit system and different product accounting components, and provides automatic reversal and retry functions, which reduces the difficulty of code maintenance and improves the flexibility and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114971552B_ABST
    Figure CN114971552B_ABST
Patent Text Reader

Abstract

The present invention discloses a system, method, device, medium and product for processing corporate credit data, and the present invention relates to the field of big data technology. The system includes: a control layer, a service layer, a policy layer and a command layer connected in sequence; the control layer realizes the conversion between external request parameters and internal processing parameters, the service layer attaches component policies to the request and sends it to the policy layer, the policy layer obtains the contract type policy, obtains the pre-packaged command and transaction command fields according to the contract type policy, obtains the to-be-executed commands by reflection, assembles and packages the to-be-executed commands into a command execution list, executes the to-be-executed commands in batches through the command execution list, and returns the command execution results. The technical solution of the present invention solves the problems caused by the current hard-coded method of calling the product accounting component by adapting the interaction between the corporate credit system and the product accounting component, realizes automatic reversal, retry and log recording, and achieves the effect of decoupling business and technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of big data technology, and in particular to a corporate credit data processing system, method, device, medium, and product. Background Art

[0002] Corporate credit business can be understood as the credit business provided by financial institutions such as banks to businesses. In corporate credit business, the corporate credit system needs to interact with different product accounting components. The interaction process usually includes:

[0003] 1) Pre-verify the contract expenditure in the public credit system and send the contract to the product accounting component when the contract end takes effect. When assembling the contract information, the contract transaction that needs to be sent is obtained by judging the different product types and product assembly data, and the reflection method is used to determine whether the contract transaction needs to be sent.

[0004] 2) Send the transaction list of the contract transaction to the execution unit as needed, so that the contract sending operation can be executed sequentially through the execution unit.

[0005] 3) Assemble the data returned by the contract into the contract expenditure and save the status of the contract expenditure.

[0006] The current interaction between the corporate credit system and the product accounting component uses hard-coded logic, making code maintenance more difficult. Furthermore, inconsistencies between the corporate credit data in the system and the product accounting component are not automatically corrected. During productization, the corporate credit system needs to adapt to the product accounting components of different banks, resulting in high code redundancy. The high degree of coupling between business and technology necessitates a complete rewrite for each output, a significant engineering effort. Code changes also impact contract payment code, leading to potential abuse of entity classes. Summary of the Invention

[0007] Embodiments of the present invention provide a corporate credit data processing system, method, device, medium, and product, which can solve the problems of high code redundancy and high business-technology coupling in related solutions.

[0008] In a first aspect, an embodiment of the present invention provides a corporate credit data processing system, comprising: a control layer, a service layer, a policy layer, and a command layer connected in sequence;

[0009] The control layer is used to convert the format of the application's request, send the converted request to the service layer, and convert the format of the request result sent by the service layer and return it to the application;

[0010] The service layer is used to determine the component strategy of the component to be called, send a request to attach the component strategy to the strategy layer, and send the request result returned by the strategy layer to the control layer;

[0011] The policy layer is configured to obtain a contract type according to the component policy, obtain a corresponding contract type policy from a component policy enumeration class based on the contract type, obtain pre-packaged command and transaction command fields according to the contract type policy, generate commands to be executed based on the pre-packaged command and transaction command fields, assemble the commands to be executed into a command execution list of the command layer, and send the request result returned by the command layer to the service layer;

[0012] The command layer is used to execute the to-be-executed commands in batches through the command execution list, and return the command execution results as request results to the strategy layer.

[0013] In a second aspect, an embodiment of the present invention further provides a method for processing corporate credit data, which is used in the corporate credit data processing system described in the first aspect, comprising:

[0014] The control layer converts the format of the application's request, sends the converted request to the service layer, and converts the request result sent by the service layer and returns it to the application;

[0015] The service layer determines the component strategy of the component to be called, sends a request to attach the component strategy to the strategy layer, and sends the request result returned by the strategy layer to the control layer;

[0016] The policy layer obtains the contract type according to the component policy, obtains the corresponding contract type policy from the component policy enumeration class through the contract type, obtains the pre-packaged command and transaction command fields according to the contract type policy, generates the to-be-executed commands based on the pre-packaged command and transaction command fields, assembles the to-be-executed commands into the command execution list of the command layer, and sends the request result returned by the command layer to the service layer;

[0017] The command layer executes the to-be-executed commands in batches through the command execution list, and returns the command execution results as request results to the policy layer.

[0018] In a third aspect, an embodiment of the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for processing corporate credit data as described in any one of the embodiments of the present invention is implemented.

[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the corporate credit data processing method as described in any one of the embodiments of the present invention.

[0020] In a fifth aspect, an embodiment of the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the corporate credit data processing method as described in any one of the embodiments of the present invention.

[0021] In an embodiment of the present invention, adaptation of the interaction between the corporate credit system and different product accounting components is achieved through sequentially connected control layers, service layers, policy layers, and command layers, thereby solving the problems currently caused by calling product accounting components in a hard-coded manner, realizing automatic reversal, retry, and logging, and achieving the effect of decoupling business and technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 A structural block diagram of a corporate credit data processing system provided by an embodiment of the present invention;

[0024] Figure 2 A flowchart of a method for processing corporate credit data provided by an embodiment of the present invention;

[0025] Figure 3 A flowchart of another method for processing corporate credit data provided by an embodiment of the present invention;

[0026] Figure 4 A flowchart of another method for processing corporate credit data provided by an embodiment of the present invention;

[0027] Figure 5 This is a structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.

[0029] It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures. Furthermore, in the description of the present invention, the terms "first," "second," etc. are used only to distinguish descriptions and should not be understood to indicate or imply relative importance. The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0030] Figure 1 This is a structural block diagram of a corporate credit data processing system provided by an embodiment of the present invention. The system can be used to adapt to the interaction between the corporate credit system and different product accounting components. Figure 1 As shown, the corporate credit data processing system 100 includes a control layer 110, a service layer 120, a strategy layer 130 and a command layer 140 connected in sequence.

[0031] The control layer 110 is used to convert the format of the application's request, send the converted request to the service layer 120, and convert the request result sent by the service layer 120 before returning it to the application;

[0032] The service layer 120 is used to determine the component strategy of the component to be called, send a request for adding the component strategy to the strategy layer 130, and send the request result returned by the strategy layer 130 to the control layer 110;

[0033] The policy layer 130 is used to obtain the contract type based on the component policy, obtain the corresponding contract type policy from the component policy enumeration class based on the contract type, obtain the pre-packaged command and transaction command fields based on the contract type policy, generate the to-be-executed commands based on the pre-packaged command and transaction command fields, assemble the to-be-executed commands into the command execution list of the command layer 140, and send the request result returned by the command layer 140 to the service layer 120;

[0034] The command layer 140 is used to execute commands to be executed in batches through a command execution list, and return the command execution results as request results to the policy layer 130.

[0035] The current integration model between the public credit system and various product accounting components presents significant bottlenecks in the implementation of output projects, resulting in slow payments, numerous security issues, and difficult troubleshooting. The present invention addresses the lack of a unified interface for automatic reversals, retries, and logging in existing integration models. It also addresses the issue of multiple models for contract creation, maintenance, and rebate processing across different accounting components, resulting in performance losses and code redundancy caused by repeated hard-coded database calls to obtain duplicate data.

[0036] The corporate credit data processing system is implemented using microservices technology, employing a lightweight approach that facilitates development and debugging, as well as distinguishing business system boundaries and clearly defining the responsibilities of microservices, enabling rapid and agile development. Using a microservices architecture, applications are built as independent components, with each application process running as a service. These services communicate through clearly defined interfaces using lightweight APIs. These services are built around business functions, with each service performing a single function. Because they operate independently, individual services can be updated, deployed, and scaled to meet application-specific functional requirements.

[0037] Specifically, the control layer includes an API submodule, which is used to encapsulate the interface for application calls, wherein the application calls the interface in feign mode. Feign calls between microservices (i.e., applications) will not go through the gateway and are only applicable to calls between applications. Feign is a lightweight framework for http request calls, which can call http requests in the form of Java interface annotations. When the microservice starts, Feign will perform a package scan and create a local JDK Proxy proxy instance of the remote interface for the interface annotated with @FeignClient according to the annotation rules. These local Proxy proxy instances are then injected into the Spring IOC container. When the method of the remote interface is called, the Proxy proxy instance will complete the actual remote access and return the result.

[0038] In an embodiment of the present invention, the control layer provides interfaces for external applications to call directly, which are uniformly encapsulated under the API submodule, define the fuse return, and define the default return according to the actual situation. Timeout or network error will be returned through this method.

[0039] The control layer, which serves as the translation layer between front-end application requests and internal system processing, includes at least one control node. It receives application requests through the control node, converts the data transfer objects in the request parameters into business objects, and sends the request containing the business objects to the service layer. The service layer then receives the request results returned, converts the business objects in the request results into data transfer objects, and sends the converted request results to the application. Data transfer objects, including InDto and OutDto, are objects used for data transmission, and as the names suggest, they represent input and output data transfer objects. Business objects are components that retrieve and process data and represent internal system implementation classes.

[0040] The control layer strictly adheres to RESTful API specifications and integrates Swagger-based API documentation. Request parameters in the control layer end with InDTO, and return parameters end with OutDTO. These parameters are converted to corresponding InBO and OutBO objects at the control layer and passed to the service layer for backend logic processing. Specifically, upon receiving an application request, the request parameters ending with InDTO are converted into InBO objects of the internal implementation class. Upon receiving the request result from the service layer, the OutBO objects of the internal implementation class in the request result parameters are converted into OutDTO objects.

[0041] The service layer reserves interface configurations for different product accounting components and uses the @Resource and @Qualifier annotations to invoke different component policies for these components. Component policies are associated with business objects. Specifically, the service layer includes at least one service node, which determines the component policy for the component to be invoked based on the business object. This node then annotates the component policy back into the converted request via annotations, sending the request to attach the component policy to the policy layer.

[0042] Optionally, the service layer is also used to set the component policy enumeration class of the product accounting component as the base class, and other customized components inherit the above component policy enumeration class of the product accounting component. Furthermore, the component policy enumeration class is used to define the contract type policy of different product accounting components.

[0043] Specifically, if there are no customization requirements, inherit the component strategy enumeration class. This inheritance approach allows you to use existing strategies, avoiding duplication and reducing code redundancy. If customization is required, rewrite the component strategy enumeration class based on your needs. Customization is achieved by overriding base class methods.

[0044] In an embodiment of the present invention, the strategy layer includes a cache submodule. The product configuration table in the cache submodule is used to cache contract types, including ordinary loans, guarantee commitments, entrusted loans, corporate overdraft loans, pre-collected interest loans, and letter of credit advances. The transaction configuration table in the cache submodule is used to cache the transaction command field. The product configuration table and the transaction configuration table enable the sending of contracts for different product accounting components and different strategy modes. In addition, the transaction configuration table enables flexible selection of the command transactions to be called, realizing configurable external command calls, allowing users to more flexibly configure the command transactions they need to call.

[0045] Exemplarily, the policy layer includes at least one policy node. This node queries the product configuration table based on the product identifier and component policy in the request to obtain the contract type. Based on the contract type, the corresponding contract type policy is retrieved from the component policy enumeration class. Prepackaged commands corresponding to the contract type policy are retrieved from the command layer. Based on the contract type policy, transaction command fields are retrieved from the transaction configuration table. Based on the prepackaged commands and transaction command fields, commands to be executed are generated through reflection and assembled into the command execution list of the command layer.

[0046] Specifically, each policy node obtains the product identifier from the request to attach a component policy. Based on the product identifier and component policy, it queries the product configuration table to obtain the contract type. Each contract type can implement add, modify, and delete methods. Based on the contract type, it retrieves the corresponding contract type policy from the component policy enumeration class and executes the corresponding method.

[0047] Each policy node retrieves pre-packaged commands corresponding to the contract type policy from the command layer. The command layer extracts the key shared methods for interaction between the corporate credit system and the product accounting component as a base class. This base class defines the contract type policy and defines interface classes for reversal, retry, and logging. All implementation classes that execute outbound transactions inherit from this base class and implement the aforementioned interface classes. The command layer also defines a composite command class with common methods for batch execution of command operations, automatic reversal, retry, and logging.

[0048] Each policy node retrieves the transaction command fields from the transaction configuration table based on the contract type policy. Based on the pre-packaged commands and transaction command fields, it generates pending commands through reflection and assembles them into the command execution list at the command layer. Specifically, the command execution class implements batch execution of pending commands in the command execution list. If assembly fails, the failure information is returned layer by layer to the control layer, where it is converted and sent to the application.

[0049] The command layer is used to provide pre-packaged commands, including basic classes, interface classes, and combined command classes.

[0050] Specifically, in the pre-packaged commands in the command layer, the basic class is used to implement: extracting a common logging method based on parameters, setting logging during initialization; obtaining command execution results; setting a common method for returning information; and obtaining return data after execution.

[0051] The interface class for pre-packaged commands in the command layer implements: command execution methods, return success or failure, and command reversal methods. It also determines whether a command needs to be executed based on input parameters; initializes log information; retrieves log information; sets command log information; retrieves transaction data after execution; retrieves the class returned after transaction execution; and sets the returned execution information, including whether the execution result is success or failure.

[0052] It should be noted that commands for executing outbound transactions will inherit from the base class and implement the following commands: initialize log information based on input parameters; use the entity class mapping architecture mapstruct to convert input parameters into the input parameter business object inDTO of the component required by the exchange, call the external transaction after transcoding, and write the execution results to the set attribute variables in the base class; in the case of automatic reversal, use the entity class mapping architecture mapstruct to convert input parameters into the input parameter business object inDTO of the component required by the exchange, call the external transaction after transcoding to perform reversal, and return the execution results.

[0053] Optionally, for customized requirements, rewrite the log initialization method in the base class to initialize log information based on the input parameters; rewrite the execution method to use the entity class mapping architecture mapstruct to convert the input parameters into the input parameter business object inDTO of the component required by the exchange, call the external transaction after customized transcoding, and write the execution result to the set attribute variable in the base class; rewrite the reversal method to use the entity class mapping architecture mapstruct to convert the input parameters into the input parameter business object inDTO of the component required by the exchange, call the external transaction for reversal after customized transcoding, and return the execution result.

[0054] Furthermore, before using the entity class mapping architecture mapstruct to convert the input parameters into the input parameter business object inDTO of the component required by the transaction, it is also included to determine whether to call an outbound transaction based on the input parameters.

[0055] Mapstruct is an entity class mapping framework that can safely assign the attributes of one entity class to another entity class through Java annotations. With Mapstruct, you only need to define a mapper interface and declare the methods to be mapped. During the compilation process, Mapstruct will automatically generate the implementation class of the interface to achieve the effect of mapping the source object to the target object.

[0056] Among the pre-packaged commands in the command layer, the combined command class is used to execute command operations in batches, including public methods for automatic reversal, retry, and logging. Specifically, the following commands are implemented:

[0057] The combined command class includes two private variable lists, namely the command execution list and the reversal command list. The add command adds pending commands to the command execution list, and the remove command removes completed commands from the command execution list. For commands that have been successfully executed and returned a success result, the add command is added to the reversal command list, awaiting reversal. It should be noted that the return success in this embodiment of the present invention refers to the successful return of the request result to the application.

[0058] Rewrite the base response class. The default return status is success. If the command execution fails, the failure information is directly set. Specifically, loop through the command execution list and call the base response class. If the command execution is successful, the return status is success. If the command execution fails, the return status is failure.

[0059] The command execution list is traversed through the execution method to determine whether the command execution result needs to be sent, and the commands that do not need to be sent are removed from the command execution list.

[0060] Initialize the transaction flow table, obtain the execution sequence number from the transaction flow table, and cyclically call the log initialization method based on the execution sequence number, save the transaction to the database, and perform a retry operation. If the command execution error is obtained, the command will be automatically retried a set number of times. After successful execution, the command will be removed from the command execution list and added to the reversal command list. If a business or technical anomaly causes the command execution to fail, the reversal command list will be traversed in reverse order to achieve the reversal.

[0061] Exemplarily, a set number of threads are started, and pending commands belonging to the same transaction in the command execution list are obtained in order of joining time, and the corresponding pending commands are executed by each thread. Optionally, a set number of threads are started, and according to the priority of each transaction in the pending command execution list, all pending commands of a transaction with a high priority are preferentially obtained, and all pending commands of the transaction with a high priority are executed by a set number of threads. This embodiment calls pending commands in the command execution list through multiple threads, and returns the command execution results as request results to the policy layer. By using the multi-threaded command calling method, the calling time of the entire transaction can be reduced. The policy layer sends the request result returned by the command layer to the service layer. The service layer sends the request result returned by the policy layer to the control layer. The control layer converts the format of the request result sent by the service layer and returns it to the application.

[0062] The technical solution of this embodiment adapts the interaction between the corporate credit system and different product accounting components through the sequentially connected control layer, service layer, policy layer and command layer, solves the problems caused by the current hard-coded method of calling product accounting components, realizes automatic correction, retry and logging, and achieves the effect of decoupling business and technology.

[0063] Figure 2 This is a flowchart of a method for processing corporate credit data provided by an embodiment of the present invention. This method can be used to adapt to the interaction between the corporate credit system and different product accounting components, and can be used in a corporate credit data processing system provided by the above embodiment. Figure 2 As shown, the method includes:

[0064] S210: The control layer converts the format of the application's request and sends the converted request to the service layer.

[0065] Data transfer objects, including InDto and OutDto, are used for data transmission. Business objects are components that retrieve and process data and represent internal implementation classes of the system.

[0066] Exemplarily, the control layer receives a request from an application program, converts a data transmission object in a request parameter into a business object, and sends a request including the business object to the service layer.

[0067] Specifically, the control layer calls the execution command in the command layer, uses mapstruct to convert the data transfer object in the request parameter into the business object of the component required by the transaction, and sends the request containing the business object to the service layer.

[0068] S220: The service layer determines the component policy of the component to be called, and sends a request to attach the component policy to the policy layer.

[0069] Exemplarily, the service layer obtains the component policy of the component to be called according to the business object, annotates the component policy back to the converted request through annotation, and sends the request for attaching the component policy to the policy layer.

[0070] Specifically, the service layer obtains the component policy corresponding to the business object in the request based on the association between the business object and the component policy, injects the component policy back into the converted request through @Resource and @Qualifier, and sends the request for the additional component policy to the policy layer.

[0071] It should be noted that when an interface has multiple implementations, the @Qualifier annotation is used to indicate which class implementation to call.

[0072] @Resource annotation: It can be injected by byName naming and byType type. By default, it is matched by byName first. If no match is found, it is matched by byType.

[0073] S230. The policy layer obtains the contract type according to the component policy, obtains the corresponding contract type policy from the component policy enumeration class through the contract type, obtains the pre-packaged command and transaction command fields according to the contract type policy, generates commands to be executed based on the pre-packaged command and transaction command fields, and assembles the commands to be executed into the command execution list of the command layer.

[0074] In an embodiment of the present invention, the strategy layer includes a cache submodule. The product configuration table in the cache submodule is used to cache contract types, including ordinary loans, guarantee commitments, entrusted loans, corporate overdraft loans, pre-collected interest loans, and letter of credit advances. The transaction configuration table in the cache submodule is used to cache the transaction command field. The product configuration table and the transaction configuration table enable the sending of contracts for different product accounting components and different strategy modes. In addition, the transaction configuration table enables flexible selection of the command transactions to be called, realizing configurable external command calls, allowing users to more flexibly configure the command transactions they need to call.

[0075] Exemplarily, the product configuration table is queried based on the product identifier and component policy in the request to obtain the contract type. Based on the contract type, the corresponding contract type policy is retrieved from the component policy enumeration class. A pre-packaged command corresponding to the contract type policy is retrieved from the command layer. Based on the contract type policy, the transaction command field is retrieved from the transaction configuration table. Based on the pre-packaged command and transaction command field, a pending command is generated through reflection. The pending command is then assembled into the command execution list in the command layer. Exemplarily, the pending command is added to the command execution list by adding a command.

[0076] In this invention, a product identifier represents the identification information of a corporate credit product. The product configuration table is used to associate and store the correspondence between product identifiers, component policies, and contract types. By querying the product configuration table based on the product identifier and component policy, the corresponding contract type can be obtained. The component policy enumeration class defines the contract type policies for various contract types. The corresponding contract type policy can be obtained from the component policy enumeration class based on the contract type.

[0077] The transaction configuration table associates and stores contract type policies and transaction command fields. Based on the contract type policy, the corresponding transaction command fields in the transaction configuration table can be retrieved. The policy layer retrieves pre-packaged commands from the command layer based on the contract type policy. Based on the pre-packaged commands and transaction command fields, the policy layer generates pending commands through reflection and assembles them into the command execution list in the command layer.

[0078] Reflection is implemented through the reflection mechanism in the Java language. The reflection mechanism combines the various parts of a class into a new object. Through reflection, bytecode files can be operated, and code snippets can also be operated.

[0079] S240: The command layer executes the commands to be executed in batches through the command execution list.

[0080] The command execution list is a queue of commands to be executed.

[0081] Exemplarily, the command layer sequentially executes the pending commands in the command execution list, specifically by looping through the command execution list, determining whether the command execution results need to be sent, and removing the commands from the command execution list that do not need to be sent. Then, for the pending commands in the command execution list, the command execution list is looped through and executed. Completed commands are removed from the command execution list; for commands that have been successfully executed and returned a success value, they are added to the reversal command list by adding commands, awaiting reversal execution.

[0082] Among the pre-packaged commands in the command layer, the combined command class is used to execute command operations in batches, including public methods for automatic reversal, retry, and logging. Specifically, the following commands are implemented:

[0083] The combined command class includes two private variable lists, namely the command execution list and the reversal command list. The command to be executed is added to the command execution list by adding a command, and the command that has been executed is removed from the command execution list by removing a command. For commands that have been executed successfully and returned success, they are added to the reversal command list by adding a command, waiting for reversal execution.

[0084] Rewrite the base response class. The default return status is success. If the command execution fails, the failure information is directly set. Specifically, loop through the command execution list and call the base response class. If the command execution is successful, the return status is success. If the command execution fails, the return status is failure.

[0085] The command execution list is traversed through the execution method to determine whether the command execution result needs to be sent, and the commands that do not need to be sent are removed from the command execution list.

[0086] Initialize the transaction flow table, obtain the execution sequence number from the transaction flow table, and cyclically call the log initialization method based on the execution sequence number, save the transaction to the database, and perform a retry operation. If the command execution error is obtained, the command will be automatically retried a set number of times. After successful execution, the command will be removed from the command execution list and added to the reversal command list. If a business or technical anomaly causes the command execution to fail, the reversal command list will be traversed in reverse order to achieve the reversal.

[0087] S250: The command layer returns the command execution result as a request result to the policy layer.

[0088] Exemplarily, the command layer returns the command execution result as a request result to the policy layer.

[0089] S260: The strategy layer sends the request result returned by the command layer to the service layer.

[0090] S270: The service layer sends the request result returned by the strategy layer to the control layer.

[0091] S280. The control layer converts the format of the request result sent by the service layer and returns it to the application.

[0092] For example, the control layer receives the request result returned by the service layer, converts the business object in the request result into a data transfer object, and sends the converted request result to the application. Specifically, the control layer obtains the request result returned by the service layer and converts the command execution result OutBO object in the request result parameter into an OutDTO object.

[0093] The technical solution of this embodiment adapts the interaction between the corporate credit system and different product accounting components through the sequentially connected control layer, service layer, policy layer and command layer, solves the problems caused by the current hard-coded method of calling product accounting components, realizes automatic correction, retry and logging, and achieves the effect of decoupling business and technology.

[0094] Figure 3 This is a flowchart of another corporate credit data processing method provided by an embodiment of the present invention. Based on the above embodiment, the present invention adds that if there is no customization requirement, the service layer inherits the component strategy enumeration class; if there is a customization requirement, the service layer rewrites the component strategy enumeration class according to the customization requirement. Figure 3 As shown, the method includes:

[0095] S301. The service layer obtains customized demand information.

[0096] The customized demand information includes whether there is a customized demand or not. Furthermore, in the case of a customized demand, the customized demand information also includes the customized demand content.

[0097] S302. If there is no customization requirement, the service layer inherits and sets the component strategy enumeration class.

[0098] Specifically, if there is no customization requirement, you can directly inherit and set the component strategy enumeration class to avoid duplication of code.

[0099] S303: If there is a customization requirement, the service layer rewrites the component strategy enumeration class according to the customization requirement.

[0100] Specifically, when there is a customization requirement, the component enumeration class is rewritten according to the customization requirement content to achieve the customization purpose.

[0101] S304: The control layer converts the format of the application's request and sends the converted request to the service layer.

[0102] S305: The service layer determines the component policy of the component to be called, and sends a request to attach the component policy to the policy layer.

[0103] S306. The policy layer obtains the contract type according to the component policy, obtains the corresponding contract type policy from the component policy enumeration class through the contract type, obtains the pre-packaged command and transaction command fields according to the contract type policy, generates commands to be executed based on the pre-packaged command and transaction command fields, and assembles the commands to be executed into the command execution list of the command layer.

[0104] S307: The command layer executes the commands to be executed in batches through the command execution list.

[0105] S308: The command layer returns the command execution result as the request result to the policy layer.

[0106] S309: The strategy layer sends the request result returned by the command layer to the service layer.

[0107] S310: The service layer sends the request result returned by the strategy layer to the control layer.

[0108] S311. The control layer converts the format of the request result sent by the service layer and returns it to the application.

[0109] The technical solution of this embodiment can achieve the purpose of customization by rewriting the component policy enumeration class according to customization requirements when there are customization requirements; when there are no customization requirements, the component policy enumeration class is inherited to avoid duplication of code.

[0110] Figure 4 This is a flowchart of another method for processing corporate credit data provided by an embodiment of the present invention. Based on the above embodiment, the embodiment of the present invention specifically defines the steps of batch execution of pending commands. Figure 4 As shown, the method includes:

[0111] S410: The control layer converts the format of the application's request and sends the converted request to the service layer.

[0112] S420: The service layer determines the component policy of the component to be called, and sends a request to attach the component policy to the policy layer.

[0113] S430. The policy layer obtains the contract type according to the component policy, obtains the corresponding contract type policy from the component policy enumeration class through the contract type, obtains the pre-packaged command and transaction command fields according to the contract type policy, generates commands to be executed based on the pre-packaged command and transaction command fields, and assembles the commands to be executed into the command execution list of the command layer.

[0114] S440: The command layer executes the pending commands in the command execution list belonging to the same transaction through multiple threads.

[0115] Exemplarily, a set number of threads are started, and pending commands belonging to the same transaction in the command execution list are retrieved in chronological order, and the corresponding pending commands are executed by each thread. Alternatively, a set number of threads are started, and all pending commands for a transaction with a high priority are preferentially retrieved according to the priority of each transaction in the pending command list, and all pending commands for the transaction with a high priority are executed by the set number of threads.

[0116] S450: The command layer returns the command execution result as a request result to the policy layer.

[0117] S460: The strategy layer sends the request result returned by the command layer to the service layer.

[0118] S470: The service layer sends the request result returned by the strategy layer to the control layer.

[0119] S480: The control layer converts the format of the request result sent by the service layer and returns it to the application.

[0120] The technical solution of this embodiment uses multi-threaded calling to execute the pending commands in the command execution list and returns the command execution results as request results to the strategy layer. The use of multi-threaded calling command method can reduce the calling time of the entire transaction.

[0121] Figure 5 This is a block diagram of an electronic device according to an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are provided for illustrative purposes only and are not intended to limit the implementation of the inventions described and / or claimed herein.

[0122] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0123] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0124] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any other suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the corporate credit data processing method.

[0125] In some embodiments, the method for processing public credit data may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method for processing public credit data described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the method for processing public credit data in any other appropriate manner (e.g., by means of firmware).

[0126] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0127] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0128] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0129] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0130] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0131] An embodiment of the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the corporate credit data processing method provided in any embodiment of the present application.

[0132] The computer program product may be implemented by writing computer program code for performing the operations of the present invention in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0133] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will appreciate that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments, and substitutions are possible for those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. A corporate credit data processing system, characterized in that: include: The control layer, service layer, policy layer and command layer are connected in sequence; The control layer is configured to receive a request from the application, convert the data transfer object in the request parameters into a business object, send the request containing the business object to the service layer, and convert the format of the request result sent by the service layer before returning it to the application, wherein the business object represents the component that retrieves and processes the data; The service layer is configured to determine a component strategy of a component to be called based on the business object, send a request to attach the component strategy to the strategy layer, and send a request result returned by the strategy layer to the control layer, wherein the component to be called is a product accounting component; The policy layer is configured to query the product configuration table to obtain the contract type based on the product identifier and component policy in the request, obtain the corresponding contract type policy from the component policy enumeration class based on the contract type, obtain the pre-packaged command from the command layer based on the contract type policy, obtain the transaction command field from the transaction configuration table based on the contract type policy, generate a to-be-executed command based on the pre-packaged command and the transaction command field, assemble the to-be-executed command into the command execution list of the command layer, and send the request result returned by the command layer to the service layer; The command layer is used to execute the to-be-executed commands in batches through the command execution list, and return the command execution results as request results to the strategy layer.

2. The system according to claim 1, wherein: The control layer includes an API submodule for encapsulating an interface for the application to call, wherein the application calls the interface in a feign manner.

3. The system according to claim 1, wherein: The control layer is specifically used for: Receive the request result returned by the service layer, convert the business object in the request result into a data transmission object, and send the converted request result to the application.

4. The system according to claim 3, characterized in that The service layer is specifically used for: The component policy is annotated back to the converted request in an annotation manner, and the request with the component policy attached is sent to the policy layer.

5. The system according to claim 1, wherein: The service layer is also used to: If there is no customization requirement, inherit and set the component strategy enumeration class; If there is a customization requirement, the setting component strategy enumeration class is rewritten according to the customization requirement.

6. The system according to claim 1, wherein: The strategy layer includes a cache submodule; The product configuration table in the cache submodule is used to cache contract types, wherein the contract types include ordinary loans, guarantee commitments, entrusted loans, corporate overdraft loans, pre-collected interest loans, and letter of credit advances; The transaction configuration table in the cache submodule is used to cache the transaction command field.

7. The system according to claim 6, characterized in that The strategy layer is specifically used for: Generate commands to be executed in a reflection manner based on the pre-packaged command and the transaction command field, and assemble the commands to be executed into a command execution list of the command layer.

8. The system according to claim 1, wherein: The command layer includes a command execution list and a reversal command list.

9. The system according to claim 8, characterized in that The command layer is specifically used for: Execute the pending commands belonging to the same transaction in the command execution list through multiple threads, and return the command execution results as request results to the strategy layer; The pending commands in the command execution list that have been executed and returned successfully are sequentially transferred to the reversal command list.

10. A method for processing corporate credit data, characterized in that: A corporate credit data processing system according to any one of claims 1 to 9, comprising: The control layer receives the request from the application, converts the data transfer object in the request parameters into a business object, sends the request containing the business object to the service layer, and converts the format of the request result sent by the service layer and returns it to the application, wherein the business object represents the component that retrieves and processes the data; The service layer determines the component strategy of the component to be called according to the business object, sends a request to attach the component strategy to the strategy layer, and sends the request result returned by the strategy layer to the control layer, wherein the component to be called is a product accounting component; The policy layer queries the product configuration table to obtain the contract type based on the product identifier and component policy in the request, obtains the corresponding contract type policy from the component policy enumeration class based on the contract type, obtains the pre-packaged command from the command layer based on the contract type policy, obtains the transaction command field from the transaction configuration table based on the contract type policy, generates a to-be-executed command based on the pre-packaged command and the transaction command field, assembles the to-be-executed command into the command execution list of the command layer, and sends the request result returned by the command layer to the service layer; The command layer executes the to-be-executed commands in batches through the command execution list, and returns the command execution results as request results to the policy layer.

11. The method according to claim 10, characterized in that The format conversion of the request result sent by the service layer and returning it to the application includes: receiving the request result returned by the service layer, converting the business object in the request result into a data transmission object, and sending the converted request result to the application.

12. The method according to claim 11, characterized in that The service layer sends a request to attach the component policy to the policy layer, including: The service layer annotates the component policy back to the converted request through annotation, and sends the request with the component policy attached to the policy layer.

13. The method according to claim 10, characterized in that Also includes: If there is no customization requirement, the service layer inherits the component strategy enumeration class; If there is a customization requirement, the service layer rewrites the setting component policy enumeration class according to the customization requirement.

14. The method according to claim 10, characterized in that The generating of commands to be executed based on the pre-packaged command and the transaction command field, and assembling the commands to be executed into a command execution list of the command layer, includes: Generate commands to be executed in a reflection manner based on the pre-packaged command and the transaction command field, and assemble the commands to be executed into a command execution list of the command layer.

15. The method according to claim 10, characterized in that The step of batch-executing the commands to be executed through the command execution list and returning the command execution results as request results to the policy layer includes: The pending commands belonging to the same transaction in the command execution list are executed through multiple threads, and the command execution results are returned to the strategy layer as request results.

16. The method according to claim 15, characterized in that The command layer also includes a reversal command list; After returning the command execution result as the request result to the strategy layer, the method further includes: The pending commands in the command execution list that have been executed and returned successfully are sequentially transferred to the reversal command list.

17. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for processing corporate credit data as described in any one of claims 10 to 16 is implemented.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for processing corporate credit data as described in any one of claims 10 to 16 is implemented.

19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the corporate credit data processing method according to any one of claims 10 to 16.

Citation Information

Patent Citations

  • A method and system for automatically generating contracts

    CN109636360A

  • Contract generation method, device and equipment and readable storage medium

    CN109711972A

  • Contract processing method, device and equipment and storage medium

    CN110689459A

  • Data processing method and device

    CN111198873A

  • Contract template generation method and apparatus, and contract generation method and apparatus

    CN114065718A