CN115760317A - Business order processing method and device, computer equipment and storage medium - Google Patents

Business order processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115760317A
CN115760317A CN202211642978.9A CN202211642978A CN115760317A CN 115760317 A CN115760317 A CN 115760317A CN 202211642978 A CN202211642978 A CN 202211642978A CN 115760317 A CN115760317 A CN 115760317A
Authority
CN
China
Prior art keywords
order
reminding
message
queue
invalidation
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
CN202211642978.9A
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211642978.9A priority Critical patent/CN115760317A/en
Publication of CN115760317A publication Critical patent/CN115760317A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application discloses a business order processing method, a business order processing device, computer equipment and a storage medium, wherein an order reminding queue and an order invalidation queue are created, after an order to be processed is obtained, an order reminding message and an order invalidation message of the order to be processed are respectively added into the order reminding queue and the order invalidation queue, so that the existence duration of the order to be processed can be determined in time, reminding information is sent to a user according to the existence duration of the order to be processed to remind the user of paying in time, and when the existence duration of the order to be processed is too long, the business order to be processed is set as an invalidation business order in an order database, so that the order information of the invalidation order to be processed is deleted from the order database in time in the order database, the existence of a large amount of invalid order data in the order database is reduced, a large amount of computing resources are liberated in time, the waste of storage resources of the order database is saved, and the order processing efficiency is improved.

Description

