Voucher data generation method and device, electronic equipment and medium

By dynamically determining the application types and interfaces of business scenarios, calling the voucher generates service analysis and generating voucher data, solve the problem of poor flexibility caused by business rules in the existing technology, realize the faster market and business process adaptation, improve the data, Conventional and regulations readability.

CN119338403APending Publication Date: 2025-01-21BEIJING ZHIDA TIANJIE COMMERCIAL OPERATION MANAGEMENT CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411448100.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, business rules are directly encoded into the business system, resulting in poor flexibility and it is difficult to quickly adapt to changes in the market and business processes.

Method used

By dynamically determining the application type of business scenarios and its corresponding interfaces, the dedicated voucher generates service analysis and generate voucher data to achieve the decoupled of business rules and systems.

Benefits of technology

Improve the flexibility and response speed of the system, reduce artificial coding errors, ensure the accuracy and consistency of the data, and improve the readability and maintenance of the rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338403A_ABST
    Figure CN119338403A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of voucher data generation, and provides a voucher data generation method and device, electronic equipment and a medium. The method can receive a voucher request of a service scene; determining an application type of the service scene according to the voucher request of the service scene; determining an interface corresponding to the application type of the service scene according to the application type of the service scene; calling a voucher generation service corresponding to an interface through the interface corresponding to the application type of the business scene; analyzing the voucher request through a voucher generation service corresponding to the interface to obtain data of multiple business subjects; and generating voucher data corresponding to the voucher request through a voucher generation service corresponding to the interface based on the multiple business subject data. According to the invention, the overall efficiency and reliability of the business system are obviously improved, the operation cost and the error rate are reduced, and an efficient, flexible and safe business rule management solution is provided for enterprises.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of credential data generation, and in particular to a credential data generation method, device, electronic device and medium. Background Art

[0002] In various current business scenarios, the management and implementation of business rules are crucial to ensure the efficiency and adaptability of enterprise operations. Business rules define the operation logic and decision-making process of an enterprise. Their complexity and variability require the system to have high flexibility and the ability to respond quickly to changes.

[0003] Traditional business rule management methods usually involve encoding rules directly into business systems. Although this approach was widely adopted in early system development, it has several significant disadvantages. First, hard-coded rules lack flexibility. Whenever business requirements change, updating rules requires modifying system code, which is not only time-consuming but also prone to introducing new errors. Second, since all rules are embedded in the code, it is difficult for non-technical personnel to understand and review these rules, reducing the readability and maintainability of the rules.

[0004] In addition, as time goes by and developers change, the original business logic may gradually become unclear due to the lack of proper documentation support. This situation may lead to omissions or misunderstandings of rules, thus affecting the overall performance and reliability of the system. For example, a newly joined developer may not be able to correctly implement new requirements or adjust existing rules due to an incomplete understanding of the business rules. Summary of the invention

[0005] In view of this, the embodiments of the present disclosure provide a credential data generation method, device, electronic device and computer-readable storage medium to solve the technical problem of poor flexibility caused by business rules being directly encoded into the business system in the prior art.

[0006] According to a first aspect of an embodiment of the present disclosure, a method for generating credential data is provided, including: receiving a credential request for a business scenario; determining an application type of the business scenario based on the credential request for the business scenario; determining an interface corresponding to the application type of the business scenario based on the application type of the business scenario; calling a credential generation service corresponding to the interface through the interface corresponding to the application type of the business scenario; parsing the credential request through the credential generation service corresponding to the interface to obtain multiple business subject data; generating credential data corresponding to the credential request based on the multiple business subject data through the credential generation service corresponding to the interface.

[0007] According to a second aspect of an embodiment of the present disclosure, a credential data generating device is provided, including: an acquisition module for receiving a credential request for a business scenario; a first determination module for determining an application type of a business scenario based on the credential request of the business scenario; a second determination module for determining an interface corresponding to the application type of the business scenario based on the application type of the business scenario; a calling module for calling a credential generation service corresponding to an interface through an interface corresponding to the application type of the business scenario; a parsing module for parsing the credential request through the credential generation service corresponding to the interface to obtain multiple business subject data; and a generating module for generating credential data corresponding to the credential request based on multiple business subject data through the credential generation service corresponding to the interface.

[0008] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0009] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0010] Compared with the prior art, the embodiments of the present disclosure have the following beneficial effects: the embodiments of the present disclosure can dynamically determine the application type of the business scenario and its corresponding interface, so that the system can be flexibly adjusted according to different business needs. This method allows the decoupling of business rules from system implementation, thereby adapting to changes in the market and business processes more quickly. By using a dedicated voucher generation service to parse and generate voucher data, the possibility of manual coding errors is reduced. Automated data processing reduces errors introduced by manual processing and ensures the accuracy and consistency of data. The management of business rules is separated from the application logic, so that non-technical personnel can also understand and manage business rules without having to deeply understand the underlying code. This transparent rule management not only improves the readability of the rules, but also simplifies maintenance work. By optimizing the configuration of interfaces and services, processing efficiency can be improved and response time can be shortened. Automated voucher generation reduces the burden on the system and improves the overall processing speed and performance. In addition, since the present disclosure adopts a modular configuration method, each component (such as application type, interface, voucher generation service) can be independently updated and expanded without affecting other parts of the system, making future expansion and updating easier and more efficient. By centrally managing the voucher generation service, security control and audit strategies can be implemented more effectively. This not only protects the security of data, but also ensures that the entire credential generation process meets relevant compliance requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0012] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of an embodiment of the present invention can be applied;

