Rental withdrawal system based on domain-driven design and withdrawal service processing method

By employing a layered architecture based on domain-driven design, the system corruption problem in the financial leasing industry's leasing withdrawal system during business iterations and team turnover was solved, achieving efficient and secure leasing withdrawal process processing and improving the system's maintainability and scalability.

CN121599767APending Publication Date: 2026-03-03永赢金融租赁有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511944141.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

When faced with frequent business scenario iterations and team personnel turnover, the leasing withdrawal system in the financial leasing industry suffers from problems such as fragmented business logic, system degradation, high maintenance difficulty, and low R&D efficiency, failing to meet the requirements of efficient, stable, and flexible response to market demands.

Method used

It adopts a layered architecture based on Domain-Driven Design (DDD), including a user interface layer, application layer, domain layer and infrastructure layer. It clarifies semantic boundaries through bounded contexts, encapsulates the core business logic of leasing and withdrawal, decouples technical implementation details, and supports the decomposition of the system into independent microservices.

Benefits of technology

It improved the system's responsiveness to business changes, reduced iteration costs, ensured high cohesion and low coupling in the lease withdrawal process, and achieved accurate, efficient, and secure automated processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121599767A_ABST
    Figure CN121599767A_ABST
Patent Text Reader

Abstract

The invention discloses a lease withdrawal system based on domain-driven design and a withdrawal service processing method, and relates to the technical field of data processing. The system is deployed on a server and comprises a user interface layer, an application layer, a domain layer and an infrastructure layer. According to the technical scheme of the present invention, by adopting the hierarchical architecture of the domain-driven design (DDD), the lease withdrawal service logic and technology are decoupled in details, so that the complex service rules are encapsulated in the core domain, the support domain and the general domain of the domain layer, and the effects of high cohesion and low coupling are achieved. Therefore, the response speed of the system to business change can be improved, the iteration cost can be reduced, and meanwhile, accurate, efficient and safe automatic processing is realized on the premise of defining the semantic boundary through the boundary context, avoiding cross-domain logic pollution and ensuring that the lease withdrawal process is highly compliant and extensible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a rental withdrawal system and withdrawal business processing method based on domain-driven design. Background Technology

[0002] In the financial leasing industry's business system, cash withdrawal is a core link connecting customer needs with the implementation of leasing services. It involves multiple business scenarios, including product configuration, equipment review, risk control verification, and financial settlement. Furthermore, with the rapid changes in market demand, cash withdrawal scenarios are iterating frequently, and business rules are becoming increasingly complex. At the same time, project teams within the industry generally face frequent staff turnover, placing higher demands on business succession and consistent implementation.

[0003] Currently, most leasing withdrawal systems in the financial leasing industry are built on the traditional MVC (Model-View-Controller) architecture. While this architecture allows for rapid feature development in the early stages of business, it has gradually revealed significant shortcomings due to continuous business iterations and frequent team changes. Firstly, business logic lacks proper domain division and encapsulation, resulting in scattered across controllers, service layers, and other components, leading to severe business-level corruption and a disorganized state. Secondly, development teams often focus only on the surface of product operations, lacking a deep understanding of the business essence. Furthermore, the lack of a unified business language and coding standards leads to inconsistent understanding of the business among team members, further exacerbating system maintenance difficulties. With repeated business iterations, these problems have become increasingly prominent, making it difficult to develop new business scenarios and compromising the quality of iterated systems. Development efficiency continues to decline, and the maintainability and scalability of the system code significantly decrease, failing to meet the core demands of the financial leasing industry for efficient, stable, and flexible response to market demands for withdrawal services.

[0004] Therefore, there is an urgent need for a leasing withdrawal-related technical solution that can optimize architecture design, unify business understanding, and improve system maintainability and iteration efficiency to address the shortcomings of existing technologies. Summary of the Invention

[0005] To address the aforementioned issues, this application provides a lease withdrawal system and withdrawal processing method based on domain-driven design, including the following:

[0006] Firstly, this application provides a lease withdrawal system based on domain-driven design, the system comprising:

[0007] The user interface layer is used to receive external rental withdrawal requests, perform parameter format validation and access permission validation, and convert the processing results into a response format.

[0008] The application layer is used to receive call requests from the user interface layer, orchestrate and combine multiple domain objects and domain services in the withdrawal business to form a complete leasing withdrawal business process, and manage transaction boundaries;

[0009] The domain layer is used to carry the core business logic of leasing withdrawal. The domain layer includes the core withdrawal domain, the supporting domain, and the general domain. The semantic boundaries of each domain are defined by bounded contexts. The domain layer includes entities, aggregates, value objects, and domain services in each domain.

[0010] The infrastructure layer provides technical implementation support to the domain layer. The infrastructure layer is decoupled from the domain layer through the dependency inversion principle and provides data persistence, external system calls, and general tool services for domain layer objects.

[0011] Optionally, the withdrawal core domain in the domain layer includes a withdrawal task aggregate root; the support domain includes a financial subdomain, a risk control subdomain, an equipment subdomain, and a marketing subdomain, the equipment subdomain includes an equipment material aggregate root and an equipment aggregate root, the marketing subdomain includes an interest reduction coupon entity and an interest rate package entity; the general domain includes a customer subdomain and a contract subdomain; the withdrawal core domain, support domain, and general domain of the domain layer each constitute an independent bounded context, and data interaction between the bounded contexts is achieved through application programming interface (API) calls. The API defines a data transfer object structure, which only contains the value object attributes required by the caller and does not contain the complete aggregate root state.

[0012] Optionally, the withdrawal task aggregation root includes a withdrawal task entity, a quotation entity, an invoice entity, an equipment and material value object, an interest reduction coupon value object, a customer value object, a disbursement result value object, a final calculated value object, and a domain service; the withdrawal task entity is used to record the withdrawal amount, withdrawal scenario, customer information, and withdrawal status; the quotation entity is used to record the quotation amount, repayment information, quotation status, and the associated equipment and material list; the quotation entity and the withdrawal task entity are associated through a unique business identifier, and the equipment and material value object references the unique identifier of the equipment and material aggregation root in the equipment subdomain.

[0013] Optionally, the device subdomain's device aggregation root includes a device entity; the device material review aggregation root includes a material entity and a material review result entity; the device material review aggregation root manages the entire lifecycle of device materials from upload to approval, and performs material upload, material selection, material addition, and material approval operations; the material review result entity records batch material review conclusion information, and the material entity records material type, material storage location, material upload timestamp, and material ownership relationship; the device material review aggregation root implements concurrency control through a version number mechanism, with each material operation triggering a version number increment; the device subdomain also includes a withdrawal device pool mutual exclusion management function, ensuring that devices are not repeatedly allocated or used during the withdrawal process through the device business mutual exclusion entity.

[0014] Optionally, the infrastructure layer includes an anti-corrosion layer configured to isolate direct dependencies of external credit systems, external auditing systems, and external imaging systems; the anti-corrosion layer defines an adapter interface that implements external system communication protocol conversion, data format mapping, and exception code conversion; the domain layer calls the adapter interface defined in the anti-corrosion layer through dependency injection, and the infrastructure layer provides concrete implementation classes of the adapter interface.

[0015] Optionally, when the application layer executes the equipment and material review process, it receives the review request forwarded by the user interface layer, calls the warehousing interface to load the equipment and material review aggregate root object, and calls the equipment and material review domain service of the domain layer. The equipment and material review domain service triggers the review behavior method of the equipment and material review aggregate root. The review behavior method performs invoice deduplication verification, equipment photo location verification, and material integrity verification. After the verification is passed, it calls the image archiving service of the infrastructure layer to complete the material archiving and storage, calls the external review system submission interface to submit the material batch to the review system, and updates the review status of the equipment and material review aggregate root after receiving the review result callback. The application layer manages the transaction commit and rollback of the entire review process.

[0016] Optionally, the withdrawal domain context function of the system is integrated and deployed with the main service of the application system as an independent functional module package, and works with the main service to realize the entire process of leasing withdrawal service; the system reserves the ability to be expanded into independent microservices in the future, and the splitting process does not require modification of the core business logic of the domain layer and the code architecture of the business logic layer.

[0017] Secondly, this application provides a lease withdrawal business processing method based on domain-driven design, the method comprising:

[0018] The system receives external rental withdrawal requests through its user interface layer, performs parameter format validation and access permission validation on the requests, and if the validation fails, the user interface layer converts the error information into a response format and returns it; if the validation passes, the request is passed to the application layer.

[0019] The system's application layer receives call requests from the user interface layer, orchestrates and combines multiple domain objects and domain services in the withdrawal business to form a complete leasing withdrawal business process, and manages the transaction boundaries of the business process.

[0020] The core business logic of leasing withdrawals is carried out through the system's domain layer. The domain layer includes a core withdrawal domain, a support domain, and a general domain, with each domain having its semantic boundaries defined by bounded contexts. In the domain layer, atomic business function logic is executed through a rich model composed of entities, aggregates, value objects, and domain services in each domain. The core withdrawal domain manages the entire lifecycle of withdrawal tasks through a withdrawal task aggregate root. The equipment subdomain included in the support domain manages the equipment material certification process and equipment information after certification through an equipment material review aggregate root. The marketing subdomain included in the support domain manages marketing rules through interest reduction coupon entities and interest rate package entities.

[0021] The system's infrastructure layer provides technical implementation support to the domain layer. The infrastructure layer is decoupled from the domain layer through the dependency inversion principle, and provides data persistence, external system calls, and general tool services for the domain objects of the domain layer.

[0022] Optionally, the withdrawal core domain in the domain layer includes a withdrawal task aggregate root; the support domain includes a financial subdomain, a risk control subdomain, an equipment subdomain, and a marketing subdomain, the equipment subdomain includes an equipment material aggregate root and an equipment aggregate root, the marketing subdomain includes an interest reduction coupon entity and an interest rate package entity; the general domain includes a customer subdomain and a contract subdomain; the withdrawal core domain, support domain, and general domain of the domain layer each constitute an independent bounded context, and data interaction between the bounded contexts is achieved through application programming interface (API) calls. The API defines a data transfer object structure, which only contains the value object attributes required by the caller and does not contain the complete aggregate root state.

[0023] Optionally, the withdrawal task aggregation root includes a withdrawal task entity, a quotation entity, an invoice entity, an equipment and material value object, an interest reduction coupon value object, a customer value object, a disbursement result value object, a final calculated value object, and a domain service; the withdrawal task entity is used to record the withdrawal amount, withdrawal scenario, customer information, and withdrawal status; the quotation entity is used to record the quotation amount, repayment information, quotation status, and the associated equipment and material list; the quotation entity and the withdrawal task entity are associated through a unique business identifier, and the equipment and material value object references the unique identifier of the equipment and material aggregation root in the equipment subdomain.