Business order processing method and device, computer equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a business order processing method and device, computer equipment and a storage medium.
Background
With the continuous development of computer communication technology, a great deal of terminals such as smart phones, tablet computers and notebook computers are widely popularized and applied, the terminals are developed towards diversification and individuation, and increasingly become indispensable terminals for people in life and work.
Currently, the user may generate an order in the above application, for example, the user may submit the order to a shopping system after determining a commodity to be purchased in an online shopping application, or submit the order to a banking system after determining a financial service to be transacted in a banking financial application, so as to perform online shopping or transacting the banking financial service. However, the existing order is generated, and the order is not paid when the order is overtime, and the overtime order is not processed in time, so that a large amount of invalid order data is generated in the order database, and a large amount of computing resources are locked, which causes a large amount of background order data, and waste of storage resources in the order database.
Disclosure of Invention
The embodiment of the invention provides a business order processing method, a business order processing device, computer equipment and a storage medium, wherein an order reminding queue and an order invalidation queue are created, after an order to be processed is obtained, an order reminding message and an order invalidation message of the order to be processed are respectively added into the order reminding queue and the order invalidation queue, so that the existence duration of the order to be processed can be determined in time, reminding information is sent to a user according to the existence duration of the order to be processed to remind the user to pay in time, and when the existence duration of the order to be processed is too long, the business order to be processed is set as an invalidation business order in an order database, so that the order information of the invalidation order to be processed is deleted from the order database in time in the order database, the existence of a large amount of invalid order data in the order database is reduced, a large amount of computing resources are liberated in time, the waste of storage resources of the order database is saved, and the order processing efficiency is improved.
The embodiment of the invention provides a service order processing method, which comprises the following steps:
when a to-be-processed business order is received, obtaining order information of the to-be-processed business order and storing the order information in an order database;
creating an order reminding message and an order invalidation message based on the order information of the service order to be processed, adding the order reminding message to an order reminding queue, and adding the order invalidation message to the order invalidation queue;
when the existence duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, removing the order reminding message from the order reminding queue, generating reminding information corresponding to the to-be-processed business order based on the order reminding message, and sending the reminding information to a business account corresponding to the to-be-processed business order;
when the existence time of the order invalidation message in the order invalidation queue is detected to be longer than the order invalidation time, removing the order invalidation message from the order invalidation queue;
and setting the to-be-processed business order as a failure business order in the order database.
Correspondingly, an embodiment of the present invention further provides a service order processing apparatus, including:
the acquisition unit is used for acquiring the order information of the business order to be processed and storing the order information into the order database when the business order to be processed is received;
the creating unit is used for creating an order reminding message and an order invalidation message based on the order information of the service order to be processed, adding the order reminding message to an order reminding queue and adding the order invalidation message to the order invalidation queue;
the first detection unit is used for removing the order reminding message from the order reminding queue when detecting that the existence duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, generating reminding information corresponding to the service order to be processed based on the order reminding message, and sending the reminding information to a service account corresponding to the service order to be processed;
the second detection unit is used for removing the order invalidation message from the order invalidation queue when the existence time of the order invalidation message in the order invalidation queue is detected to be longer than the order invalidation time;
and the setting unit is used for setting the to-be-processed business order as a failure business order in the order database.
In some embodiments of the present invention, there may also be provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method as described above when executing the computer program.
In some embodiments of the invention, a computer-readable storage medium may also be provided, having stored thereon a computer program which, when run on a computer, causes the computer to perform the steps of the method as described above.
By adopting the embodiment of the application, when the to-be-processed business order is received, the order information of the to-be-processed business order is obtained and stored in the order database; then, creating an order reminding message and an order invalidation message based on the order information of the service order to be processed, adding the order reminding message into an order reminding queue, and adding the order invalidation message into the order invalidation queue; then, when the existence duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, removing the order reminding message from the order reminding queue, generating reminding information corresponding to the to-be-processed business order based on the order reminding message, and sending the reminding information to a business account corresponding to the to-be-processed business order; then, when the existence time of the order invalidation message in the order invalidation queue is detected to be longer than the order invalidation time, removing the order invalidation message from the order invalidation queue; and finally, setting the to-be-processed business order as a failure business order in the order database. According to the method and the device, the order reminding queue and the order invalidation queue are created, after the to-be-processed order is obtained, the order reminding message and the order invalidation message of the to-be-processed order are respectively added into the order reminding queue and the order invalidation queue, so that the existence duration of the to-be-processed order can be determined in time, the reminding message is sent to the user according to the existence duration of the to-be-processed order to remind the user to pay in time, and when the existence duration of the to-be-processed order is too long, the to-be-processed order is set as the invalidation business order in the order database, so that the order information of the invalidation to-be-processed order is deleted from the order database in time in the order database, the existence of a large amount of invalid order data in the order database is reduced, a large amount of computing resources are liberated in time, the waste of storage resources of the order database is saved, and the order processing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a service order processing method according to an embodiment of the present invention;
fig. 2 is a schematic view of an application scenario of the service order processing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a service order processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the application provides a business order processing method and device, computer equipment and a storage medium. Specifically, the service order processing method according to the embodiment of the present application may be executed by a computer device, where the computer device may be a terminal or a server. The terminal may be a terminal device such as a smart phone, a tablet Computer, a notebook Computer, a touch screen, a Personal Computer (PC), a Personal Digital Assistant (PDA), and the like, and may further include a client, which may be an application client, a browser client carrying a control program, or an instant messaging client, and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and a big data and artificial intelligence platform.
The embodiment of the invention provides a service order processing method, a service order processing device, computer equipment and a storage medium. The following describes the service order processing method, apparatus, computer device, and storage medium in detail. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of a business order processing method according to an embodiment of the present application, and a specific flow may include the following steps 101 to 106:
101, when receiving a service order to be processed, obtaining order information of the service order to be processed and storing the order information in an order database.
The order information may include order creation time for creating the to-be-processed service order, a product or service name added in the order, a product or service model, a product or service quantity, an initiator/receiver name of the order, a destination address, and other information, and each to-be-processed service order corresponds to an order identifier.
In order to monitor the existence time of the to-be-processed service order, before the step "when the to-be-processed service order is received, obtaining and storing order information of the to-be-processed service order in an order database", the method may include:
and responding to a queue creating instruction, and respectively creating an order reminding queue and an order invalidation queue, wherein the order reminding queue is provided with a reminding payment time length, and the order invalidation queue is provided with an order invalidation time length.
Specifically, in the embodiment of the present application, two message queues may be respectively created based on a distributed message queue (RabbitMQ), where the two message queues may be an order reminding queue (remindermessageQueue) and an order failure queue (expiremessageQueue), the order reminding queue is used for storing order reminding messages of an order to be processed, and the order failure queue is used for storing order failure messages. The RabbitMQ is a set of high-performance widely-used distributed message queue service software.
Further, when the order reminding queue and the order invalidation queue are created, the expiration time of the tasks in the queues, that is, the survival time of the tasks, can be set for the two queues respectively. Specifically, a task is added in each of an order reminding queue and an order invalidation queue to set x-message-tt, the x-message-tt of the two queues is set as a reminding payment duration and an order invalidation duration respectively, the x-message-tt is used for controlling the survival time of messages in a message queue, if the survival time of the messages is overtime, the messages can be changed into dead letters (dead letters), and after the messages are changed into dead letters, the messages are forwarded to a dead letter queue switch (DLX).
102, creating an order reminding message and an order invalidation message based on the order information of the service order to be processed, adding the order reminding message to an order reminding queue, and adding the order invalidation message to the order invalidation queue.
In the embodiment of the present application, an order reminding message and an order invalidation message may be created based on the order identifier of the to-be-processed service order and the order creation time, the order reminding message is added to an order reminding queue, and the order invalidation message is added to the order invalidation queue.
103, when it is detected that the existing duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, removing the order reminding message from the order reminding queue, generating reminding information corresponding to the to-be-processed service order based on the order reminding message, and sending the reminding information to a service account corresponding to the to-be-processed service order.
In an embodiment, the removing the order reminding message from the order reminding queue when it is detected that the existing duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, generating reminding information corresponding to the to-be-processed service order based on the order reminding message, and sending the reminding information to a service account corresponding to the to-be-processed service order includes:
when the existence duration of the order reminding message in the order reminding queue is larger than the order reminding payment duration, removing the order reminding message from the order reminding queue, generating a first dead-letter message based on the order reminding message, and sending the first dead-letter message to the order reminding dead-letter queue;
when the fact that the order form reminding deadtime queue receives the first deadtime message is detected, an order form payment reminding thread is established, reminding information corresponding to the to-be-processed business order is generated by the order form payment reminding thread based on the order form reminding message, and the reminding information is sent to a business account corresponding to the to-be-processed business order.
Specifically, two consumers can be created in the order processing system through a new consumer, and the two consumers are an order payment reminding message consumer (reminderconsumer) and an order invalidation message consumer (expireconsumer), respectively, wherein the order payment reminding message consumer obtains the order reminding message by monitoring the deadlock message of the order reminding message of the first deadlock queue switch when the deadlock message of the order reminding message appears on the first deadlock queue switch, executes an order payment reminding logic based on the order reminding message, specifically, the reminding message corresponding to the to-be-processed service order is generated based on the order reminding message, and the reminding message is sent to the service account corresponding to the to-be-processed service order.
In order to avoid that the order is subjected to information reminding and invalidation processing after the order is successfully paid, before the step "detecting that the existence duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration", the method may include:
and if the order state of the service order to be processed is detected to be a paid state, deleting the order reminding message of the service order to be processed from the order reminding queue, and deleting the order failure message of the service order to be processed from the order failure queue.
For example, after it is detected that the service order to be processed is paid, whether an order reminding message corresponding to the service order to be processed still exists in an order reminding queue is inquired, and if the order reminding message exists in the order reminding queue, the order reminding message of the service order to be processed is deleted from the order reminding queue. For another example, after it is detected that the pending business order completes payment, it is queried whether an order invalidation message corresponding to the pending business order still exists in the order invalidation queue, and if the order invalidation message exists in the order invalidation queue, the order invalidation message of the pending business order is deleted from the order invalidation queue.
And 104, when detecting that the existence time of the order invalidation message in the order invalidation queue is longer than the order invalidation time, removing the order invalidation message from the order invalidation queue.
In an embodiment, the step of removing the order invalidation message from the order invalidation queue when it is detected that the existence time of the order invalidation message in the order invalidation queue is longer than the order invalidation time, may include:
when the existence time of the order failure message in the order failure queue is longer than the order failure time length, removing the order failure message from the order failure queue, generating a second credit line message based on the order failure message, and sending the second credit line message to the order failure credit line queue;
when the order form failure credit line queue receives the second credit message, an order form failure thread is established, the order form failure thread is adopted to determine that the current order form state of the to-be-processed business order form is a failure state, and the order form information and the current order form state are sent to the order form database, so that the to-be-processed business order form is set as a failure business order form in the order form database.
Specifically, two consumers may be created in the order processing system through a new consumer, and the two consumers are respectively an order payment reminding message consumer (reminderconsumer) and an order failure message consumer (expireconsumer), where the order failure message consumer monitors a deadtime message of an order failure message of the second deadtime queue switch, acquires the order failure message when monitoring a deadtime message of the order failure message on the second deadtime queue switch, and executes an order payment failure logic based on the order failure message, specifically, may determine that a current order state of the to-be-processed service order is a failure state, and send the order information and the current order state to the order database, so as to set the to-be-processed service order as a failure service order in the order database.
And 105, setting the to-be-processed business order as a failure business order in the order database.
In order to reduce the occupation of the order information of the invalid service order on the storage space of the order database, the order information in the order database can be periodically cleaned. After the step of setting the pending service order as a failed service order in the order database, the method may include:
acquiring a target time length of the order database from the end time of the latest database cleaning operation to the current time;
and cleaning the order database according to the preset time length and the target time length so as to delete the order information of the invalid service order from the order database.
Further, the step of performing a cleaning operation on the order database according to the preset duration and the target duration to delete the order information of the failed service order from the order database may include:
if the target time length is the same as the preset time length, generating a database cleaning instruction;
and responding to the database cleaning instruction, cleaning the order database to delete the order information of the failure service order from the order database.
Based on the above description, the service order processing method of the present application will be further described below by way of example. The following description will take an example of the application of the service order processing method in a specific implementation scenario, where the specific application scenario is as follows:
(1) The computer device may create two message queues, respectively, based on a distributed message queue (RabbitMQ), which may be an order reminder queue (remindermessageQueue) for storing order reminder messages for the order to be processed and an order failure queue (expiremessageQueue) for storing order failure messages, respectively. When the order reminding queue and the order invalidation queue are created, the expiration time of the tasks in the queues, namely the survival time of the tasks, can be set for the two queues respectively. Specifically, a task is added in each of an order reminding queue and an order invalidation queue to set x-message-tt, the x-message-tt of the two queues is set as a reminding payment duration and an order invalidation duration respectively, the x-message-tt is used for controlling the survival time of messages in a message queue, if the survival time of the messages is overtime, the messages can be changed into dead letters (dead letters), and after the messages are changed into dead letters, the messages are forwarded to a dead letter queue switch (DLX).
(2) The method comprises the steps that a user can create a to-be-processed service order after selecting a related product in a target application program on terminal equipment, and sends the to-be-processed service order to an order processing system, computer equipment receives the to-be-processed service order, obtains order information of the to-be-processed service order and stores the order information in an order database, wherein the order information can comprise order creation time of the to-be-processed service order creation, product or service names added in the order, product or service models, product or service quantity, and initiator/receiver names and target addresses of the order, and each to-be-processed service order corresponds to an order identifier. The order identifier can be used to search the order database for the corresponding business order.
(3) The computer device may create an order reminding message and an order invalidation message based on the order identification of the to-be-processed service order and the order creation time, add the order reminding message to an order reminding queue, and add the order invalidation message to the order invalidation queue.
(4) When computer equipment detects that the existing time length of the order reminding message in the order reminding queue is longer than the order reminding payment time length, removing the order reminding message from the order reminding queue, generating a first deadlock message based on the order reminding message, and sending the first deadlock message to the order reminding deadlock queue. When the fact that the order form reminding deception queue receives the first deception message is detected, an order form payment reminding thread is established, reminding information corresponding to the to-be-processed business order is generated by the order form payment reminding thread based on the order form reminding message, and the reminding information is sent to a business account corresponding to the to-be-processed business order.
(5) And when the computer equipment detects that the existence time of the order failure message in the order failure queue is longer than the order failure time, removing the order failure message from the order failure queue, generating a second credit death message based on the order failure message, and sending the second credit death message to the order failure credit death queue. When the order form failure credit line queue receives the second credit message, an order form failure thread is established, the order form failure thread is adopted to determine that the current order form state of the to-be-processed business order form is a failure state, and the order form information and the current order form state are sent to the order form database, so that the to-be-processed business order form is set as a failure business order form in the order form database.
Based on the above description, the service order processing method of the present application will be further described below by way of example. The following description will take an example of the application of the service order processing method in a specific implementation scenario, where the specific application scenario is as follows:
(1) The computer device may create two message queues, respectively, based on a distributed message queue (RabbitMQ), which may be an order reminder queue (remindermessageQueue) for storing order reminder messages for the order to be processed and an order failure queue (expiremessageQueue) for storing order failure messages, respectively. When the order reminding queue and the order invalidation queue are created, the expiration time of the tasks in the queues, namely the survival time of the tasks, can be set for the two queues respectively. Specifically, a task is added in each of an order reminding queue and an order invalidation queue to set x-message-tt, the x-message-tt of the two queues is set as a reminding payment duration and an order invalidation duration respectively, the x-message-tt is used for controlling the survival time of messages in a message queue, if the survival time of the messages is overtime, the messages can be changed into dead letters (dead letters), and after the messages are changed into dead letters, the messages are forwarded to a dead letter queue switch (DLX).
(2) The method comprises the steps that a user can create a to-be-processed service order after selecting a related product in a target application program on terminal equipment, and sends the to-be-processed service order to an order processing system, computer equipment receives the to-be-processed service order, obtains order information of the to-be-processed service order and stores the order information in an order database, wherein the order information can comprise order creation time of the to-be-processed service order creation, product or service names added in the order, product or service models, product or service quantity, and initiator/receiver names and target addresses of the order, and each to-be-processed service order corresponds to an order identifier. The order identifier can be used to search the order database for the corresponding business order.
(3) The computer device may create an order reminding message and an order invalidation message based on the order identifier of the to-be-processed service order and the order creation time, add the order reminding message to an order reminding queue, and add the order invalidation message to the order invalidation queue.
(4) And if the computer equipment detects that the order state of the service order to be processed is the paid state, deleting the order reminding message of the service order to be processed from the order reminding queue and deleting the order invalidation message of the service order to be processed from the order invalidation queue. Specifically, after detecting that the service order to be processed is paid, the computer device queries whether an order reminding message corresponding to the service order to be processed still exists in an order reminding queue, and deletes the order reminding message of the service order to be processed from the order reminding queue if the order reminding message exists in the order reminding queue. And simultaneously, inquiring whether the order invalidation message corresponding to the to-be-processed order still exists in the order invalidation queue, and if the order invalidation message exists in the order invalidation queue, deleting the order invalidation message of the to-be-processed business order from the order invalidation queue.
Based on the above description, the service order processing method of the present application will be further described below by way of example. The following description will take an application of the service order processing method in a specific implementation scenario as an example, please refer to fig. 2, and the specific application scenario is as follows:
(1) The computer device may create two message queues, respectively, based on a distributed message queue (RabbitMQ), which may be an order reminder queue (remindermessageQueue) for storing order reminder messages for the order to be processed and an order failure queue (expiremessageQueue) for storing order failure messages, respectively. When the order reminding queue and the order invalidation queue are created, the expiration time of the tasks in the queues, namely the survival time of the tasks, can be set for the two queues respectively. Specifically, a task is added in each of an order reminding queue and an order invalidation queue to set x-message-tt, the x-message-tt of the two queues is set as a reminding payment duration and an order invalidation duration respectively, the x-message-tt is used for controlling the survival time of messages in a message queue, if the survival time of the messages is overtime, the messages can be changed into dead letters (dead letters), and after the messages are changed into dead letters, the messages are forwarded to a dead letter queue switch (DLX).
(2) The method comprises the steps that a user can create a to-be-processed service order after selecting a related product in a target application program on terminal equipment, and sends the to-be-processed service order to an order processing system, computer equipment receives the to-be-processed service order, obtains order information of the to-be-processed service order and stores the order information in an order database, wherein the order information can comprise order creation time of the to-be-processed service order creation, product or service names added in the order, product or service models, product or service quantity, and initiator/receiver names and target addresses of the order, and each to-be-processed service order corresponds to an order identifier. The order identifier can be used to search the order database for the corresponding business order.
(3) The computer device may create an order reminding message and an order invalidation message based on the order identifier of the to-be-processed service order and the order creation time, add the order reminding message to an order reminding queue, and add the order invalidation message to the order invalidation queue.
(4) When computer equipment detects that the existing time length of the order reminding message in the order reminding queue is longer than the order reminding payment time length, removing the order reminding message from the order reminding queue, generating a first deadlock message based on the order reminding message, and sending the first deadlock message to the order reminding deadlock queue. When the fact that the order form reminding deadtime queue receives the first deadtime message is detected, an order form payment reminding thread is established, reminding information corresponding to the to-be-processed business order is generated by the order form payment reminding thread based on the order form reminding message, and the reminding information is sent to a business account corresponding to the to-be-processed business order.
(5) When the computer equipment detects that the existing time of the order failure message in the order failure queue is longer than the order failure time, removing the order failure message from the order failure queue, generating a second dead-letter message based on the order failure message, and sending the second dead-letter message to the order failure dead-letter queue. When the order form failure credit line queue receives the second credit message, an order form failure thread is established, the order form failure thread is adopted to determine that the current order form state of the to-be-processed business order form is a failure state, and the order form information and the current order form state are sent to the order form database, so that the to-be-processed business order form is set as a failure business order form in the order form database.
(6) The computer device can acquire a target time length from the end time of the latest database cleaning operation to the current time of the order database, and perform cleaning operation on the order database according to a preset time length and the target time length so as to delete order information of the failure service order from the order database. Specifically, if the target duration is the same as the preset duration, a database cleaning instruction is generated; and responding to the database cleaning instruction, cleaning the order database to delete the order information of the failure service order from the order database.
To sum up, the embodiment of the present application provides a method for processing a service order, which includes, when a service order to be processed is received, acquiring order information of the service order to be processed and storing the order information in an order database; then, creating an order reminding message and an order invalidation message based on the order information of the service order to be processed, adding the order reminding message into an order reminding queue, and adding the order invalidation message into the order invalidation queue; then, when the existence duration of the order reminding message in the order reminding queue is detected to be longer than the order reminding payment duration, removing the order reminding message from the order reminding queue, generating reminding information corresponding to the to-be-processed service order based on the order reminding message, and sending the reminding information to a service account corresponding to the to-be-processed service order; then, when the existence time of the order invalidation message in the order invalidation queue is detected to be longer than the order invalidation time, removing the order invalidation message from the order invalidation queue; and finally, setting the to-be-processed business order as a failure business order in the order database. According to the method and the device, the order reminding queue and the order invalidation queue are created, after the to-be-processed order is obtained, the order reminding message and the order invalidation message of the to-be-processed order are respectively added into the order reminding queue and the order invalidation queue, so that the existence duration of the to-be-processed order can be determined in time, the reminding message is sent to the user according to the existence duration of the to-be-processed order to remind the user to pay in time, and when the existence duration of the to-be-processed order is too long, the to-be-processed order is set as the invalidation business order in the order database, so that the order information of the invalidation to-be-processed order is deleted from the order database in time in the order database, the existence of a large amount of invalid order data in the order database is reduced, a large amount of computing resources are liberated in time, the waste of storage resources of the order database is saved, and the order processing efficiency is improved.
In order to better implement the method, correspondingly, the embodiment of the invention further provides a service order processing device, and the service order processing device is specifically integrated in a terminal or a server.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a service order processing apparatus according to an embodiment of the present application, where the service order processing apparatus includes:
the acquiring unit 201 is configured to acquire order information of a to-be-processed service order and store the order information in an order database when the to-be-processed service order is received;
a creating unit 202, configured to create an order reminding message and an order invalidation message based on the order information of the to-be-processed service order, add the order reminding message to an order reminding queue, and add the order invalidation message to the order invalidation queue;
a first detecting unit 203, configured to remove the order reminding message from the order reminding queue when it is detected that the existence duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, generate reminding information corresponding to the to-be-processed service order based on the order reminding message, and send the reminding information to a service account corresponding to the to-be-processed service order;
a second detecting unit 204, configured to remove the order invalidation message from the order invalidation queue when it is detected that the existence time of the order invalidation message in the order invalidation queue is longer than the order invalidation time;
a setting unit 205, configured to set the to-be-processed service order as a failure service order in the order database.
In some embodiments, the service order processing apparatus includes:
the acquisition subunit is used for acquiring the target time length of the order database from the latest finishing time of the database cleaning operation to the current time;
and the first processing subunit is used for carrying out cleaning operation on the order database according to the preset time length and the target time length so as to delete the order information of the invalid service order from the order database.
In some embodiments, the service order processing apparatus includes:
the generating subunit is used for generating a database cleaning instruction if the target duration is the same as the preset duration;
and the first response subunit is used for responding to the database cleaning instruction, performing cleaning operation on the order database, and deleting the order information of the failure service order from the order database.
In some embodiments, the service order processing apparatus includes:
and the second response subunit is used for responding to the queue creating instruction and respectively creating an order reminding queue and an order failure queue, wherein the order reminding queue is provided with a reminding payment time length, and the order failure queue is provided with an order failure time length.
In some embodiments, the service order processing apparatus includes:
the second processing subunit is used for removing the order reminding message from the order reminding queue when detecting that the existence duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, generating a first credit line message based on the order reminding message, and sending the first credit line message to the order reminding credit line queue;
the second processing subunit is further configured to, when it is detected that the order form reminding confident queue receives the first confident message, create an order form payment reminding thread, generate reminding information corresponding to the to-be-processed service order based on the order form reminding message by using the order form payment reminding thread, and send the reminding information to a service account corresponding to the to-be-processed service order.
In some embodiments, the service order processing apparatus includes:
the third processing subunit is configured to, when it is detected that the existence time of the order invalidation message in the order invalidation queue is longer than the order invalidation time, remove the order invalidation message from the order invalidation queue, generate a second deadlock message based on the order invalidation message, and send the second deadlock message to the order invalidation deadlock queue;
the third processing subunit is further configured to, when it is detected that the order form invalidation credit standing queue receives the second credit standing message, create an order form invalidation thread, determine, by using the order form invalidation thread, that the current order form state of the to-be-processed service order form is a failure state, and send the order form information and the current order form state to the order form database, so as to set the to-be-processed service order form as a failure service order form in the order form database.
In some embodiments, the service order processing apparatus includes:
and the fourth processing subunit is configured to delete the order reminding message of the to-be-processed service order from the order reminding queue and delete the order invalidation message of the to-be-processed service order from the order invalidation queue if it is detected that the order state of the to-be-processed service order is the paid state.
The embodiment of the application provides a business order processing device, which obtains order information of a business order to be processed and stores the order information in an order database when the business order to be processed is received through an obtaining unit 201; the creating unit 202 creates an order reminding message and an order invalidation message based on the order information of the to-be-processed service order, adds the order reminding message to an order reminding queue, and adds the order invalidation message to the order invalidation queue; when detecting that the existing duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, the first detection unit 203 removes the order reminding message from the order reminding queue, generates reminding information corresponding to the to-be-processed service order based on the order reminding message, and sends the reminding information to a service account corresponding to the to-be-processed service order; when detecting that the existing time of the order invalidation message in the order invalidation queue is longer than the order invalidation time, the second detection unit 204 removes the order invalidation message from the order invalidation queue; the setting unit 205 sets the to-be-processed service order as a failed service order in the order database. According to the method and the device, the order reminding queue and the order invalidation queue are created, after the to-be-processed order is obtained, the order reminding message and the order invalidation message of the to-be-processed order are respectively added into the order reminding queue and the order invalidation queue, so that the existence duration of the to-be-processed order can be determined in time, the reminding message is sent to the user according to the existence duration of the to-be-processed order to remind the user to pay in time, and when the existence duration of the to-be-processed order is too long, the to-be-processed order is set as the invalidation business order in the order database, so that the order information of the invalidation to-be-processed order is deleted from the order database in time in the order database, the existence of a large amount of invalid order data in the order database is reduced, a large amount of computing resources are liberated in time, the waste of storage resources of the order database is saved, and the order processing efficiency is improved.
In addition, an embodiment of the present invention further provides a computer device, where the computer device may be a terminal or a server, as shown in fig. 4, which shows a schematic structural diagram of the computer device according to the embodiment of the present invention, and specifically:
the computer device may include components such as a processor 301 of one or more processing cores, memory 302 of one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 4 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 301 is a control center of the computer device, connects various parts of the entire computer device by various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 302 and calling data stored in the memory 302, thereby monitoring the computer device as a whole. Optionally, processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301.
The memory 302 may be used to store software programs and modules, and the processor 301 executes various functional applications and data processing by operating the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
The computer device further comprises a power supply 303 for supplying power to the various components, and preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, so that functions of managing charging, discharging, power consumption and the like can be realized through the power management system. The power supply 303 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 304, the input unit 304 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 301 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the application programs stored in the memory 302, thereby implementing various functions as follows:
when a to-be-processed business order is received, obtaining order information of the to-be-processed business order and storing the order information in an order database;
creating an order reminding message and an order invalidation message based on the order information of the service order to be processed, adding the order reminding message to an order reminding queue, and adding the order invalidation message to the order invalidation queue;
when the existence duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, removing the order reminding message from the order reminding queue, generating reminding information corresponding to the to-be-processed business order based on the order reminding message, and sending the reminding information to a business account corresponding to the to-be-processed business order;
when the existence time of the order invalidation message in the order invalidation queue is detected to be longer than the order invalidation time, removing the order invalidation message from the order invalidation queue;
and setting the to-be-processed business order as a failure business order in the order database.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention further provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the method provided in various optional implementation manners in the embodiment of the present invention.
According to an aspect of the application, there is also provided a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations in the embodiments described above.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any service order processing method provided in the embodiment of the present application, beneficial effects that can be achieved by any service order processing method provided in the embodiment of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The method, the apparatus, the computer device and the storage medium for processing the service order provided by the embodiment of the present invention are described in detail, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for processing a service order is characterized by comprising the following steps:
when a to-be-processed business order is received, obtaining order information of the to-be-processed business order and storing the order information in an order database;
creating an order reminding message and an order invalidation message based on the order information of the service order to be processed, adding the order reminding message to an order reminding queue, and adding the order invalidation message to the order invalidation queue;
when the existence duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, removing the order reminding message from the order reminding queue, generating reminding information corresponding to the to-be-processed business order based on the order reminding message, and sending the reminding information to a business account corresponding to the to-be-processed business order;
when the existence time of the order invalidation message in the order invalidation queue is longer than the order invalidation time, removing the order invalidation message from the order invalidation queue;
and setting the to-be-processed business order as a failure business order in the order database.
2. The service order processing method according to claim 1, wherein after setting the service order to be processed as a failure service order in the order database, further comprising:
acquiring a target time length of the order database from the end time of the latest database cleaning operation to the current time;
and cleaning the order database according to the preset time length and the target time length so as to delete the order information of the failure service order from the order database.
3. The service order processing method according to claim 2, wherein the performing a cleaning operation on the order database according to a preset duration and the target duration to delete order information of a failed service order from the order database comprises:
if the target duration is the same as the preset duration, generating a database cleaning instruction;
and responding to the database cleaning instruction, cleaning the order database to delete the order information of the failure service order from the order database.
4. The service order processing method according to claim 1, wherein before acquiring and storing order information of the service order to be processed in the order database when the service order to be processed is received, the method further comprises:
and responding to a queue creating instruction, and respectively creating an order reminding queue and an order invalidation queue, wherein the order reminding queue is provided with a reminding payment time length, and the order invalidation queue is provided with an order invalidation time length.
5. The method according to claim 1, wherein when it is detected that the existing duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, removing the order reminding message from the order reminding queue, generating reminding information corresponding to the to-be-processed service order based on the order reminding message, and sending the reminding information to a service account corresponding to the to-be-processed service order, the method comprises:
when the existence duration of the order reminding message in the order reminding queue is larger than the order reminding payment duration, removing the order reminding message from the order reminding queue, generating a first dead-letter message based on the order reminding message, and sending the first dead-letter message to the order reminding dead-letter queue;
when the fact that the order form reminding deception queue receives the first deception message is detected, an order form payment reminding thread is established, reminding information corresponding to the to-be-processed business order is generated by the order form payment reminding thread based on the order form reminding message, and the reminding information is sent to a business account corresponding to the to-be-processed business order.
6. The business order processing method according to claim 1, wherein said removing the order invalidation message from the order invalidation queue when detecting that the existence time of the order invalidation message in the order invalidation queue is longer than the order invalidation time comprises:
when the existence time of the order failure message in the order failure queue is longer than the order failure time length, removing the order failure message from the order failure queue, generating a second credit line message based on the order failure message, and sending the second credit line message to the order failure credit line queue;
when the order form failure credit line queue receives the second credit message, an order form failure thread is established, the order form failure thread is adopted to determine that the current order form state of the to-be-processed business order form is a failure state, and the order form information and the current order form state are sent to the order form database, so that the to-be-processed business order form is set as a failure business order form in the order form database.
7. The method of processing a service order according to claim 1, before detecting that the length of time that the order alert message exists in the order alert queue is longer than the length of time that the order alert message is paid for, further comprising:
and if the order state of the service order to be processed is detected to be a paid state, deleting the order reminding message of the service order to be processed from the order reminding queue, and deleting the order invalidation message of the service order to be processed from the order invalidation queue.
8. A business order processing apparatus, comprising:
the acquisition unit is used for acquiring the order information of the business order to be processed and storing the order information into the order database when the business order to be processed is received;
the creating unit is used for creating an order reminding message and an order invalidation message based on the order information of the service order to be processed, adding the order reminding message to an order reminding queue and adding the order invalidation message to the order invalidation queue;
the first detection unit is used for removing the order reminding message from the order reminding queue when detecting that the existence duration of the order reminding message in the order reminding queue is longer than the order reminding payment duration, generating reminding information corresponding to the service order to be processed based on the order reminding message, and sending the reminding information to a service account corresponding to the service order to be processed;
the second detection unit is used for removing the order invalidation message from the order invalidation queue when the existence time of the order invalidation message in the order invalidation queue is detected to be longer than the order invalidation time;
and the setting unit is used for setting the to-be-processed business order as a failure business order in the order database.
9. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of processing a service order according to any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when the computer program is run on a computer, causes the computer to carry out the steps of the service order processing method according to any of claims 1 to 7.
CN202211642978.9A 2022-12-20 2022-12-20 Business order processing method and device, computer equipment and storage medium Pending CN115760317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211642978.9A CN115760317A (en) 2022-12-20 2022-12-20 Business order processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211642978.9A CN115760317A (en) 2022-12-20 2022-12-20 Business order processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115760317A true CN115760317A (en) 2023-03-07