[0013] Figure 2 It is a flowchart of a method for generating credential data provided by an embodiment of the present disclosure;

[0014] Figure 3 It is a flowchart of another method for generating credential data provided by an embodiment of the present disclosure;

[0015] Figure 4 It is a flowchart of another method for generating credential data provided by an embodiment of the present disclosure;

[0016] Figure 5 is a block diagram of a credential data generating device provided by an embodiment of the present disclosure;

[0017] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0019] It should be noted that the user information (including but not limited to terminal device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0020] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of an embodiment of the present invention can be applied is shown.

[0021] like Figure 1As shown, the system architecture 100 may include one or more of a first terminal device 101, a second terminal device 102, and a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0022] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.

[0023] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send data, etc. The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like.

[0024] The server 105 may be a server that provides various services. For example, the server 105 may receive a credential request of a business scenario from the first terminal device 103 (or the second terminal device 102 or the third terminal device 103); determine the application type of the business scenario according to the credential request of the business scenario; determine the interface corresponding to the application type of the business scenario according to the application type of the business scenario; call the credential generation service corresponding to the interface through the interface corresponding to the application type of the business scenario; parse the credential request through the credential generation service corresponding to the interface to obtain multiple business subject data; generate credential data corresponding to the credential request based on the multiple business subject data through the credential generation service corresponding to the interface.

[0025] In some embodiments, the credential data generation method provided in the embodiments of the present invention is generally executed by the server 105, and accordingly, the credential data generation device is generally set in the server 105. In other embodiments, some terminal devices may have functions similar to those of the server to execute the method. Therefore, the credential data generation method provided in the embodiments of the present invention is not limited to being executed on the server side.

[0026] The credential data generation method and device according to the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0027] Figure 2is a flow chart of a method for generating credential data provided by an embodiment of the present disclosure. The method provided by an embodiment of the present disclosure can be executed by any electronic device with computer processing capability, for example, the electronic device can be Figure 1 The server is shown.

[0028] like Figure 2 As shown, the credential data generating method includes steps S210 to S260.

[0029] In step S210, a credential request for a business scenario is received.

[0030] Step S220: Determine the application type of the business scenario according to the credential request of the business scenario.

[0031] In step S230, according to the application type of the business scenario, an interface corresponding to the application type of the business scenario is determined.

[0032] In step S240, the credential generation service corresponding to the interface is called through the interface corresponding to the application type of the business scenario.

[0033] In step S250, the voucher request is parsed through the voucher generation service corresponding to the interface to obtain multiple business subject data.

[0034] In step S260, the voucher generation service corresponding to the interface generates voucher data corresponding to the voucher request based on the multiple business account data.

[0035] The method can dynamically determine the application type of the business scenario and its corresponding interface, so that the system can be flexibly adjusted according to different business needs. This method allows the decoupling of business rules from system implementation, so as to adapt to changes in the market and business processes more quickly. By using a special voucher generation service to parse and generate voucher data, the possibility of manual coding errors is reduced. Automated data processing reduces errors introduced by manual processing and ensures the accuracy and consistency of data. The management and application logic of business rules are separated so that non-technical personnel can understand and manage business rules without having to deeply understand the underlying code. This transparent rule management not only improves the readability of the rules, but also simplifies maintenance work. By optimizing the configuration of interfaces and services, processing efficiency can be improved and response time can be shortened. Automated voucher generation reduces the burden on the system and improves the overall processing speed and performance. In addition, since the present disclosure adopts a modular configuration method, each component (such as application type, interface, voucher generation service) can be updated and expanded independently without affecting other parts of the system, making future expansion and updating easier and more efficient. By centrally managing the voucher generation service, security control and audit strategies can be implemented more effectively. This not only protects the security of data, but also ensures that the entire credential generation process meets relevant compliance requirements.

