Custom business document number generation method, system, device and product
By customizing the business document number generation system, decoupling business system resources, and realizing unified generation of business document numbers and buffering of high-concurrency requests, the problems of complex development and maintenance and high resource usage in existing technologies are solved, and the system stability and response speed are improved.
Patent Information
- Application Number
- CN202510794974.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-14
- Publication Date
- 2025-09-23
AI Technical Summary
When generating business order numbers, existing enterprise-level business systems face problems such as complex development and maintenance, high resource usage, high system pressure, and easy to cause lag and crashes, especially in high-concurrency scenarios.
A customized business document number generation system is used to parse the basic rules of the target business system through the number generation system, generate and cache business document numbers, decouple business system resources, and achieve unified management and buffering of high-concurrency requests.
It reduces the development and testing workload, improves system stability, avoids resource occupation and system pressure, improves response speed and reliability, and meets the uniqueness and real-time requirements of order numbers.
Smart Images

Figure CN120688446A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of back-end business systems, and in particular to a method, system, device and product for generating custom business document numbers. Background Art
[0002] For business systems of enterprise-level applications, in order to ensure the orderly development of business and full-process tracking and monitoring, and to ensure that the business can be queried and information shared at any time point in the entire life cycle, it is necessary to provide a business order number for each business generated in production and operation as a unique identifier.
[0003] In actual applications, the rules for generating business document numbers are diverse and complex, involving multiple rules such as partitioning, identification, and business type. In addition, the rules for generating business document numbers will vary depending on the business system. For currently used business systems, custom code of the business system is used to generate business document numbers. Subsequent maintenance is complex, and expansion requires redevelopment, which increases the workload of development and testing and takes a long time. In addition, the generation of business document numbers is not strongly related to the main business logic. The development and maintenance of the business system to update the business document number generation rules will cause unnecessary impact on the business system and business processes. In addition, when a business system is faced with the processing of highly concurrent businesses, allocating already tight system resources to the surging business document number generation task process will place a heavy burden on the system and may even cause the business system to freeze or crash. Summary of the Invention
[0004] The purpose of this application is to overcome the shortcomings of the existing technology and provide a method, system, equipment and product for generating customized business document numbers, which can enable business document numbers for different projects and different business systems to be uniformly generated and maintained under the same architecture, greatly reducing the development and testing workload, sharing the system pressure and increasing the stability of the system.
[0005] In a first aspect, the present application provides a method for generating a custom business document number, comprising the following steps: S1, the order number generation system analyzes the basic business order number rules of the target business system and establishes business order number generation rules based on the basic business order number rules within the order number generation system; S2: The target business system sends a business order number generation request to the order number generation system. The order number generation system calls the corresponding business order number generation rule based on the business order number generation request, parses it into a business order number output rule, and generates a business order number. S3, the target business system sends a request to obtain a business order number to the order number generation system, and the order number generation system provides the generated business order number to the target business system.
[0006] Through the above technical solution, the order number generation system parses the basic business order number rules of the target business system and then stores them. When the target business system generates a business order number requirement, the order number generation system calls the business order number generation rules, pre-generates the business order number, and then returns the generated business order number to the target business system in response to the target business system's acquisition request. The above technical solution decouples the business system from the order number generation system, so that the generation and maintenance of business order numbers are performed in the order number generation system, which is efficient, easy to maintain, and does not occupy business system resources. The business order number requirements of the target business system are split into generation steps and provision steps, and are executed step by step. This can provide a buffer for the generation of high-concurrency business order numbers and reduce the operating pressure of the target business system.
[0007] Preferably, S1 specifically includes: S1.1. Create a rule storage table corresponding to the target business system in the rule database of the ticket generation system, and configure the index field and blank rule field of the rule storage table; S1.2, obtaining the basic business order number rules of the target business system and parsing them to obtain the business order number generation rules, importing them into the blank rule fields of the rule storage table and storing them as fill-in rule fields; S1.3, configure an API port open to the target business system, where the API port leads to the rule database.
[0008] The above technical solution establishes a rule storage table within the ticket generation system's rule database, storing the basic business ticket rules for the target business system being parsed. This enables differentiated management of business ticket numbers for different business systems, allowing the ticket generation system to simultaneously manage multiple business systems. Business systems access the ticket generation system's rule database through an API and call the corresponding rule storage table, ensuring that different business systems do not interfere with each other.
[0009] Preferably, in S1.2, the method for obtaining and parsing the basic business order number rules of the target business system is to obtain the business order number information data packet of the target business system, the business order number information data packet containing the arrangement of the rules of each field of the business order number using a specific symbol interval, and the arrangement is the basic business order number rule. The basic business order number rule is parsed based on the specific symbol interval to form the business order number generation rule, the business order number generation rule is manually reviewed, modified or expanded, and then imported into the blank rule field of the rule storage table and stored as the fill rule field.
[0010] Through the above technical solution, the basic business order number rules based on the business order number information data packet are parsed to obtain the business order number generation rules, which are then manually reviewed, modified or expanded. This can ensure the accuracy of the business order number generation rules and facilitate the convenient and efficient synchronization of updating the business order number generation rules when the business order number rules of the target business system need to be expanded and maintained in the future.
[0011] Preferably, S2 specifically includes: S2.1, the target business system calls the API port and sends a business order number generation request, which includes an index value that matches the index field of the rule storage table; S2.2: The order number generation system calls the corresponding rule storage table in the rule database based on the index value, parses the rule storage table, and obtains the business order number output rule; S2.3, the order number generation system configures a business order number cache area for the business order number generation request; S2.4, the order number generation system calls the business order number output rule and generates business order numbers in batches in the business order number cache area.
[0012] Through this technical solution, when the ticket generation system generates business ticket numbers in response to a business ticket generation request, it invokes the corresponding business ticket output rules. It then configures a cache area before generating the business ticket numbers, and then stores the batch-generated business ticket numbers in the cache area for easy access. This technical solution can generate business ticket numbers in batches, allowing them to be accessed at any time as needed, thereby improving the responsiveness of the ticket generation system and alleviating system pressure during high-concurrency business ticket number requests.
[0013] Preferably, configuring the rule storage table also includes configuring the current maximum order number field and the cached order number quantity field. In S2.4, the starting value for generating batch business order numbers is determined based on the current maximum order number field, and the quantity of generated batch business order numbers is determined based on the cached order number quantity field. After batch generation of business order numbers, the maximum value of the generated business order numbers is updated to the current maximum order number field.
[0014] Through the above technical solution, it is ensured that each time a business order number is generated, the last business order number generated is used as the starting point, so that the business order numbers are continuously generated without duplication, and the number of business order numbers generated at a time is controllable.
[0015] Preferably, configuring the rule storage table also includes configuring whether to cache the field, which is divided into whether to cache or not; when the whether to cache field is required to cache, through S2.3, the order number generation system configures a business order number cache area for the business order number generation request; when the whether to cache field is not required to cache, S2.3 is not executed, and when S2.4 is executed, the order number generation system generates a single business order number.
[0016] Through the above technical solution, the cache field determines whether cache space needs to be allocated and business order numbers need to be generated in batches when generating business order numbers. As a result, for a specific business type, the order number generation system receives a single business order number generation request at a time and generates a single business order number to ensure the uniqueness and real-time nature of the business order number, and to ensure that the business order number accurately matches the business task at the current time, meeting security and compliance requirements.
[0017] Preferably, S3 specifically includes: S3.1: Check whether a business order number has been generated. If no business order number has been generated, return to S2. If a business order number has been generated, execute S3.2. S3.2, returning the generated business order number to the target business system, and marking the returned business order number.
[0018] Through the above technical solution, when the target system issues a request to obtain a business order number, if there is no generated business order number, S2 is automatically executed to generate a business order number to avoid the system from not responding; marking the returned business order number can ensure that the returned business order number is not returned repeatedly, thereby increasing system reliability.
[0019] In the second aspect, the present application provides a system for generating a custom business document number, which adopts the following technical solutions: The document number generation system includes a rule parsing module, a rule database module, a target business system docking module, a business document number generation module, and a business document number cache module; The rule parsing module parses the basic business order number rules of the target business system to form business order number generation rules, and parses the stored business order number generation rules to form business order number output rules; The rule database module stores the business order number generation rules as a rule storage table in the rule database; The target business system docking module receives a business order number generation request and a business order number acquisition request from the target business system, and sends the generated business order number to the target business system; The business order number generation module calls the business order number output rule in response to the business order number generation request, configures the business order number cache area in the business order number cache module, and then generates the business order number; The business order number cache module stores the generated business order number in the corresponding cache area and returns the business order number to the target business system docking module in response to a business order number acquisition request.
[0020] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for generating a custom business document number when executing the computer program.
[0021] In a fourth aspect, the present application provides a computer program product, which includes a computer program or instructions, so that the computer program or instructions can implement the steps in the above-mentioned method for generating a customized business document number.
[0022] In summary, this application includes at least one of the following beneficial technical effects: 1. This application decouples the business system from the ticket generation system. Business ticket numbers are generated and maintained through the ticket generation system. Updates and extensions to business ticket number rules do not need to go through the business system, greatly reducing the workload of business system development and testing. 2. This application uses a ticket generation system to centrally manage the business ticket generation rules for multiple business systems, avoiding ticket number conflicts between different systems and ensuring global uniqueness of ticket numbers. It also enables standardized management of different business systems, improving system stability. It can also provide business ticket generation services for business systems with different API access sources, expanding the application scope of the business ticket generation system. 3. The tracking number generation system of this application does not occupy the system resources of the business system and can provide a buffer for the business system in high-concurrency scenarios, avoiding delays or failures caused by performance bottlenecks when the business system generates tracking numbers independently; 4. This application can be adjusted according to the type of business scenario. For a large number of high-concurrency business order number application requirements, batch-generated business order numbers are pre-stored in the cache area and returned to the target business system at any time as needed, which can ensure the response speed of the order number generation system; for the need to generate business order numbers individually, the order number generation system receives a single business order number generation request at a time and generates a single business order number to ensure the uniqueness and real-time nature of the business order number, and to ensure that the business order number accurately matches the business task at the current time, meeting security and compliance requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 Schematic diagram of the process of generating a custom business document number in an embodiment of the present application; Figure 2 Schematic diagram of the process of S1 in the embodiment of the present application; Figure 3Schematic diagram of the process of S2 in the embodiment of the present application; Figure 4 Schematic diagram of the process of S3 in the embodiment of the present application; Figure 5 This is a structural block diagram of a system for generating a custom business document number in an embodiment of the present application; Figure 6 Schematic diagram of the computer device architecture in an embodiment of the present application. DETAILED DESCRIPTION
[0024] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed, but as long as they are within the scope of the present application, they are protected by patent law.
[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. It should be noted that in the optional embodiments of the present application, when the embodiments in the present application are applied to specific products or technologies, the object information and other related data involved need to obtain the object's permission or consent, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if the embodiments of the present application involve data related to the object, it needs to be obtained through the authorization and consent of the object, the authorization and consent of the relevant departments and in compliance with the relevant laws, regulations and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject needs to be obtained. The embodiments also need to be implemented with the authorization and consent of the object.
[0026] The embodiments of the present application are described in further detail below with reference to the accompanying drawings.
[0027] Example 1: See also Figure 1 , a method for generating a custom business document number in an embodiment of the present application includes the following steps; S1. The order number generation system analyzes the basic business order number rules of the target business system and establishes business order number generation rules based on the basic business order number rules in the order number generation system.
[0028] S2: The target business system sends a business order number generation request to the order number generation system. The order number generation system calls the corresponding business order number generation rule according to the business order number generation request, parses it into a business order number output rule, and generates a business order number.
[0029] S3, the target business system sends a request to obtain a business order number to the order number generation system, and the order number generation system provides the generated business order number to the target business system.
[0030] For more details, see Figure 2 , the steps of S1 include: S1.1. Create a rule storage table corresponding to the target business system in the rule database of the ticket generation system. Configure the index field, blank rule field, and other configuration fields of the rule storage table.
[0031] As a specific embodiment, the fields of a rule storage table include: no_type, type field, serves as the label for configuring the rule storage table. The default value is 0 and serves as the data classification label for subsequent data expansion applications of the rule storage table.
[0032] no_maxnum, the maximum order number field, is used to store the maximum business order number value currently generated by the rule storage table.
[0033] no_rule, a rule expression field, is used to store the parsed business order number generation rule. If no content is stored, the rule field is blank.
[0034] no_table, the table name field, is used to name the rule storage table. no_column, the attribute name field, is used to name the business attribute corresponding to the rule storage table. Both are index fields.
[0035] no_cache_num, the cache order number quantity field, defines the quantity of batch business order numbers generated in a single time.
[0036] S1.2, obtain the basic business order number rules of the target business system and parse them to obtain the business order number generation rules, and import them into the blank rule field of the rule storage table and store them as the filled rule field.
[0037] More specifically, in S1.2, the method for obtaining and parsing the basic business order number rules of the target business system is to obtain the business order number information data packet of the target business system, which contains the arrangement of the rules of each field of the business order number using a specific symbol interval, and the arrangement is the basic business order number rule. Then, the basic business order number rule is parsed based on the specific symbol interval to form the business order number generation rule. It should be noted that in this embodiment, the business order number generation rule specifies the generation algorithm of each field based on the JAVA SPI mechanism, and different algorithms can be switched through configuration files or conditional parameters. When adding a new algorithm, only a new implementation class and SPI configuration need to be added, and there is no need to modify the main process code. The business order number generation rule is manually reviewed, modified or expanded, and then imported into the blank rule field of the rule storage table and stored as a filled rule field.
[0038] As a specific embodiment, the following basic business order number rules are parsed: UUID (uuid) + yyyymmdd (current year, month, and day) + TMCODE (current tenant) + snowflake (snowflake ID) + number (a serial number of several digits) + check (a fixed character) The above basic business order number rules specify the generation algorithm of each field through SPI. The fields are connected by a specific symbol "+", and then stored in no_rule to form a filling rule field and updated to the rule storage table.
[0039] S1.3, configure the API port open to the target business system, which leads to the rule database.
[0040] It should be noted that each target business system only has access to the rule database layer of the ticket generation system. The ticket generation system also utilizes row-level security (RLS) to dynamically filter data at the database level, thereby limiting query results. A business identification parameter is mandatory in the API interface, and the backend service automatically binds this parameter to the query criteria. The API gateway sets an IP whitelist to allow access from specified IP addresses of the target business system. This security policy restricts the target business system's access to the ticket generation system, isolates different business systems from each other, and ensures system security.
[0041] For more details, see Figure 3 , the steps of S2 include: S2.1, the target business system calls the API port and sends a business order number generation request, which includes an index value that matches the index field of the rule storage table.
[0042] S2.2, the order number generation system calls the corresponding rule storage table in the rule database based on the index value, parses the rule storage table to obtain the business order number output rule.
[0043] S2.3, the order number generation system configures a business order number cache area for the business order number generation request. The cache area is a non-volatile cache area.
[0044] S2.4, the order number generation system calls the business order number output rule and generates business order numbers in batches in the business order number cache area.
[0045] It should be noted that any one request to generate a business order number causes the order generation system to batch generate business order numbers within the business order number cache area. When the order generation system receives another request to generate a business order number, it first checks the corresponding cache area to see if any unreturned business order numbers exist. If so, batch generation of business order numbers will not proceed. In another embodiment, administrators can configure a threshold for the minimum number of business order numbers in the cache area through a rule storage table. When the order generation system receives another request to generate a business order number, if the number of spare business order numbers in the cache area is equal to or below the threshold, business order numbers will be generated.
[0046] More specifically, the ticket generation system first determines the starting value for batch business ticket numbers based on the current maximum ticket number field. It then determines the number of batch business ticket numbers to generate based on the cached ticket number quantity field. After generating the batch of business ticket numbers, it stores them in the cache area and simultaneously updates the current maximum ticket number field in the rule storage table. The batch-generated business ticket numbers stored in the cache area are kept in reserve and can be returned at any time upon request from the target business system, improving the responsiveness of the business ticket generation system.
[0047] It's important to note that when traditional single-business systems generate business ticket numbers in response to requests, even if a business process only has a single ticket number and the actual business process hasn't yet occurred, the business system still needs to create a business task for that ticket number, assign a starting point for the task, and allocate system resources for the task. This results in a significant waste of system resources. Especially in highly concurrent business environments, the generation of a large number of ticket numbers consumes significant system resources, leading to performance degradation and, in severe cases, system freezes or crashes.
[0048] In an embodiment of the present application, in response to a request to generate a business order number from the target business system, a batch of business order numbers are generated in a cache area. Although the business order number has actually been generated, it is not actually returned to the target system, but is stored in the cache area, so it does not occupy the system resources of the target business system. After the business process is actually advanced, it is necessary to create a task starting point and allocate system resources in the target business system. Only then will the business order number be returned to the target business system, and the target business system will perform specific configuration of the business task corresponding to the business order number. The embodiment of the present application can provide resource buffer space for the target business system, and can optimize the resource allocation of the target business system, especially in high-concurrency scenarios.
[0049] For more details, see Figure 4 , the steps of S3 include: S3.1: The target business system sends a request to the order number generation system to obtain a business order number. The system checks the cache to see if there is a generated but unmarked business order number. If not, the system returns to S2 to generate a business order number. If so, the system executes S3.2. S3.2, among the business order numbers that have not been marked, return the smallest business order number to the target business system, and mark the returned business order number.
[0050] It should be noted that the purpose of generating a business order number in response to a business order number generation request is to reserve business order number space for potential business tasks, reserve business order numbers for ready access at any time, improve response speed, and cope with high-concurrency scenarios. The generation of a business order number does not mean that the business order number has been returned to the target business system. The business system actually obtains the business order number by sending a business order number acquisition request to the order number generation system. In scenarios with urgent business tasks or high-concurrency and large-volume business tasks, the target business system may not issue a business order number generation request in a timely manner, or the business order number generated by the business order number generation request may be exhausted but the business order number generation request has not yet been resubmitted. Through the above steps, S2 can be automatically executed to generate a business order number when no business order number is generated, avoiding system unresponsiveness and improving system reliability.
[0051] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0052] Example 2: In this embodiment, the fields of the rule storage table also include: no_cache, configure whether to cache the field, set to 1 if caching is required and 0 if not.
[0053] When no_cache is 1, the steps for generating a business order number are the same as those in Example 1, i.e., through S2.3, the order number generation system configures a business order number cache area for the business order number generation request, and then stores the generated business order number in the cache area.
[0054] If no_cache is 0, S2.3 is skipped and S2.4 is executed. The ticket generation system only generates a single business ticket number and returns it to the target business system. Since the ticket generation system generates a single business ticket number in this scenario, there's no need to configure a cache area. The generated business ticket number is returned directly to the target business system. The generated business ticket number also needs to be updated in the maximum ticket number field of the rule storage table.
[0055] This technical solution enables the ticket generation system to generate a single business ticket number upon receiving a single request. This ensures the uniqueness and real-time nature of the ticket number, accurately matching the time of the current business task, and meeting the security and compliance requirements of the task. This solution is particularly suitable for businesses that require high accuracy and relevance between the time nodes of the task and the ticket number, such as financial transaction clearing, power grid dispatching, and precision industrial control timing tasks.
[0056] Example 3: See also Figure 5 A customized business document number generation system according to an embodiment of the present application includes a rule parsing module 1, a rule database module 2, a target business system docking module 3, a business document number generation module 4, and a business document number cache module 5.
[0057] The rule parsing module 1 parses the basic business order number rules of the target business system to form business order number generation rules, and parses the stored business order number generation rules to form business order number output rules.
[0058] The rule database module 2 stores the business order number generation rules as a rule storage table in the rule database.
[0059] The target business system docking module 3 receives the business order number generation request and the business order number acquisition request from the target business system, and sends the generated business order number to the target business system.
[0060] The business order number generation module 4 calls the business order number output rule in response to the business order number generation request, configures the business order number cache area in the business order number cache module 5, and then generates the business order number.
[0061] The business order number cache module 5 stores the generated business order number in the corresponding cache area, and returns the business order number to the target business system docking module in response to a business order number acquisition request.
[0062] Those skilled in the art will clearly understand that for the sake of convenience and brevity 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 distributed and completed by 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.
[0063] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described custom business document number generation system can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0064] Example 4: The embodiment of the present application provides a computer device, which may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, a database, and has a cache area. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used for storing the rule storage table in the rule database and for storing the field generation algorithm in the custom business document number generation method. The cache area of the computer device is used to cache the generated business document number. The network interface of the computer device is used to connect to an external target business system. When the computer program is executed by the processor, a custom business document number generation method is implemented.
[0065] Example 5: An embodiment of the present application provides a computer program product, which includes a computer program or instructions, so that the computer program or instructions can implement the steps in the above-mentioned method for generating a customized business document number.
[0066] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product comprises one or more computer instructions. When loaded and executed on a computer, the computer program instructions fully or partially perform the processes or functions described in the embodiments of this application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium accessible by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be magnetic media (e.g., floppy disk, hard disk, magnetic tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive).
[0067] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0068] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention 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 various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. A method for generating a custom business document number, characterized in that: The method includes the following steps: S1, the order number generation system analyzes the basic business order number rules of the target business system and establishes business order number generation rules based on the basic business order number rules within the order number generation system; S2: The target business system sends a business order number generation request to the order number generation system. The order number generation system calls the corresponding business order number generation rule based on the business order number generation request, parses it into a business order number output rule, and generates a business order number. S3, the target business system sends a request to obtain a business order number to the order number generation system, and the order number generation system provides the generated business order number to the target business system.
2. A method for generating a custom business document number according to claim 1, characterized in that: S1 specifically includes: S1.
1. Create a rule storage table corresponding to the target business system in the rule database of the ticket generation system, and configure the index field and blank rule field of the rule storage table; S1.2, obtaining the basic business order number rules of the target business system and parsing them to obtain the business order number generation rules, importing them into the blank rule fields of the rule storage table and storing them as fill-in rule fields; S1.3, configure an API port open to the target business system, where the API port leads to the rule database.
3. A method for generating a custom business document number according to claim 2, characterized in that: In S1.2, the method for obtaining and parsing the basic business order number rules of the target business system is to obtain the business order number information data packet of the target business system, which contains the arrangement of the rules of each field of the business order number using a specific symbol interval. The arrangement is the basic business order number rule. The basic business order number rule is parsed based on the specific symbol interval to form the business order number generation rule. The business order number generation rule is manually reviewed, modified or expanded, and then imported into the blank rule field of the rule storage table and stored as the fill rule field.
4. A method for generating a custom business document number according to claim 2, characterized in that: S2 specifically includes: S2.1, the target business system calls the API port and sends a business order number generation request, which includes an index value that matches the index field of the rule storage table; S2.2: The order number generation system calls the corresponding rule storage table in the rule database based on the index value, parses the rule storage table, and obtains the business order number output rule; S2.3, the order number generation system configures a business order number cache area for the business order number generation request; S2.4, the order number generation system calls the business order number output rule and generates business order numbers in batches in the business order number cache area.
5. A method for generating a custom business document number according to claim 4, characterized in that: Configuring the rule storage table also includes configuring the current maximum order number field and the cached order number quantity field. In S2.4, the starting value for generating batch business order numbers is determined based on the current maximum order number field, and the number of generated batch business order numbers is determined based on the cached order number quantity field. After batch generation of business order numbers, the maximum value of the generated business order numbers is updated to the current maximum order number field.
6. A method for generating a custom business document number according to claim 4, characterized in that: Configuring the rule storage table also includes configuring whether to cache the field, which is divided into whether to cache or not; when the whether to cache field is required to cache, through S2.3, the order number generation system configures a business order number cache area for the business order number generation request; when the whether to cache field is not required to cache, S2.3 is not executed, and when S2.4 is executed, the order number generation system generates a single business order number.
7. A method for generating a custom business document number according to claim 1, characterized in that: S3 specifically includes: S3.1: Check whether a business order number has been generated. If no business order number has been generated, return to S2. If a business order number has been generated, execute S3.
2. S3.2, returning the generated business order number to the target business system, and marking the returned business order number.
8. A system for generating custom business document numbers, characterized in that: It includes rule parsing module, rule database module, target business system docking module, business order number generation module and business order number cache module; The rule parsing module parses the basic business order number rules of the target business system to form business order number generation rules for storage, and parses the stored business order number generation rules to form business order number output rules; The rule database module stores the business order number generation rules as a rule storage table in the rule database; The target business system docking module receives a business order number generation request and a business order number acquisition request from the target business system, and sends the generated business order number to the target business system; The business order number generation module calls the business order number output rule in response to the business order number generation request, configures the business order number cache area in the business order number cache module, and then generates the business order number; The business order number cache module stores the generated business order number in the corresponding cache area and returns the business order number to the target business system docking module in response to a business order number acquisition request.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for generating a customized business document number according to any one of claims 1 to 7 are implemented.
10. A computer program product, characterized in that The computer program product includes a computer program or instructions, so that the computer program or instructions can implement the steps in the method for generating a customized business document number according to any one of claims 1 to 7.
Citation Information
Patent Citations
Service code generation method and system
CN113935285A
Streaming serial number generation method and device, computer equipment and readable storage medium
CN116483892A