CN116757689A - Request processing method and device, electronic equipment and computer readable storage medium - Google Patents

Request processing method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN116757689A
CN116757689A CN202310618029.5A CN202310618029A CN116757689A CN 116757689 A CN116757689 A CN 116757689A CN 202310618029 A CN202310618029 A CN 202310618029A CN 116757689 A CN116757689 A CN 116757689A
Authority
CN
China
Prior art keywords
message
processing
processed
target
account
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
CN202310618029.5A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310618029.5A priority Critical patent/CN116757689A/en
Publication of CN116757689A publication Critical patent/CN116757689A/en
Pending legal-status Critical Current

Links

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a request processing method and device, electronic equipment and a computer readable storage medium, which can be applied to the technical field of big data, the technical field of information security and the technical field of finance. The request processing method comprises the following steps: in response to a resource operation request for a target user, encapsulating the resource operation request and the first target account as a first message to be processed using the request processing cluster if it is determined that the plurality of accounts associated with the target user includes the first target account; distributing the first message to be processed to a first message processing queue by using the request processing cluster; and acquiring a first message to be processed from the first message processing queue by using the first business operation cluster in a real-time consumption mode so as to perform resource operation processing on the first message to be processed.

Description

Request processing method and device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of big data technology, the field of information security technology, and the field of finance technology, and in particular, to a request processing method, apparatus, device, medium, and program product.
Background
Currently, when an enterprise completes a specific type of large-batch transaction operation, a method of timing batch execution is mostly adopted, and the operation of the transaction business is performed in a timing batch mode in a fixed time period on a specified operation day.
In the process of implementing the disclosed concept, the inventor finds that at least the following problems exist in the related art: the method for executing the transfer transaction in the timed batch has some problems, such as the situation that background processing operation is blocked under the condition that the data amount to be processed is large, the real-time account checking of the transfer transaction cannot be realized, and the efficiency is low; in addition, in the process of operating account data, the user needs to pay attention to whether other transaction operations exist in the account at the same time, and the user can operate after data confirmation so as to avoid error of the account data, so that the complexity of operation is further improved, and the processing efficiency of the system is reduced.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a request processing method, apparatus, device, medium, and program product.
In one aspect of the present disclosure, a request processing method is provided, including:
in response to a resource operation request for a target user, when a request processing cluster is utilized to determine that a first target account is included in a plurality of accounts associated with the target user, the resource operation request and the first target account are packaged into a first message to be processed, wherein the account type of the first target account belongs to a first preset account type, and the operation type of the first target account comprises a preset operation type;
Distributing the first message to be processed to a first message processing queue by using the request processing cluster;
and acquiring a first message to be processed from the first message processing queue by using the first business operation cluster in a real-time consumption mode so as to perform resource operation processing on the first message to be processed.
According to an embodiment of the present disclosure, further comprising:
acquiring a first message processing result obtained after processing a first message to be processed by using a first service operation cluster, so as to determine whether a resource operation request for a target user is completed or not according to the first message processing result;
under the condition that the resource operation request aiming at the target user is not completed, the first message processing result and the first message to be processed are packaged into a queue transferring instruction, and the queue transferring instruction is sent to a request processing cluster;
responding to the queue transferring instruction, and distributing the first message to be processed to a second message processing queue by using the request processing cluster;
and acquiring a first message to be processed from the second message processing queue by using the second business operation cluster in a timing consumption mode, and performing resource operation processing on the first message to be processed.
According to an embodiment of the present disclosure, performing resource operation processing on a first message to be processed using a second business operation cluster includes:
Performing resource operation processing on a first target account indicated by a first message to be processed;
determining whether an associated account having an association relationship with the first target account exists in a plurality of accounts associated with the target user under the condition that the resource operation processing for the first target account fails;
and when the associated account exists in the plurality of accounts, performing resource operation processing on the associated account.
According to an embodiment of the present disclosure, the above method further includes:
when the plurality of accounts associated with the target user do not comprise the first target account but comprise the second target account, encapsulating the resource operation request and the second target account into a second message to be processed by using the request processing cluster, and distributing the second message to be processed to a second message processing queue, wherein the account type of the second target account belongs to a second preset account type, and the operation type of the second target account comprises a preset operation type;
and acquiring a second message to be processed from the second message processing queue by using a second service operation cluster in a timing consumption mode, and performing resource operation processing on the second message to be processed.
According to an embodiment of the present disclosure, the above method further includes:
Determining whether target resource operation data for a target user exists in a database before performing resource operation processing on a first message to be processed or before performing resource operation processing on a second message to be processed;
and in the case that the target resource operation data aiming at the target user exists in the database, terminating the resource operation processing aiming at the first message to be processed or terminating the resource operation processing aiming at the second message to be processed.
According to an embodiment of the present disclosure, after distributing the first message to be processed to the first message processing queue, the method further includes configuring a processing sequence number for the first message to be processed;
the obtaining the first message to be processed from the first message processing queue so as to perform resource operation processing on the first message to be processed comprises the following steps:
and acquiring the first message to be processed from the first message processing queue based on the processing sequence number so as to perform resource operation processing on the first message to be processed.
According to an embodiment of the present disclosure, the first service operation cluster includes a plurality of operation nodes, each of which is configured with a node number;
based on the processing sequence number, acquiring the first message to be processed from the first message processing queue, so as to perform resource operation processing on the first message to be processed, wherein the method comprises the following steps:
Taking the processing sequence numbers for the total number of the plurality of operation nodes to obtain a target remainder corresponding to the processing sequence numbers;
determining a target operation node corresponding to the target remainder from a plurality of operation nodes based on a preset mapping relation between the target remainder and the node number;
and acquiring the first message to be processed from the first message processing queue by utilizing the target operation node so as to perform resource operation processing on the second message to be processed.
Another aspect of the present disclosure provides a message processing system, comprising:
a request processing cluster, configured to, in response to a resource operation request for a target user, package the resource operation request and a first target account into a first message to be processed when it is determined that a first target account is included in a plurality of accounts associated with the target user, where an account type of the first target account belongs to a first predetermined account type, and an operation type of the first target account includes a predetermined operation type;
a first message processing queue for receiving a first message to be processed originating from a request processing cluster;
and the first business operation cluster is used for acquiring the first message to be processed from the first message processing queue in a real-time consumption mode so as to perform resource operation processing on the first message to be processed.
According to an embodiment of the present disclosure, wherein:
the request processing cluster is further used for packaging the resource operation request and the second target account into a second message to be processed when the first target account is not included in the plurality of accounts associated with the target user but the second target account is included in the plurality of accounts associated with the target user;
the system further comprises:
a second message processing queue for receiving a second message to be processed originating from the request processing cluster;
and the second business operation cluster is used for acquiring a second message to be processed from the second message processing queue in a timing consumption mode and carrying out resource operation processing on the second message to be processed.
Another aspect of the present disclosure provides a message processing apparatus, comprising:
the first packaging module is used for responding to a resource operation request aiming at a target user, and packaging the resource operation request and a first target account into a first message to be processed when the request processing cluster determines that a plurality of accounts associated with the target user comprise the first target account, wherein the account type of the first target account belongs to a first preset account type, and the operation type of the first target account comprises a preset operation type;
The first distributing module is used for distributing the first message to be processed to the first message processing queue by using the request processing cluster;
and the real-time processing module is used for acquiring a first message to be processed from the first message processing queue by using the first business operation cluster in a real-time consumption mode so as to perform resource operation processing on the first message to be processed.
According to an embodiment of the present disclosure, the above apparatus further includes:
the first determining module is used for obtaining a first message processing result obtained after processing the first message to be processed by utilizing the first business operation cluster so as to determine whether the resource operation request for the target user is completed or not according to the first message processing result;
the second encapsulation module is used for encapsulating the first message processing result and the first message to be processed into a queue transferring instruction and sending the queue transferring instruction to the request processing cluster under the condition that the resource operation request aiming at the target user is not completed;
the second distributing module is used for responding to the queue transferring instruction and distributing the first message to be processed to a second message processing queue by utilizing the request processing cluster;
the first timing processing module is used for acquiring a first message to be processed from the second message processing queue by using the second service operation cluster in a timing consumption mode, and performing resource operation processing on the first message to be processed. According to an embodiment of the present disclosure, the first timing processing module includes:
The first processing unit is used for carrying out resource operation processing on a first target account indicated by the first message to be processed;
a determining unit configured to determine whether an associated account having an association relationship with a first target account exists among a plurality of accounts associated with the target user in a case where resource operation processing for the first target account fails;
and the first processing unit is used for carrying out resource operation processing on the associated accounts under the condition that the associated accounts exist in the plurality of accounts.
According to an embodiment of the present disclosure, the above apparatus further includes:
a third encapsulation module, configured to encapsulate, when it is determined that the plurality of accounts associated with the target user does not include the first target account but includes the second target account, the resource operation request and the second target account into a second message to be processed by using the request processing cluster, where an account type of the second target account belongs to a second predetermined account type, and an operation type of the second target account includes a predetermined operation type;
the third distributing module is used for distributing the second message to be processed to the second message processing queue;
the second timing processing module is used for acquiring a second message to be processed from the second message processing queue by using a second service operation cluster in a timing consumption mode, and performing resource operation processing on the second message to be processed.
According to an embodiment of the present disclosure, the above apparatus further includes:
a second determining module, configured to determine whether target resource operation data for a target user exists in the database before performing resource operation processing on the first message to be processed or before performing resource operation processing on the second message to be processed;
and the termination module is used for terminating the resource operation processing for the first message to be processed or terminating the resource operation processing for the second message to be processed under the condition that the target resource operation data for the target user exist in the database.
According to an embodiment of the present disclosure, the apparatus further includes a configuration module configured to configure a processing sequence number for a first message to be processed after distributing the first message to be processed to the first message processing queue;
the real-time processing module comprises:
and the real-time processing unit is used for acquiring the first message to be processed from the first message processing queue based on the processing sequence number so as to perform resource operation processing on the first message to be processed.
According to an embodiment of the present disclosure, the first service operation cluster includes a plurality of operation nodes, each of which is configured with a node number;
The real-time processing unit includes:
the remainder taking subunit is used for taking the processing sequence number for the total number of the plurality of operation nodes to obtain a target remainder corresponding to the processing sequence number;
a determining subunit, configured to determine, from the plurality of operation nodes, a target operation node corresponding to the target remainder based on a preset mapping relationship between the target remainder and the node number;
and the processing subunit is used for acquiring the first message to be processed from the first message processing queue by utilizing the target operation node so as to perform resource operation processing on the second message to be processed.
Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the request processing method described above.
Another aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described request processing method.
Another aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described request processing method.
According to the embodiment of the disclosure, by firstly judging whether the plurality of accounts associated with the target user include the first target account (can refer to the account type of the special function), and processing the first target account of the special function only when the first target account is included, the first target account can be used as the target account for resource operation, for example, the special account can be configured for the user to be used for the transfer transaction operation of the preset type, and in the process of operating account data, other transaction operation processing of the account is not required to be completed, so that the transfer transaction service processing logic is simplified, and the processing efficiency is improved. Further, the first service operation cluster processes resource operation information in time in a mode of non-fixed time and non-fixed scene quasi-real-time proxy service batch uninterrupted circulation execution processing, so that service processing efficiency is improved. In addition, according to the embodiment of the disclosure, the first message processing queue is set as the middleware, so that asynchronous processing of the messages is realized, decoupling between systems is realized, and the data processing efficiency of the system is improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a request processing method, apparatus, device, medium and program product according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a request processing method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a system diagram of a request processing method according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a block diagram of a request processing apparatus according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a request processing apparatus according to another embodiment of the present disclosure;
fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a request processing method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc., of the data involved (including, but not limited to, user personal information) all comply with relevant legal regulations, are used for legal purposes, and do not violate well-known. In particular, necessary measures are taken for personal information of the user, illegal access to personal information data of the user is prevented, and personal information security, network security and national security of the user are maintained.
In embodiments of the present disclosure, the user's authorization or consent is obtained before the user's personal information is obtained or collected.
It should be noted that the request processing method, apparatus, device, medium and program product of the embodiments of the present disclosure are applicable to the big data technical field, the information security technical field, and the financial technical field, and may also be applicable to any field other than the big data technical field, the information security technical field, and the financial technical field, and the application fields of the request processing method, apparatus, device, medium and program product of the embodiments of the present disclosure are not limited.
The embodiment of the disclosure provides a request processing method, which comprises the following steps:
in response to a resource operation request for a target user, when a request processing cluster is utilized to determine that a first target account is included in a plurality of accounts associated with the target user, the resource operation request and the first target account are packaged into a first message to be processed, wherein the account type of the first target account belongs to a first preset account type, and the operation type of the first target account comprises a preset operation type;
distributing the first message to be processed to a first message processing queue by using the request processing cluster;
And acquiring a first message to be processed from the first message processing queue by using the first business operation cluster in a real-time consumption mode so as to perform resource operation processing on the first message to be processed.
Fig. 1 schematically illustrates an application scenario diagram of a request processing method according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a service cluster 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the service cluster 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the service cluster 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The service cluster 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
In an application scenario of an embodiment of the present disclosure, the service cluster 105 may be divided into a plurality of clusters with different functions, and may specifically include, for example, a request processing cluster, a message processing queue cluster, a business operation cluster, and so on.
A user can initiate a resource operation request aiming at a target user to a service cluster 105 by using a first terminal device 101, a second terminal device 102 and a third terminal device 103, and respond to the user request, a request processing cluster in the service cluster 105 processes the user request, packages the request into a message to be processed, and sends the message to be processed to a message processing queue cluster; the service operation cluster can acquire the message to be processed from the message processing queue cluster, and returns a processing result after the resource operation processing is performed on the message to be processed, and the message is displayed to the user through the first terminal equipment 101, the second terminal equipment 102 and the third terminal equipment 103.
It should be noted that the request processing method provided by the embodiments of the present disclosure may be generally performed by the service cluster 105. Accordingly, the request processing apparatus provided by embodiments of the present disclosure may be generally disposed in service cluster 105. The request processing method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the service cluster 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the service cluster 105. Accordingly, the request processing apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster different from the service cluster 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the service cluster 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The request processing method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 6 based on the scenario described in fig. 1.
Fig. 2 schematically illustrates a flow chart of a request processing method according to an embodiment of the disclosure.
As shown in fig. 2, the request processing method of this embodiment includes operations S201 to S203.
In response to the resource operation request for the target user, in operation S201, the resource operation request and the first target account are encapsulated into a first message to be processed in a case where it is determined that the first target account is included in the plurality of accounts associated with the target user by using the request processing cluster, wherein an account type of the first target account belongs to a first predetermined account type, and an operation type of the first target account includes a predetermined operation type.
According to an embodiment of the present disclosure, the request processing method of the embodiment of the present disclosure may be applied in a business processing scenario of a predetermined type of mass transfer transaction. The resource operation request for the target user may be, for example, a request for transfer transaction to an account of the target user.
The request processing cluster is used for analyzing the request, obtaining the user ID, querying the database based on the user ID, querying a plurality of accounts associated with the user ID of the target user, and further determining whether the plurality of accounts associated with the target user comprise the first target account. Each account associated with the target user may be associated with one or more types of operations, such as for daily consumption, transfer of money, for loan dispensing and repayment, and the like. The predetermined type of operation refers to a user-specified type of operation, for example, in the context of embodiments of the present disclosure, to a first target account including a type of operation for a predetermined type of transfer transaction, to a user having contracted for the account to be available for the predetermined type of transfer transaction. The first predetermined account type may refer to a dedicated account type, i.e., an account type associated with only one operation type, e.g., in the context of embodiments of the present disclosure, the first target account is an account dedicated to a predetermined type transfer transaction where the account type of the first target account belongs to the first predetermined account type and the operation type of the first target account includes the predetermined operation type. The first target account may be a virtual account (e.g., various application wallets), a debit card account associated with a physical card, or the like.
It should be noted that, before obtaining information (user ID, user account information) of the user, approval or authorization of the user needs to be obtained. For example, before operation S201, a request to acquire user information may be issued to the user. In case the user agrees or authorizes that the user information can be acquired, the operation S201 is performed.
In addition, the request processing cluster is further configured to encapsulate the processing message, for example, in a case where it is determined that a first target account is included in a plurality of accounts associated with the target user, encapsulate the resource operation request and the first target account into a first message to be processed, where the first message to be processed includes a first target account field, an issue amount field, a processing time field, and the like. Table 1 below is an example of the types of fields included in the first message to be processed.
TABLE 1
Field name Annotating
PSEQNO Batch number
YEARMONTH Date of transfer transaction
AMOUNT Dispensing amount
RECEIVEDATE Date of data reception
PAYMENTMETHOD Account type
…… ……
In operation S202, a first message to be processed is distributed to a first message processing queue using a request processing cluster. The first message processing queue may be used as middleware for storing messages, and various types of middleware may be used, for example, kafka may be used.
In operation S203, a first message to be processed is obtained from the first message processing queue by using the first service operation cluster in a real-time consumption manner, so as to perform resource operation processing on the first message to be processed. The first service operation cluster is used for processing service data in real time in batches, and a first message to be processed can be obtained from the first message processing queue for processing in an uninterrupted circular scanning mode.
The first business operation cluster performs resource operation processing on the first message to be processed, for example, the value of the remaining amount field in the first target account can be modified based on the value of the issued amount field in the first message to be processed, so as to realize transfer transaction to the first target account.
In the related art, when a predetermined type of large-batch transfer transaction is performed, a method of performing the transfer transaction in a batch manner is often used, and the operation of performing the transfer transaction in a batch manner is performed in a fixed time period on the day of the transfer transaction. However, the method of timing batch execution has some problems, such as blocking background processing operation under the condition of large data volume to be processed, being unable to realize real-time account checking, and having low efficiency; in addition, in the process of operating account data, the account needs to be concerned about whether other transaction operations exist in the account at the same time, and transfer transaction can be performed after data confirmation is performed, so that account data errors are avoided, the operation complexity is further improved, and the system processing efficiency is reduced.
According to the embodiment of the disclosure, by firstly judging whether the plurality of accounts associated with the target user include the first target account (can refer to the account type of the special function), and processing the first target account of the special function only when the first target account is included, the first target account can be used as the target account for resource operation, for example, the special account can be configured for the user to be used for the transfer transaction operation of the preset type, and in the process of operating account data, other transaction operation processing of the account is not required to be completed, so that the transfer transaction service processing logic is simplified, and the processing efficiency is improved. Further, the first service operation cluster processes resource operation information in time in a mode of non-fixed time and non-fixed scene quasi-real-time proxy service batch uninterrupted circulation execution processing, so that service processing efficiency is improved. In addition, according to the embodiment of the disclosure, the first message processing queue is set as the middleware, so that asynchronous processing of the messages is realized, decoupling between systems is realized, and the data processing efficiency of the system is improved.
Fig. 3 schematically illustrates a system schematic diagram of a request processing method according to an embodiment of the present disclosure.
As shown in fig. 3, a system architecture capable of implementing a request processing method according to an embodiment of the present disclosure includes the above-mentioned request processing cluster, a first message processing queue, and a first service operation cluster, where the request processing cluster is used to parse a request, determine an account type, and encapsulate a processing message; the first message processing queue is used as a middleware between the request processing cluster and the first business operation cluster, so that decoupling between systems is realized. The first service operation cluster is used for processing service data in real time in batches, and can acquire a first message to be processed from the first message processing queue in an uninterrupted cyclic scanning mode and perform resource operation processing on the first message to be processed.
As shown in fig. 3, a system architecture in which the request processing method according to the embodiments of the present disclosure may be implemented may further include a second message processing queue and a second service operation cluster in addition to the above-described request processing cluster, the first message processing queue and the first service operation cluster.
The first message processing queue is used for storing messages for real-time batch processing, the second message processing queue is used for storing messages for timing batch processing, and accordingly, the first message processing queue is in butt joint with the first business operation cluster, and the second message processing queue is in butt joint with the second business operation cluster. The first service operation cluster is used for processing service data in real time in batches, and can acquire the message to be processed from the first message processing queue in an uninterrupted cyclic scanning mode and perform resource operation processing on the message to be processed. The second service operation cluster is used for processing service data in a timed batch mode, and the to-be-processed information can be obtained from the second information processing queue in a timed scanning mode to perform resource operation processing on the to-be-processed information. The second message processing queue is also used as a middleware between the request processing cluster and the second service operation cluster, so that the decoupling between systems is realized.
According to an embodiment of the present disclosure, a message for real-time batch processing is stored through a first message processing queue, a message for timing batch processing is stored through a second message processing queue, the first message processing queue interfaces with a first business operation cluster for real-time batch processing, and the second message processing queue interfaces with a second business operation cluster for timing batch processing. Because the timeliness requirements of two kinds of service processing of real-time batch processing and timing batch processing are relatively different, by arranging two kinds of message middleware to respectively butt joint different kinds of service processing clusters, the complete decoupling of the two kinds of service processing of real-time batch processing and timing batch processing can be realized, the processing processes of two processing logic links are not interfered with each other, the system processing efficiency is improved as a whole, and meanwhile, the parallel processing of the two links can be realized, and the overall processing timeliness is further improved.
According to an embodiment of the present disclosure, as shown in fig. 3, after performing the resource operation processing on the first message to be processed by using the first service operation cluster, the following operations 11-14 are further included.
And 11, acquiring a first message processing result obtained after processing the first message to be processed by using the first service operation cluster, and determining whether the resource operation request for the target user is completed according to the first message processing result. Table 2 below exemplifies data fields included in the first message processing result. Specifically, the remaining amount field, a processing flag field for whether to issue success, a failure reason field, an error message field, and the like may be included.
TABLE 2
Name of the name Annotating
FILEF File source mark
DEPZONE Land area code
DEPBRNO Net point number
SENDATE Return date
SEQNO Lot number
FILETYPE File type
MSGVAR New and old format sign
STATUS Treatment sign (000-success; 001 failure)
ACCN01 First target account
ACCN02 Associated account
AMOUNT Amount of money
DRCRF Loan sign (1-loan, 2-loan)
NOTES Failure cause
ERRMSG Error message
An operation 12, under the condition that the resource operation request aiming at the target user is not completed, packaging a first message processing result and a first message to be processed into a queue transferring instruction, and sending the queue transferring instruction to a request processing cluster;
operation 13, the request processing cluster responds to the queue transferring instruction and distributes the first message to be processed to the second message processing queue;
and 14, acquiring the first message to be processed from the second message processing queue by using the second service operation cluster in a timing consumption mode, and performing resource operation processing on the first message to be processed. The second service operation cluster is used for processing service data in a timed batch mode, acquiring a first message to be processed from the second message processing queue in a timed scanning mode, and performing resource operation processing on the first message to be processed.
The first message to be processed comprises a user ID, a first target account field, an issued amount field, a processing time field and the like.
The second business operation cluster performs resource operation processing on the first message to be processed, and specifically, the first target account indicated by the first message to be processed can be subjected to resource operation processing. The value of the remaining amount field in the first target account may be modified, for example, based on the value of the issued amount field in the first pending message, to effect a transfer transaction to the first target account.
Further, in the case that the resource operation processing for the first target account fails, determining whether an associated account having an association relationship with the first target account exists in a plurality of accounts associated with the target user; and when the associated account exists in the plurality of accounts, performing resource operation processing on the associated account. Specifically, the second business operation cluster performs resource operation processing on the first message to be processed, and may also query a database based on the user ID, and query whether an associated account having an association relationship with the first target account exists in a plurality of accounts associated with the user ID of the target user, where the operation type of the associated account also includes a transfer transaction operation type of a predetermined type, which means that the user has signed up that the account is available for the transfer transaction of the predetermined type. The value of the remaining amount field in the associated account may also be modified based on the value of the issued amount field in the first pending message to effect a transfer transaction to the associated account. On the premise that the issuing of the given account fails, the success of the transfer transaction is ensured through the associated account.
Before the first message to be processed is distributed to the second message processing queue, the first message to be processed can be subjected to data format conversion so as to adapt to the data format requirement of the timed batch program processing.
Table 3 exemplarily shows an example of data fields of a first message to be processed in the second message processing queue, where the first message to be processed includes a first target account field, an associated account field, a release amount field, a processing time field, a data new and old format flag, and the like. For example, the new and old data format flag MSGVAR is 2, which represents the new format (converted format); MSGVAR is 1, representing the old format (pre-conversion format), this file is automatically generated in the FTP specified directory; the first target account field and the associated account field establish a corresponding relation.
TABLE 3 Table 3
According to the embodiment of the disclosure, by monitoring the feedback result of the first service operation cluster, under the condition of operation failure, the first message to be processed is distributed to the second message processing queue, and the resource operation is completed through the processing of the second service operation cluster. The automatic queue transferring and resource operation processing of the messages are realized, the success rate of data processing is improved, and the business purpose of transfer transaction is ensured. The real-time processing is changed into the timing processing, so that the flow of the real-time processing of the source is not interfered, and the timeliness of the real-time batch processing program is ensured.
According to an embodiment of the disclosure, as shown in fig. 3, the request processing cluster is configured to parse a request, determine an account type, and encapsulate a processing message, and specifically may include encapsulating a first message to be processed for real-time batch processing and encapsulating a second message to be processed for timed batch processing according to different account types.
Specifically, the above method further includes the following operations 21-22.
In operation 21, the request processing cluster obtains the user ID after parsing the resource operation request, and queries the database based on the user ID, queries a plurality of accounts associated with the user ID of the target user, and further determines whether a first target account dedicated to a predetermined type of transfer transaction is included in the plurality of accounts associated with the target user.
In the event that it is determined that the plurality of accounts associated with the target user does not include the first target account but includes the second target account, encapsulating the resource operation request and the second target account as a second pending message using the request processing cluster and distributing the second pending message to the second message processing queue, wherein the account type of the second target account belongs to a second predetermined account type and the operation type of the second target account includes a predetermined operation type (the predetermined operation type refers to a user-specified operation type, for example, in the context of a predetermined type of transfer transaction, the operation type of the second target account includes a predetermined type of transfer transaction operation type). That is, the second predetermined account type may refer to a non-specific account type, i.e., an account type that may be associated with more than one type of operation, e.g., the second target account may be used for a predetermined type of transfer transaction, but is not limited to only a predetermined type of transfer transaction. The second target account may be a virtual account (e.g., various application wallets), a debit card account associated with the physical card, or the like.
In operation 22, a second service operation cluster is used to obtain a second message to be processed from the second message processing queue in a timing consumption manner, and perform resource operation processing on the second message to be processed.
According to the embodiment of the disclosure, the first message to be processed for real-time batch processing and the second message to be processed for timing batch processing are respectively packaged according to different account types. The operation data of the special account is processed in a real-time batch processing mode, the operation data of the non-special account is processed in a timing batch processing mode, different processing strategies are adopted for processing different types of accounts, and the processing efficiency of the payment service is improved as a whole.
According to an embodiment of the present disclosure, the above method further includes: determining whether target resource operation data for a target user exists in a database before performing resource operation processing on a first message to be processed or before performing resource operation processing on a second message to be processed; and in the case that the target resource operation data aiming at the target user exists in the database, terminating the resource operation processing aiming at the first message to be processed or terminating the resource operation processing aiming at the second message to be processed.
According to the embodiment of the disclosure, the method ensures that the same service is processed only once, prevents repeated operation of data, and improves the accuracy of service operation results.
According to an embodiment of the present disclosure, after distributing the first message to be processed to the first message processing queue, the method further includes configuring a processing sequence number for the first message to be processed.
The obtaining the first message to be processed from the first message processing queue so as to perform resource operation processing on the first message to be processed comprises the following steps: and acquiring the first message to be processed from the first message processing queue based on the processing sequence number so as to perform resource operation processing on the first message to be processed.
Wherein, the processing sequence numbers, such as 11, 12, 13, 14 and … …, are configured for each first message to be processed in sequence according to the sequence of message production. The resource operation processing can be performed on the first message to be processed according to the sequence of the sequence numbers based on the processing sequence numbers.
Further, the first business operation cluster includes a plurality of operation nodes, each of which is configured with a node number. The plurality of first messages to be processed in the first message processing queue may be evenly distributed to the plurality of operation nodes according to the following method.
Specifically, based on the processing sequence number, the first message to be processed is obtained from the first message processing queue, and performing the resource operation processing on the first message to be processed includes operations 31-32.
In operation 31, the processing sequence number is calculated for the total number of the plurality of operation nodes, and the target remainder corresponding to the processing sequence number is obtained.
In operation 32, a target operation node corresponding to the target remainder is determined from the plurality of operation nodes based on a preset mapping relationship between the target remainder and the node number.
In operation 33, a first message to be processed is obtained from the first message processing queue using the target operating node to perform a resource operation process on a second message to be processed.
The preset mapping relation between the target remainder and v of the node number needs to ensure that a plurality of messages to be processed in the first message processing queue are uniformly distributed in v of a plurality of operation nodes.
For example, the preset mapping relationship may be preset as: the target remainder corresponds to the same node number, such as 10 nodes, and the numbers are 1, 2 and 3 … …; and calculating to obtain a remainder of 2 obtained by taking the remainder of the processing serial number 12 of a certain message to be processed for the total number 10 of the operation nodes, wherein the corresponding target operation node is the operation node with the node number of 2, and processing the message to be processed with the processing serial number 12 (the remainder of 2) through the operation node with the node number of 2.
For another example, the preset mapping relationship between the target remainder and the node number may also be a corresponding relationship between the custom number and the remainder, for example, if there are 2 nodes, the numbers are 1 and 2; can be set as follows: the remainders 1, 3, 5, 7, 9 correspond to the number 1; the remainders of 0, 2, 4, 6 and 8 correspond to the number 2; in this way, the operation node with the number 1 processes the message to be processed with the remainder of 1, 3, 5, 7 and 9, and the operation node with the number 2 processes the message to be processed with the remainder of 2, 4, 6 and 8.
According to the embodiment of the disclosure, the method can uniformly distribute the plurality of first messages to be processed in the first message processing queue to the plurality of operation nodes, so that the processing speed can be greatly improved, and the problem of overflow of the memory of a single node can be avoided to a greater extent.
Another aspect of the present disclosure provides a message processing system, and a system architecture of the message processing system of an embodiment of the present disclosure may refer to fig. 3 described above.
As shown in fig. 3, the system includes a request processing cluster, a first message processing queue, a first business operations cluster, a second message processing queue, a second business operations cluster.
A request processing cluster, configured to, in response to a resource operation request for a target user, package the resource operation request and a first target account into a first message to be processed when it is determined that a first target account is included in a plurality of accounts associated with the target user, where an account type of the first target account belongs to a first predetermined account type, and an operation type of the first target account includes a predetermined operation type;
a first message processing queue for receiving a first message to be processed originating from a request processing cluster;
the first business operation cluster is used for acquiring a first message to be processed from the first message processing queue in a real-time consumption mode so as to perform resource operation processing on the first message to be processed;
the request processing cluster is further used for packaging the resource operation request and the second target account into a second message to be processed when the first target account is not included in the plurality of accounts associated with the target user but the second target account is included in the plurality of accounts associated with the target user;
a second message processing queue for receiving a second message to be processed originating from the request processing cluster;
and the second business operation cluster is used for acquiring a second message to be processed from the second message processing queue in a timing consumption mode and carrying out resource operation processing on the second message to be processed.
The first service operation cluster is further used for obtaining a first message processing result obtained after processing the first message to be processed, determining whether the resource operation request for the target user is completed or not according to the first message processing result, and packaging the first message processing result and the first message to be processed into a queue transferring instruction and sending the queue transferring instruction to the request processing cluster under the condition that the resource operation request for the target user is determined not to be completed;
the request processing cluster is further used for responding to the queue transferring instruction and distributing the first message to be processed to the second message processing queue;
the second service operation cluster is further used for acquiring a first message to be processed from the second message processing queue in a timing consumption mode, and performing resource operation processing on the first message to be processed.
Specific implementation methods in the request processing cluster, the first message processing queue, the first service operation cluster, the second message processing queue, and the second service operation cluster may refer to the descriptions related to fig. 2 and fig. 3 in the foregoing embodiments, and are not repeated herein.
According to an embodiment of the present disclosure, a message for real-time batch processing is stored through a first message processing queue, a message for timing batch processing is stored through a second message processing queue, the first message processing queue interfaces with a first business operation cluster for real-time batch processing, and the second message processing queue interfaces with a second business operation cluster for timing batch processing. Because the timeliness requirements of two kinds of service processing of real-time batch processing and timing batch processing are relatively different, by arranging two kinds of message middleware to respectively butt joint different kinds of service processing clusters, the complete decoupling of the two kinds of service processing of real-time batch processing and timing batch processing can be realized, the processing processes of two processing logic links are not interfered with each other, the system processing efficiency is improved as a whole, and meanwhile, the parallel processing of the two links can be realized, and the overall processing timeliness is further improved.
Based on the message processing method, the disclosure also provides a message processing device. The device will be described in detail below with reference to fig. 4 and 5.
Fig. 4 schematically shows a block diagram of a request processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 4, the request processing apparatus 400 of this embodiment includes a first encapsulation module 401, a first distribution module 402, and a real-time processing module 403.
The first encapsulating module 401 is configured to encapsulate, in response to a resource operation request for a target user, the resource operation request and a first target account into a first message to be processed when it is determined that the plurality of accounts associated with the target user includes the first target account by using the request processing cluster, where an account type of the first target account belongs to a first predetermined account type, and an operation type of the first target account includes a predetermined operation type;
a first distributing module 402, configured to distribute a first message to be processed to a first message processing queue by using a request processing cluster;
the real-time processing module 403 is configured to acquire, by using the first service operation cluster, a first message to be processed from the first message processing queue in a real-time consumption manner, so as to perform resource operation processing on the first message to be processed.
According to the embodiment of the disclosure, the first packaging module 401 first determines whether the plurality of accounts associated with the target user includes the first target account (may refer to the account type of the dedicated function), and processes the first target account of the dedicated function only when the first target account includes the first target account, so that the first target account of the dedicated function can be used as a target account for operating resources, for example, the dedicated account can be configured for the user to be used for a predetermined type of transfer transaction operation, and in the process of operating account data, no other transaction operation processing of the account needs to be waited for to complete, so that the transfer transaction service processing logic is simplified, and the processing efficiency is improved. Further, the real-time processing module 403 processes the resource operation message in time by the first service operation cluster in a mode of uninterrupted and cyclic execution of the non-fixed time and non-fixed-time quasi-real-time proxy service batch, thereby improving the service processing efficiency. In addition, in the embodiment of the present disclosure, the first distributing module 402 distributes the message to the first message processing queue, so as to implement asynchronous processing of the message, implement decoupling between systems, and improve the data processing efficiency of the system.
Fig. 5 schematically illustrates a block diagram of a request processing apparatus according to another embodiment of the present disclosure. The request processing apparatus 500 of this embodiment includes, in addition to the first encapsulation module 401, the first distribution module 402, and the real-time processing module 403 described above, a first determination module 501, a second encapsulation module 502, a second distribution module 503, and a first timing processing module 504.
A first determining module 501, configured to obtain a first message processing result obtained after processing a first message to be processed by using a first service operation cluster, so as to determine whether a resource operation request for a target user is completed according to the first message processing result; the second encapsulation module 502 is configured to encapsulate, when it is determined that the resource operation request for the target user is not completed, the first message processing result and the first message to be processed into a queue transfer instruction, and send the queue transfer instruction to the request processing cluster; a second distributing module 503, configured to respond to the instruction of transferring the queue, and distribute the first message to be processed to the second message processing queue by using the request processing cluster; the first timing processing module 504 is configured to acquire, by using the second service operation cluster, a first message to be processed from the second message processing queue in a manner of timing consumption, and perform resource operation processing on the first message to be processed.
According to an embodiment of the present disclosure, the first timing processing module includes a first processing unit, a determining unit, and a first processing unit.
The first processing unit is used for carrying out resource operation processing on a first target account indicated by the first message to be processed; a determining unit configured to determine whether an associated account having an association relationship with a first target account exists among a plurality of accounts associated with the target user in a case where resource operation processing for the first target account fails; and the first processing unit is used for carrying out resource operation processing on the associated accounts under the condition that the associated accounts exist in the plurality of accounts.
According to an embodiment of the disclosure, the apparatus further includes a third encapsulation module, a third distribution module, and a second timing processing module.
The third packaging module is used for packaging the resource operation request and the second target account into a second message to be processed by using the request processing cluster under the condition that the plurality of accounts associated with the target user do not comprise the first target account but comprise the second target account, wherein the account type of the second target account belongs to a second preset account type, and the operation type of the second target account comprises a preset operation type; the third distributing module is used for distributing the second message to be processed to the second message processing queue; the second timing processing module is used for acquiring a second message to be processed from the second message processing queue by using a second service operation cluster in a timing consumption mode, and performing resource operation processing on the second message to be processed.
According to the embodiment of the disclosure, the device further comprises a second determining module and a termination module.
The second determining module is used for determining whether target resource operation data aiming at a target user exist in the database before the resource operation processing is carried out on the first message to be processed or before the resource operation processing is carried out on the second message to be processed; and the termination module is used for terminating the resource operation processing for the first message to be processed or terminating the resource operation processing for the second message to be processed under the condition that the target resource operation data for the target user exist in the database.
According to an embodiment of the present disclosure, the apparatus further includes a configuration module configured to configure a processing sequence number for the first message to be processed after distributing the first message to be processed to the first message processing queue.
The real-time processing module comprises a real-time processing unit and is used for acquiring a first message to be processed from the first message processing queue based on the processing sequence number so as to perform resource operation processing on the first message to be processed.
According to an embodiment of the present disclosure, the first business operation cluster includes a plurality of operation nodes, each of which is configured with a node number.
The real-time processing unit comprises a remainder taking subunit, a determining subunit and a processing subunit.
The processing unit is used for processing the processing sequence number, and obtaining a target remainder corresponding to the processing sequence number according to the total number of the plurality of operation nodes; a determining subunit, configured to determine, from the plurality of operation nodes, a target operation node corresponding to the target remainder based on a preset mapping relationship between the target remainder and the node number; and the processing subunit is used for acquiring the first message to be processed from the first message processing queue by utilizing the target operation node so as to perform resource operation processing on the second message to be processed.
According to embodiments of the present disclosure, any of the first encapsulation module 401, the first distribution module 402, the real-time processing module 403, the first determination module 501, the second encapsulation module 502, the second distribution module 503, and the first timing processing module 504 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the first encapsulation module 401, the first distribution module 402, the real-time processing module 403, the first determination module 501, the second encapsulation module 502, the second distribution module 503, the first timing processing module 504 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or encapsulating circuitry, or in any one of or a suitable combination of three of software, hardware and firmware. Alternatively, at least one of the first encapsulation module 401, the first distribution module 402, the real-time processing module 403, the first determination module 501, the second encapsulation module 502, the second distribution module 503, and the first timing processing module 504 may be at least partially implemented as a computer program module, which may perform the corresponding functions when being executed.
Fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a request processing method according to an embodiment of the disclosure.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. The processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 601 may also include on-board memory for caching purposes. The processor 601 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or the RAM 603. Note that the program may be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 600 may also include an input/output (I/O) interface 605, the input/output (I/O) interface 605 also being connected to the bus 604. The electronic device 600 may also include one or more of the following components connected to a 6 input/output (I/O) interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to a 6 input/output (I/O) interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: 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), 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 context of this disclosure, 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. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code means for causing a computer system to carry out the message processing methods provided by the embodiments of the present disclosure when the computer program product is run on the computer system.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and/or installed from the removable medium 611. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts 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 disclosure. 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 which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (12)