[0036] In some embodiments of the present disclosure, a voucher request for a business scenario is received. For example, the voucher request contains a business scenario identifier, which helps the system identify the source and nature of the request. The business scenario identifier is a key field that indicates the specific business scenario corresponding to the request, such as audit, finance, or compliance. In addition to the business scenario identifier, the voucher request may also include other relevant information, such as date, transaction type, amount involved, etc., which will be used for specific calculations and records when generating vouchers. Specifically, in the audit scenario, the voucher request focuses on verifying the accuracy and completeness of financial records. The voucher request includes the accounts, periods, and specific audit requirements that need to be audited. In the financial processing scenario, the voucher request usually involves daily financial operations, such as income, expenditure, asset purchases, etc. This type of voucher request requires accurate recording of each financial transaction to ensure the correctness of the account. For compliance scenarios, the voucher request involves ensuring that the enterprise's operations comply with legal and regulatory requirements. For example, it is necessary to generate a voucher to prove that the enterprise complies with specific tax regulations or industry standards. After receiving the voucher request, the validity of the request is first verified, including checking the integrity and correctness of the business scenario identifier and other necessary fields. After verification, the corresponding application type and corresponding interface are determined according to the business scenario identifier so that the request can be correctly routed to the appropriate credential generation service. In this way, it can ensure that credential requests for various business scenarios are accurately received and effectively processed, supporting enterprises to achieve efficient and accurate credential management in various business operations. This not only improves the degree of automation of business processes, but also enhances the reliability and transparency of the entire system.

[0037] In some embodiments of the present disclosure, the application type of the business scenario is determined according to the credential request of the business scenario. For example, the application type is a classification defined according to the characteristics and requirements of the business scenario, which guides how to process the received credential request. Each application type is associated with a set of specific processing rules and interfaces, which are designed to meet the needs of a specific business scenario. Specifically, a credential request containing a business scenario identifier is first received. These requests describe specific business operations that need to be performed, such as auditing, financial records, or compliance checks. The business scenario identifier and other relevant information in the request are analyzed, such as the transaction type, the amount involved, the relevant date, etc. This analysis helps the system understand the specific requirements and complexity of the request. According to preset rules or models, the request is mapped to the corresponding application type. These rules are based on the characteristics and requirements of the business scenario, for example, financial transactions are mapped to the "financial processing" application type, and compliance checks are mapped to the "compliance review" application type. If the business scenario is "finance", the application type is "daily account processing", which involves calling financial accounting and report generation services. If the business scenario is "auditing", the application type is "audit verification", which involves calling audit tracking and record verification services. If the business scenario is "compliance", the application type is "compliance check", which involves calling regulatory compliance and risk assessment services. In this way, determining the application type of the business scenario not only improves the accuracy and efficiency of the credential generation process, but also ensures that various business needs are properly handled, thereby supporting the company's operations in all aspects in accordance with predetermined standards and specifications.

[0038] In some embodiments of the present disclosure, according to the application type of the business scenario, the interface corresponding to the application type of the business scenario is determined. For example, the interface here refers to a software interface for processing requests of a specific application type. These interfaces serve as a bridge between the application type and the actual service, ensuring the correct execution of the voucher generation process. Each application type corresponds to an interface, which defines how data is received, processed and transmitted. First, according to the application type of the business scenario determined in the previous step, such as "daily account processing", "audit verification" or "compliance check". According to the application type, the corresponding interface is found. This mapping is based on the configuration defined by the business scenario, where each application type is associated with a specific service interface. The determined interface supports different functions, such as data validation, calculation, record generation, etc. For example, the financial processing interface supports account entry and financial report generation, and the compliance check interface supports regulatory compliance review and risk assessment. In this way, determining the interface corresponding to the application type of the business scenario not only improves the professionalism and accuracy of business processing, but also ensures the efficient operation of the system and the correct implementation of business rules.

[0039] In some embodiments of the present disclosure, the credential generation service corresponding to the interface is called through the interface corresponding to the application type of the business scenario. For example, in the business system, the interface is used as a connection point between the application type and the actual execution service to pass the request from the front end to the specific service of the back end. Each interface calls a back-end service according to its defined function to complete a specific task, such as credential generation, data verification or other business logic processing. The interface first verifies the integrity and correctness of the request data, and then processes the request data according to the requirements of the application type, and prepares to call the back-end service. The interface calls the corresponding credential generation service according to the mapping rules. These services perform specific business logic, such as calculation, data storage, and credential preparation, based on the data passed by the interface. During the service processing, the interface manages the transmission of data to ensure that the data flows correctly between the various service components while maintaining the consistency and security of the data. Finally, the service generates the required credentials and returns them to the requester through the interface or stores them in the system for subsequent use. This interface calls the financial voucher generation service to process requests such as account entry and expense reimbursement, and generates corresponding financial vouchers. This interface calls the audit tracking service to collect and verify the data required for the audit and generate an audit report. This interface calls the compliance assessment service to perform risk analysis and regulatory compliance checks and generate compliance reports or records. By calling the corresponding service through a dedicated interface, requests can be processed more efficiently, reducing processing time and error rates. The separation of interfaces and services makes the business system more flexible and convenient for adjusting or expanding services according to business needs. Each step of the interface call can be recorded and tracked, enhancing the transparency and traceability of business processing.