[0024] Optionally, the device subdomain's device aggregation root includes a device entity; the device material review aggregation root includes a material entity and a material review result entity; the device material review aggregation root manages the entire lifecycle of device materials from upload to approval, and performs material upload, material selection, material addition, and material approval operations; the material review result entity records batch material review conclusion information, and the material entity records material type, material storage location, material upload timestamp, and material ownership relationship; the device material review aggregation root implements concurrency control through a version number mechanism, with each material operation triggering a version number increment; the device subdomain also includes a withdrawal device pool mutual exclusion management function, ensuring that devices are not repeatedly allocated or used during the withdrawal process through the device business mutual exclusion entity.

[0025] Optionally, the infrastructure layer includes an anti-corrosion layer configured to isolate direct dependencies on external credit systems, external auditing systems, and external imaging systems; the anti-corrosion layer defines an adapter interface that implements external system communication protocol conversion, data format mapping, and exception code conversion; the domain layer calls the adapter interface defined in the anti-corrosion layer through dependency injection, and the infrastructure layer provides concrete implementation classes of the adapter interface.

[0026] Optionally, when the application layer executes the equipment and material review process, it receives the review request forwarded by the user interface layer, calls the warehousing interface to load the equipment and material review aggregate root object, and calls the equipment and material review domain service of the domain layer. The equipment and material review domain service triggers the review behavior method of the equipment and material review aggregate root. The review behavior method performs invoice deduplication verification, equipment photo location verification, and material integrity verification. After the verification is passed, it calls the image archiving service of the infrastructure layer to complete the material archiving and storage, calls the external review system submission interface to submit the material batch to the review system, and updates the review status of the equipment and material review aggregate root after receiving the review result callback. The application layer manages the transaction commit and rollback of the entire review process.

[0027] Optionally, the withdrawal domain context function of the system is integrated and deployed with the main service of the application system as an independent functional module package, and works with the main service to realize the entire process of leasing withdrawal service; the system reserves the ability to be expanded into independent microservices in the future, and the splitting process does not require modification of the core business logic of the domain layer and the code architecture of the business logic layer.

[0028] Thirdly, this application provides an apparatus comprising a memory and a processor, the memory for storing instructions or code, and the processor for executing the instructions or code to cause the apparatus to perform the domain-driven design-based leasing withdrawal business processing method described in any implementation of the second aspect above.

[0029] Fourthly, this application provides a computer-readable storage medium storing code, wherein when the code is executed, a device running the code implements the domain-driven design-based leasing withdrawal business processing method described in any of the implementations of the second aspect above.

[0030] This application provides a rental withdrawal system based on Domain-Driven Design (DDD). Deployed on a server, the system includes: a user interface layer for receiving external rental withdrawal requests, performing parameter format and access permission checks, and converting the processing results into a response format; an application layer for receiving call requests from the user interface layer, orchestrating and combining multiple domain objects and domain services in the withdrawal business to form a complete rental withdrawal business process, and managing transaction boundaries; a domain layer for carrying the core rental withdrawal business logic, comprising a core withdrawal domain, a supporting domain, and a general domain, each domain having its semantic boundaries defined by bounded contexts; the domain layer includes entities, aggregates, value objects, and domain services from each domain; and an infrastructure layer for providing technical implementation support to the domain layer. This infrastructure layer is decoupled from the domain layer through the dependency inversion principle, providing data persistence, external system calls, and general tool services for domain layer objects. By adopting a layered architecture based on Domain-Driven Design (DDD), the rental withdrawal business logic is decoupled from the technical implementation details, allowing complex business rules to be encapsulated within the core, supporting, and general domains of the domain layer, achieving high cohesion and low coupling. This can improve the system's responsiveness to business changes, reduce iteration costs, and at the same time, clarify semantic boundaries through bounded contexts to avoid cross-domain logic pollution, ensuring that the lease withdrawal process can achieve accurate, efficient, and secure automated processing under the premise of high compliance and scalability. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings used in the description of the embodiment or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 A schematic diagram of a rental withdrawal system based on domain-driven design is provided for an embodiment of this application;

[0033] Figure 2 A schematic diagram of the domain layer structure provided in an embodiment of this application;

[0034] Figure 3 An interactive schematic diagram of a rental withdrawal system provided in an embodiment of this application;

[0035] Figure 4 A flowchart illustrating a domain-driven design-based leasing withdrawal business processing method provided in this application embodiment. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0037] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0038] Figure 1 This is a schematic diagram illustrating the structure of a domain-driven design-based rental withdrawal system provided in an embodiment of this application. (Combined with...) Figure 1 As shown in the embodiment of this application, the rental withdrawal system 100 based on domain-driven design includes:

[0039] User interface layer 110 serves as the entry point for system interaction with the outside world. Its main functions are to receive external rental withdrawal requests, perform parameter format validation (such as validating the legality of fields such as withdrawal amount and customer information) and access permission validation (such as verifying the operation permissions of the request initiator), and convert the processing results into a response format that conforms to the external system specifications.