Family

ID=85346892

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211642978.9A Pending CN115760317A (en) 2022-12-20 2022-12-20 Business order processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115760317A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708120A (en) * 2023-04-12 2023-09-05 友帮信互联网技术(北京)有限公司 Service method and device for time online sharing service

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708120A (en) * 2023-04-12 2023-09-05 友帮信互联网技术(北京)有限公司 Service method and device for time online sharing service
CN116708120B (en) * 2023-04-12 2024-02-23 友帮信互联网技术(北京)有限公司 Service method and device for time online sharing service

Similar Documents

Publication Publication Date Title
CN106357811B (en) A kind of delet method of Backup Data, apparatus and system
CN113329069B (en) Instant messaging method, system and computing device
CN113656179B (en) Scheduling method and device of cloud computing resources, electronic equipment and storage medium
CN109947408B (en) Message pushing method and device, storage medium and electronic equipment
CN110751458B (en) Business approval method, device and system
CN108491264A (en) A kind of unified resource retrieval management method suitable for isomery cloud
CN115760317A (en) Business order processing method and device, computer equipment and storage medium
CN110427134A (en) Data processing method, device, equipment and the readable storage medium storing program for executing of instant messaging
CN112948081B (en) Method, device, equipment and storage medium for processing tasks in delayed mode
CN112965799B (en) Task state prompting method and device, electronic equipment and medium
CN104601448A (en) Method and device for handling virtual card
CN113034178A (en) Multi-system integral calculation method and device, terminal equipment and storage medium
CN111598571A (en) Transaction processing method, device, equipment and storage medium of block chain
CN115563160A (en) Data processing method, data processing device, computer equipment and computer readable storage medium
CN115809324A (en) Business pushing method, device, server and computer readable storage medium
US20090164523A1 (en) System and method for sending messages
CN115905322A (en) Service processing method and device, electronic equipment and storage medium
CN112258244A (en) Method, device, equipment and storage medium for determining task of target object
CN112732413B (en) Exception handling method, exception handling device, computer equipment and computer readable storage medium
CN114979045B (en) Group chat robot communication method, device, equipment and medium
CN112767159B (en) Online transaction processing method and device
US10269056B2 (en) Request processing system, request processing method, program, and information storage medium
CN110473036B (en) Method and device for generating order number
CN110737537B (en) Contract message processing method and device, electronic equipment and storage medium
CN114238674A (en) Method and system for providing historical document data

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