[0040] In some embodiments of the present disclosure, the credential generation service corresponding to the interface parses the credential request to obtain multiple business subject data, including: obtaining the identification of the business scenario from the credential request through the credential generation service corresponding to the interface; obtaining the mapping relationship between the business scenario and the business subject from the preset configuration data according to the identification of the business scenario; and obtaining multiple business subject data corresponding to the business scenario according to the mapping relationship. For example, first, the credential generation service needs to receive the credential request from the external system or user through its public API interface. Specifically, the credential generation service can listen to the specified port and path and wait for the receipt of the credential request. The received request data is parsed, and the data is usually transmitted in JSON or XML format. The parsing process needs to extract all important information, such as the identification of the business scenario. The identification of the business scenario is extracted from the parsed data. This identification is a key information for subsequent retrieval of the relevant business subject mapping relationship from the configuration data. The business scenario identification is usually a code or a label. According to the extracted business scenario identification, the credential generation service needs to obtain the corresponding business subject mapping relationship from the preset configuration data. For example, a database or configuration file storing configuration data is accessed. These data contain mapping relationships between different business scenarios and corresponding business subjects. Query or retrieve the corresponding business account list according to the business scenario identifier. This is usually a table lookup or database query operation. When the business account mapping relationship associated with a specific business scenario is obtained, the voucher generation service will obtain specific business account data based on these mapping relationships. For example, based on the business account mapping, aggregate or calculate the final business account data. For example, extract and integrate data from multiple data sources or services. Format the aggregated data into the format required for voucher generation to ensure the accuracy and availability of the data. Finally, the voucher generation service returns the processed business account data to the requester. Through these steps, the voucher generation service can effectively process voucher requests from different business scenarios, ensuring that each request can be accurately converted into the corresponding business account data to meet the needs of financial processing and reporting.

[0041] In some embodiments of the present disclosure, the voucher generation service corresponding to the interface generates voucher data corresponding to the voucher request based on multiple business subject data, including: obtaining a voucher template corresponding to the business scenario from a template database according to the multiple business subject data; generating voucher data corresponding to the voucher request based on the multiple business subject data and the voucher template corresponding to the business scenario. For example, first, the voucher generation service needs to determine the voucher template to be used according to the provided business subject data. For example, connect to a database storing voucher templates, which contains voucher templates for different business scenarios. According to the business scenario identifier contained in the incoming business subject data, query the corresponding voucher template. Each business scenario corresponds to a voucher template. After obtaining the appropriate voucher template, generate a voucher based on the template and the business subject data. For example, integrate the business subject data into the selected voucher template. Specifically, fill the data into the preset fields of the template, such as debit amount, credit amount, account code, etc. When filling the data, it is necessary to adjust or calculate according to specific business rules, such as calculating tax amount, adjusting amount, etc. After completing the data filling and any necessary calculations, generate the final voucher entity. This voucher entity should be a complete record, including all necessary accounting information, ready for accounting records or further processing. The generated voucher data needs to be formatted into a usable format and output to the requester or passed to other systems for further processing. Depending on actual needs, the voucher data can also be formatted into formats such as JSON, XML, or other systems that can accept it. Before sending or storing data, perform data validation to ensure that all information is accurate. Send or store voucher data: Send the formatted voucher data back to the requesting client or pass it to other financial management systems for further processing, such as recording it into the account. Log the entire voucher generation process, including the data received, the template used, and the generated voucher details. This is very important for subsequent audits and problem diagnosis. Monitor the performance of the voucher generation service to ensure that processing time and resource usage are within an acceptable range. Through these steps, the voucher generation service can effectively handle voucher requests for various business scenarios, ensuring that the generated voucher data is both accurate and meets accounting standards and business requirements.

[0042] Figure 3 FIG. 1 is a flow chart of another method for generating credential data provided by an embodiment of the present disclosure. Figure 3 As shown, before receiving the credential request of the business scenario, the above method also includes step S310 and step S320.

[0043] In step S310, historical voucher data corresponding to the business scenario is obtained according to the business scenario.

[0044] In step S320, the historical voucher data is parsed to obtain a subject set corresponding to the business scenario, and the subject set corresponding to the business scenario is cached.

[0045] The method can obtain the historical voucher data corresponding to the business scenario according to the business scenario, parse the historical voucher data to obtain the subject set corresponding to the business scenario, and cache the subject set corresponding to the business scenario, so that the historical voucher data can be effectively managed and utilized, thereby supporting complex business analysis and decision-making. This method improves the efficiency of data processing, reduces duplication of work, and ensures the immediate availability and accuracy of data.