[0040] Application layer 120 is used to receive call requests from user interface layer 110. Its core responsibility is to orchestrate and combine multiple domain objects and domain services in the withdrawal business to form a complete leasing withdrawal business process (such as the chain of withdrawal initiation, information entry, equipment and material review, amount confirmation, etc.) and manage transaction boundaries (such as ensuring the atomicity of equipment and material review and withdrawal status update).

[0041] Domain layer 130 is the core layer that carries the core business logic of leasing withdrawals. It includes the core withdrawal domain, support domain, and general domain. Each domain defines its semantic boundaries through bounded contexts to avoid confusion of business concepts. The domain layer contains entities, aggregates, value objects, and domain services of each domain, and is the direct carrier of business rules and logic.

[0042] Figure 2 This application provides a schematic diagram of the structure of a domain layer, as shown in the embodiment. Figure 2 As shown: The withdrawal core domain is the core business domain of the domain layer, containing the withdrawal task aggregate root; the support domain provides auxiliary business capabilities for the core domain, including the financial subdomain, risk control subdomain, equipment subdomain, and marketing subdomain, where the equipment subdomain and marketing subdomain contain corresponding aggregate roots and entities; the general domain provides common business capabilities for multiple business domains, including the customer subdomain and the contract subdomain; the withdrawal core domain, support domain, and general domain each constitute an independent bounded context, and the bounded contexts interact with each other through application programming interfaces (APIs). The data transfer objects (DTOs) defined by the APIs only contain the value object attributes required by the caller, and do not contain the complete aggregate root state, which ensures lightweight data interaction and avoids strong coupling between bounded contexts.

[0043] The withdrawal core domain contains the WithdrawalTaskAggregate, which is the core of the withdrawal core domain. It contains LoanEntity, QuotationEntity, InvoiceEntity, and value objects such as DeviceMateriaValue, CouponValue, CustomerValue, WithdrawalDisburseValue, and TrialcalculationValue. It also encapsulates domain service methods.

[0044] LoanEntity: Records core business information such as withdrawal amount (total withdrawable amount, application amount), withdrawal scenario, customer information, and withdrawal status. It is the basic data carrier of the withdrawal process. Its main attributes include: taskId: task number, baseInfo: basic information (product type, business type, withdrawal scenario type, entry method), amount: amount information (total withdrawable amount, withdrawal application amount), accountInfo: account information, status: withdrawal status, customerId: customer information identifier, couponId: coupon identifier.

[0045] Quotation Entity: Records the quotation amount, repayment information (interest rate, term, method), and quotation status. It is associated with the withdrawal task entity through a unique business identifier to achieve business binding between withdrawal and quotation. Its main attributes include: repaymentInterestRate: repayment interest rate, repaymentTerm: repayment term, repaymentType: repayment method, quotationAmount: quotation amount, and status: quotation status.

[0046] Invoice Entity: Records invoice data such as task number, buyer / seller information, and product information. It supports the invalid() method to cancel a quotation. Its main attributes include: taskId: task number, buyerInfo: buyer information, sellerInfo: seller information, deviceInfo: product information (name, model, unit price, tax, etc.), and invalid(): method to cancel a quotation.

[0047] The value object includes the DeviceMaterialValue object, which is a unique identifier referencing the device material aggregate root in the device subdomain, enabling cross-domain data association. Its attributes include taskId (task number), checkedAmount (selected amount), and auditAmount (audited amount).

[0048] The CouponValue object encapsulates the relevant attributes of the interest rate reduction coupon, ensuring data immutability. Its attributes include id (coupon ID), couponName (coupon name), couponPlan (discount plan), availableStatus (availability status), unavailableReason (reason for unavailability), and expirationTime (expiration time).

[0049] CustomerValue object: Encapsulates customer information. Its attributes include id (primary key), customerType (customer type), individualCustomerId (individual customer ID), corecustomerId (enterprise core customer ID), legalPhone (legal representative's mobile phone number), legalName (legal representative's name), certType (document type), certNumber (document number), orgCode (unified social security code), orgName (enterprise name), and List. <ent>(List of companies), defaultOrg (default company).

[0050] The final calculation value object (TrialCalculationValue) records the core payment and calculation-related IDs. Its attributes include hxPayId (core payment ID), hxLoanId (core calculation ID), and hxVersionId (core calculation version).

[0051] WithdrawalDisburseValue object: Records information related to the withdrawal result. Its properties include isAllowWithdrawals (whether withdrawal is allowed), isRyzLimitValid (whether the EasyRent credit limit is valid), isEasyApproveLineLimitNumPass (whether the EasyRent line limit exceeds the limit and passes verification), isGuaranteeContractPass (whether the maximum guarantee contract verification passes), needAuth (whether authorization is required), originSystem (returns the source system that initiated the withdrawal process), currentNode (if originSystem is not empty, returns the node of the withdrawal process in progress), and outRefuseLimit (whether the withdrawal limit has been exceeded).

[0052] Domain Service Methods: The WithdrawalTaskAggregate encapsulates a rich set of domain service methods, covering all business behaviors throughout the withdrawal process and ensuring the cohesion of business logic. These methods include: init(QuotationEntity): Initiate withdrawal (initialization); fillInformation(amount, Account, Coupon, Invoice): Information entry; updateAccountInfo(Account): Modify account information; finishDeviceUpload(): Complete the upload of equipment materials (invoices and contracts) (for withdrawals, invoice and contract uploads are a black box; externally, only notification of completion and updating of the withdrawal table status are needed); finishDevicePhotosUpload(): Complete the upload of equipment photos (for withdrawals, equipment uploads are a black box; externally, only notification of completion and updating of the withdrawal table status are needed); moneyConfirm(TrialCalculationValue, Coupon): Amount confirmation; signResultCallback(): Signing result callback; leaseDisbursementCallback(): Loan disbursement result callback; cancelWithdrawal(): Cancel withdrawal.

[0053] The supporting domain includes a finance subdomain, a risk control subdomain, an equipment subdomain, and a marketing subdomain. The marketing subdomain includes coupon entities (CouponEntity) and interest rate package entities (InterestRatePackageEntity). The coupon entity (CouponEntity) records attributes such as coupon ID, name, and discount scheme, and provides methods for pre-binding, secondary binding, and release. Its attributes include id (coupon ID), couponName (coupon name), couponPlan (discount scheme), availableStatus (availability status), unavailableReason (unavailability reason), and expirationTime (expiration time). Its methods include bindFirst() (pre-binding coupon), bindSecond(contractId) (second binding coupon), and unbind() (releasing coupon).

[0054] The Interest Rate Package Entity records attributes such as package ID, name, and rules, supporting the configuration of interest rate schemes for withdrawal transactions. Its attributes include id (package ID), packageName (package content / name), packageDisplayContent (package display content), packageRule (package rules), packageType (package type), packageStartTime (package start time), and packageEndTime (package end time). The Device Subdomain contains the Device Aggregate Root and the Device Material Approval Aggregate Root. The Device Aggregate Root contains the Device Entity, recording information such as device ID, name, and model. The Device Material Approval Aggregate Root contains the Device Material Entity and the Material ApproveResult Entity, managing the entire lifecycle of device materials from upload to approval, providing operations such as material upload, selection, addition, and approval, and implementing concurrency control through a version number mechanism. Simultaneously, the Device Subdomain includes a withdrawal device pool mutual exclusion management function, using the DeviceBusinessExclusion Entity to prevent devices from being repeatedly allocated during the withdrawal process.

[0055] Device subdomain: contains DeviceAggregate and DeviceMaterialApproveAggregate.

[0056] The DeviceAggregate root contains DeviceEntities, recording information such as device ID, name, and model. DeviceEntity attributes include deviceId (device ID), taskId (task ID), deviceName (device name), deviceModel (device model), and deviceStatus (device status). DeviceAggregate attributes include deviceId (device ID), taskId (task ID), deviceName (device name), deviceModel (device ID), deviceStatus (device status), and devicePhotos:List. <devicematerialentity>(Equipment photos (invoice / contract)). Methods include addDevicePhotos() (add device photos).

[0057] The DeviceMaterialApproveAggregate contains the DeviceMaterialEntity and the MaterialApproveResultEntity, managing the entire lifecycle of device materials from upload to approval. It provides operations such as material upload, selection, addition, and approval, and implements concurrency control through a version number mechanism.

[0058] The DeviceMaterialEntity has the following attributes: id (material ID), taskId (task number associated with the material), and deviceMaterialType (material type). Its methods include saveImageInfo(imgAddr, imgId) (upload image tree) and invoiceIdentifyResult(code, msg) (invoice recognition result).

[0059] MaterialApproveResultEntity: Records batch material review conclusion information. Its attributes include id (review ID), taskId (associated task number), bsType (business type), deviceMaterialType (material type), and approveStatus (review result).

[0060] The main attributes of DeviceMaterialApproveAggregate include: taskId: task number (equal to batch number), deviceBatchMoney: total amount for selected devices, invoiceStatus: invoice status, status: status, deviceEvalAmount: total amount for device evaluation (current batch), and uploadedDeviceList: List. <devicematerialentity>Upload the equipment and materials collection (to be modified to a map), materialApproveResultList:List <materialapproveresultentity>Equipment and materials review list (currently in the telemarketing system), deviceList:List <deviceentity>: All device collections; deviceBusinessExclusion: DeviceBusinessExclusionEntity: Device audit mutually exclusive entity;

[0061] The main methods of DeviceMaterialApproveAggregate include: checkDeviceList(List <deviceentity>): Add selected device information, addDeviceList(List <devicematerialentity>): Add device information, auditDevice(): Approve device information, auditDeviceCallback(MaterialApproveResult): Approval success callback, checkDevicePhotoValid(): Check if the device photo is valid, addDevicePhotoList(List <devicematerialentity>): Add device photo (device data upload page), auditDevicePhoto(): Review device photo, auditDevicePhotoCallback(MaterialApproveResult): Device photo approval success callback, addToLeasePool(): Add leased item to pool (evaluation behavior).

[0062] The device subdomain also includes a withdrawal device pool mutual exclusion management function, ensuring that devices are not repeatedly allocated or used during the withdrawal process through the DeviceBusinessExclusionEntity. Its attributes include taskId (MWEIS_LOAN_APPLY primary key), bs_type (business type, withdrawal - device pool), approve_type (approval type - file type), approve_status (approval status - 0 rejected, 1 approved), and approve_desc (approval description). The relevant database tables include MWEIS_APPROVE_FLOWSTATE_DX (telemarketing audit table, containing auditSuccess() and auditFail() methods) and MWEIS_DEVICE_BUSINESS_EXCLUSION (withdrawal device pool mutual exclusion table).