1. A request processing method, comprising:
in response to a resource operation request for a target user, encapsulating the resource operation request and a first target account into a first message to be processed when a request processing cluster is utilized to determine that the plurality of accounts associated with the target user comprise the first target account, wherein the account type of the first target account belongs to a first preset account type, and the operation type of the first target account comprises a preset operation type;
Distributing the first message to be processed to a first message processing queue by using a request processing cluster;
and acquiring the first message to be processed from the first message processing queue by using a first business operation cluster in a real-time consumption mode so as to perform resource operation processing on the first message to be processed.
2. The method of claim 1, further comprising:
acquiring a first message processing result obtained after processing the first message to be processed by using a first service operation cluster, so as to determine whether a resource operation request for the target user is completed or not according to the first message processing result;
under the condition that the resource operation request aiming at the target user is not completed, the first message processing result and the first message to be processed are packaged into a queue transferring instruction, and the queue transferring instruction is sent to the request processing cluster;
distributing the first message to be processed to a second message processing queue by using the request processing cluster in response to the queue transfer instruction;
and acquiring the first message to be processed from the second message processing queue by using a second service operation cluster in a timing consumption mode, and performing resource operation processing on the first message to be processed.
3. The method of claim 2, performing resource operation processing on the first message to be processed with a second business operation cluster comprising:
performing resource operation processing on the first target account indicated by the first message to be processed;
determining whether an associated account having an association relationship with the first target account exists among a plurality of accounts associated with the target user in the case that the resource operation process for the first target account fails;
and carrying out resource operation processing on the associated accounts under the condition that the associated accounts exist in the plurality of accounts.
4. The method of claim 1, further comprising:
in the case that the first target account is not included in the plurality of accounts associated with the target user but a second target account is included, encapsulating the resource operation request and the second target account into a second message to be processed by using a request processing cluster, and distributing the second message to be processed to a second message processing queue, wherein the account type of the second target account belongs to a second preset account type, and the operation type of the second target account belongs to the preset operation type;
And acquiring the second message to be processed from the second message processing queue by using a second service operation cluster in a timing consumption mode, and performing resource operation processing on the second message to be processed.
5. The method of any of claims 1-4, further comprising:
determining whether target resource operation data for the target user exists in a database before performing resource operation processing on the first message to be processed or before performing resource operation processing on the second message to be processed;
and under the condition that the target resource operation data aiming at the target user exists in the database, terminating the resource operation processing aiming at the first message to be processed or terminating the resource operation processing aiming at the second message to be processed.
6. The method according to claim 1:
after distributing the first message to be processed to a first message processing queue, configuring a processing sequence number for the first message to be processed;
the obtaining the first message to be processed from the first message processing queue, so as to perform resource operation processing on the first message to be processed, including:
And acquiring the first message to be processed from the first message processing queue based on the processing sequence number so as to perform resource operation processing on the first message to be processed.
7. The method of claim 6, wherein the first business operations cluster comprises a plurality of operation nodes, each of the operation nodes configured with a node number;
based on the processing sequence number, acquiring the first message to be processed from the first message processing queue, so as to perform resource operation processing on the first message to be processed, wherein the resource operation processing comprises the following steps:
taking the processing sequence numbers out of the total number of the plurality of operation nodes to obtain a target remainder corresponding to the processing sequence numbers;
determining a target operation node corresponding to the target remainder from the plurality of operation nodes based on a preset mapping relation between the target remainder and the node number;
and acquiring the first message to be processed from the first message processing queue by utilizing the target operation node so as to perform resource operation processing on the second message to be processed.
8. A message processing system, comprising:
a request processing cluster, configured to, in response to a resource operation request for a target user, package, in a case where it is determined that a first target account is included in a plurality of accounts associated with the target user, the resource operation request and the first target account as a first message to be processed, where an account type of the first target account belongs to a first predetermined account type, and an operation type of the first target account includes a predetermined operation type;
A first message processing queue for receiving the first message to be processed originating from the request processing cluster;
and the first business operation cluster is used for acquiring the first message to be processed from the first message processing queue in a real-time consumption mode so as to perform resource operation processing on the first message to be processed.
9. A message processing apparatus, comprising:
a first encapsulation module, configured to, in response to a resource operation request for a target user, encapsulate, with a request processing cluster, the resource operation request and a first target account into a first message to be processed when it is determined that the plurality of accounts associated with the target user includes the first target account, where an account type of the first target account belongs to a first predetermined account type, and an operation type of the first target account includes a predetermined operation type;
a first distributing module, configured to distribute the first message to be processed to a first message processing queue by using a request processing cluster;
and the real-time processing module is used for acquiring the first message to be processed from the first message processing queue by using a first business operation cluster in a real-time consumption mode so as to perform resource operation processing on the first message to be processed.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-7.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-7.
12. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202310618029.5A 2023-05-29 2023-05-29 Request processing method and device, electronic equipment and computer readable storage medium Pending CN116757689A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310618029.5A CN116757689A (en) 2023-05-29 2023-05-29 Request processing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310618029.5A CN116757689A (en) 2023-05-29 2023-05-29 Request processing method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116757689A true CN116757689A (en) 2023-09-15