[0046] In some embodiments of the present disclosure, historical voucher data corresponding to a business scenario is obtained according to the business scenario. For example, before starting to receive voucher requests, the business scenario needs to be clearly defined first. Business scenarios involve specific business operations, such as sales, procurement, financial settlement, etc. Each business scenario has its specific data requirements and relevance. For example, a sales scenario requires access to vouchers related to sales orders, customer payments, and inventory changes. According to the specific needs of the business scenario, determine the type of data that needs to be retrieved, such as transaction date, amount, related accounts and subjects, etc. Determine the time range of the data, for example, all relevant vouchers within the past year need to be obtained. According to the defined data requirements, configure the database query statement or set the API query parameters. Execute a query in the database or data warehouse to retrieve data. This step needs to ensure the efficiency and security of data access. Extract query results from a database or other data source. These data typically include detailed information about historical vouchers, such as voucher numbers, dates, amounts involved, and related descriptions. Perform preliminary processing on the extracted data, such as formatting dates and numbers, and cleaning up incomplete or irrelevant records to ensure the quality and consistency of the data. Verify after data extraction to ensure that the acquired data accurately reflects the needs of the business scenario. The verification step may include checking data integrity, consistency, and timeliness. The extracted and verified data is passed to the next processing flow, such as data parsing, account set generation, and caching. Data delivery needs to ensure data security and privacy protection. Through the above steps, historical voucher data related to specific business scenarios can be effectively retrieved from a large amount of stored data, laying a solid foundation for further data processing and analysis. This process not only supports efficient data processing, but also ensures the accuracy and applicability of the data.

[0047] In some embodiments of the present disclosure, historical voucher data is parsed to obtain a subject set corresponding to a business scenario, and the subject set corresponding to the business scenario is cached. For example, all relevant accounting subjects and related information are extracted from historical voucher data, which generally include subject codes, subject names, loan amounts, etc. Data parsing tools or scripts, such as Python data processing software, are used to process and parse data. For example, text analysis, pattern matching, or regular expressions are used to identify and extract data. Based on the parsed data, a subject set is constructed, which includes all subjects used in the business scenario. This set should include a detailed description of the subject, such as subject name, subject code, and its frequency of use in the business scenario. The extracted subject data is deduplicated, classified, and sorted to ensure the accuracy and ease of use of the subject set. Caching subject sets can significantly reduce the number of times the system repeatedly performs data parsing in the same or similar business scenarios, thereby improving the overall response speed and processing power of the system. Caching allows subject sets to be quickly accessed and used, especially in scenarios where frequent queries and report generation are required. Memory caches such as Redis, Memcached, etc. can be used, which support high-speed data access and easy-to-manage expiration policies. Implement appropriate caching strategies, including but not limited to setting reasonable cache expiration times, cache update mechanisms, and fault-tolerant processing. Regularly check and update cache content to ensure data accuracy and timeliness. Cache updates should be triggered when relevant historical voucher data changes. Monitor cache performance, including access speed and hit rate, as well as cache size and utilization, to ensure that the cache mechanism does not become a bottleneck for system performance. Through this process, not only can historical voucher data be effectively managed and utilized, but business needs can also be quickly responded to and data processing efficiency improved. The strategy for caching subject collections will directly affect the speed of data access and the operating efficiency of the system.

[0048] In some embodiments of the present disclosure, the above method also includes obtaining the newly added voucher data corresponding to each business scenario from the specified database according to a preset cycle; parsing the newly added voucher data, and updating the subject set corresponding to each business scenario according to the parsing result. For example, according to business needs and data update frequency, set a suitable cycle (such as daily, weekly or monthly), and regularly obtain the newly added voucher data from the database during this cycle. The setting of the cycle should take into account the activity and data volume of business activities to optimize the efficiency and timeliness of data processing. Establish a connection with the specified database to ensure the security and stability of the data acquisition process. According to the set time range, execute SQL queries or call APIs to obtain the newly added voucher data. Usually involves comparing timestamps or checking records marked as "new". Use data parsing tools or scripts to parse the acquired newly added voucher data and extract key information, such as subject code, subject name, transaction amount, etc. This step requires processing various data formats and structures to ensure accurate extraction of required information from complex data. Check the parsed subject information against the existing subject set to determine whether there are new subjects appearing in the newly added voucher data. If new subjects are found, add these subjects to the subject set of the corresponding business scenario. Specifically, you can modify the database table or update the data structure in memory. When the subject set is updated, the corresponding cache also needs to be updated to reflect the latest data. This ensures that the business system uses the latest information in subsequent queries and operations. Through these steps, the subject sets related to each business scenario can be continuously updated and maintained, ensuring the real-time and accuracy of the data, while optimizing the system's response speed and processing capabilities.

[0049] Figure 4 FIG. 1 is a flow chart of another method for generating credential data provided by an embodiment of the present disclosure. Figure 4 As shown, before receiving the credential request of the business scenario, the above method also includes steps S410 to S430.

[0050] In step S410, a business operation corresponding to the business scenario is obtained according to the business scenario.

[0051] In step S420, rules corresponding to the business scenarios are generated according to the business scenarios and business operations, and the rules corresponding to the business scenarios are cached in the credential generation engine.

[0052] In step S430, interfaces corresponding to the rules are configured according to the rules corresponding to the business scenarios.

[0053] The method can obtain the business operation corresponding to the business scenario according to the business scenario, generate the rules corresponding to the business scenario according to the business scenario and the business operation, and cache the rules corresponding to the business scenario to the voucher generation engine, and can effectively manage and apply business rules to ensure the accuracy and efficiency of voucher generation. This method helps to improve the automation level and accuracy of financial processing, while reducing manual errors and processing delays.