[0063] The relevant database table HNEIS_LOAN_APPLY (withdrawal application table, shared kernel) contains the fields invoice_status (invoice evaluation status 6 - not evaluated, 1 - evaluated), ocr_eval_amount (total amount of OCR evaluation), device_batch (selected device batch), and device_batch_money (total amount of selected devices).

[0064] The general domain includes a customer subdomain and a contract subdomain, providing common capabilities across business domains: the customer subdomain encapsulates a customer value object (CustomerValue) to record data such as customer type, personal / corporate customer number, and legal representative information; the contract subdomain supports business interactions such as contract result callbacks in the withdrawal process.

[0065] Infrastructure layer 140 provides technical implementation support for the domain layer and decouples it from the domain layer through the dependency inversion principle (the domain layer defines the interface, and the infrastructure layer provides the implementation). Specific functions include: providing data persistence services (such as database operations) for domain layer objects, external system call services (such as calling external trusted systems), and general tool services (such as logging and encryption).

[0066] When the application layer executes the equipment and material review process, the specific steps are as follows:

[0067] The application layer receives the audit request forwarded by the user interface layer. It then calls the warehousing interface to load the corresponding DeviceMaterialApproveAggregate object and invokes the DeviceMaterialApproveAggregate domain service in the domain layer. This domain service triggers the audit behavior methods of DeviceMaterialApproveAggregate (e.g., auditDevice()). These methods perform a series of checks, including invoice deduplication, device photo location verification, and material integrity verification. Upon successful verification, the image archiving service in the infrastructure layer is invoked to complete material archiving and storage. The external audit system submission interface (via the adapter in the anti-corrosion layer) is called to submit the material batch to the audit system. The application layer receives the audit result callback returned by the audit system. Based on the callback result, the audit status of DeviceMaterialApproveAggregate is updated (e.g., by calling auditDeviceCallback()). The application layer manages the transaction commit and rollback of the entire audit process. This process clearly separates business logic, process orchestration, and technical implementation, ensuring the standardization, traceability, and high cohesion and low coupling of the audit process.

[0068] The withdrawal domain context function of the aforementioned system is integrated and deployed with the main application system service as an independent functional module package, working in conjunction with the main service to realize the entire process of lease withdrawal. At the same time, the system reserves the ability to be expanded into independent microservices in the future. Due to the decoupling design of the core business logic of the domain layer from the infrastructure layer and the application layer, the splitting process does not require modification of the core business logic of the domain layer and the code architecture of the business logic layer, and can smoothly adapt to the expansion needs of business scale and the evolution of deployment architecture.

[0069] The above embodiments describe the structure of a rental withdrawal system based on domain-driven design. The following will combine... Figure 3 This section introduces the process of using the system. Figure 3 This is an interactive diagram of a rental withdrawal system provided in this application embodiment. The front end submits an "equipment and material review" operation request to the system, triggering the equipment and material review process in the rental withdrawal business. After receiving the request, the user interface layer first performs parameter format validation to check the legality of the format of the equipment and material related parameters, and then performs access permission validation to verify whether the front end user initiating the request has the operation permission. After the validation passes, the request is forwarded to the application layer. After receiving the call request, the application layer integrates the equipment and material aggregate root corresponding to the current review task and triggers the domain services related to equipment and material review in the domain layer, handing over the business process to the domain layer for execution. The equipment and material aggregate root in the domain layer executes the "submit for review" behavior, calls its own encapsulated review logic, and simultaneously calls the external system through the anti-corrosion layer of the infrastructure layer to complete the equipment and material submission process. After completing the core business logic, the processing result is returned to the application layer. After receiving the review result from the domain layer, the application layer performs standardized processing on the result, such as transaction status confirmation and process node update, and then forwards the processed result to the user interface layer. The user interface layer converts the processing results of the application layer into a response format that the front end can recognize and feeds it back to the front end. The front end displays the final status of the equipment and material review based on the response results, such as "under review" or "approved".

[0070] This interactive process achieves a complete closed loop of request verification, process orchestration, business execution, and result feedback through layered collaboration. The responsibilities of each layer are clear and decoupled from each other, which not only ensures the security of business operations but also improves the traceability and maintainability of the process.

[0071] Figure 4 A flowchart illustrating a domain-driven design-based leasing withdrawal business processing method provided in this application embodiment. (Combined with...) Figure 4 As shown in the embodiments of this application, the lease withdrawal business processing method based on domain-driven design may include:

[0072] S401. Receive external rental withdrawal requests through the system's user interface layer, and perform parameter format validation and access permission validation on the requests; if the validation fails, convert the error information into a response format through the user interface layer and return it; if the validation passes, pass the request to the application layer.

[0073] S402. The system's application layer receives the call request from the user interface layer, arranges and combines multiple domain objects and domain services in the withdrawal business to form a complete leasing withdrawal business process, and manages the transaction boundaries of the business process.

[0074] S403. The core business logic of leasing withdrawal is carried through the domain layer of the system. The domain layer includes a core withdrawal domain, a supporting domain, and a general domain. The semantic boundaries of each domain are defined by a bounded context.