Family

ID=87946911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310618029.5A Pending CN116757689A (en) 2023-05-29 2023-05-29 Request processing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116757689A (en)

Similar Documents

Publication Publication Date Title
CN111400061A (en) Data processing method and system
CN111427971B (en) Business modeling method, device, system and medium for computer system
CN115587575A (en) Data table creation method, target data query method, device and equipment
CN114022031A (en) Data processing method, data processing apparatus, electronic device, medium, and computer program product
CN111881329A (en) Account balance management method and system
CN112288577A (en) Transaction processing method and device for distributed service, electronic equipment and medium
CN112181628B (en) Resource transfer method, device, system and electronic equipment
CN116932214A (en) Instruction sending method and device, electronic equipment and computer storage medium
CN115965474A (en) Service processing method, device, equipment and storage medium
CN114780361A (en) Log generation method, device, computer system and readable storage medium
CN113535565B (en) Interface use case generation method, device, equipment and medium
CN112988604B (en) Object testing method, testing system, electronic device and readable storage medium
CN116757689A (en) Request processing method and device, electronic equipment and computer readable storage medium
CN114004701A (en) Method and device for generating transaction result, electronic equipment and storage medium
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN113111077A (en) Consistency control method, consistency control device, electronic equipment, consistency control medium and program product
CN113176907A (en) Interface data calling method and device, computer system and readable storage medium
CN114969059B (en) Method and device for generating order information, electronic equipment and storage medium
CN114268558B (en) Method, device, equipment and medium for generating monitoring graph
CN117395314A (en) Request processing method, request processing device, electronic equipment and storage medium
CN114202046B (en) Method, device, equipment and medium for generating two-dimension code based on SAP system
CN116775307A (en) Service processing method, device, equipment and storage medium
CN113067885A (en) Application system, request processing method, electronic device, and storage medium
CN116662025A (en) Request response method, device, equipment and storage medium
CN117609352A (en) Data processing method, device, equipment and storage medium

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