[0054] In some embodiments of the present disclosure, business operations corresponding to business scenarios are obtained according to business scenarios. For example, first, business scenarios are defined. Business scenarios are usually specific scenarios that describe internal operations of an enterprise or customer interactions, such as: sales order processing: customers place orders to purchase products. Inventory management: product entry, exit or inventory adjustment. Invoice processing: generation, sending and payment of invoices. Each business scenario should describe its triggering conditions, the subjects involved (such as customers, suppliers), key data elements (such as order quantity, price, timestamp), etc. in detail. For each business scenario, identify the business operations performed in the scenario. These operations are specific steps required to complete the business scenario, such as: sales order processing: customer information verification, order entry creation, inventory check, order confirmation, invoice generation. Collect data related to each business scenario, including historical transaction data, user behavior logs, system operation records, etc. Through data analysis, the characteristics and requirements of each business scenario can be better understood. The information obtained from the analysis is used to map the specific business operations of each business scenario. Including determining the order, dependencies and execution conditions of the operations. For example, an order cannot be confirmed before an inventory check. Based on the mapping of business operations, formulate corresponding business rules. These rules define the execution standards and conditions for operations, ensuring the correctness and consistency of business processes. Integrate the identified and defined business operations into the enterprise's business systems. Regularly monitor the execution and effects of business operations, and collect feedback to optimize business scenarios and operations. This includes analyzing the efficiency of operations, finding bottlenecks, and adjusting processes or rules to improve performance.

[0055] In some embodiments of the present disclosure, rules corresponding to business scenarios are generated according to business scenarios and business operations, and the rules corresponding to business scenarios are cached in the voucher generation engine. For example, on the basis that the business scenarios and corresponding business operations have been clarified, the next step is to define the specific rules that these scenarios and operations need to follow. These rules generally include: conditional rules: define under what conditions to perform specific operations. Execution rules: specify the specific way and steps to perform operations. Verification rules: ensure the accuracy and integrity of data during the execution of operations. For example, in the business scenario of sales order processing, the rules included are: if the inventory is greater than the order quantity, the order is allowed to be executed. When the order amount exceeds a certain limit, it requires approval by senior management. Each order item is associated with a valid customer account. According to the defined rules, the rule engine is used to generate executable rule code. The generated rules need to be cached in the voucher generation engine to increase the processing speed and reduce the delay of each transaction processing. Convert the rules into a format suitable for caching and store them in the cache system. Set the expiration time, update strategy and fault tolerance mechanism of the cache to ensure the validity and consistency of the cached data. Integrate cached rules into the credential generation engine or the corresponding business system to ensure that these cached rules can be called to process transactions during actual business operations. Ensure that the credential generation engine can be seamlessly integrated with the cache system and that cached data can be efficiently accessed when calling rules. Monitor system performance, especially the response time and accuracy of rule execution, to ensure that the system meets expected business needs. When business changes or policies are adjusted, update business rules in a timely manner and synchronize them to the cache. Adjust cache strategies and optimize cache performance according to the operation of the business system, such as adjusting cache size, update frequency, etc. Through these steps, enterprises can ensure the efficient execution of business rules while improving the speed and accuracy of transaction processing. This not only improves the level of automation in business operations, but also helps reduce errors and improve customer satisfaction.

[0056] In some embodiments of the present disclosure, the interface corresponding to the rule is configured according to the rule corresponding to the business scenario. For example, before configuring the interface, it is first necessary to determine the specific requirements of the business rule for the interface. This includes:

[0057] Determine what data the interface needs to receive (input) and what data it needs to output after executing the rules (output). Define the data format (such as JSON, XML, etc.) and data type (such as integer, string, date, etc.) that the interface should use. Configure the structure and behavior of the interface according to the determined requirements and specifications. Define API endpoints for each business rule operation and determine the methods that each endpoint will support (such as GET, POST, PUT, DELETE). Configure how to protect the interface, including authentication and authorization mechanisms such as OAuth, API keys, etc. Implement the business logic of the interface endpoints to ensure that they correctly handle input data and generate corresponding output according to business rules. Ensure that the received data conforms to the expected format and type, and non-compliant requests should be handled appropriately. Develop error handling logic to ensure that the interface can return clear and consistent error messages when errors occur. After the interface is developed, test to ensure that the interface's functionality and performance meet the requirements. Deploy the interfaces to the production environment and ensure that they can access all necessary network resources and services. Monitor the usage and performance of the interfaces to ensure that they are operating normally and respond to any problems in a timely manner. Perform necessary maintenance and upgrades on the interfaces based on changes in business requirements or technology updates. Through these steps, enterprises can ensure that business rules are effectively executed through configured interfaces, enhancing the automation and efficiency of business processes.