[0075] In the domain layer, atomic business function logic is executed through a rich model composed of entities, aggregates, value objects, and domain services in each domain. Among them, the withdrawal core domain manages the entire lifecycle of withdrawal tasks through the withdrawal task aggregate root. The equipment subdomain included in the support domain manages the equipment material certification process through the equipment material review aggregate root and manages the equipment information after certification through the equipment aggregate root. The marketing subdomain included in the support domain manages marketing rules through interest reduction coupon entities and interest rate package entities.

[0076] S404. The system's infrastructure layer provides technical implementation support to the domain layer. The infrastructure layer is decoupled from the domain layer through the dependency inversion principle, and provides data persistence, external system calls, and general tool services for the domain objects of the domain layer.

[0077] In one implementation of this application, the withdrawal core domain in the domain layer includes a withdrawal task aggregate root; the support domain includes a financial subdomain, a risk control subdomain, an equipment subdomain, and a marketing subdomain, the equipment subdomain includes an equipment material aggregate root and an equipment aggregate root, the marketing subdomain includes an interest reduction coupon entity and an interest rate package entity; the general domain includes a customer subdomain and a contract subdomain; the withdrawal core domain, support domain, and general domain of the domain layer each constitute an independent bounded context, and data interaction between the bounded contexts is achieved through application programming interface (API) calls. The API defines a data transfer object structure, which only contains the value object attributes required by the caller and does not contain the complete aggregate root state.

[0078] In one implementation of this application, the withdrawal task aggregation root includes a withdrawal task entity, a quotation entity, an invoice entity, an equipment and material value object, an interest reduction coupon value object, a customer value object, a disbursement result value object, a final calculated value object, and a domain service; the withdrawal task entity is used to record the withdrawal amount, withdrawal scenario, customer information, and withdrawal status; the quotation entity is used to record the quotation amount, repayment information, quotation status, and associated equipment and material list; the quotation entity and the withdrawal task entity are associated through a unique business identifier, and the equipment and material value object references the unique identifier of the equipment and material aggregation root in the equipment subdomain.

[0079] In one implementation of this application, the device subdomain's device aggregation root includes a device entity; the device material review aggregation root includes a material entity and a material review result entity; the device material review aggregation root manages the entire lifecycle of device materials from upload to approval, and performs material upload operations, material selection operations, material addition operations, and material approval operations; the material review result entity records batch material review conclusion information, and the material entity records material type, material storage location, material upload timestamp, and material ownership relationship; the device material review aggregation root implements concurrency control through a version number mechanism, with each material operation triggering a version number increment; the device subdomain also includes a withdrawal device pool mutual exclusion management function, ensuring that devices are not repeatedly allocated or used during the withdrawal process through the device business mutual exclusion entity.

[0080] In one implementation of this application, the infrastructure layer includes an anti-corrosion layer configured to isolate direct dependencies on external credit systems, external auditing systems, and external imaging systems; the anti-corrosion layer defines an adapter interface that implements external system communication protocol conversion, data format mapping, and exception code conversion; the domain layer calls the adapter interface defined in the anti-corrosion layer through dependency injection, and the infrastructure layer provides concrete implementation classes for the adapter interface.

[0081] In one implementation of this application, when the application layer executes the equipment and material review process, it receives a review request forwarded by the user interface layer, calls the warehousing interface to load the equipment and material review aggregate root object, and calls the equipment and material review domain service of the domain layer. The equipment and material review domain service triggers the review behavior method of the equipment and material review aggregate root. The review behavior method performs invoice deduplication verification, equipment photo location verification, and material integrity verification. After the verification is passed, it calls the image archiving service of the infrastructure layer to complete the material archiving and storage, calls the external review system submission interface to submit the material batch to the review system, and updates the review status of the equipment and material review aggregate root after receiving the review result callback. The application layer manages the transaction submission and rollback of the entire review process.

[0082] In one implementation of this application, the withdrawal domain context function of the system is integrated and deployed with the main service of the application system as an independent functional module package, and works with the main service to realize the entire process of leasing withdrawal; the system reserves the ability to be expanded into independent microservices in the future, and the splitting process does not require modification of the core business logic of the domain layer and the code architecture of the business logic layer.

[0083] This application also provides corresponding devices and computer storage media for implementing the solutions provided in this application.

[0084] The device includes a memory and a processor. The memory stores instructions or code, and the processor executes the instructions or code to cause the device to perform the method described in any embodiment of this application.

[0085] The computer storage medium stores code, and when the code is run, the device running the code implements the method described in any embodiment of this application.

[0086] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as a read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0087] It is understood that in the specific embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved need to obtain user permission or consent when the above embodiments of this application are applied to specific products or technologies, and the collection, use and processing of related data need to comply with the relevant laws, regulations and standards of relevant countries and regions.

[0088] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0089] It should also be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components indicated as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0090] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.< / devicematerialentity> < / devicematerialentity> < / deviceentity> < / deviceentity> < / materialapproveresultentity> < / devicematerialentity> < / devicematerialentity> < / ent>

Claims

1. A rental withdrawal system based on domain-driven design, characterized in that, The system is deployed on a server, and the system includes: The user interface layer is used to receive external rental withdrawal requests, perform parameter format validation and access permission validation, and convert the processing results into a response format. The application layer is used to receive call requests from the user interface layer, orchestrate and combine multiple domain objects and domain services in the withdrawal business to form a complete leasing withdrawal business process, and manage transaction boundaries; The domain layer is used to carry the core business logic of leasing withdrawal. The domain layer includes the core withdrawal domain, the supporting domain, and the general domain. The semantic boundaries of each domain are defined by bounded contexts. The domain layer includes entities, aggregates, value objects, and domain services in each domain. The infrastructure layer provides technical implementation support to the domain layer. The infrastructure layer is decoupled from the domain layer through the dependency inversion principle and provides data persistence, external system calls, and general tool services for domain layer objects.

