Business document processing method and device, computer device and storage medium
By using preset queues and business continuation configuration information in business document processing, the target document can be directly obtained and processed, solving the problem of time-consuming table scanning in traditional methods and achieving efficient and accurate business document continuation processing.
Patent Information
- Application Number
- CN202110515831.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-12
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2041-05-12
AI Technical Summary
In traditional business document processing methods, scanning tables to extract data takes a long time, resulting in low efficiency and excessive system resource consumption.
By pre-setting queue storage document identifiers and obtaining the extension processing period and target document identifier from the business extension configuration information, the target document can be directly retrieved from the database for processing, avoiding complex table scanning analysis.
It greatly improves the efficiency of business document processing, saves time and costs, reduces system resource consumption, and improves data extraction efficiency and processing accuracy.
Smart Images

Figure CN113342863B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a business document processing method, apparatus, computer equipment, and storage medium. Background Technology
[0002] With the rapid development of science and technology, a wide variety of products have emerged, each offering a wealth of services for users. Some services are not one-off but rather have an ongoing nature, thus requiring ongoing processing. In some cases, this ongoing processing can be achieved online via computer.
[0003] Traditional business continuity processing methods involve scanning the database using a table scanning process or thread to extract data, analyze the business documents requiring continuity processing, and then perform continuity processing on these documents. Because table scanning and data extraction consume significant system resources and time, especially with a large volume of documents, the time consumption can be substantial, sometimes taking hours or even longer. Therefore, traditional methods suffer from high time costs and low efficiency. Summary of the Invention
[0004] Therefore, it is necessary to provide a business document processing method, apparatus, computer equipment, and storage medium that can improve efficiency in addressing the aforementioned technical problems.
[0005] A method for processing business documents, characterized in that the method includes:
[0006] Obtain service continuity configuration information;
[0007] Obtain the extension processing period from the aforementioned service extension configuration information;
[0008] Obtain the document identifier of the target business document from the preset queue; the target business document is a business document to be extended that matches the extension processing period.
[0009] Retrieve the target business document corresponding to the document identifier from the database;
[0010] Based on the business continuation processing logic in the business continuation configuration information, business continuation processing is performed according to the target business document.
[0011] A business document processing device, the device comprising:
[0012] The acquisition module is used to acquire business continuation configuration information; acquire the continuation processing period from the business continuation configuration information; and acquire the document identifier of the target business document from a preset queue; the target business document is a business document to be continuated that matches the continuation processing period.
[0013] The processing module is used to retrieve the target business document corresponding to the document identifier from the database; and to perform business continuation processing based on the business continuation processing logic in the business continuation configuration information and the target business document.
[0014] In one embodiment, the preset queue is a preset partitioned queue; the device further includes:
[0015] The queue determination module is used to determine the due date of documents within the extended processing period; to determine the queue identifier of the partition queue corresponding to each document's due date; and to store the document identifier of business documents corresponding to the same document's due date in the same partition queue.
[0016] The acquisition module is also used to obtain the document identifier of the target business document from the partition queue corresponding to the queue identifier.
[0017] In one embodiment, the same partition queue stores document identifiers for business documents under the same product that correspond to the same document expiration time. The acquisition module is also used to obtain the product identifier corresponding to the business to be renewed from the business renewal configuration information; the queue determination module is also used to generate a queue identifier for the corresponding partition queue for each document expiration time based on the product identifier and the document expiration time.
[0018] In one embodiment, the processing module is further configured to perform business continuation processing based on the business continuation processing logic in the business continuation configuration information, generate a business continuation document according to the target business document, convert the format of the business continuation document according to the format supported by the business provider corresponding to the target business document, and send the format-converted business continuation document to the business provider.
[0019] In one embodiment, the queue includes at least one set of queue elements arranged in sequence; a document identifier is contained in the queue elements; each set of queue elements also includes at least one task identifier to be processed; the processing module is further configured to, when each set of queue elements is selected as the current dequeue queue element, if the current task identifier in the current dequeue queue element is a continuation processing task identifier, execute the business continuation processing logic based on the business continuation configuration information, and perform business continuation processing according to the target business document; if the business continuation processing is successful, after removing the continuation processing task identifier from the current dequeue queue element, if the queue element still contains a task identifier to be processed, then add the queue element back to the tail of the queue.
[0020] In one embodiment, the processing module is further configured to rewrite the currently dequeued queue element to the corresponding position in the queue in the event of a failure in business continuation processing; and to perform business continuation processing based on the business continuation configuration information according to the continuation processing task identifier in the queue element, and to perform business continuation processing according to the target business document.
[0021] In one embodiment, the processing module is further configured to, when a queue element re-added to the tail of the queue is selected as the current dequeue queue element, perform a corresponding processing task on the target business document corresponding to the document identifier in the queue element according to the current task identifier in the queue element; if the task processing is successful, remove the current task identifier from the queue element; if the queue element after removing the task identifier still contains task identifiers to be processed, continue to re-add the queue element to the tail of the queue for loop iteration until the queue element no longer contains any task identifiers to be processed, and then stop re-adding the queue element to the queue.
[0022] In one embodiment, the processing module is further configured to, when a queue element re-added to the tail of the queue is selected as the current dequeue queue element, perform document expiration processing on the target business document corresponding to the document identifier in the queue element if the current task identifier in the queue element is a document expiration processing task identifier.
[0023] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:
[0024] Obtain service continuity configuration information;
[0025] Obtain the extension processing period from the aforementioned service extension configuration information;
[0026] Obtain the document identifier of the target business document from the preset queue; the target business document is a business document to be extended that matches the extension processing period.
[0027] Retrieve the target business document corresponding to the document identifier from the database;
[0028] Based on the business continuation processing logic in the business continuation configuration information, business continuation processing is performed according to the target business document.
[0029] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0030] Obtain service continuity configuration information;
[0031] Obtain the extension processing period from the aforementioned service extension configuration information;
[0032] Obtain the document identifier of the target business document from the preset queue; the target business document is a business document to be extended that matches the extension processing period.
[0033] Retrieve the target business document corresponding to the document identifier from the database;
[0034] Based on the business continuation processing logic in the business continuation configuration information, business continuation processing is performed according to the target business document.
[0035] The aforementioned business document processing method, apparatus, computer equipment, and storage medium pre-set a queue to store document identifiers that require extension processing. The extension period is obtained from the business extension configuration information, and then the document identifier of the target business document matching the extension period is retrieved from the pre-set queue. That is, it eliminates the need for complex database scanning to identify business documents requiring extension processing. Instead, the document identifiers needing extension can be easily determined through the business extension configuration information and the pre-set queue. Then, the target business document can be directly searched in the database based on the document identifier. Finally, based on the configured business extension processing logic, business extension processing is performed on the target business document. Compared to complex table scanning and analysis for business extension processing, this significantly improves efficiency and saves time. Attached Figure Description
[0036] Figure 1 This is an application environment diagram of a business document processing method in one embodiment;
[0037] Figure 2 This is an application environment diagram of the business document processing method in another embodiment;
[0038] Figure 3 This is a flowchart illustrating a business document processing method in one embodiment;
[0039] Figure 4 This is a schematic diagram of the interface for enabling automatic renewal service in one embodiment;
[0040] Figure 5 This is a schematic diagram of the interface for enabling automatic renewal service in another embodiment;
[0041] Figure 6 This is a schematic diagram of service continuity configuration information in one embodiment;
[0042] Figure 7 This is a sequence diagram of a business document processing method in one embodiment;
[0043] Figure 8 This is a structural block diagram of a business document processing device in one embodiment;
[0044] Figure 9 This is a structural block diagram of a business document processing device in another embodiment;
[0045] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0047] In one embodiment, the business document processing method provided in this application can be applied to, for example... Figure 1 In the application environment shown, the business requester 102, server 104, and business provider 106 communicate via a network. The business requester 102 can be a terminal initiating a business request. The business provider 106 can be an end providing business services, such as a server used by the business provider. It can be understood that server 104 is equivalent to a server used by a third-party business proxy platform, implementing proxy services between the business requester 102 and the business provider 106. Server 104 is used to execute the business document processing methods in the embodiments of this application. There can be one or more business requesters 102 and business providers 106.
[0048] After the business request client 102 requests the server 104 to enable the automatic renewal service, the server 104 can automatically obtain the business renewal configuration information (for example, by executing a scheduled task to periodically obtain the business renewal configuration information), and obtain the renewal processing period from the business renewal configuration information. The server 104 can obtain the document identifier of the target business document from a preset queue; the target business document is the business document to be renewed that matches the renewal processing period. The server 104 can search the database for the target business document corresponding to the document identifier, and perform business renewal processing according to the business renewal processing logic in the business renewal configuration information. The server 104 can send the business renewal processing result to the corresponding business provider 106.
[0049] In one embodiment, the business document processing method provided in this application can also be applied to, for example... Figure 2In the application environment shown, the business request client 202 communicates with the server 204 via a network. The server 204 itself may have business service provision capabilities; that is, the server 204 may belong to the server used by the business provider, rather than a third-party business proxy platform. The server 204 is used to execute the business document processing methods in the embodiments of this application.
[0050] After the business request client 202 requests the server 204 to enable the automatic renewal service, the server 204 can automatically obtain the business renewal configuration information (for example, by executing a scheduled task to periodically obtain the business renewal configuration information). From the business renewal configuration information, the server 204 obtains the renewal processing period. The server 204 can obtain the document identifier of the target business document from a preset queue; the target business document is the business document to be renewed that matches the renewal processing period. The server 204 can search the database for the target business document corresponding to the document identifier and perform business renewal processing based on the business renewal processing logic in the business renewal configuration information.
[0051] It should be noted that the terminals in the various embodiments of this application can be, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0052] In one embodiment, such as Figure 3 As shown, a business document processing method is provided. This method can be executed by a server or a terminal, or by both a terminal and a server. This method is now applied to... Figure 1 Taking the server in the example, the following steps are included:
[0053] Step 302: Obtain service continuity configuration information.
[0054] The service continuation configuration information consists of relevant settings configured to ensure service continuation. Service continuation refers to the process of extending a service before its expiration.
[0055] To facilitate understanding, we will use the insurance renewal scenario as an example. In the insurance renewal scenario, a user purchases insurance and can renew the policy before its expiration to continue purchasing the insurance. It can be understood that insurance renewal is a process of continuing the insurance business, i.e., a business continuation scenario.
[0056] It should be noted that the business continuity in the various embodiments of this application is not limited to insurance renewal scenarios, but is applicable to any scenario where business continuity is carried out, such as membership renewal, book borrowing renewal, and item rental renewal.
[0057] In one embodiment, the server can obtain business continuation configuration information corresponding to the target product. The target product is the product corresponding to the business to be continued. A business document is a document generated during the business process. For example, if you want to renew an insurance policy within an insurance product, then that insurance product is the target product, and the policy is the document generated during the insurance business process.
[0058] In one embodiment, the server can start a scheduled task at a specified time to read business continuity configuration information. In another embodiment, different times can be specified for different product types. Taking insurance products as an example, a scheduled task can be set to start at 8:00 AM daily for paid insurance to retrieve business continuity configuration information for a specific target product within the paid insurance category, while a scheduled task can start at 10:00 AM daily for free insurance. By determining different scheduled tasks for different product types and performing business continuity tasks in different time periods, server CPU, bandwidth, and other resources can be saved.
[0059] In one embodiment, the server is equipped with a service continuation service program, through which the server can read service continuation configuration information. The service continuation service program is a program used to implement service continuation.
[0060] It is understandable that the service continuation configuration information may include the continuation processing period and the service continuation processing logic.
[0061] In one embodiment, the service continuation configuration information may further include the product identifier of the service to be continued. It should be noted that the service continuation configuration information may include at least one product identifier. That is, multiple product identifiers can be written into the same service continuation configuration information. The service continuation configuration information may also include other configuration information, which is not limited thereto.
[0062] Step 304: Obtain the extension processing period from the business extension configuration information.
[0063] The extension processing period refers to the period during which business continuity processing is required.
[0064] It is understandable that if the continuation reference time corresponding to a business document is within the continuation processing period, then it is determined that the business document needs to undergo continuation processing. The continuation reference time refers to the reference time used to determine whether continuation processing is required.
[0065] In one embodiment, the extension reference time may include the document's expiry date. That is, the document's expiry date is used as the reference time to determine whether the policy has entered the extension processing period, i.e., whether extension processing is required. For example, in a renewal scenario, the policy's expiry date (i.e., the document's expiry date) can be used as the extension reference time. Assuming the renewal period is [2021-04-28, 2021-04-30], if the expiry date falls within the renewal period, it is determined that the policy needs to be renewed. That is, a policy with an expiry date of 2021-04-29 is a policy awaiting renewal.
[0066] It's understandable, and other times can also be used as the reference time for continuation. For example, if the continuation processing period is set based on the time interval between the current time and the policy's expiry date, then the continuation reference time is the time interval between the current time and the policy's expiry date. To make it easier to understand, let's take the policy renewal scenario as an example. Suppose we set the renewal period to be within one week of the policy's expiry date. Then, policies within one week of the policy's expiry date are the policies awaiting renewal.
[0067] In one embodiment, a change request for the service continuation service procedure is obtained, and based on the change request, the service continuation configuration information is adjusted. It is understood that changes to the service continuation configuration can take effect at any time; that is, the adjusted service continuation configuration information can take effect in real time.
[0068] In one embodiment, at least one of the following can be configured in the business continuation configuration information: the continuation processing period, the business continuation processing logic, and the product identifier of the business to be continued. For example, in an insurance scenario, the business continuation configuration information includes an automatic renewal period, which can be changed from the range of [T, T+2] to [T, T+3].
[0069] It is understandable that changing the business continuation configuration information can ensure that the subsequent business continuation processing logic is based on the latest requirements, thus improving the accuracy of business continuation processing. Furthermore, by simply modifying the business continuation configuration information, the scope requiring continuation processing can be flexibly determined without altering the document identifier data in the preset queue or performing complex operations such as data replenishment. This ensures rapid acquisition of document identifiers and improves data extraction efficiency.
[0070] Step 306: Obtain the document identifier of the target business document from the preset queue; the target business document is a business document to be renewed that matches the renewal processing period.
[0071] The preset queue is a queue pre-set for recording document identifiers. That is, the preset queue includes at least one set of queue elements arranged in sequence, and each queue element includes a document identifier.
[0072] In one embodiment, the preset queue may include multiple preset partition queues. The server can then determine the corresponding partition queue based on the extended processing period, and retrieve the business documents to be extended that match the extended processing period from the determined partition queue.
[0073] The partition queue is a queue used to store document identifiers for different partitions. That is, document identifiers in the database are not all stored in a single queue, but are partitioned and stored in multiple different queues; each queue is a partition queue. The server can then select the document identifiers of the target business document sequentially from the corresponding partition queues. It can be understood that retrieving document identifiers sequentially using partition queues improves efficiency.
[0074] Furthermore, different timeframes can be specified for different product types. If the server has not completed the business continuation processing logic task for the previous startup time, it can read the corresponding partition queues according to the business continuation configuration information for different product types and extract data from the partition queues. Partition queue storage effectively supports multi-process reads, allowing different processes to read different queues to process products from different service providers or different product types. Multiple processes can also read the same queue simultaneously for horizontal scaling and faster processing efficiency.
[0075] In one embodiment, the partitioned queue can be implemented using SSDB (a disk-based NoSQL database similar to Redis), or other types of key-value databases.
[0076] In another embodiment, a queue can be pre-set, which includes document identifiers corresponding to various extension processing periods. The server can sequentially select document identifiers of target business documents that match the acquired extension processing period from this queue. Specifically, the server can obtain the document expiration time corresponding to the document identifiers stored in the pre-set queue; and sequentially extract the document identifiers whose expiration time is within the extension processing period from the document identifiers stored in the pre-set queue to obtain the document identifier of the target business document.
[0077] In one embodiment, the business document corresponding to the document identifier in the preset queue is a business document with automatic renewal service enabled. That is, if the business document has automatic renewal service enabled, the document identifier of the business document can be added to the queue for subsequent business renewal processing.
[0078] In one embodiment, a user can activate the automatic renewal service in at least one of the following ways:
[0079] On the business processing page used to create business documents, perform the activation operation to enable the automatic renewal service for business documents;
[0080] After a business document is successfully created, you can activate the automatic renewal service on the business document details page.
[0081] Apply for automatic renewal service for business documents offline.
[0082] In one embodiment, users can apply for automatic renewal service for business documents through at least one offline method such as telephone, SMS, and email.
[0083] Figure 4 This is a schematic diagram of the interface for enabling automatic renewal service in one embodiment. Figure 4 This illustrates that when a user creates a business document, they can activate the automatic renewal service on the business processing page 400. Users can trigger the "Free Activation" control 402 on the business processing page 400 to apply for automatic renewal service activation.
[0084] Figure 5 This is a schematic diagram of the interface for enabling automatic renewal service in another embodiment. Figure 5 This illustrates that in a policy renewal scenario, after a policy is successfully created, the user can activate the automatic renewal service on the policy details page 500. The user can trigger the "Activate Automatic Renewal for Free" control 502 on the policy details page 500 to apply for the automatic renewal service (i.e., activate the automatic continuation service).
[0085] In one embodiment, the method further includes: monitoring the status of the automatic continuation switch corresponding to each document identifier in a preset queue, and updating the queue according to the status of the automatic continuation switch corresponding to each document identifier.
[0086] The automatic continuation switch controls whether the automatic continuation service is enabled. The automatic continuation switch corresponding to the document identifier is set specifically for the business document corresponding to that document identifier.
[0087] Specifically, the identifier of the business document for which automatic renewal service is enabled can be pre-written into a preset queue. The server can monitor the status of the automatic renewal switch corresponding to the document identifier in the preset queue in real time. When the automatic renewal switch corresponding to the document identifier is in the off state, the document identifier is removed from the preset queue, thereby updating the queue in real time.
[0088] Step 308: Locate the target business document corresponding to the document identifier in the database.
[0089] Specifically, after the server obtains the document identifier of the target business document from the preset queue, it will search the database for the target business document corresponding to the extracted document identifier.
[0090] Step 310: Based on the business continuation processing logic in the business continuation configuration information, perform business continuation processing according to the target business document.
[0091] Specifically, the business continuation configuration information also includes the business continuation processing logic corresponding to the target business document. The server can perform business continuation processing based on this logic and the target business document. For example, in a policy renewal scenario, the policy renewal configuration information can configure the policy renewal processing logic, and the server can perform policy renewal processing for the target policy that needs to be renewed based on this logic.
[0092] In one embodiment, the preset queue is a preset partitioned queue. The method further includes: determining the due date of documents within the extended processing period; determining the queue identifier of the partitioned queue corresponding to each document's due date; the same partitioned queue is used to store the document identifiers of business documents corresponding to the same due date. In this embodiment, step 306, obtaining the document identifier of the target business document from the preset queue, includes: obtaining the document identifier of the target business document from the partitioned queue corresponding to the queue identifier.
[0093] The document due date refers to the expiry date of the business document. It's understood that the precision of the document due date measurement is not limited; it can be measured in days, hours, or minutes.
[0094] It is understood that in this embodiment, the document's expiration date is used as the extension reference time. Therefore, the extension processing period can be a single specified document expiration date or a range of document expiration dates. The server can determine the document expiration dates that fall within the extension processing period. It is understood that if a document's expiration date falls within the extension processing period, it indicates that the business document corresponding to that expiration date is a business document that needs to be extended.
[0095] In this embodiment, multiple partitioned queues are pre-set. Each partitioned queue stores document identifiers belonging to business documents with the same expiration time. That is, data is partitioned based on document expiration times. Therefore, the server can determine the queue identifier of the partitioned queue corresponding to each document's expiration time within the extended processing period. Furthermore, the server can retrieve the document identifier of the target business document from the partitioned queue corresponding to the queue identifier. It can be understood that the document identifiers stored in the partitioned queue corresponding to the determined queue identifier are the document identifiers of the target business document. Because each partitioned queue stores document identifiers corresponding to the same expiration time, it indicates that the business documents corresponding to the document identifiers stored in that partitioned queue all belong to business documents requiring business extension processing. Therefore, all document identifiers in that partitioned queue can be used as the document identifiers of the target business document.
[0096] It should be noted that determining the queue identifier for the partition queue corresponding to each document's due date can be done solely based on the document's due date. That is, data partitioning can be performed based on a single document's due date. However, it is not limited to determining the queue identifier solely based on the document's due date. Alternatively, the queue identifier can be determined by combining the document's due date with other dimensions of information. For example, the queue identifier can be determined based on the document's due date and the product identifier, or it can be determined based on the document's due date and the user identifier.
[0097] It can be understood that a queue consists of at least one set of queue elements arranged in sequence; the document identifier is contained within each queue element. The queue identifier is equivalent to a key, and the set of queue elements is equivalent to a value. The corresponding value can be found using the key. For example, if data is partitioned by document expiration time and product identifier, then the queue identifier key = document expiration time + product identifier. This queue identifier can then be used as the key to find the corresponding value, which is the set of queue elements containing the document identifier. Therefore, the document identifier of the target business document can be obtained.
[0098] In one embodiment, in addition to document identifiers, queue elements may also include at least one of user identifiers and task identifiers to be processed.
[0099] In one embodiment, the queue elements are stored in an extensible format. Queue elements can be stored in JSON format for easy future expansion. For example: {"user_id":"abc","policy_id":"111"}, where user_id represents the user identifier and policy_id represents the document identifier. In this set of queue elements, the user identifier is abc and the document identifier is 111.
[0100] The aforementioned business document processing method pre-sets a queue to store document identifiers that require extension processing. It retrieves the extension period from the business extension configuration information and then obtains the document identifier of the target business document matching the extension period from the pre-set queue. This eliminates the need for complex database scans to identify business documents requiring extension. Instead, the document identifiers can be easily determined using the business extension configuration information and the pre-set queue. The method then simply retrieves the target business document from the database based on the document identifier and performs the extension processing based on the configured business extension logic. Compared to complex table scans and analysis, this method significantly improves efficiency and saves time.
[0101] In addition, it avoids the problem of consuming a lot of system resources caused by complex table scanning analysis. By using business continuation configuration information and pre-set queues, the document identifier can be easily determined. Then, the corresponding target business document can be retrieved from the database for business continuation processing, which greatly reduces the consumption of system resources.
[0102] In one embodiment, the same partition queue stores document identifiers for business documents under the same product that correspond to the same document expiration time. The method further includes: obtaining the product identifier corresponding to the business to be continued from the business continuation configuration information. In this embodiment, determining the queue identifier of the partition queue corresponding to each document expiration time includes: for each document expiration time, generating the queue identifier of the corresponding partition queue based on the product identifier and the document expiration time.
[0103] Specifically, the server pre-creates partitioned queues based on two dimensions: product and document expiration time. Each partitioned queue stores the document identifiers of business documents under the same product that correspond to the same document expiration time. That is, the queue identifier of each partitioned queue is a unique identifier pre-determined based on information from the two dimensions of product identifier and document expiration time.
[0104] In this embodiment, the service continuation configuration information includes, in addition to the continuation processing period and the service continuation processing logic, the product identifier corresponding to the service to be continued. It can be understood that the product identifier in the service continuation configuration information is used to indicate the product that requires service continuation processing.
[0105] The server can obtain the product identifier corresponding to the business to be renewed from the business renewal configuration information. Then, for each document's expiration time within the renewal processing period, it generates a queue identifier for the partition queue to be renewed based on the product identifier and the document's expiration time. Further, the server can search for the corresponding partition queue based on this queue identifier, and retrieve the document identifier of the target business document from the found partition queue. In other words, the document identifier in the found partition queue is the document identifier of the target business document.
[0106] In one embodiment, the server can combine the document due date and product identifier in plaintext to obtain the queue identifier. In other embodiments, the queue identifier can also be obtained by hashing the document due date and product identifier and using the hash result as the queue identifier; or, the document due date and product identifier can be out of order to generate a unique identifier as the queue identifier. This application does not limit how the queue identifier is obtained from the document due date and product identifier, as long as a unique identifier can be obtained from these two dates.
[0107] To facilitate understanding, an example is provided below. Assume the extension processing period is [T, T+2], where T is the document's expiration date, meaning that automatic business extension processing can be performed from the document's expiration date to two days after its expiration. Assume the business document processing method in this embodiment is executed on June 1, 2020. Then, the extension processing period at this time is [May 30, 2020, June 1, 2020]. The document expiration dates within the extension processing period are May 30, 2020, May 31, 2020, and June 1, 2020. Assume the product identifier in the business extension configuration information is PH12. Then, the queue identifier key for the partitioned queue, determined based on the product identifier and the expiration date of each document, is 20200601-PH12, 20200531-PH12, and 20200530-PH12. Taking 20200601-PH12 as an example, 20200601 is the document's due date, and PH12 is the product identifier. Combining these two results in the queue identifier 20200601-PH12. Then, the corresponding partition queues for these three queue identifiers can be found, and the document identifier can be obtained from these three partition queues to obtain the document identifier of the target business document.
[0108] Figure 6 This is a schematic diagram of service continuity configuration information in one embodiment. Figure 6 The following example illustrates the business continuation configuration information corresponding to product PH12. The server first retrieves the product identifier and continuation processing period for the business to be continued from the business continuation configuration information. In 602, the product identifier ProductCode is PH12, the rule identifier ruleKey is automatic continuation processing, and 602a indicates the continuation processing period—that is, the expiration date of the document and two days after the expiration date are both within the continuation processing period where business continuation is possible. Based on the product identifier and the continuation processing period, the document identifier of the target business document is determined, and thus the target business document is identified. The information in 604 and 606 constitutes the business continuation processing logic. This logic may include verifying whether the user information corresponding to the target business document meets the business continuation processing conditions. Of course, the business continuation processing logic may also include other content, such as business continuation steps. If the target business document meets the business continuation processing logic, then the business continuation processing is performed on the target business document. For example, 604 is the processing logic for determining whether the user is under 100 years old to ensure the accuracy of the business continuation processing. It should be noted that... Figure 6 The diagram only illustrates some of the business continuity processing logic.
[0109] In the above embodiments, partitioning based on both product and document expiration dates refines the granularity of partition queue management, thereby refining the granularity of business continuity processing, reducing its limitations, and improving accuracy. Furthermore, it avoids the problem of excessive data volume and low processing efficiency caused by placing all document identifiers in the same partition queue or placing document identifiers for all products with the same document expiration date in the same partition queue, significantly improving processing efficiency.
[0110] In one embodiment, business continuation processing is performed based on the business continuation processing logic in the business continuation configuration information and the target business document, including: performing business continuation processing based on the target business document and the target business document to generate a business continuation document; converting the business continuation document to a format supported by the business provider corresponding to the target business document; and sending the format-converted business continuation document to the business provider.
[0111] Among them, a business continuation document refers to a business document generated after business continuation. It can be understood that the business can continue based on the business continuation document. That is, the user can continue to use the business. For example, in a renewal scenario, the business continuation document is the renewal policy (i.e., the document after renewal). Suppose a car insurance policy is renewed to generate a renewal policy; then, the user can continue to use the car insurance.
[0112] The service provider is the end that provides the service. For example, in insurance business, the service provider could be the server corresponding to the insurance company. The service provider corresponding to the target business document is the end that provides the service corresponding to the target business document.
[0113] Specifically, the server can perform business continuation processing based on the business continuation configuration information and the target business document to generate a business continuation document. It is understandable that the format of the business continuation document generated by the server may not match the format supported by the business provider. In such cases, the server can convert the business continuation document to the format supported by the business provider corresponding to the target business document and send the converted business continuation document to the business provider.
[0114] In the above embodiments, business continuation processing is performed uniformly to generate business continuation documents. Then, the business continuation documents are converted according to the corresponding format and sent to the business provider. This achieves a centralized processing function and avoids the resource consumption problem caused by each business provider performing complex business continuation processing separately. Since each business provider's own business continuation processing will inevitably consume a lot of resources and costs, this solution greatly saves system resource costs and human resource costs.
[0115] In one embodiment, the queue includes at least one set of queue elements arranged in sequence; a document identifier is contained in the queue elements; each set of queue elements also includes at least one task identifier to be processed. The method further includes: when each set of queue elements is selected as the current dequeue element, if the current task identifier in the currently dequeue element is a continuation processing task identifier, executing the business continuation processing logic based on the business continuation configuration information, and performing business continuation processing according to the target business document; if the business continuation processing is successful, after removing the continuation processing task identifier from the currently dequeue element, if the queue element still contains task identifiers to be processed, then adding the queue element back to the tail of the queue.
[0116] It is understood that a queue consists of at least one set of queue elements ordered in sequence. Each set of queue elements includes a document identifier and at least one task identifier to be processed. The task identifier is used to uniquely identify the task to be processed.
[0117] The task identifier to be processed may include a continuation processing task identifier. The continuation processing task identifier is used to identify a continuation processing task. In one embodiment, the task identifier to be processed may further include at least one of a document expiration processing task and a business continuation status update task.
[0118] It should be noted that the server can dequeue each group of queue elements sequentially, executing one task per dequeue. If a group of queue elements contains multiple pending task identifiers, during a dequeue operation, one pending task identifier can be used as the current task identifier to execute the task corresponding to that current task identifier. After the task corresponding to the current task identifier is successfully executed, the task identifier is removed from the queue element. If the group of queue elements after removing the task identifier still contains pending task identifiers, the group of queue elements is added back to the tail of the queue to continue waiting for dequeue. During the next dequeue, the task corresponding to the next pending task identifier in the queue element can be processed.
[0119] Therefore, when each queue element is selected as the current dequeue element, if the current task identifier in the dequeue element is a continuation processing task identifier, then step 310, based on the business continuation processing logic in the business continuation configuration information, is executed to perform business continuation processing according to the target business document. If the business continuation processing is successful, the continuation processing task identifier is removed from the currently dequeue element. If, after removing the continuation processing task identifier, the queue element still contains task identifiers to be processed, then the queue element is re-added to the tail of the queue. It can be understood that the queue element re-added to the tail of the queue no longer includes continuation processing task identifiers.
[0120] In one embodiment, the method further includes: in the event of a failure in business continuation processing, rewriting the currently dequeued queue element back to the corresponding position in the queue; and in the event that the queue element rewritten back to the corresponding position in the queue is reselected as the currently dequeued queue element, executing the business continuation processing logic based on the business continuation configuration information according to the continuation processing task identifier in the queue element, and performing business continuation processing according to the target business document.
[0121] Specifically, in the event of a business continuity failure, the server can write the currently dequeued queue element back to its corresponding position in the queue, awaiting the next dequeue attempt for business continuity processing. If the queue element that was written back to its corresponding position is then selected as the current dequeue element, the server can execute the business continuity processing logic based on the business continuity configuration information, according to the continuity processing task identifier in the queue element, and perform business continuity processing based on the target business document.
[0122] In one embodiment, the corresponding position in the queue can be the initial position of the queue element. That is, the initial position refers to the position of the queue element before the start of this renewal process. Specifically, in the event of a service renewal failure, the server can determine the initial position of the currently dequeued queue element and write it back to that initial position. It can be understood that rewriting the failed queue elements back to their initial positions restores the initial order among the failed queue elements, ensuring that the service renewal process can still proceed in the previous order during the next renewal attempt, thus improving processing accuracy.
[0123] In other embodiments, the corresponding position in the queue can be any position or the tail. That is, in the event of a service continuation failure, the server can randomly determine the position where the currently dequeued queue element is written back and write it back to that randomly determined position.
[0124] In the above embodiments, the attributes of the queue elements in the queue are extensible and have the ability to update the task status, including the continuation processing task identifier. After the business continuation processing fails, the queue element can be automatically rewritten back into the queue, and then the next business continuation processing can be automatically performed. That is, by expanding the queue elements, the queue is given the function of automatically re-executing business continuation processing, which greatly improves the success rate of business continuation processing.
[0125] In one embodiment, the method further includes: when a queue element re-added to the tail of the queue is selected as the current dequeue queue element, performing a corresponding processing task on the target business document corresponding to the document identifier in the queue element according to the current task identifier in the queue element; if the task processing is successful, removing the current task identifier from the queue element; if the queue element after removing the task identifier still contains task identifiers to be processed, continuing to re-add the queue element to the tail of the queue for iterative looping until the queue element no longer contains any task identifiers to be processed, and then stopping the re-addition of the queue element to the queue.
[0126] It's understandable that a single business document often involves more than one task. Taking an insurance policy as an example, besides renewing the policy, it might also need to handle document expiration, such as adding an expired status marker to the policy. This is because after the original policy is renewed, a new renewal policy is generated, and the original policy becomes expired upon maturity. Therefore, adding an expired status marker to the original policy is equivalent to performing a document expiration handling task on that original policy.
[0127] Therefore, in this embodiment of the application, the function of the queue is extended, so that a queue can be used multiple times to perform multiple tasks, without having to create a separate queue for each task, which greatly saves the system resources required for task management.
[0128] Specifically, when a queue element re-added to the tail of the queue is selected as the current dequeue element, the server can use one of the pending task identifiers in that group of queue elements as the current task identifier. The server can then execute the task corresponding to the current task identifier on the target business document corresponding to the document identifier in that group of queue elements. If the task is successfully processed, the server removes the current task identifier from the queue elements. If the queue elements after removing the task identifier still contain pending task identifiers, the server continues to re-add the queue elements to the tail of the queue for iterative processing until the queue elements no longer contain any pending task identifiers (i.e., the task identifiers in that group of queue elements are empty). At this point, the server stops re-adding queue elements to the queue.
[0129] In the above embodiments, the attributes of the queue elements in the queue can be extended, and can include at least one task identifier to be processed, thereby having the ability to execute multiple tasks and update task status. That is, business continuity processing can be realized in a queue, and triggering of other different tasks can be realized. Furthermore, the status of each task can be updated in the queue, which greatly saves the system resources required for task management.
[0130] In one embodiment, when a queue element re-added to the tail of the queue is selected as the current dequeue queue element, the corresponding processing task is executed on the target business document corresponding to the document identifier in the queue element according to the current task identifier in the queue element. This includes: when a queue element re-added to the tail of the queue is selected as the current dequeue queue element, if the current task identifier in the queue element is a document expiration processing task identifier, then the document expiration processing is performed on the target business document corresponding to the document identifier in the queue element.
[0131] Among them, the document expiration processing task refers to the task of processing expired business documents.
[0132] Specifically, when a queue element that has been re-added to the tail of the queue is selected as the current dequeue element, the server can obtain the current task identifier from the group of queue elements. If the current task identifier is a document expiration processing task identifier, it means that this dequeue needs to execute a document expiration processing task. Then the server can perform document expiration processing on the target business document corresponding to the document identifier in the queue element.
[0133] In one embodiment, the server can add an expired status flag to the target business document corresponding to the document identifier in the queue element, so as to realize the document expiration processing of the target business document.
[0134] It is understood that in this embodiment, the functionality of the queue has been extended, allowing a single queue to be used for both business continuation processing and document expiration processing tasks. This eliminates the need to create separate queues for business continuation and document expiration processing tasks, significantly saving system resources allocated for task management.
[0135] To facilitate understanding, let's illustrate this with an insurance scenario. For example, a queue of elements includes a user identifier (user_id), a policy identifier (policy_id, the document identifier of the business document), and task identifiers (features) to be processed. Suppose a queue of elements is {"user_id":"abc","policy_id":"111","features":["renewal","expire"]}. This queue contains two task identifiers to be processed: a renewal task identifier (renewal) and a policy expiration task identifier (expire) (document expiration task). If this queue is selected as the current dequeue element, and the current task identifier is the renewal task identifier (renewal), then the target business document corresponding to the policy identifier in this queue will be processed for renewal. If renewal fails (usually due to payment failure), no action is taken. The queue element {"user_id":"abc","policy_id":"111","features":["renewal","expire"]} is written back to the queue, awaiting renewal again. If renewal is successful, the renewal task is complete, and the queue can be used to execute other remaining tasks. Therefore, the renewal task identifier "renewal" is deleted from the queue element group, resulting in the modified queue element group {"user_id":"abc","policy_id":"111","features":["expire"]}. Since this queue element also includes the pending task identifier "expire", indicating that the policy expiration task still needs to be processed, the queue element group {"user_id":"abc","policy_id":"111","features":["expire"]} is written back to the tail of the queue to continue using the queue for policy expiration processing. When the queue element is dequeued again, the policy expiration processing task corresponding to the expire task identifier can be executed. If the processing is successful, the expire task identifier will be deleted from the queue element group, resulting in the modified queue element group {"user_id":"abc","policy_id":"111","features":[]}. In this case, there are no pending task identifiers in the queue element group (features is empty), so it is not necessary to rewrite the queue element group {"user_id":"abc","policy_id":"111","features":[]} into the queue.In other words, multiple tasks for a policy can be processed by creating only one queue, instead of creating a separate queue for each task. This makes full use of queue resources and saves the system resources that need to be allocated for task management.
[0136] In the above embodiments, by expanding the queue elements, the queue is given the function of automatically executing policy expiration tasks and the ability to update the policy expiration status. That is, a single queue can realize both business continuation processing and the triggering and status control of policy expiration, which greatly saves the system resources required for task control.
[0137] like Figure 7 As shown, in one embodiment, a sequence diagram of a business document processing method is provided, from... Figure 7 As can be seen, the business document processing method in this application embodiment is implemented through the interaction between the business requesting end, the server, and the business providing end. The business requesting end is the end that requests business processing, i.e., the user terminal. The business providing end is the server used by the business provider to provide services. The server includes a first service program, a second service program, and an order issuance gateway. The first service program is used to receive business processing requests and process the business; the second service program is a business continuation service program, i.e., a program used to perform business continuation processing. The order issuance gateway is used to send the generated business document to the business providing end. This sequence diagram specifically includes the following steps:
[0138] (1.1) The user requests to process the business through the business request terminal to the first service program, and at the same time requests to enable the automatic renewal service for the business.
[0139] (1.2) After a business document is generated (i.e. after the business is successfully processed), the user requests the first service program to enable the automatic renewal service for the business to which the business document belongs through the business document details page provided by the business request terminal.
[0140] It is understandable that (1.1) and (1.2) are two different times or two different ways for users to request the activation of automatic renewal service.
[0141] (1.3) After enabling the automatic renewal service, users can also request the first service program to disable the automatic renewal service for the business to which the business document belongs through the automatic renewal switch provided by the business request terminal.
[0142] (2) The first service program in the server will send a message to the second service program to enable / disable the automatic renewal service.
[0143] Understandably, after a transaction is successfully completed, the first service program creates a business document. The second service program on the server writes the identifier of the business document requiring automatic renewal service to the corresponding partition queue. When a user selects to enable or disable the automatic renewal switch, a corresponding switch message is sent. The second service program can listen for this message and update the partition queue in real time. If it receives a message indicating that the automatic renewal service for a business document is disabled, the second service program can remove the document identifier of that business document from the partition queue to update the partition queue.
[0144] It should be noted that a partitioned queue is a queue formed by partitioning data. Each partitioned queue stores a portion of document identifiers, thereby improving the efficiency of document data retrieval. Data can be partitioned according to document due date and product; that is, document identifiers of business documents with the same due date for a specific product are grouped into the same partitioned queue. In other embodiments, data partitioning can also be performed according to other dimensions, and this is not limited.
[0145] It is understood that a partitioned queue can include multiple sets of queue elements. In addition to the document identifier, each queue element can also include at least one of the following: a user identifier and a task identifier to be processed. Queue elements can also include other custom attribute information, which is not limited thereto.
[0146] (3) The second service program will start the corresponding scheduled task to obtain the business continuation configuration information from the business continuation configuration platform, and extract the continuation processing period and product identifier from the business continuation configuration information.
[0147] (4) The second service procedure can determine the due date of the documents within the extended processing period, and generate the queue identifier of the corresponding partition queue based on the determined due date and product identifier of each document.
[0148] (5) Find the corresponding partition queue based on the queue identifier.
[0149] (6) Retrieve the target business document from the database based on the document identifier in the partition queue.
[0150] (7) Based on the business continuation logic, perform business continuation processing according to the target business document and generate a business continuation document.
[0151] (8) Add the business continuation document to the order queue.
[0152] It is understandable that after processing the continuation of business documents corresponding to document identifiers in the same partition queue, the generated business continuation documents can be added to the same order issuance queue. That is, there can be a one-to-one correspondence between the order issuance queue and the partition queue.
[0153] It is understandable that the order queue will sequentially issue orders for the business continuation documents within it to the order gateway.
[0154] (9) The order gateway performs format conversion processing on the business continuation documents according to the format supported by the corresponding business provider.
[0155] It should be noted that the relationship between the order queue and the business provider can be many-to-many, many-to-one (i.e., one insurance company sells multiple products), or one-to-many.
[0156] A small number of orders may be sold to multiple insurance companies, creating a one-to-many relationship between the insurance company and the order.
[0157] (10) The order gateway sends the format-converted service continuation document to the corresponding service provider.
[0158] This application also provides an application scenario, namely, a renewal application scenario, in which the above-mentioned business document processing method is applied to achieve automatic renewal processing. Specifically, the application of the business document processing method in the renewal application scenario is as follows:
[0159] Users can apply to enable automatic renewal for their purchased insurance policies. Specifically, users can apply to enable automatic renewal when purchasing insurance or receiving complimentary insurance (i.e., enable automatic continuation service), or after the policy takes effect, they can apply to enable automatic renewal on the policy details page, or they can apply to enable automatic renewal offline via telephone, SMS, or other offline methods.
[0160] In addition to creating policies based on user purchase actions, the core application service program on the third-party agency platform can also notify the renewal service program within the platform of requests to activate automatic renewal. The renewal service program then adds the policy identifier to a partitioned queue. The core application service program then stores the created policies in a database.
[0161] It is understandable that the renewal service program pre-partitions data based on the product identifier (i.e., product code) and the policy expiration date. The queue identifier for each partition is determined based on the product identifier and the policy expiration date. Each queue element in the partition queue includes the policy identifier. It is also understood that each queue element may include the user identifier and the task identifier to be processed. The queue identifier is the key of the partition queue, and the set of sequentially arranged queue elements is the value of the partition queue.
[0162] It is understandable that the message received by the renewal service program requesting the activation of automatic renewal service may include the user identifier, policy identifier, product identifier, and policy expiration date. The renewal service program can determine the partitioned queue that needs to be stored based on the product identifier and policy expiration date, and then write a set of queue elements, including the user identifier and policy identifier, into that partitioned queue.
[0163] The renewal service program can periodically initiate renewal tasks, retrieving renewal configuration information from the product configuration platform. This configuration information can include a list of product identifiers to be renewed, the automatic renewal period for each product identifier, and the specific renewal logic. The renewal service then determines the expiration date of policies within the automatic renewal period. Based on the product identifiers in the list and the policy expiration dates, it establishes a partitioned queue for processing renewals. Next, it sequentially extracts policy identifiers from the partitioned queues and retrieves the corresponding target policies from the database based on these identifiers. After generating a renewal policy, it adds it to the issuance queue, which then pushes the renewal policies sequentially to the issuance gateway. The issuance gateway can convert the renewal policy's format according to the insurance company to which the product belongs, ensuring it's compatible with the insurance company's server, and then sends the converted policy to the corresponding insurance company's server.
[0164] It is understandable that each queue element in the partitioned queue can also include task identifiers to be processed. These task identifiers can include renewal task identifiers and policy expiration task identifiers. After successfully processing the renewal of the policy corresponding to the document identifier in each queue element, the renewal task identifier can be removed from that queue element, and the queue element after removing the renewal task identifier is rewritten to the tail of the partitioned queue. The next time a policy expiration task is processed based on this rewritten queue element, if the processing is successful, the policy expiration task identifier in the queue element is removed. It is also understandable that the task identifiers to be processed can include other task identifiers, which is not limited. It is simply a matter of removing the corresponding task identifier from the queue element and rewriting it to the tail of the partitioned queue after successful task processing, and repeating this process until there are no more task identifiers in the queue element, at which point the rewriting to the tail stops.
[0165] It is understandable that if the renewal process fails, the renewal task identifier in the queue element will still be retained, and the queue element will be rewritten back to the corresponding position in the partition queue, waiting for the next automatic renewal process.
[0166] This application also provides another application scenario: a book renewal application scenario, which applies the aforementioned business document processing method. Specifically, the application of this business document processing method in the book renewal application scenario is as follows: When a user completes the book rental procedure online, they can apply to activate the automatic renewal service. Upon successful rental, a rental document is generated. The server can then add the document identifier of the rental document to a queue and write the rental document to the database. The server can obtain the renewal processing period based on the renewal configuration information, retrieve the document identifier of the target rental document whose rental expiration date falls within the renewal processing period from the queue, and then retrieve the target rental document corresponding to that document identifier from the database. The server can then process the renewal of the target rental document according to the renewal processing logic in the renewal configuration information.
[0167] It should be understood that although the steps in the flowcharts of the various embodiments of this application are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in each flowchart may include multiple steps or multiple stages, which are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.
[0168] In one embodiment, such as Figure 8 As shown, a business document processing device is provided. This device can be a software module, a hardware module, or a combination of both integrated into a computer device. Specifically, the device includes: an acquisition module 802 and a processing module 804, wherein:
[0169] The acquisition module 802 is used to acquire business continuation configuration information; acquire the continuation processing period from the business continuation configuration information; acquire the document identifier of the target business document from a preset queue; the target business document is a business document to be continuated that matches the continuation processing period.
[0170] The processing module 804 is used to search the database for the target business document corresponding to the document identifier; and to perform business continuation processing based on the business continuation processing logic in the business continuation configuration information and the target business document.
[0171] In one embodiment, the preset queue is a preset partitioned queue. For example... Figure 9 As shown, the device also includes:
[0172] The queue determination module 803 is used to determine the due date of documents within the extended processing period; determine the queue identifier of the partition queue corresponding to each document's due date; and store the document identifier of business documents corresponding to the same document's due date in the same partition queue.
[0173] In this embodiment, the acquisition module 802 is further configured to acquire the document identifier of the target business document from the partition queue corresponding to the queue identifier.
[0174] In one embodiment, the same partition queue stores the document identifiers of business documents under the same product that correspond to the same document expiration time. The acquisition module 802 is also used to obtain the product identifier corresponding to the business to be renewed from the business renewal configuration information; the queue determination module 803 is also used to generate the queue identifier of the corresponding partition queue for each document expiration time based on the product identifier and the document expiration time.
[0175] In one embodiment, the processing module 804 is further configured to perform business continuation processing based on the business continuation processing logic in the business continuation configuration information, generate a business continuation document according to the target business document, convert the format of the business continuation document according to the format supported by the business provider corresponding to the target business document, and send the format-converted business continuation document to the business provider.
[0176] In one embodiment, the queue includes at least one set of queue elements arranged in sequence; a document identifier is contained in the queue elements; each set of queue elements also includes at least one task identifier to be processed; the processing module 804 is further configured to, when each set of queue elements is selected as the current dequeue queue element, if the current task identifier in the current dequeue queue element is a continuation processing task identifier, execute the business continuation processing logic based on the business continuation configuration information, and perform business continuation processing according to the target business document; if the business continuation processing is successful, after removing the continuation processing task identifier from the current dequeue queue element, if the queue element still contains a task identifier to be processed, then add the queue element back to the tail of the queue.
[0177] In one embodiment, the processing module 804 is further configured to rewrite the currently dequeued queue element to the corresponding position in the queue in the event of a failure in the business continuation processing; and to perform business continuation processing based on the business continuation configuration information according to the continuation processing task identifier in the queue element when the rewritten queue element to the corresponding position is reselected as the current dequeued queue element.
[0178] In one embodiment, the processing module 804 is further configured to, when the queue element re-added to the tail of the queue is selected as the current dequeue queue element, perform the corresponding processing task on the target business document corresponding to the document identifier in the queue element according to the current task identifier in the queue element; if the task processing is successful, remove the current task identifier from the queue element; if the queue element after removing the task identifier still contains task identifiers to be processed, continue to re-add the queue element to the tail of the queue for loop iteration until the queue element no longer contains any task identifiers to be processed, and then stop re-adding the queue element to the queue.
[0179] In one embodiment, the processing module 804 is further configured to, when a queue element re-added to the tail of the queue is selected as the current dequeue queue element, perform document expiration processing on the target business document corresponding to the document identifier in the queue element if the current task identifier in the queue element is a document expiration processing task identifier.
[0180] Specific limitations regarding the business document processing device can be found in the limitations regarding the business document processing method described above, and will not be repeated here. Each module in the aforementioned business document processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0181] In one embodiment, a computer device is provided, which may be a terminal or a server, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a business document processing method.
[0182] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0183] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0184] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0185] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps in the above method embodiments.
[0186] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0187] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0188] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for processing business documents, characterized in that, The method includes: Obtain service continuity configuration information; Obtain the extension processing period from the aforementioned service extension configuration information; Determine the due date of the documents within the extended processing period; Each partition queue is assigned a queue identifier corresponding to the due date of each document; the same partition queue is used to store the document identifiers of business documents corresponding to the same due date; the partition queue includes at least one set of queue elements arranged in sequence, and each set of queue elements includes a document identifier and at least one task identifier to be processed. Obtain the document identifier of the target business document from the partition queue corresponding to the queue identifier; the target business document is a business document to be extended that matches the extension processing period. Retrieve the target business document corresponding to the document identifier from the database; When each of the queue elements is selected as the current dequeue element, if the current task identifier in the dequeue element is a continuation processing task identifier, the business continuation processing logic in the business continuation configuration information is used to perform business continuation processing according to the target business document.
2. The method according to claim 1, characterized in that, The same partition queue stores the document identifiers of business documents under the same product that correspond to the same document expiry time; The method further includes: Obtain the product identifier corresponding to the service to be continued from the service continuation configuration information; The step of determining the queue identifier of the partition queue corresponding to the due date of each document includes: For each document's expiration time, a queue identifier for the corresponding partition queue is generated based on the product identifier and the document's expiration time.
3. The method according to claim 1, characterized in that, The business continuation processing logic based on the business continuation configuration information, which performs business continuation processing according to the target business document, includes: Based on the business continuation processing logic in the business continuation configuration information, business continuation processing is performed according to the target business document to generate a business continuation document. The business continuation document is format-converted according to the format supported by the business provider corresponding to the target business document. Send the format-converted service continuation document to the service provider.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: If the business continuation processing is successful, after removing the continuation processing task identifier from the currently dequeued queue element, if the queue element still contains task identifiers to be processed, then the queue element is added back to the tail of the queue.
5. The method according to claim 4, characterized in that, The method further includes: In the event of a business continuity failure, the currently dequeued queue element will be rewritten to the corresponding position in the queue. If the queue element that has been rewritten to the corresponding position in the queue is reselected as the current dequeue queue element, the business continuation processing logic based on the business continuation configuration information is executed according to the continuation processing task identifier in the queue element, and business continuation processing is performed according to the target business document.
6. The method according to claim 4, characterized in that, The method further includes: If a queue element that has been re-added to the tail of the queue is selected as the current dequeue element, then according to the current task identifier in the queue element, the corresponding processing task is executed on the target business document corresponding to the document identifier in the queue element. If a task is successfully processed, the current task identifier is removed from the queue element. If the queue element after removing the task identifier still contains task identifiers to be processed, the queue element is added back to the tail of the queue for iterative processing until the queue element no longer contains any task identifiers to be processed, at which point the process of adding the queue element back to the queue stops.
7. The method according to claim 6, characterized in that, When a queue element re-added to the tail of the queue is selected as the current dequeue element, the corresponding processing task is executed on the target business document corresponding to the document identifier in the queue element based on the current task identifier in the queue element, including: If a queue element that has been re-added to the tail of the queue is selected as the current dequeue element, and the current task identifier in the queue element is a document expiration processing task identifier, then the target business document corresponding to the document identifier in the queue element is processed for document expiration.
8. A business document processing device, characterized in that, The device includes: The acquisition module is used to acquire service continuation configuration information and obtain the continuation processing period from the service continuation configuration information. The queue determination module is used to determine the due date of documents within the extended processing period; determine the queue identifier of the partition queue corresponding to each due date of the document; the same partition queue is used to store the document identifier of business documents corresponding to the same due date of the document; the partition queue includes at least one set of queue elements arranged in sequence, and each set of queue elements includes a document identifier and at least one task identifier to be processed; The acquisition module is further configured to acquire the document identifier of the target business document from the partition queue corresponding to the queue identifier; the target business document is a business document to be extended that matches the extension processing period; The processing module is used to search the database for the target business document corresponding to the document identifier; when each group of queue elements is selected as the current dequeue queue element, if the current task identifier in the current dequeue queue element is a continuation processing task identifier, the business continuation processing logic in the business continuation configuration information is used to perform business continuation processing according to the target business document.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Task monitoring processing method and device, computer equipment and storage medium
CN110288193A