[0058] In some embodiments of the present disclosure, the above method further includes: obtaining new business operations corresponding to each business scenario from a specified database according to a preset cycle; updating the rules corresponding to each business scenario in the voucher generation engine based on each business scenario and the new business operations corresponding to each business scenario. For example, first, it is necessary to determine the cycle for extracting data from the database. This cycle can be daily, weekly, monthly, etc., depending on the frequency of changes in business requirements and the processing capacity of the system. The setting of the cycle should take into account the real-time requirements of business operations and the rational use of system resources. According to the set cycle, it is necessary to regularly extract new business operation data from the specified database. According to the business scenario requirements, write SQL queries or use other database query languages ​​to extract new business operation data within a specific time period. Automatically execute these queries at a predetermined time point. Clean and format the query results for subsequent processing. After obtaining new business operation data, it is necessary to update the rules in the voucher generation engine based on these data. Analyze the impact of the new business operations on the existing rules. Determine whether it is necessary to add new rules, modify existing rules, or delete outdated rules. Based on the analysis results, update the rules, such as writing new rule codes or adjusting existing codes. After updating the rules, conduct thorough testing to ensure the correctness and effectiveness of the new rules. Deploy new or updated rules that have passed the test to the credential generation engine. Deploy new or updated rule code to the credential generation engine in the production environment. If using cache to store rules, you need to update the relevant rule data in the cache to ensure that the engine is using the latest rule set. Monitor the implementation effect of new rules to ensure that they are executed correctly in the production environment and make timely adjustments to resolve any problems that arise. Notify the business and technical teams about rule updates to ensure that all relevant personnel are aware of the latest business operations and rule status. In addition, regularly evaluate the performance of the system to ensure the efficiency of data acquisition, rule updates, and credential generation. Based on the evaluation results and business feedback, optimize the process of data acquisition and rule updates to improve the overall efficiency and responsiveness of the system. Through these detailed steps, enterprises can ensure that their business rule systems are updated in sync with business needs, thereby improving the accuracy and efficiency of business operations. This approach also helps reduce human errors and improve the level of automation.

[0059] Figure 5 It is a block diagram of a credential data generating device provided by an embodiment of the present disclosure.

[0060] like Figure 5 As shown, the credential data generating device 500 includes an acquisition module 510 , a first determination module 520 , a second determination module 530 , a calling module 540 , a parsing module 550 and a generating module 560 .

[0061] Specifically, the acquisition module 510 is used to receive a credential request for a business scenario.

[0062] The first determination module 520 is used to determine the application type of the business scenario according to the credential request of the business scenario.

[0063] The second determination module 530 is used to determine the interface corresponding to the application type of the business scenario according to the application type of the business scenario.

[0064] The calling module 540 is used to call the credential generation service corresponding to the interface through the interface corresponding to the application type of the business scenario.

[0065] The parsing module 550 is used to parse the voucher request through the voucher generation service corresponding to the interface to obtain multiple business subject data.

[0066] The generation module 560 is used to generate voucher data corresponding to the voucher request based on multiple business subject data through the voucher generation service corresponding to the interface.

[0067] The credential data generating device 500 can dynamically determine the application type of the business scenario and its corresponding interface, so that the system can be flexibly adjusted according to different business needs. This method allows the decoupling of business rules from system implementation, so as to adapt to changes in the market and business processes more quickly. By using a special credential generation service to parse and generate credential data, the possibility of manual coding errors is reduced. Automated data processing reduces errors introduced by manual processing and ensures the accuracy and consistency of data. The management and application logic of business rules are separated so that non-technical personnel can also understand and manage business rules without having to deeply understand the underlying code. This transparent rule management not only improves the readability of the rules, but also simplifies maintenance work. By optimizing the configuration of interfaces and services, processing efficiency can be improved and response time can be shortened. Automated credential generation reduces the burden on the system and improves the overall processing speed and performance. In addition, since the present disclosure adopts a modular configuration method, each component (such as application type, interface, credential generation service) can be independently updated and expanded without affecting other parts of the system, making future expansion and updating easier and more efficient. By centrally managing credential generation services, security control and audit strategies can be implemented more effectively. This not only protects the security of data, but also ensures that the entire credential generation process meets relevant compliance requirements.

[0068] In some embodiments of the present disclosure, before receiving a credential request for a business scenario, the credential data generating device 500 is also used to: obtain historical credential data corresponding to the business scenario based on the business scenario; parse the historical credential data to obtain a subject set corresponding to the business scenario, and cache the subject set corresponding to the business scenario.

[0069] In some embodiments of the present disclosure, before receiving a credential request for a business scenario, the credential data generation device 500 is also used to: obtain business operations corresponding to the business scenario based on the business scenario; generate rules corresponding to the business scenario based on the business scenario and the business operations, and cache the rules corresponding to the business scenario to the credential generation engine; and configure the interface corresponding to the rules based on the rules corresponding to the business scenario.

[0070] In some embodiments of the present disclosure, the voucher data generating device 500 is also used to: obtain new voucher data corresponding to each business scenario from a specified database according to a preset period; parse the new voucher data, and update the subject set corresponding to each business scenario according to the parsing result.