2. The system according to claim 1, characterized in that, The core withdrawal domain in the domain layer contains the withdrawal task aggregate root; the support domain contains the financial subdomain, risk control subdomain, equipment subdomain, and marketing subdomain. The equipment subdomain contains the equipment material aggregate root and the equipment aggregate root, and the marketing subdomain contains the interest reduction coupon entity and the interest rate package entity; the general domain contains the customer subdomain and the contract subdomain. The core withdrawal domain, support domain, and general domain of the domain layer each constitute an independent bounded context. Data interaction between the bounded contexts is achieved through application programming interface (API) calls. The API defines the data transfer object structure, which only contains the value object attributes required by the caller and does not contain the complete aggregate root state.

3. The system according to claim 2, characterized in that, The withdrawal task aggregation root includes a withdrawal task entity, a quotation entity, an invoice entity, an equipment and material value object, an interest reduction coupon value object, a customer value object, a disbursement result value object, a final calculated value object, and domain services. The withdrawal task entity is used to record the withdrawal amount, withdrawal scenario, customer information, and withdrawal status. The quotation entity is used to record the quotation amount, repayment information, quotation status, and associated equipment and material list. The quotation entity and the withdrawal task entity are associated through a unique business identifier, and the equipment and material value object references the unique identifier of the equipment and material aggregation root in the equipment subdomain.

4. The system according to claim 2, characterized in that, The device subdomain's device aggregation root contains device entities; the device material review aggregation root contains material entities and material review result entities; the device material review aggregation root manages the entire lifecycle of device materials from upload to approval, and performs material upload, material selection, material addition, and material approval operations; the material review result entity records batch material review conclusion information, and the material entity records material type, material storage location, material upload timestamp, and material ownership relationship; the device material review aggregation root implements concurrency control through a version number mechanism, with each material operation triggering a version number increment; the device subdomain also includes a withdrawal device pool mutual exclusion management function, ensuring that devices are not repeatedly allocated or used during the withdrawal process through the device business mutual exclusion entity.

5. The system according to claim 1, characterized in that, The infrastructure layer includes an anti-corrosion layer, which is configured to isolate direct dependencies on external credit systems, external auditing systems, and external imaging systems. The anti-corrosion layer defines an adapter interface, which implements external system communication protocol conversion, data format mapping, and exception code conversion. The domain layer calls the adapter interface defined in the anti-corruption layer through dependency injection, and the infrastructure layer provides the concrete implementation class of the adapter interface.

6. The system according to claim 1, characterized in that, When the application layer executes the equipment and material review process, it receives the review request forwarded by the user interface layer, calls the warehousing interface to load the equipment and material review aggregate root object, and calls the equipment and material review domain service of the domain layer. The equipment and material review domain service triggers the review behavior method of the equipment and material review aggregate root. The review behavior method performs invoice deduplication verification, equipment photo location verification, and material integrity verification. After the verification is passed, the image archiving service of the infrastructure layer is called to complete the material archiving and storage. The external review system submission interface is called to submit the material batch to the review system. After receiving the review result callback, the review status of the equipment and material review aggregate root is updated. The application layer manages the transaction submission and rollback of the entire review process.

7. The system according to claim 1, characterized in that, The system’s withdrawal domain context function is integrated and deployed with the main service of the application system as an independent functional module package, and works with the main service to realize the full process service of leasing withdrawal. The system reserves the ability to be expanded into independent microservices in the future, and the splitting process does not require modification of the core business logic of the domain layer and the code architecture of the business logic layer.

8. A method for processing lease withdrawal transactions based on domain-driven design, characterized in that, The method, applied to the domain-driven design-based rental withdrawal system described in claim 1, comprises: The system receives external rental withdrawal requests through its user interface layer, performs parameter format validation and access permission validation on the requests, and if the validation fails, the user interface layer converts the error information into a response format and returns it; if the validation passes, the request is passed to the application layer. The system's application layer receives call requests from the user interface layer, orchestrates and combines multiple domain objects and domain services in the withdrawal business to form a complete leasing withdrawal business process, and manages the transaction boundaries of the business process. The core business logic of leasing withdrawals is carried out through the system's domain layer. The domain layer includes a core withdrawal domain, a support domain, and a general domain, with each domain having its semantic boundaries defined by bounded contexts. In the domain layer, atomic business function logic is executed through a rich model composed of entities, aggregates, value objects, and domain services in each domain. The core withdrawal domain manages the entire lifecycle of withdrawal tasks through a withdrawal task aggregate root. The equipment subdomain included in the support domain manages the equipment material certification process and equipment information after certification through an equipment material review aggregate root. The marketing subdomain included in the support domain manages marketing rules through interest reduction coupon entities and interest rate package entities. The system's infrastructure layer provides technical implementation support to the domain layer. The infrastructure layer is decoupled from the domain layer through the dependency inversion principle, and provides data persistence, external system calls, and general tool services for the domain objects of the domain layer.

9. A computing device, characterized in that, The computing device includes: a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the steps of the method as described in claim 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in claim 8.