Credential generation method and apparatus, electronic device, medium, and computer program product
By predicting payment times and adjusting the voucher production time based on historical payment records, and obtaining initial data in advance, the problem of time-consuming payment voucher production has been solved, enabling the rapid generation of secure and compliant voucher images and improving the user experience.
Patent Information
- Application Number
- CN202411523140.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-10-29
AI Technical Summary
The existing process for creating payment voucher images involves multiple systems working together, which is time-consuming and affects user experience.
By receiving access requests from the payment system, adjusting the advance preparation time of the voucher based on the user's historical payment records, predicting the payment time, and obtaining the initial voucher data in advance, a complete voucher image is synthesized when the user makes the payment.
It shortens user waiting time, improves user experience, avoids unnecessary resource consumption, and ensures the compliance and security of credential generation.
Smart Images

Figure CN119444217B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, medium and computer program product for generating credentials. Background Technology
[0002] After completing payment through the payment system, users request a payment receipt image to prove to relevant personnel or organizations that the payment has been made. However, the process of creating a payment receipt image involves the collaborative work of multiple systems, including the payment system, the receipt system, and the electronic seal system. The process is cumbersome, and the existing methods for creating payment receipt images take a total of five to six seconds, resulting in a long waiting time for users and impacting the user experience. Summary of the Invention
[0003] This application aims to at least partially address one of the technical problems in the related art.
[0004] Therefore, the first aspect of this application is to propose a method for generating credentials.
[0005] The second aspect of this application is to provide a credential generation device.
[0006] The third aspect of this application is to propose an electronic device.
[0007] The fourth aspect of this application is to provide a non-transitory computer-readable storage medium.
[0008] The fifth aspect of this application is to provide a computer program product.
[0009] To achieve the above objectives, a first aspect of this application provides a method for generating credentials, comprising:
[0010] Receive access requests from target users to the payment system via user terminals, wherein the payment system includes payment slips pending payment;
[0011] Based on the access request, the predicted payment time of the payment slip is determined, and based on the target user's historical payment records, the advance preparation time is adjusted to obtain the advance preparation time of the voucher corresponding to the target user.
[0012] Based on the predicted payment time and the advance voucher production time, the starting time for voucher production is determined.
[0013] In response to the payment system's system time being equal to the voucher's initial creation time, initial voucher data is obtained based on the payment slip;
[0014] In response to the user terminal making payment based on the payment slip, a payment voucher image is generated based on the initial voucher data and the actual payment data.
[0015] To achieve the above objectives, a second aspect of this application provides a credential generation apparatus, comprising:
[0016] A receiving module is used to receive access requests from target users to the payment system via user terminals, wherein the payment system includes payment slips to be paid;
[0017] The first determining module is used to determine the predicted payment time of the payment slip based on the access request, and to adjust the set advance production time based on the target user's historical payment records to obtain the advance production time of the voucher corresponding to the target user.
[0018] Based on the predicted payment time and the advance voucher production time, the starting time for voucher production is determined.
[0019] The acquisition module is used to acquire initial voucher data based on the payment slip in response to the system time of the payment system being equal to the voucher's initial creation time.
[0020] The generation module is used to generate a payment voucher image based on the initial voucher data and the actual payment data in response to the user terminal making a payment based on the payment slip.
[0021] To achieve the above objectives, a third aspect of this application provides an electronic device comprising:
[0022] A processor, and a memory communicatively connected to the processor;
[0023] The memory stores computer-executed instructions;
[0024] The processor executes computer execution instructions stored in the memory to implement the credential generation method described in the first aspect.
[0025] To achieve the above objectives, a fourth aspect of this application provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the credential generation method described in the first aspect.
[0026] To achieve the above objectives, a fifth aspect of this application provides a computer program product including a computer program that, when executed by a processor, implements the credential generation method described in the first aspect.
[0027] This application receives access requests from target users through user terminals to a payment system, where the payment system includes payment slips pending payment. Based on the access request, the predicted payment time of the payment slip is determined, and based on the target user's historical payment records, the pre-creation time is adjusted to obtain the corresponding pre-creation time for the voucher. The voucher's initial creation time is determined based on the predicted payment time and the pre-creation time. In response to the payment system's system time equaling the voucher's initial creation time, initial voucher data is obtained based on the payment slip. In response to the user terminal making payment based on the payment slip, a payment voucher image is generated based on the initial voucher data and the actual payment data. This application advances the creation time of the payment voucher image to before the user makes payment, obtaining the initial voucher data before payment. After payment, only the initial voucher data and the actual payment data need to be synthesized to quickly generate a complete payment voucher image, shortening the waiting time when the user requests the payment voucher after payment and improving the user experience. In addition, this application combines the target user's historical payment records and flexibly adjusts the advance production time according to their actual payment habits, which can avoid obtaining the initial voucher data too early or too late, resulting in premature occupation of relevant resources or affecting the user experience.
[0028] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0029] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0030] Figure 1 A flowchart illustrating a credential generation method provided in an embodiment of this application;
[0031] Figure 2 A flowchart illustrating another credential generation method provided in this application embodiment;
[0032] Figure 3 A flowchart illustrating another credential generation method provided in this application embodiment;
[0033] Figure 4 A flowchart illustrating another credential generation method provided in this application embodiment;
[0034] Figure 5 This is a schematic diagram of the structure of a certificate generation device provided in an embodiment of this application;
[0035] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0036] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0037] It should be noted that the acquisition, transmission, storage, use, and processing of data (including but not limited to user device information and user personal information) in the technical solution of this application all comply with the relevant provisions of relevant laws and regulations.
[0038] The following description, with reference to the accompanying drawings, describes a method, apparatus, electronic device, medium, and computer program product for generating credentials according to embodiments of this application, wherein this application can be applied to a payment system.
[0039] Example 1:
[0040] Figure 1 This is a flowchart illustrating a credential generation method provided in an embodiment of this application. Figure 1 As shown, the method includes the following steps:
[0041] Step 101: Receive the access request from the target user to the payment system through the user terminal, wherein the payment system includes payment slips to be paid.
[0042] The payment system can refer to any system such as an electricity payment system, a water payment system, or a tuition payment system. A user terminal's access request to the payment system can refer to a login request from a target user through their user terminal. The payment slip to be paid can include basic elements such as the slip number, payment period, validity period, amount due, and remarks.
[0043] Step 102: Based on the access request, determine the predicted payment time of the payment slip, and based on the target user's historical payment records, adjust the set advance production time to obtain the advance production time of the voucher corresponding to the target user.
[0044] In this embodiment of the application, the predicted payment time can refer to the predicted time when the user terminal will make payment based on the payment slip; the advance production time is preset, for example, the advance production time can be 5 minutes; the advance production time of the voucher refers to the advance production time corresponding to the target user, which is used to indicate how far in advance the production of the payment voucher image will begin for the target user.
[0045] As an example, the average time interval is determined based on the time interval between the historical access time and the historical payment time corresponding to the historical payment record. The advance creation time is then adjusted based on the average time interval to obtain the advance voucher creation time. Specifically, the larger the average time interval, the shorter the advance voucher creation time; conversely, the smaller the average time interval, the longer the advance voucher creation time.
[0046] It should be noted that if the target user is a new user, that is, the target user has no historical payment record, the advance creation time can be set as the advance creation time of the target user's voucher.
[0047] Step 103: Determine the starting time for voucher production based on the predicted payment time and the advance voucher production time.
[0048] As an example, starting from the predicted payment time, the initial voucher creation time is calculated by extrapolating the advance voucher creation time. For instance, if the predicted payment time is 10:00 AM on the day of the visit, and the advance voucher creation time is 10 minutes, then the initial voucher creation time is 9:50 AM.
[0049] Step 104: In response to the payment system's system time being equal to the voucher's initial creation time, obtain the initial voucher data based on the payment slip.
[0050] The system time of the payment system can refer to the standard time used by the payment system to record information such as the current date, time, and time zone.
[0051] When the system time of the payment system equals the initial voucher creation time, voucher pre-production can begin to obtain initial voucher data. This initial voucher data refers to the semi-finished payment voucher image; it should be noted that this semi-finished image refers to image data, and the image generation step has not yet been performed.
[0052] The initial voucher data includes data that can be obtained from the payment slip, such as the payment slip number, payment item, and amount due.
[0053] Step 105: In response to the user terminal making payment based on the payment slip, a payment voucher image is generated based on the initial voucher data and the actual payment data.
[0054] When a user is detected making a payment through their mobile terminal, the system acquires the actual payment data, adds it to the initial voucher data to obtain the target voucher data, and then generates a payment voucher image based on the target voucher data. The actual payment data includes the amount paid, the actual payment time, and the payment account.
[0055] This application receives access requests from target users to a payment system via user terminals. The payment system includes payment slips pending payment. Based on the access request, the predicted payment time of the payment slip is determined, and based on the target user's historical payment records, a pre-processing time is adjusted to obtain the pre-processing time for the corresponding voucher for the target user. The voucher's initial processing time is determined based on the predicted payment time and the pre-processing time. In response to the payment system's system time equaling the voucher's initial processing time, initial voucher data is obtained based on the payment slip. In response to the user terminal making payment based on the payment slip, a payment voucher image is generated based on the initial voucher data and the actual payment data. This application advances the processing time of the payment voucher image to before the user makes payment. Initial voucher data is obtained before the user makes payment, and after payment, only the initial voucher data and the actual payment data need to be synthesized to quickly generate a complete payment voucher image. This shortens the waiting time when the user requests a payment voucher after payment and improves the user experience. In addition, this application combines the target user's historical payment records and flexibly adjusts the advance production time according to their actual payment habits, which can avoid obtaining the initial voucher data too early or too late, resulting in premature occupation of relevant resources or affecting the user experience.
[0056] Example 2:
[0057] Figure 2 This is a flowchart illustrating a credential generation method according to another embodiment of this application, as shown below. Figure 2 As shown, the method includes the following steps:
[0058] Step 201: Receive the target user's access request to the payment system through the user terminal.
[0059] The access request includes the target user's user identifier.
[0060] Step 202: Based on the user identifier of the target user included in the access request, obtain the target user's historical payment records, and determine the payment date range matched by the target user according to the historical payment dates corresponding to the historical payment records.
[0061] When obtaining the payment records of a target user, historical payment records can be retrieved based on the payment type of the outstanding payment slip. For example, if the payment type of the outstanding payment slip is electricity, the target user's historical electricity payment records can be retrieved; if the payment type of the outstanding payment slip is water, the target user's historical water payment records can be retrieved.
[0062] As an example, we can statistically analyze the historical payment dates corresponding to historical payment records to obtain the payment date range.
[0063] Step 203: Obtain the access date corresponding to the access request and determine whether the access date is within the payment date range.
[0064] The access date can be included in the access request.
[0065] Whether the access date falls within the payment date range is an important reference factor in determining the user's purpose for accessing the payment system. The judgment result can reflect the user's true intention to a certain extent, that is, whether the user intends to make a payment based on the payment slip.
[0066] Step 204: In response to the access date falling within the payment date range, based on the access request, determine the predicted payment time of the payment slip, and based on the target user's historical payment records, adjust the set advance production time to obtain the advance production time of the voucher corresponding to the target user.
[0067] If the access date falls within the payment date range, it indicates that the user's access may be for payment based on a payment slip. In this case, the predicted payment time of the payment slip and the advance preparation time of the voucher can be determined, thereby determining the start time for voucher preparation so that the payment voucher can be prepared in advance.
[0068] If the access date is not within the payment date range, it means that the user's access may not be based on a payment slip. In this case, there is no need to determine the predicted payment time of the payment slip and the advance preparation time of the voucher.
[0069] By pre-judging whether the access date corresponding to the access request falls within the payment date range, we can more effectively ensure that the pre-production of vouchers is only initiated when the user actually intends to make a payment based on the payment slip. This effectively avoids unnecessary consumption of service resources, such as unnecessary voucher pre-production, thereby achieving efficient utilization of service resources.
[0070] To obtain a more accurate predicted payment time and to pre-produce payment vouchers at the appropriate time, as an example, based on the target user's user identifier included in the access request, the target user's historical payment records are obtained; the predicted payment time is determined based on the access time corresponding to the access request, the historical access time corresponding to the historical payment records, and the historical payment time.
[0071] One possible approach is to statistically analyze the time interval between historical access times and historical payment times corresponding to historical payment records, and then determine the predicted payment time based on the time interval and the access time corresponding to the access request.
[0072] As another possible implementation, the historical access time and historical payment time corresponding to the historical payment record, as well as the access time corresponding to the access request, can be input into the payment time prediction model to obtain the predicted payment time output by the payment time prediction model. The payment time prediction model can refer to a Long Short-Term Memory (LSTM) network model.
[0073] Historical payment records can reveal a user's payment habits. Therefore, this application, by combining historical payment records, can accurately predict payment time, thereby ensuring that the voucher is pre-made before the user makes the payment.
[0074] Step 205: Determine the starting time for voucher production based on the predicted payment time and the advance voucher production time.
[0075] Step 206: In response to the payment system's system time being equal to the voucher's initial creation time, obtain the initial voucher data based on the payment slip.
[0076] Step 207: In response to the user terminal making payment based on the payment slip, a payment voucher image is generated based on the initial voucher data and the actual payment data.
[0077] It should be noted that the explanations of steps 201 and 205-207 can be found in the relevant descriptions in any embodiment of this application, and will not be repeated here.
[0078] This application obtains the target user's historical payment records based on the user identifier included in the access request, and determines the payment date range matched by the target user based on the historical payment dates corresponding to the historical payment records; it obtains the access date corresponding to the access request and determines whether the access date is within the payment date range; in response to the access date being within the payment date range, it determines the predicted payment time of the payment slip based on the access request, and adjusts the pre-processing time based on the target user's historical payment records to obtain the pre-processing time of the voucher corresponding to the target user; and determines the voucher's start time for processing based on the predicted payment time and the pre-processing time of the voucher. By pre-determining whether the access date corresponding to the access request is within the payment date range, it can more effectively ensure that the voucher pre-processing work is initiated only when the user intends to make a payment based on the payment slip, thereby avoiding unnecessary consumption of service resources.
[0079] Example 3:
[0080] Figure 3 This is a flowchart illustrating a credential generation method according to another embodiment of this application, as shown below. Figure 3 As shown, the method includes the following steps:
[0081] Step 301: Receive the target user's access request to the payment system through the user terminal.
[0082] Step 302: Based on the access request, determine the predicted payment time for the payment slip.
[0083] Step 303: Determine the degree of fluctuation of the time interval based on the time interval between the historical access time and the historical payment time corresponding to the historical payment record.
[0084] The degree of fluctuation in the time interval can be used to represent the instability of the time length between historical access time and historical payment time. A small degree of fluctuation means that the time from user access to payment is relatively fixed, while a large degree of fluctuation means that there is greater uncertainty in the time from user access to payment.
[0085] As an example, the standard deviation or variance can be determined based on the time interval between historical access time and historical payment time, and the standard deviation or variance can be used as a measure of the degree of fluctuation of the time interval.
[0086] Step 304: Obtain the voucher data generation time of the voucher system within the set historical time period.
[0087] The voucher system is used to generate initial voucher data; the set historical period can refer to the time period before the access time corresponding to the access request; the voucher data generation time can refer to the average time it takes for the voucher system to generate initial voucher data within the set historical period.
[0088] Step 305: Based on the degree of fluctuation and the voucher data generation time, adjust the set advance production time to obtain the advance production time of the voucher.
[0089] Among them, the greater the fluctuation, the longer the advance preparation time for vouchers; the smaller the fluctuation, the shorter the advance preparation time for vouchers. The longer the voucher data generation time, the longer the advance preparation time for vouchers; the shorter the voucher data generation time, the shorter the advance preparation time for vouchers.
[0090] Based on the fluctuation of time intervals, the advance production time can be flexibly adjusted according to the user's actual payment behavior habits. Based on the voucher data generation time of the voucher system within the set historical period, the advance production time can be flexibly adjusted according to the processing speed of the voucher system. This will minimize the situation where users have to wait because the voucher has not been pre-made after completing the payment, and enable users to quickly obtain the payment voucher image when needed.
[0091] As one possible implementation, based on the first mapping function, the degree of fluctuation is mapped to a first adjustment weight; based on the second mapping function, the voucher data generation time is mapped to a second adjustment weight; and the set advance production time is adjusted according to the first adjustment weight and / or the second adjustment weight to obtain the advance production time of the voucher.
[0092] As another possible implementation, a first adjustment weight is determined based on the comparison result of the fluctuation degree with at least one set fluctuation threshold; a second adjustment weight is determined based on the comparison result of the voucher data generation time with at least one generation time threshold; and the set advance production time is adjusted based on the first adjustment weight and / or the second adjustment weight to obtain the voucher advance production time.
[0093] When multiple fluctuation thresholds are set, these thresholds can form multiple fluctuation ranges. Each fluctuation range corresponds to a different first adjustment weight. By comparing the fluctuation level with at least one set fluctuation threshold, the fluctuation range in which the fluctuation level falls can be determined, and thus the first adjustment weight can be determined. It should be noted that the greater the fluctuation level, the greater the first adjustment weight, and the smaller the fluctuation level, the smaller the first adjustment weight.
[0094] Similarly, when there are multiple generation time thresholds, these thresholds can form multiple generation time intervals. Each generation time interval corresponds to a different second adjustment weight. By comparing the voucher data generation time with at least one generation time threshold, the generation time interval in which the voucher data generation time falls can be determined, and thus the second adjustment weight can be determined. It should be noted that the longer the voucher data generation time, the greater the second adjustment weight; the shorter the voucher data generation time, the smaller the second adjustment weight.
[0095] The threshold comparison process is simple to calculate and can quickly and accurately determine the first adjustment weight that matches the degree of fluctuation and the second adjustment weight that matches the voucher data generation time, thereby quickly determining the advance preparation time of vouchers and improving voucher production efficiency.
[0096] Step 306: Determine the starting time for voucher production based on the predicted payment time and the advance voucher production time.
[0097] Step 307: In response to the payment system's system time being equal to the voucher's initial creation time, obtain the initial voucher data based on the payment slip.
[0098] Step 308: In response to the user terminal making payment based on the payment slip, a payment voucher image is generated based on the initial voucher data and the actual payment data.
[0099] It should be noted that the explanations of steps 301-303, 306 and 308 can be found in the relevant descriptions in any embodiment of this application, and will not be repeated here.
[0100] This application determines the fluctuation level of the time interval based on the time interval between the historical access time and the historical payment time corresponding to the historical payment record; obtains the voucher data generation time of the voucher system within a set historical period; and adjusts the set advance production time based on the fluctuation level and the voucher data generation time to obtain the voucher advance production time. Based on the fluctuation level of the time interval, the set advance production time can be flexibly adjusted according to the user's actual payment behavior habits. Based on the voucher data generation time of the voucher system within the set historical period, the set advance production time can be flexibly adjusted according to the processing speed of the voucher system, minimizing the need for users to wait after completing payment due to incomplete voucher production, and enabling users to quickly obtain payment voucher images when needed.
[0101] Example 4:
[0102] Figure 4 This is a flowchart illustrating a credential generation method according to another embodiment of this application, as shown below. Figure 4 As shown, the method includes the following steps:
[0103] Step 401: Receive the target user's access request to the payment system through the user terminal.
[0104] Step 402: Based on the access request, determine the predicted payment time of the payment slip, and based on the target user's historical payment records, adjust the set advance preparation time to obtain the advance preparation time of the voucher corresponding to the target user.
[0105] Step 403: Determine the starting time for voucher production based on the predicted payment time and the advance voucher production time.
[0106] Step 404: In response to the payment system's system time being equal to the voucher's initial creation time, a pending payment transaction record is generated based on the payment slip and sent to the voucher system so that the voucher system can generate a stamping request based on the pending payment transaction record and add the stamping request to the electronic seal system's stamping request queue. The electronic seal system is used to send a stamping notification to the voucher system when the stamping request is dequeued.
[0107] The process of generating a pending payment record based on a payment slip involves converting the payment slip into a standardized and traceable pending payment record. Upon receiving the pending payment record, the voucher system generates a stamping request and sends it to the electronic seal system, adding it to the electronic seal system's stamping request queue. The electronic seal system processes the stamping requests in the queue according to predefined rules. When it receives a stamping request corresponding to a pending payment record, it sends a stamping notification to the voucher system, which then forwards the notification to the payment system. The stamping notification instructs the electronic seal system to permit the stamping.
[0108] Step 405: In response to receiving the seal usage notification from the voucher system, obtain the electronic seal from the electronic seal system.
[0109] Upon receiving a notification to use the seal, the payment system retrieves the electronic seal from the electronic seal system based on the outstanding payment transaction history. It's important to note that the electronic seal can refer to an encrypted electronic seal.
[0110] Step 406: Send the payment record and electronic seal to the voucher system, and obtain the initial voucher data generated by the voucher system based on the payment record and electronic seal.
[0111] After obtaining the electronic seal, the payment record and the electronic seal are sent to the voucher system so that the voucher system can pre-create the voucher and obtain the initial voucher data.
[0112] The close interaction between the payment system, voucher system, and electronic seal system enables the payment system to automatically generate a payment transaction record based on the payment slip when a specific time point is identified, and immediately send it to the voucher system. The voucher system then responds quickly, generating a seal request and queuing it for the electronic seal system. After processing the seal request, the electronic seal system immediately notifies the voucher system and securely provides the electronic seal. Finally, the voucher system combines the payment transaction record and the electronic seal to quickly generate initial voucher data. This process not only ensures the accuracy and consistency of the data but also enhances the compliance and security of the voucher generation process through automation.
[0113] In this embodiment of the application, after obtaining the initial voucher data based on the payment slip, the method further includes: in response to the user terminal not making payment within a set time period, deleting the initial voucher data or marking the initial voucher data as unusable data, and / or sending a data abandonment request to the voucher system, and / or sending a seal revocation request to the electronic seal system.
[0114] Among them, the data disposal request is used to instruct the voucher system to delete the initial voucher data or mark the initial voucher data as unusable data, and the seal cancellation request is used to instruct the electronic seal system to mark the status of the seal record corresponding to the initial voucher data as cancelled.
[0115] In payment and / or voucher systems, deleting initial voucher data or marking it as unavailable can prevent outdated or invalid data from continuing to circulate in the system, reducing the risk of data confusion and erroneous operations. Marking the status of the seal record corresponding to the initial voucher data as revoked can ensure that the relevant data no longer has any validity, preventing the misuse or abuse of electronic seals.
[0116] Step 407: In response to the user terminal making payment based on the payment slip, a payment voucher image is generated based on the initial voucher data and the actual payment data.
[0117] It should be noted that the explanations of steps 401, 402, 403 and 407 can be found in the relevant descriptions in any embodiment of this application, and will not be repeated here.
[0118] This application responds to the payment system's system time being equal to the voucher's initial creation time. Based on the payment slip, a pending payment transaction record is generated and sent to the voucher system. This allows the voucher system to generate a stamping request based on the pending payment transaction record and add it to the electronic seal system's stamping request queue. The electronic seal system sends a stamping notification to the voucher system when the stamping request is dequeued. Upon receiving the stamping notification from the voucher system, the application retrieves the electronic seal from the electronic seal system. The pending payment transaction record and the electronic seal are then sent to the voucher system, and the application obtains the initial voucher data generated by the voucher system based on these data. This process not only ensures data accuracy and consistency but also enhances the compliance and security of the voucher generation process through automation.
[0119] Example 5:
[0120] Figure 5 This is a schematic diagram of the structure of a credential generation device provided in an embodiment of this application, as shown below. Figure 5 As shown, it includes:
[0121] The receiving module 501 is used to receive the access request from the target user to the payment system through the user terminal, wherein the payment system includes payment slips to be paid;
[0122] The first determining module 502 is used to determine the predicted payment time of the payment slip based on the access request, and to adjust the set advance preparation time based on the target user's historical payment records to obtain the advance preparation time of the voucher corresponding to the target user.
[0123] The second determining module 503 is used to determine the starting time for voucher production based on the predicted payment time and the advance voucher production time.
[0124] The acquisition module 504 is used to obtain initial voucher data based on the payment slip in response to the system time of the payment system being equal to the voucher's initial creation time.
[0125] The generation module 505 is used to generate a payment voucher image based on the initial voucher data and the actual payment data in response to the user terminal making a payment based on the payment slip.
[0126] As one possible implementation, the first determining module 502 is used for:
[0127] Based on the user identifier of the target user included in the access request, obtain the target user's historical payment records, and determine the payment date range matched by the target user according to the historical payment dates corresponding to the historical payment records;
[0128] Obtain the access date corresponding to the access request, and determine whether the access date falls within the payment date range;
[0129] If the access date falls within the payment date range, the predicted payment time for the bill is determined based on the access request.
[0130] As one possible implementation, the first determining module 502 is used for:
[0131] Based on the user identifier of the target user included in the access request, obtain the target user's historical payment records;
[0132] The predicted payment time is determined based on the access time corresponding to the access request, the historical access time and the historical payment time corresponding to the historical payment record.
[0133] As one possible implementation, the initial voucher data is generated by the voucher system. The first determining module 502 is used for:
[0134] The degree of fluctuation in the time interval is determined based on the time interval between the historical access time and the historical payment time corresponding to the historical payment record;
[0135] Obtain the voucher data generation time of the voucher system within a set historical time period;
[0136] Based on the degree of fluctuation and the voucher data generation time, the advance production time is adjusted to obtain the advance production time of the voucher.
[0137] As one possible implementation, the first determining module 502 is used for:
[0138] The first adjustment weight is determined based on the comparison between the degree of volatility and at least one set volatility threshold.
[0139] The second adjustment weight is determined based on the comparison between the voucher data generation time and at least one generation time threshold.
[0140] Based on the first adjustment weight and / or the second adjustment weight, the set advance production time is adjusted to obtain the advance production time of the voucher.
[0141] As one possible implementation, module 504 is used for:
[0142] Based on the payment slip, a payment transaction record is generated and sent to the voucher system. The voucher system then generates a seal request based on the payment transaction record and adds the seal request to the seal request queue of the electronic seal system. The electronic seal system is used to send a seal notification to the voucher system when the seal request is dequeued.
[0143] In response to receiving a seal usage notification from the credential system, obtain an electronic seal from the electronic seal system;
[0144] Send the payment record and electronic seal to the voucher system, and obtain the initial voucher data generated by the voucher system based on the payment record and electronic seal.
[0145] As one possible implementation, the device also includes:
[0146] The processing module is used to respond to the user terminal's failure to make payment within a set time period by deleting the initial voucher data or marking the initial voucher data as unavailable data, and / or sending a data abandonment request to the voucher system, and / or sending a seal revocation request to the electronic seal system.
[0147] Among them, the data disposal request is used to instruct the voucher system to delete the initial voucher data or mark the initial voucher data as unusable data, and the seal cancellation request is used to instruct the electronic seal system to mark the status of the seal record corresponding to the initial voucher data as cancelled.
[0148] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of this embodiment, and will not be repeated here.
[0149] Example 6:
[0150] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 600 in this embodiment is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0151] like Figure 6 As shown, the electronic device 600 includes: a memory 610, a processor 620, and computer instructions stored in the memory 610 and executable on the processor 620.
[0152] When the processor 620 executes instructions, it implements the credential generation method provided in the above embodiments.
[0153] Furthermore, the electronic device 600 also includes:
[0154] Communication interface 630 is used for communication between memory 610 and processor 620.
[0155] The memory 610 is used to store computer instructions that can be run on the processor 620.
[0156] The memory 610 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0157] The processor 620 is used to implement the credential generation method of the above embodiments when executing a program.
[0158] If the memory 610, processor 620, and communication interface 630 are implemented independently, then the communication interface 630, memory 610, and processor 620 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0159] Optionally, in a specific implementation, if the memory 610, processor 620, and communication interface 630 are integrated on a single chip, then the memory 610, processor 620, and communication interface 630 can communicate with each other through an internal interface.
[0160] The processor 620 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0161] To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the aforementioned methods.
[0162] To implement the above embodiments, this application also proposes a computer program product, including a computer program that implements the aforementioned method when executed by a processor.
[0163] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0164] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0165] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0166] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0167] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0168] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0169] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.
[0170] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0171] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for generating vouchers, characterized in that, The method comprises the following steps: receiving an access request of a target user to a payment system through a user terminal, wherein the payment system comprises a payment order to be paid; based on the access request, determining the predicted payment time of the payment order, and adjusting the set advance production time based on the historical payment record of the target user to obtain the corresponding voucher advance production time of the target user; determining the initial production time of the voucher according to the predicted payment time and the voucher advance production time; in response to the system time of the payment system being equal to the initial production time of the voucher, obtaining initial voucher data based on the payment order, wherein the initial voucher data is generated by a voucher system; in response to the user terminal paying based on the payment order, generating a payment voucher image based on the initial voucher data and the actual payment data; wherein, based on the access request, determining the predicted payment time of the payment order comprises: based on the user identifier of the target user included in the access request, obtaining the historical payment record of the target user, and determining the payment date interval matched by the target user according to the historical payment date corresponding to the historical payment record; obtaining the access date corresponding to the access request, and determining whether the access date is located within the payment date interval; in response to the access date being located within the payment date interval, determining the predicted payment time of the payment order based on the access request; wherein, based on the historical payment record of the target user, the set advance production time is adjusted to obtain the corresponding voucher advance production time of the target user, comprising: determining the fluctuation degree of the time interval according to the time interval between the historical access time and the historical payment time corresponding to the historical payment record; obtaining the voucher data generation time of the voucher system within a set historical period; determining a first adjustment weight according to the comparison result of the fluctuation degree and at least one set fluctuation threshold; determining a second adjustment weight according to the comparison result of the voucher data generation time and at least one generation time threshold; based on the first adjustment weight and / or the second adjustment weight, the set advance production time is adjusted to obtain the voucher advance production time.
2. The method of claim 1, wherein, based on the access request, determining the predicted payment time of the payment order comprises: based on the user identifier of the target user included in the access request, obtaining the historical payment record of the target user; determining the predicted payment time according to the access time corresponding to the access request, the historical access time and the historical payment time corresponding to the historical payment record.
3. The method of claim 1, wherein, based on the payment order, obtaining initial voucher data comprises: generating a payment flow based on the payment order, and sending the payment flow to a voucher system, so that the voucher system generates a stamp request based on the payment flow, and adds the stamp request to a stamp request queue of an electronic seal system, wherein the electronic seal system is used to send a stamping notification to the voucher system when the stamp request is dequeued; In response to receiving the seal notification sent by the credential system, obtain an electronic seal from the electronic seal system; The payment record and the electronic seal are sent to the voucher system, and the initial voucher data generated by the voucher system based on the payment record and the electronic seal are obtained.
4. The method of claim 3, wherein, After obtaining the initial voucher data based on the payment slip, the method further includes: In response to the user terminal failing to make payment within a set time period, the initial voucher data is deleted or marked as unusable data, and / or a data abandonment request is sent to the voucher system, and / or a seal revocation request is sent to the electronic seal system; The data disposal request is used to instruct the voucher system to delete the initial voucher data or mark the initial voucher data as unusable data, and the seal cancellation request is used to instruct the electronic seal system to mark the status of the seal record corresponding to the initial voucher data as cancelled.
5. A credential generation device, characterized by, include: A receiving module is used to receive access requests from target users to the payment system via user terminals, wherein the payment system includes payment slips to be paid; The first determining module is used to determine the predicted payment time of the payment slip based on the access request, and to adjust the set advance production time based on the target user's historical payment records to obtain the advance production time of the voucher corresponding to the target user. The second determining module is used to determine the starting time for voucher production based on the predicted payment time and the advance voucher production time. The acquisition module is used to acquire initial voucher data based on the payment slip in response to the system time of the payment system being equal to the voucher's initial creation time. The initial voucher data is generated by the voucher system. The generation module is used to generate a payment voucher image based on the initial voucher data and the actual payment data in response to the user terminal making a payment based on the payment slip. Wherein, the first determining module is used for: Based on the user identifier of the target user included in the access request, obtain the target user's historical payment records, and determine the payment date range matched by the target user according to the historical payment dates corresponding to the historical payment records; obtain the access date corresponding to the access request, and determine whether the access date is within the payment date range; in response to the access date being within the payment date range, determine the predicted payment time of the payment bill based on the access request; The first determining module is further configured to: Based on the time interval between the historical access time and the historical payment time corresponding to the historical payment record, determine the degree of fluctuation of the time interval; obtain the voucher data generation time of the voucher system within a set historical period; determine a first adjustment weight based on the comparison result of the degree of fluctuation with at least one set fluctuation threshold; determine a second adjustment weight based on the comparison result of the voucher data generation time with at least one generation time threshold; adjust the set advance production time based on the first adjustment weight and / or the second adjustment weight to obtain the advance production time of the voucher.
6. The apparatus of claim 5, wherein, The first determining module is used for: Based on the user identifier of the target user included in the access request, obtain the target user's historical payment records; The predicted payment time is determined based on the access time corresponding to the access request, the historical access time and historical payment time corresponding to the historical payment record.
7. The apparatus of claim 5, wherein, The acquisition module is used for: Based on the payment slip, a pending payment transaction record is generated and sent to the voucher system so that the voucher system can generate a seal request based on the pending payment transaction record and add the seal request to the seal request queue of the electronic seal system. The electronic seal system is used to send a seal notification to the voucher system when the seal request is dequeued. In response to receiving the seal notification sent by the credential system, obtain an electronic seal from the electronic seal system; The payment record and the electronic seal are sent to the voucher system, and the initial voucher data generated by the voucher system based on the payment record and the electronic seal are obtained.
8. The apparatus of claim 7, wherein, The device further includes: The processing module is configured to, in response to the user terminal failing to make payment within a set time period, delete the initial voucher data or mark the initial voucher data as unusable data, and / or send a data abandonment request to the voucher system, and / or send a seal revocation request to the electronic seal system; The data disposal request is used to instruct the voucher system to delete the initial voucher data or mark the initial voucher data as unusable data, and the seal cancellation request is used to instruct the electronic seal system to mark the status of the seal record corresponding to the initial voucher data as cancelled.
9. An electronic device, comprising: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-4.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-4.
11. A computer program product, characterised in that, It includes a computer program that, when executed by a processor, implements the method of any one of claims 1-4.
Citation Information
Patent Citations
Information query method, device and equipmentapparatus and device, and computer readable storage medium
CN110751480A
Voucher generation method and device, equipment and storage medium
CN116645103A