[0071] In some embodiments of the present disclosure, the credential data generation device 500 is also used to: obtain new business operations corresponding to each business scenario from a specified database according to a preset period; and update the rules corresponding to each business scenario in the credential generation engine based on each business scenario and the new business operations corresponding to each business scenario.

[0072] In some embodiments of the present disclosure, the parsing module 550 is configured to: obtain an identifier of a business scenario from a credential request through a credential generation service corresponding to an interface; obtain a mapping relationship between the business scenario and business subjects from preset configuration data based on the identifier of the business scenario; and obtain multiple business subject data corresponding to the business scenario based on the mapping relationship.

[0073] In some embodiments of the present disclosure, the generation module 560 is configured to: obtain a voucher template corresponding to the business scenario from a template database based on multiple business subject data; and generate voucher data corresponding to the voucher request based on multiple business subject data and the voucher template corresponding to the business scenario.

[0074] Figure 6 Schematic diagram of an electronic device 6 provided in an embodiment of the present disclosure. Figure 6 As shown, the electronic device 6 of this embodiment includes: a processor 601, a memory 602, and a computer program 603 stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program 603, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 601 executes the computer program 603, the functions of the modules in the above-mentioned device embodiments are implemented.

[0075] The electronic device 6 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 6 may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will appreciate that Figure 6The electronic device 6 is merely an example and does not limit the electronic device 6 . The electronic device 6 may include more or less components than those shown in the figure, or different components.

[0076] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0077] The memory 602 may be an internal storage unit of the electronic device 6, for example, a hard disk or memory of the electronic device 6. The memory 602 may also be an external storage device of the electronic device 6, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 6. The memory 602 may also include both an internal storage unit of the electronic device 6 and an external storage device. The memory 602 is used to store computer programs and other programs and data required by the electronic device.

[0078] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0079] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0080] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be included in the protection scope of the present disclosure.

Claims

1. A method for generating voucher data, characterized in that: include: Receive credential requests for business scenarios; Determining an application type of the business scenario according to a credential request of the business scenario; Determine, according to the application type of the business scenario, an interface corresponding to the application type of the business scenario; Through the interface corresponding to the application type of the business scenario, call the credential generation service corresponding to the interface; The voucher request is parsed through the voucher generation service corresponding to the interface to obtain multiple business subject data; The voucher generation service corresponding to the interface generates voucher data corresponding to the voucher request based on the multiple business subject data.

2. The method according to claim 1, characterized in that: Before receiving the credential request of the business scenario, the method further includes: Acquire historical voucher data corresponding to the business scenario according to the business scenario; The historical voucher data is parsed to obtain a subject set corresponding to the business scenario, and the subject set corresponding to the business scenario is cached.

3. The method according to claim 1, characterized in that Before receiving the credential request of the business scenario, the method further includes: Obtaining business operations corresponding to the business scenario according to the business scenario; Generate rules corresponding to the business scenario according to the business scenario and the business operation, and cache the rules corresponding to the business scenario in a credential generation engine; Configure the interface corresponding to the rule according to the rule corresponding to the business scenario.

4. The method according to claim 2, characterized in that: The method further comprises: Acquire new voucher data corresponding to each business scenario from the specified database according to the preset cycle; The newly added voucher data is parsed, and the subject set corresponding to each business scenario is updated according to the parsing result.

5. The method according to claim 3, characterized in that: The method further comprises: Obtain new business operations corresponding to each business scenario from the specified database according to the preset period; Based on each business scenario and the newly added business operations corresponding to each business scenario, the rules corresponding to each business scenario in the credential generation engine are updated.

6. The method according to claim 1, characterized in that The voucher request is parsed through the voucher generation service corresponding to the interface to obtain multiple business subject data including: Obtaining an identifier of the business scenario from the credential request through a credential generation service corresponding to the interface; According to the identification of the business scenario, a mapping relationship between the business scenario and the business subject is obtained from preset configuration data; According to the mapping relationship, multiple pieces of business subject data corresponding to the business scenario are obtained.

7. The method according to claim 1, characterized in that The credential generation service corresponding to the interface generates credential data corresponding to the credential request based on the plurality of business subject data, including: According to the plurality of business subject data, a voucher template corresponding to the business scenario is obtained from a template database; Based on the multiple business subject data and the voucher template corresponding to the business scenario, voucher data corresponding to the voucher request is generated.

8. A voucher data generating device, characterized in that: include: The acquisition module is used to receive the credential request of the business scenario; A first determination module, configured to determine an application type of the business scenario according to a credential request of the business scenario; A second determination module is used to determine, according to the application type of the business scenario, an interface corresponding to the application type of the business scenario; A calling module, used to call the credential generation service corresponding to the interface through the interface corresponding to the application type of the business scenario; A parsing module, used to parse the voucher request through the voucher generation service corresponding to the interface to obtain multiple business subject data; A generation module is used to generate voucher data corresponding to the voucher request based on multiple business subject data through a voucher generation service corresponding to the interface.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Electronic invoice generation method and device, electronic equipment and computer program product

    CN119991234A