CN115619552A - Asynchronous processing method and device of transaction bill, electronic equipment and medium - Google Patents

Asynchronous processing method and device of transaction bill, electronic equipment and medium Download PDF

Info

Publication number
CN115619552A
CN115619552A CN202211203226.2A CN202211203226A CN115619552A CN 115619552 A CN115619552 A CN 115619552A CN 202211203226 A CN202211203226 A CN 202211203226A CN 115619552 A CN115619552 A CN 115619552A
Authority
CN
China
Prior art keywords
transaction
thread
task
service
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211203226.2A
Other languages
Chinese (zh)
Inventor
覃利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211203226.2A priority Critical patent/CN115619552A/en
Publication of CN115619552A publication Critical patent/CN115619552A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Software Systems (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Bioethics (AREA)
  • Economics (AREA)
  • Computer Hardware Design (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses an asynchronous processing method, device, electronic equipment and medium of transaction bills, and relates to the technical field of data analysis. The specific implementation mode of the method comprises the following steps: receiving a transaction bill request by utilizing a preprocessing thread, and preprocessing a transaction bill file; according to a plurality of preset business data templates, checking the preprocessed transaction bill file through a checking thread, determining target business data meeting the requirements of the business data templates, constructing business tasks corresponding to the target business data and adding the business tasks to a to-be-executed business task list; and polling the to-be-executed service task table by the execution thread, generating a service message corresponding to the service task, and sending the service message to a downstream system. According to the method, long online transactions can be split into a plurality of parallel atomic transactions, so that a plurality of steps are asynchronously executed, the time consumption of the bill processing process is greatly shortened, the bill processing efficiency is improved, the waiting time cost of a user is reduced, and the user satisfaction is improved.

Description

Asynchronous processing method and device of transaction bill, electronic equipment and medium
Technical Field
The invention relates to the technical field of data analysis, in particular to an asynchronous processing method and device of a transaction bill, electronic equipment and a medium.
Background
The online transaction means that a user initiates a bill processing request to an ECDS (Electronic commercial draft system) of the financial institution through a counter, a self-service device, an online channel and the like of the financial institution, and the ECDS stores the bill processing request to a system database and reports the bill processing request to a downstream system in a combined text mode.
In the existing online transaction process, the ECDS needs to tamper and verify the transaction bill file, and then check the transaction bill file after the verification is passed, so that a service task can be generated and executed if the check is correct, and then a message is formed and reported after the execution is finished.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
with the rapid development of financial institution business, the number of transactions included in each transaction bill file is increased rapidly, the existing bill processing process needs to wait for the completion of the inspection of all data included in the whole file to generate business tasks, and meanwhile, the document can be sent after the completion of the generation of all business tasks, all the steps are linked tightly, and the whole bill processing process is long in time, low in efficiency, extremely high in waiting time cost for users and poor in transaction experience due to the fact that the number of data inspection elements is large and the task composition is time-consuming.
Disclosure of Invention
In view of this, embodiments of the present invention provide an asynchronous processing method, apparatus, electronic device, medium, and program for a transaction ticket, which can split a long online transaction into multiple parallel atomic transactions, so that multiple process steps are executed asynchronously, thereby greatly reducing the time consumption of the ticket processing process, improving the ticket processing efficiency, reducing the waiting time cost of a user, and improving the transaction satisfaction of the user.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an asynchronous processing method of a transaction ticket, including:
the method is executed asynchronously using a plurality of threads, including a preprocessing thread, an inspection thread, and an execution thread, the method comprising:
utilizing the preprocessing thread to receive a transaction bill request, wherein the transaction bill request comprises a transaction bill file, and preprocessing the transaction bill file;
according to a plurality of preset business data templates, the preprocessed transaction bill file is checked through the checking thread, target business data meeting the requirements of the business data templates are determined, business tasks corresponding to the target business data are constructed and added to a business task table to be executed;
and the execution thread polls the to-be-executed service task table, generates a service message corresponding to the service task and sends the service message to a downstream system.
Optionally, the transaction ticket request further includes a request time and a request message; the preprocessing the transaction ticket file comprises the following steps:
the preprocessing thread judges whether the request time belongs to a transaction time interval of the downstream system;
and under the condition that whether the request time belongs to the transaction time interval or not, the preprocessing thread performs duplicate checking and tampering verification on the transaction bill file.
Optionally, the performing duplicate checking on the transaction ticket file includes:
determining whether a system database has a file with the same name as the transaction bill file according to the file name of the transaction bill file;
rejecting the transaction instrument request if the system database is in a file of the same name as the transaction instrument file.
Optionally, the transaction ticket request further includes a request message; the tamper verification of the transaction ticket file comprises the following steps:
determining whether the transaction bill file is tampered or not according to the signature field of the request message;
and under the condition that the transaction bill file is not tampered, extracting the business data in the transaction bill file, generating an inspection task corresponding to the business data, and adding the inspection task to the task table to be inspected.
Optionally, the determining whether the transaction ticket file is tampered according to the signature field of the request message includes:
performing MD5 encryption on the transaction bill file to determine an encrypted hash value;
comparing the encrypted hash value with the digital abstract of the signature field of the request message, and determining whether the encrypted hash value is the same as the digital abstract;
determining that the transaction ticket file is tampered in the event that the encrypted hash value and the digital digest are different.
Optionally, the determining the target service data meeting the requirements of the service data template includes:
the inspection thread determines the service type of the service data of the inspection task according to the request message;
the checking thread searches the ECDS database and determines a target business data template corresponding to the business type of the business data;
and the inspection thread inspects the value of the service data by using the target service data template, and screens the target service data meeting the requirements of the target service data template.
Optionally, before the checking thread determines the service type of the service data of the checking task according to the request packet, the method further includes:
polling the task table to be checked determined by the preprocessing thread to obtain the checking task.
Optionally, the target service data template is any one of the following service data templates: the system comprises a ticket drawing business data template, an endorsement business data template, a ticket delivery business data template, an acceptance business data template and a pledge business data template.
Optionally, the ticket issuing service data template includes a ticket issuing amount threshold lower limit, a ticket issuing amount threshold upper limit and a ticket issuing date condition relation.
Optionally, the endorsement service data template includes an endorsement user identification condition relation and an endorsement date condition relation.
Optionally, before the preprocessing the transaction ticket file, further comprising:
and the preprocessing thread generates a transaction bill task corresponding to the transaction bill request and stores the transaction bill task into a to-be-processed bill task table.
Optionally, the method further comprises:
and generating log records corresponding to the to-be-executed service task list, the to-be-checked task list and the to-be-processed bill task list.
Optionally, the method further comprises:
and according to the log records of the to-be-executed service task list, the to-be-checked task list and the to-be-processed bill task list, positioning a thread fault or a task failure result, and restarting a thread corresponding to the thread fault or restarting a corresponding task by using the thread corresponding to the task failure result.
Optionally, the method further comprises:
and setting the execution starting time of the to-be-executed service task table by the execution thread according to different service types requested by the transaction bill, so that each service task is executed at the corresponding execution starting time.
Optionally, the transaction ticket file is in a TXT format, and the business data in the transaction ticket file is extracted in a row-by-row manner.
According to a further aspect of an embodiment of the present invention, there is provided an asynchronous processing apparatus of a transaction ticket, the apparatus asynchronously executing using a plurality of threads including a preprocessing thread, an inspection thread, and an execution thread, the apparatus including:
the receiving module is used for receiving a transaction bill request by utilizing the preprocessing thread, wherein the transaction bill request comprises a transaction bill file, and preprocessing the transaction bill file;
the inspection module is used for inspecting the preprocessed transaction bill file through the inspection thread according to a plurality of preset service data templates, determining target service data meeting the requirements of the service data templates, constructing service tasks corresponding to the target service data and adding the service tasks to a service task table to be executed;
and the group Wen Mokuai is used for polling the to-be-executed service task table by the execution thread, generating a service message corresponding to the service task, and sending the service message to a downstream system.
According to another aspect of an embodiment of the invention, there is provided an electronic device for asynchronous processing of transaction tickets, comprising:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the asynchronous processing method of the transaction ticket provided by the invention.
According to a further aspect of an embodiment of the present invention, there is provided a computer readable medium, on which a computer program is stored, which program, when executed by a processor, implements the asynchronous processing method of transaction tickets provided by the present invention.
One embodiment of the above invention has the following advantages or benefits: the online transaction is divided into a plurality of atomic operations, each atomic operation is executed by one thread, the whole bill processing process is performed by a plurality of threads including a preprocessing thread, an inspection thread and an execution thread in parallel, transaction bill requests are processed asynchronously, the preprocessing thread performs duplicate checking and tampering checking on transaction files, and inspection tasks are generated and stored in a task table to be inspected; polling a task table to be checked by a checking thread, checking the service data as long as the task to be checked is found, screening target service data to generate a service task, and storing the service task to be executed in the service task table; the execution thread polls the service task table to be executed, and only a technical means that the service task to be executed is a text-grouping sending downstream system is found, so that the technical problems that all steps in the existing bill processing process are closely linked, the time and the cost of the whole bill processing process are long and low due to more data check elements and time consumption of task text grouping, the waiting time and the cost of a user are extremely high, and the transaction experience is poor are solved, and further, the technical effects that one long online transaction can be split into a plurality of parallel atomic transactions, a plurality of flow steps are asynchronously executed, the time consumption of the bill processing process is greatly shortened, the bill processing efficiency is improved, the waiting time cost of the user is reduced, and the transaction satisfaction degree of the user is improved are achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a method of asynchronous processing of transaction tickets, according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a main flow of a method of preprocessing a transaction ticket document according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a main flow of a tampering verification method of a transaction ticket file according to an embodiment of the present invention;
fig. 4 is a schematic view of a main flow of a business data inspection method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the main modules of an asynchronous processing arrangement of transaction tickets according to an embodiment of the invention;
FIG. 6 illustrates an exemplary system architecture diagram of an asynchronous processing method of transaction instruments or an asynchronous processing device of transaction instruments suitable for application with embodiments of the present invention;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The bill exchange: the system also refers to a ticket exchange station, and refers to a unified ticket exchange platform with multiple functions of ticket quotation, ticket exchange, registration and trusteeship, clearing and settlement, information service and the like.
ECDS: the Electronic commercial draft system is an Electronic commercial draft system, receives, registers and forwards Electronic commercial draft data telegraph text by depending on network computer technology, provides services related to Electronic commercial draft money paying and fund clearing behaviors and the like, is a comprehensive business processing platform with the services of paper commercial draft registration inquiry, commercial draft public quotation and the like, and can cover the whole life cycle of the bill.
The MD5 algorithm: the MD5 Message-Digest Algorithm, also called HASH Algorithm or HASH Algorithm, is a one-way encryption function, which can compress information of any length to a fixed length (called Message Digest) to ensure the information transmission is complete and consistent.
The ECDS adopts a synchronization mechanism to process a transaction bill request, a requested transaction bill file usually comprises a plurality of transactions, the ECDS needs to check the plurality of transactions, and after all the transactions are checked, the transactions meeting the requirements are screened to generate business tasks; and executing the service tasks one by one until all the service tasks are executed, and sending the messages of all the service tasks to a downstream system together, namely, each step can be executed by waiting for the end of the previous step from the beginning to the end of the existing transaction processing process. With the development of financial institution business, the transaction quantity of a single request is larger and larger, and simultaneously, more elements need to be checked, so that the time consumption of one online transaction is far longer than the overtime set by the front end, and the use experience of a user is influenced.
According to the asynchronous processing method of the transaction bill, the steps are respectively executed by utilizing the plurality of asynchronous threads, each thread is used as a minimum execution unit/irreparable unit, the long online transaction is divided into the execution of the plurality of irreparable atomic threads, the response time of the transaction request is greatly shortened, the transaction processing efficiency is improved, and the user experience is improved.
Fig. 1 is a schematic diagram of a main flow of an asynchronous processing method of a transaction ticket according to an embodiment of the present invention, and as shown in fig. 1, the asynchronous processing method of a transaction ticket of the present invention includes the steps of:
in the embodiment of the invention, the asynchronous processing method of the transaction ticket is executed by the ECDS, the ECDS comprises a plurality of threads such as a preprocessing thread, an inspection thread and an execution thread, the plurality of threads are parallel, corresponding thread services are asynchronously executed, and the number of each thread can be selectively set according to actual traffic, for example, 1, 10 and … ….
Step S101, receiving a transaction bill request by utilizing the preprocessing thread, wherein the transaction bill request comprises a transaction bill file, and preprocessing the transaction bill file.
In the embodiment of the invention, a preprocessing thread of the ECDS receives a transaction bill request sent by a client, the transaction bill request comprises request time, a transaction bill file and a request message, and the preprocessing thread preprocesses the transaction bill file according to the request time and the request message and extracts service data in the transaction bill file.
In the embodiment of the present invention, as shown in fig. 2, the method for preprocessing the transaction ticket document of the present invention includes the following steps:
in the embodiment of the invention, the preprocessing method of the transaction order file is executed by a preprocessing thread of the ECDS. The preprocessing thread may be a single thread, or the preprocessing thread may include a plurality of threads such as a time judgment thread, a duplication checking thread, a verification thread, and a data extraction thread, and is used for judging the request time of the transaction ticket request and performing duplication checking, verification, and data extraction on the transaction ticket file.
In the case that the preprocessing thread is a single thread, the preprocessing thread is used as an atomic thread (or called as a minimum thread) which is not separable by the ECDS, and performs corresponding time judgment, duplicate checking, checksum data extraction processes.
Under the condition that the preprocessing threads comprise a plurality of threads such as a time judging thread, a duplication checking thread, a checking thread and a data extracting thread, the time judging thread, the duplication checking thread, the checking thread and the data extracting thread are used as atomic threads which are not separable by the ECDS, and corresponding time judging, duplication checking, checking and data extracting processes are executed.
Step S201, obtaining the request time of the transaction ticket request.
In the embodiment of the invention, in the case that the preprocessing thread is a single thread, the preprocessing thread acquires the request time of the transaction ticket request.
Under the condition that the preprocessing thread comprises a plurality of threads such as a time judgment thread, a duplication checking thread, a verification thread and a data extraction thread, the time judgment thread acquires the request time of the transaction bill request.
Step S202, judging whether the request time belongs to a transaction time interval, if so, turning to step S203; if not, go to step S208.
In the embodiment of the invention, the online transaction must ensure the synchronization with the working time of the downstream system, that is, only the working time of the downstream system, the ECDS can communicate with the downstream system to process the transaction bill request of the online transaction, so the transaction time interval is the working time of the downstream system. For example, the downstream system may be a server of a ticket exchange, and since the ticket exchange operates only during the daytime and does not operate during the daytime and at night, the ECDS follows the operation time of the ticket exchange, and the determined transaction time interval is the daytime.
Further, under the condition that the preprocessing thread is a single thread, the preprocessing thread judges whether the request time of the transaction bill request belongs to the transaction time interval, and if so, the transaction bill request is received and processed.
Under the condition that the preprocessing thread comprises a plurality of threads such as a time judgment thread, a duplication checking thread, a verification thread and a data extraction thread, the time judgment thread judges whether the request time of the transaction bill request belongs to a transaction time interval, and if so, the transaction bill request is received and processed.
And step S203, checking the duplicate of the transaction ticket file.
In the embodiment of the invention, in the case that the preprocessing thread is a single thread, the duplication checking of the transaction ticket file is executed by the preprocessing thread.
And under the condition that the preprocessing thread comprises a plurality of threads such as a time judgment thread, a duplication checking thread, a verification thread and a data extraction thread, the duplication checking of the transaction bill file is executed by the duplication checking thread.
In the embodiment of the invention, under the condition that the preprocessing thread or the time judgment thread determines that the request time belongs to the transaction time interval, the network fault may cause the user to mistakenly send the transaction bill request failure or the user mistakenly touches the transaction bill request, and the transaction bill request may be the transaction bill request repeatedly sent by the user through the client, so that the preprocessing thread or the duplication checking thread needs to carry out duplication checking processing on the transaction bill file in order to prevent the processing of repeated transactions and waste of computing resources.
Step S204, determining whether a system database has a file with the same name as the transaction ticket file according to the file name of the transaction ticket file, and if so, turning to step S208; if not, go to step S205.
In the embodiment of the invention, the preprocessing thread or the duplication checking thread searches a system database (or called ECDS database) according to the file name of the transaction bill file and judges whether the file with the same name of the transaction bill file exists or not.
And step S205, carrying out tampering verification on the transaction bill file.
In the embodiment of the invention, in the case that the preprocessing thread is a single thread, the tampering check of the transaction ticket file is performed by the preprocessing thread.
And under the condition that the preprocessing thread comprises a plurality of threads such as a time judgment thread, a duplication checking thread, a verification thread and a data extraction thread, the tampering verification of the transaction bill file is executed by the verification thread.
Step S206, determining whether the transaction bill file is tampered according to the signature field of the request message, and if so, turning to step S208; if not, go to step S207.
In the embodiment of the invention, under the condition that the ECDS database does not have the file with the same name as the transaction bill file, the preprocessing thread or the verification thread carries out tampering verification on the transaction bill file so as to ensure that the transaction bill file is not tampered and the data in the transaction bill file is safe.
In the embodiment of the present invention, as shown in fig. 3, the method for verifying tampering of a transaction ticket document of the present invention includes the following steps:
in the embodiment of the invention, under the condition that the preprocessing thread is a single thread, the tampering verification method of the transaction ticket file is executed by the preprocessing thread.
Under the condition that the preprocessing thread comprises a plurality of threads such as a time judgment thread, a duplication checking thread, a verification thread and a data extraction thread, the tampering verification method of the transaction bill file is executed by the verification thread.
Step S301, performing MD5 encryption on the transaction ticket file, and determining an encrypted hash value.
In the embodiment of the invention, the preprocessing thread or the verification thread encrypts the transaction bill file by using an MD5 algorithm, and determines the encrypted hash value so as to facilitate the subsequent tampering verification.
Step S302, comparing the encrypted hash value with the digital abstract of the signature field of the request message.
In the embodiment of the invention, the value of the request message including the signature field is obtained by encrypting the transaction bill file by the client, so as to ensure the data transmission safety and prevent the transaction bill file from being tampered by a malicious attack user. Wherein:
and the client encrypts the transaction bill file by using an md5 algorithm to generate a digital abstract, and stores the digital abstract as the value of the signature field in the signature field of the request message.
Further, the preprocessing thread or the verification thread compares the encrypted hash value obtained by encrypting the transaction ticket file with the digital abstract of the signature field of the request message, and determines whether the encrypted hash value and the digital abstract are the same.
Step S303, determining whether the encrypted hash value and the digital digest are the same, if so, going to step S304; if not, go to step S305.
Step S304, the online transaction is continued, and step S206 is executed.
In the embodiment of the invention, under the condition that the encrypted hash value obtained by encrypting the transaction ticket file by the preprocessing thread or the verification thread is the same as the digital digest of the signature field of the request message, the transaction ticket file is safe and online transaction can be continued.
Step S305, rejecting the transaction ticket request.
In the embodiment of the invention, under the condition that the encrypted hash value obtained by encrypting the transaction bill file by the preprocessing thread or the verification thread is different from the digital abstract of the signature field of the request message, the transaction bill file is indicated to be tampered, and the transaction bill file has a leakage risk, so that the transaction bill request is rejected, and the possible transaction risk is prevented.
In the embodiment of the invention, according to the tampering verification method of the transaction bill file, the tampering verification is carried out on the transaction bill file by using the MD5 algorithm, whether the encrypted hash value of the transaction bill file after encryption is the same as the digital abstract of the signature field of the request message or not is judged, and the transaction bill file is safe under the same condition, so that the transaction can be continued; under different conditions, the method indicates that the transaction bill file has leakage risk, directly refuses the transaction bill request, and prevents the transaction data from leaking so as to ensure the safety of online transaction.
Step S207, extracting the business data in the transaction bill file, generating an inspection task corresponding to the business data, and adding the inspection task to the task table to be inspected.
In the embodiment of the invention, in the case that the preprocessing thread is a single thread, the business data extraction in the transaction ticket file is executed by the preprocessing thread.
Under the condition that the preprocessing thread comprises a plurality of threads such as a time judgment thread, a duplication checking thread, a verification thread and a data extraction thread, the business data extraction in the transaction bill file is executed by the data extraction thread.
In the embodiment of the invention, under the condition that the transaction bill file is determined not to be tampered, the preprocessing thread or the data extraction thread extracts the business data of each line in the transaction bill file, one transaction bill file comprises a plurality of lines of business data, and each line of business data corresponds to one transaction. And each line of business data is extracted by the preprocessing thread or the data extraction thread, namely, an inspection task corresponding to the business data is constructed, and the inspection task is added to the task table to be inspected.
In the embodiment of the invention, the mode of extracting the business data in the transaction ticket file by the preprocessing thread or the data extraction thread is line-by-line reading.
Step S208, rejecting the transaction ticket request.
In the embodiment of the invention, under the condition that the preprocessing thread or the time judgment thread determines that the request time does not belong to the transaction time interval, the non-business time reminding of the non-transaction time can be displayed to the user through the client, and the transaction bill request is refused, so that the user continuously waits until the transaction time interval is reached or other time is selected to resubmit the transaction bill request.
In the embodiment of the invention, under the condition that the preprocessing thread or the duplication checking thread determines that the ECDS database is in the same-name file of the transaction bill file, the ECDS is shown to process the transaction bill request without repeatedly processing the transaction bill request, a repeated request prompt of 'no repeated submission' can be displayed to a user through the client, the transaction bill request repeatedly submitted by the user is rejected, and the user continues to wait for the response result of the successfully submitted transaction bill request.
In the embodiment of the invention, under the condition that the preprocessing thread or the verification thread determines that the transaction bill file is tampered, the transaction bill request is refused, and the possible leakage risk is prevented, so that the transaction safety is ensured.
In the embodiment of the invention, according to the method for preprocessing the transaction bill file, whether the transaction bill file can be preprocessed is judged according to the request time, and the transaction bill file is subjected to duplicate checking and tampering verification under the condition that the request time belongs to the transaction time interval, so that the transaction data is prevented from being leaked while computing resources are reasonably utilized, and the transaction safety is guaranteed.
Step S102, according to a plurality of preset business data templates, the preprocessed transaction bill file is checked through the checking thread, target business data meeting the requirements of the business data templates are determined, and business tasks corresponding to the target business data are constructed and added to a business task table to be executed.
In the embodiment of the invention, the request message of the transaction bill request also comprises service types, the transaction bill requests of different service types correspond to different service data templates, the service types comprise ticket drawing, endorsement, ticket delivery, acceptance, pledge and the like, and the service data of one transaction bill file belongs to the same service type. And the inspection thread polls the task table to be inspected according to a plurality of preset service data templates, inspects the service data of the inspection task, determines target service data meeting requirements, generates a service task corresponding to the target service data and adds the service task to the service task table to be executed.
In the embodiment of the present invention, as shown in fig. 4, the method for checking service data of the present invention includes the following steps:
in the embodiment of the present invention, the method for checking service data is executed by a checking thread of the ECDS, where the checking thread may be a single thread, or the checking thread may include a polling thread, a template search thread, a data screening thread, and a plurality of threads, and is used to poll a task table to be checked, search a target service data template, and screen target service data.
Further, under the condition that the checking thread is a single thread, the checking thread is used as an ECDS inseparable atomic thread, and corresponding processes of polling the task table to be checked, searching the target service data template and screening the target service data are executed.
Further, under the condition that the inspection threads comprise a plurality of threads such as a polling thread, a template searching thread, a data screening thread and the like, the polling thread, the template searching thread and the data screening thread are used as atomic threads which are not separable by the ECDS, and corresponding processes of polling a task table to be inspected, searching a target service data template and screening target service data are executed.
In the embodiment of the invention, under the condition that the check thread is an independent thread, the check thread is parallel to the preprocessing thread, and the check thread automatically polls the task table to be checked in real time and executes the check task while the preprocessing thread judges the request time, performs the duplicate checking and verification on the transaction bill file, extracts the service data to generate the check task and adds the check task to the task table to be checked. That is, while the preprocessing thread continuously sends the inspection task to the task table to be inspected, the inspection thread checks whether the task table to be inspected has the inspection task in real time, if only the inspection task exists in the task table to be inspected, the service data included in the inspection task is inspected, the target service data is screened, and the steps are repeated, so that the asynchronous parallel processing of the preprocessing thread and the inspection thread is realized.
In the embodiment of the invention, under the condition that the inspection thread comprises a plurality of threads such as a template search thread, a data screening thread and the like, the template search thread, the data screening thread and a time judgment thread, a duplication checking thread, a verification thread and a data extraction thread are parallel, when the time judgment thread judges the request time and the duplication checking thread checks the transaction bill file, the verification thread checks the transaction bill file, the data extraction thread extracts the service data to generate the inspection task and adds the inspection task to the task table to be inspected, the polling thread polls the task table to be inspected, the template search thread searches the target service data template and the data screening thread screens the target service data in real time/automatically. That is, when the time judgment thread judges the request time, the duplication checking thread checks the transaction bill file, the check thread checks the transaction bill file, the data extraction thread extracts the service data to generate the check task, the polling thread checks whether the check task exists in the task table to be checked in real time, if the check task exists in the task table to be checked, the template searching thread and the data screening thread are immediately informed, the template searching thread searches a target service data template, the data screening thread checks the service data included in the check task, and screens the target service data, and the steps are repeated, so that asynchronous parallel processing of the template searching thread, the data screening thread, the time judgment thread, the duplication checking thread, the check thread and the data extraction thread is realized.
Step S401, polling the task table to be checked to obtain the checking task.
In the embodiment of the invention, the inspection thread or the polling thread automatically polls the task table to be inspected to obtain the inspection task in the task table to be inspected.
Step S402, determining the service type of the service data of the inspection task according to the request message.
In the embodiment of the invention, the inspection thread or the polling thread determines the service type corresponding to the service data included in the inspection task according to the value of the service type field of the request message of the transaction bill request corresponding to the inspection task.
Step S403, searching the system database, and determining a target service data template corresponding to the service type of the service data.
In the embodiment of the invention, the service data templates of the ECDS database correspond to the service types one by one. For example, the service type is ticketing, and correspondingly, the target service data template is a ticketing service data template of the ECDS database; or, the service type is an endorsement, and correspondingly, the target service data template is an endorsement service data template of the ECDS database; or, the ECDS database also comprises a ticket delivery service data template, a acceptance service data template, a pledge service data template and the like. And the checking thread or the template searching thread searches an ECDS database to determine a target business data template.
Step S404, using the target service data template to check the value of the service data and screen the target service data meeting the requirement of the target service data template.
In an embodiment of the present invention, the service data template includes a plurality of inspection criteria for service data. And the inspection thread or the data screening thread inspects the value of the service data according to the target service data template and screens the target service data.
Furthermore, the check criteria of the ticketing service data template may include a lower threshold of a ticketing amount, an upper threshold of the ticketing amount, and a conditional relational expression of a ticketing date, and accordingly, the ticketing amount in the service data must be greater than or equal to the lower threshold of the ticketing amount, the ticketing amount in the service data must be less than or equal to the upper threshold of the ticketing amount, and the ticketing date in the service data must satisfy the conditional relational expression of the ticketing date, for example, when the lower threshold of the ticketing amount is 0 yuan, the upper threshold of the ticketing amount is 10 billion yuan, and the conditional relational expression of the ticketing date is that the due date of a ticket is greater than or equal to the ticketing date, the ticketing amount of the service data of the check task is 3 trillions, the due date of the ticket is 20211231, and the ticketing date is 20210919, the service data of the check task meets the requirements of the ticketing service data template, that the service data of the check task belongs to the target service data; for another example, when the lower limit of the threshold value of the amount of ticket out is 0 yuan, the upper limit of the threshold value of the amount of ticket out is 10 billion yuan, and the conditional expression of the date of ticket out is that the due date of the ticket is greater than or equal to the date of ticket out, the amount of ticket out of the service data of the inspection task is 3 ten thousand yuan, the due date of the ticket is 20201231, and the date of ticket out is 20210919, the due date of the ticket out of the inspection task is smaller than the date of ticket out, and the service data of the inspection task does not meet the requirement of the template of the service data of the ticket out, that is, the service data of the inspection task does not belong to the target service data.
Further, the inspection standard of the endorsement service data template may include an endorsement user identification condition relational expression and an endorsement date condition relational expression, and accordingly, the requesting user identification in the service data must meet the endorsement user identification condition relational expression, and the endorsement date in the service data must meet the endorsement date condition relational expression, for example, when the requesting user identification must be the same as the user identification of the endorsement ticket, the endorsement date condition relational expression is that the request time is equal to the endorsement date, the requesting user identification of the inspection task is a002, the endorsement user identification of the endorsement ticket is B003, the request time is 20210919, and the endorsement date is 20210919, the requesting user identification of the inspection task is different from the endorsement user identification of the endorsement ticket, that is, the service data of the inspection task does not meet the requirement of the ticket-issuing service data template, and the service data of the inspection task does not belong to the target service data.
In the embodiment of the invention, according to the method for checking the service data, the target service data template corresponding to the service data of the checking task is determined according to the service type field of the request message of the data processing request, the service data is checked by using the target service data template to screen the target service data meeting the requirement of the target service data template, and through multithreading parallelism, compared with the prior method that the service data checking is carried out after all the service data of the transaction bill file are extracted, the method can greatly accelerate the checking speed of the service data, shorten the checking time of the service data, improve the checking efficiency and improve the satisfaction degree of a user.
In the embodiment of the invention, after the inspection thread or the data screening thread determines the target service data meeting the requirements of the target service data template, the service task corresponding to the target service data is generated and added to the service task table to be executed. For example, a transaction ticket file includes 1000 lines of business data, 1000 inspection tasks are generated corresponding to 1000 transactions, and 900 business data of the 1000 inspection tasks meet the requirements of a target business data template, that is, 900 business tasks are generated and added to a to-be-executed business task table.
Step S103, the execution thread polls the service task table to be executed, generates a service message corresponding to the service task, and sends the service message to a downstream system.
In the embodiment of the invention, an inspection thread, a preprocessing thread and an execution thread are parallel, the inspection thread automatically monitors a task table to be inspected while the preprocessing thread analyzes a transaction bill file and adds an inspection task to the task table to be inspected, and the service data of the inspection task is inspected and the target service data is screened as long as the inspection task exists in the task table to be inspected; when the inspection thread inspection task processes the inspection task and screens the target service data, the execution thread automatically monitors the to-be-executed service task table, and as long as the service task exists in the to-be-executed service task table, a service message corresponding to the service task is generated and sent to a downstream system. The steps are repeated, and asynchronous parallel processing of the preprocessing thread, the checking thread and the executing thread is realized.
Furthermore, in the process of polling the to-be-executed service task list by the execution thread, when a service message is sent to the downstream system once, the to-be-executed service task list is continuously judged, whether a service task is newly added to the to-be-executed service task list is determined, and as long as the to-be-executed service task list is newly added, the target service data of the service task is immediately organized.
In the embodiment of the invention, the downstream system can be a server of a bill exchange and receives messages reported by ECDS servers of various financial institutions.
In the embodiment of the invention, through asynchronous parallel processing of the preprocessing thread, the checking thread and the executing thread, the next step is carried out without waiting for the completion of all transaction processing in each step (including waiting for all service data of a transaction bill file extracted in the preprocessing step to enter the checking step, waiting for all service data in the checking step to be checked to enter the composition step, and waiting for all target service data in the composition step to be sent to a downstream system), as long as single transaction processing is completed (including extracting single-line service data by the preprocessing thread, namely inserting the single-line service data into a task table to be checked, adding the service task table to be executed by the checking thread after one checking task is finished, and sending the downstream system by the executing thread after a message of one service task is generated by the executing thread), namely, the composition is sent to the downstream system, so that the processing time consumption of the bill service is greatly shortened, the bill output efficiency of the bill service is improved, and the user experience is improved.
In the embodiment of the invention, the transaction bill file of the transaction bill request sent by the client can be in a TXT format, when a user uploads the transaction bill file in an EXCEL format to the client, the client converts the transaction bill file in the EXCEL format into the transaction bill file in the TXT format, the transaction bill file serving as the transaction bill request is sent to the ECDS, and the transaction bill file is processed by multiple parallel threads of the ECDS. When the transaction bill file in the EXCEL format is converted into the transaction bill file in the TXT format, each line of the EXCEL corresponds to each line of the TXT one by one, and when the preprocessing thread extracts the service data in the transaction bill file, the extraction mode of extracting the service data in the transaction bill file is line-by-line extraction.
In an embodiment of the present invention, before the preprocessing the transaction ticket file, the method further includes:
and the preprocessing thread generates a transaction bill task corresponding to the transaction bill request and stores the transaction bill task into a to-be-processed bill task table.
In the embodiment of the invention, the log records of the to-be-processed bill task table, the to-be-checked task table and the to-be-executed service task table are generated, so that under the condition of any thread fault or task processing failure, the log records can be checked, the processing process can be analyzed, the abnormal problem can be positioned and solved in time.
In the embodiment of the invention, according to the log record, the thread fault or the task failure result in each task table is positioned, the fault thread is restarted, and/or the corresponding task is restarted by utilizing the thread corresponding to the task failure result.
In the embodiment of the invention, different execution starting times can be set for the service task list to be executed according to different service types requested by the transaction bills, so that different types of service tasks are executed at different execution starting times, the bill processing efficiency is improved, and the centralized management of different bill services is facilitated.
Each business behavior can set the execution time and the starting and ending time, and the control is convenient to be carried out according to the business behavior dimension. And the execution thread sets the execution starting time of each service task in the to-be-executed service task table, so that each service task is executed at the corresponding execution starting time.
In an embodiment of the invention, the asynchronous execution by the method by using a plurality of threads, including a preprocessing thread, an inspection thread and an execution thread, comprises the following steps: utilizing the preprocessing thread to receive a transaction bill request, wherein the transaction bill request comprises a transaction bill file, and preprocessing the transaction bill file; according to a plurality of preset business data templates, the preprocessed transaction bill file is checked through the checking thread, target business data meeting the requirements of the business data templates are determined, and business tasks corresponding to the target business data are constructed and added to a to-be-executed business task list; the execution thread polls the to-be-executed service task table, generates a service message corresponding to the service task, sends the service message to a downstream system and the like, so that a long online transaction can be split into a plurality of parallel atomic transactions, a plurality of flow steps are asynchronously executed, the time consumption of a bill processing process is greatly shortened, the bill processing efficiency is improved, the waiting time cost of a user is reduced, and the transaction satisfaction of the user is improved.
Fig. 5 is a schematic diagram of main blocks of an asynchronous processing device of a transaction ticket according to an embodiment of the present invention, and as shown in fig. 5, the asynchronous processing device 500 is asynchronously executed by using a plurality of threads, including a preprocessing thread, an inspection thread, and an execution thread, and the asynchronous processing device 500 of a transaction ticket of the present invention includes:
a receiving module 501, configured to receive a transaction ticket request by using the preprocessing thread, where the transaction ticket request includes a transaction ticket file, and preprocess the transaction ticket file.
The checking module 502 is configured to check the preprocessed transaction ticket file through the checking thread according to a plurality of preset service data templates, determine target service data meeting requirements of the service data templates, construct a service task corresponding to the target service data, and add the service task to a to-be-executed service task table.
And the group Wen Mokuai is used for polling the to-be-executed service task table by the execution thread, generating a service message corresponding to the service task, and sending the service message to a downstream system.
In the embodiment of the invention, a long online transaction can be divided into a plurality of parallel atomic transactions through the receiving module, the checking module, the composition module and other modules, so that a plurality of process steps are asynchronously executed, the time consumption of a bill processing process is greatly shortened, the bill processing efficiency is improved, the waiting time cost of a user is reduced, and the transaction satisfaction of the user is improved.
Fig. 6 shows an exemplary system architecture diagram of an asynchronous processing method of transaction instruments or an asynchronous processing device of transaction instruments suitable for application to an embodiment of the present invention, which, as shown in fig. 6, includes:
as shown in fig. 6, the system architecture 600 may include end devices 601, 602, 603, a network 604, an ECDS server 605, and a downstream system 606. The network 604 is used to provide a medium for communication links between the end devices 601, 602, 603 and the ECDS server 605, between the ECDS server 605 and the downstream system 606. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The user may interact with the ECDS server 605 through the network 604 using the terminal devices 601, 602, 603 to receive or transmit messages or the like. Various communication client applications, such as a transaction ticket application, a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like, may be installed on the terminal devices 601, 602, and 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The ECDS server 605 may be a server providing various services, for example, a background management server providing support for a transaction ticket website browsed by a user using the terminal devices 601, 602, and 603. The back-end management server may analyze and process the received data such as the transaction ticket request, and send the generated service packet to the downstream system 606.
It should be noted that the asynchronous transaction ticket processing method provided by the embodiment of the present invention is generally executed by the ECDS server 605, and accordingly, the asynchronous transaction ticket processing apparatus is generally disposed in the ECDS server 605.
It should be understood that the number of terminal devices, networks, ECDS servers, and downstream systems in fig. 6 are merely illustrative. There may be any number of end devices, networks, ECDS servers, and downstream systems, as desired for an implementation.
Fig. 7 is a schematic structural diagram of a computer system suitable for implementing the terminal device or the server according to the embodiment of the present invention, and as shown in fig. 7, the computer system 700 of the terminal device or the server according to the embodiment of the present invention includes:
a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the system 700 are also stored. The CPU701, the ROM702, and the RAM703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a receiving module, an inspection module, and a composition module. For example, the inspection module may be further described as a module that inspects the preprocessed transaction ticket file through the inspection thread according to a plurality of preset service data templates, determines target service data meeting the requirements of the service data templates, constructs a service task corresponding to the target service data, and adds the service task to a to-be-executed service task table.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: the method is executed asynchronously using a plurality of threads, including a preprocessing thread, an inspection thread, and an execution thread, the method comprising: utilizing the preprocessing thread to receive a transaction bill request, wherein the transaction bill request comprises a transaction bill file, and preprocessing the transaction bill file; according to a plurality of preset business data templates, the preprocessed transaction bill file is checked through the checking thread, target business data meeting the requirements of the business data templates are determined, business tasks corresponding to the target business data are constructed and added to a business task table to be executed; and the execution thread polls the service task table to be executed, generates a service message corresponding to the service task and sends the service message to a downstream system.
According to the technical scheme of the embodiment of the invention, the online transaction is decomposed into a plurality of atomic operations which cannot be separated repeatedly, namely, one online transaction is made into the flow-based operation, and a plurality of threads are utilized for parallel processing, so that even if one transaction bill file has thousands of transactions, the bill processing time can be greatly shortened, waiting is not needed, the user experience is improved, and the competitiveness of a financial institution is improved; and log storage is carried out on the processing failure result, so that abnormal problems can be found and processed in time, and system operation and maintenance personnel can maintain conveniently.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (19)

1. A method of asynchronous processing of transaction tickets, the method being performed asynchronously using a plurality of threads, including a preprocessing thread, an inspection thread, and an execution thread, the method comprising:
utilizing the preprocessing thread to receive a transaction bill request, wherein the transaction bill request comprises a transaction bill file, and preprocessing the transaction bill file;
according to a plurality of preset business data templates, the preprocessed transaction bill file is checked through the checking thread, target business data meeting the requirements of the business data templates are determined, and business tasks corresponding to the target business data are constructed and added to a to-be-executed business task list;
and the execution thread polls the service task table to be executed, generates a service message corresponding to the service task and sends the service message to a downstream system.
2. The method of claim 1, wherein the transaction ticket request further comprises a request time and a request message; the preprocessing the transaction ticket file comprises the following steps:
the preprocessing thread judges whether the request time belongs to a transaction time interval of the downstream system;
and under the condition that whether the request time belongs to a transaction time interval or not, the preprocessing thread performs duplicate checking and tampering verification on the transaction bill file.
3. The method of claim 2, wherein the reviewing the transaction ticket file comprises:
determining whether a system database has a file with the same name as the transaction bill file or not according to the file name of the transaction bill file;
rejecting the transaction instrument request if the system database is in a file of the same name as the transaction instrument file.
4. The method of claim 3, wherein the transaction instrument request further comprises a request message; the tamper verification of the transaction ticket file comprises the following steps:
determining whether the transaction bill file is tampered or not according to the signature field of the request message;
and under the condition that the transaction bill file is not tampered, extracting the business data in the transaction bill file, generating an inspection task corresponding to the business data, and adding the inspection task to the task table to be inspected.
5. The method according to claim 4, wherein the determining whether the transaction ticket document is tampered with based on the signature field of the request message comprises:
performing MD5 encryption on the transaction bill file to determine an encrypted hash value;
comparing the encrypted hash value with the digital abstract of the signature field of the request message, and determining whether the encrypted hash value is the same as the digital abstract;
determining that the transaction ticket file is tampered in the event that the encrypted hash value and the digital digest are different.
6. The method of claim 1, wherein the determining the target service data meeting the service data template requirement comprises:
the inspection thread determines the service type of the service data of the inspection task according to the request message;
the checking thread searches the ECDS database and determines a target business data template corresponding to the business type of the business data;
and the inspection thread inspects the value of the service data by using the target service data template, and screens the target service data meeting the requirements of the target service data template.
7. The method according to claim 6, before the inspecting thread determines the service type of the service data of the inspecting task according to the request packet, further comprising:
polling the task table to be checked determined by the preprocessing thread to obtain the checking task.
8. The method of claim 6, wherein the target service data template is any one of the following service data templates: the system comprises a ticket drawing business data template, an endorsement business data template, a ticket delivery business data template, an acceptance business data template and a pledge business data template.
9. The method of claim 8, wherein the ticketing services data template includes a ticketing amount lower threshold, a ticketing amount upper threshold, and a ticketing date condition relationship.
10. The method of claim 8, wherein the endorsement services data template comprises an endorsement user identification conditional relationship and an endorsement date conditional relationship.
11. The method of claim 1, further comprising, prior to said preprocessing said transaction ticket file:
and the preprocessing thread generates a transaction bill task corresponding to the transaction bill request and stores the transaction bill task into a to-be-processed bill task table.
12. The method of claim 1, 4 or 11, further comprising:
and generating log records corresponding to the to-be-executed service task table, the to-be-checked task table and the to-be-processed bill task table.
13. The method of claim 12, further comprising:
and according to the log records of the to-be-executed service task list, the to-be-checked task list and the to-be-processed bill task list, positioning a thread fault or a task failure result, and restarting a thread corresponding to the thread fault or restarting a corresponding task by using the thread corresponding to the task failure result.
14. The method of claim 6, further comprising:
and setting the execution starting time of the to-be-executed service task table by the execution thread according to different service types requested by the transaction bill, so that each service task is executed at the corresponding execution starting time.
15. The method of claim 4, wherein the transaction ticket file is in a TXT format and the business data in the transaction ticket file is extracted by line.
16. An apparatus for asynchronous processing of transaction tickets, the apparatus being configured to execute asynchronously using a plurality of threads, including a preprocessing thread, an inspection thread, and an execution thread, the apparatus comprising:
the receiving module is used for receiving a transaction bill request by utilizing the preprocessing thread, wherein the transaction bill request comprises a transaction bill file, and preprocessing the transaction bill file;
the inspection module is used for inspecting the preprocessed transaction bill file through the inspection thread according to a plurality of preset service data templates, determining target service data meeting the requirements of the service data templates, constructing service tasks corresponding to the target service data and adding the service tasks to a service task table to be executed;
and the group Wen Mokuai is used for polling the to-be-executed service task table by the execution thread, generating a service message corresponding to the service task, and sending the service message to a downstream system.
17. An electronic device for asynchronous processing of transaction instruments, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-15.
18. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-15.
19. A computer program product comprising a computer program, characterized in that the computer program realizes the method according to any of claims 1-15 when executed by a processor.
CN202211203226.2A 2022-09-29 2022-09-29 Asynchronous processing method and device of transaction bill, electronic equipment and medium Pending CN115619552A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211203226.2A CN115619552A (en) 2022-09-29 2022-09-29 Asynchronous processing method and device of transaction bill, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211203226.2A CN115619552A (en) 2022-09-29 2022-09-29 Asynchronous processing method and device of transaction bill, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN115619552A true CN115619552A (en) 2023-01-17

Family

ID=84860173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211203226.2A Pending CN115619552A (en) 2022-09-29 2022-09-29 Asynchronous processing method and device of transaction bill, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115619552A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116703536A (en) * 2023-08-08 2023-09-05 倍施特科技(集团)股份有限公司 Ticket transaction data processing method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116703536A (en) * 2023-08-08 2023-09-05 倍施特科技(集团)股份有限公司 Ticket transaction data processing method and system
CN116703536B (en) * 2023-08-08 2023-10-24 倍施特科技(集团)股份有限公司 Ticket transaction data processing method and system

Similar Documents

Publication Publication Date Title
CN111127009B (en) Account staggering positioning method and device applied to self-service equipment
CN113094434A (en) Database synchronization method, system, device, electronic equipment and medium
CN111897770A (en) Method and system for initiating litigation request
CN112445866A (en) Data processing method and device, computer readable medium and electronic equipment
CN112348326A (en) Bank business processing method and system
CN114022031A (en) Data processing method, data processing apparatus, electronic device, medium, and computer program product
CN111861745A (en) Service wind control method and device
CN114004217B (en) Message signature element extraction method and system
CN115619552A (en) Asynchronous processing method and device of transaction bill, electronic equipment and medium
CN112734352A (en) Document auditing method and device based on data dimensionality
WO2023197917A1 (en) Payment security management method and apparatus and payment system
CN111400187A (en) Parameter dynamic verification system and method based on customized data source
CN115689570A (en) Business information risk identification method, device, equipment and medium
CN115471228A (en) Financial business certificate checking method, device, equipment and storage medium
CN114841815A (en) Transaction analysis method and device, electronic equipment and computer-readable storage medium
CN114897613A (en) Abnormal transaction behavior detection method and system, electronic device and storage medium
CN114529382A (en) Account checking data processing method and device
CN113592571A (en) Bill issuing early warning method, device, equipment and computer readable medium
CN113537964A (en) Application form processing method, device, storage medium and device
CN111401889B (en) Credit data processing method, device, equipment and medium based on block chain
CN113962640A (en) Method and device for processing bulletin account, storage medium and electronic equipment
CN113538057A (en) Paper bill conversion method, device, equipment and readable storage medium
CN113015170A (en) Short message verification method, device, electronic equipment and medium
CN111857876A (en) Service processing method and device, electronic equipment and computer readable medium
CN113792267B (en) Method and device for checking digital copyright of card surface picture of payment mechanism

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination