CN111290866B - Service processing method and device - Google Patents

Service processing method and device Download PDF

Info

Publication number
CN111290866B
CN111290866B CN202010086202.8A CN202010086202A CN111290866B CN 111290866 B CN111290866 B CN 111290866B CN 202010086202 A CN202010086202 A CN 202010086202A CN 111290866 B CN111290866 B CN 111290866B
Authority
CN
China
Prior art keywords
service
processing
synchronous
target
asynchronous
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.)
Active
Application number
CN202010086202.8A
Other languages
Chinese (zh)
Other versions
CN111290866A (en
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010086202.8A priority Critical patent/CN111290866B/en
Publication of CN111290866A publication Critical patent/CN111290866A/en
Application granted granted Critical
Publication of CN111290866B publication Critical patent/CN111290866B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/549Remote execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Telephonic Communication Services (AREA)

Abstract

One or more embodiments of the present disclosure disclose a service processing method and apparatus, so as to solve the problem in the prior art that service processing reliability is low. The method is applied to a first server and comprises the following steps: and generating a request identifier of the service processing request based on the service processing request of the target service. And sending the service processing request to a synchronous service interface of the second server. The synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service. And acquiring the synchronous processing result from the synchronous service interface, and generating a processing record corresponding to the target service based on the synchronous processing result. And carrying out asynchronous processing on the business meeting the asynchronous processing conditions in the target business according to the request identification of the business processing request and the processing record.

Description

Service processing method and device
Technical Field
The present disclosure relates to the field of service processing technologies, and in particular, to a service processing method and apparatus.
Background
During the processing of traffic, it is often necessary to provide special services to some traffic. For example, in the wind control scenario, if the business risk is identified to be very high, a penalty needs to be applied to the corresponding subject (user or merchant, etc.), such as freezing or prohibiting login, etc., so as to ensure the account and fund security of the user.
For the type of service mentioned above, the system level requires the provision of highly reliable services. When the conventional remote call protocol (Remote Procedure Call Protocol, RPC) server provides services, it is difficult to guarantee that 100% of the services are available due to network jitter, underlying storage jitter, and the like. Taking the case of a wind control scenario, for example, an account is a blackout account, the balance of the account should be prohibited from being raised, but if an abnormality occurs in "prohibited from being raised" when a penalty is invoked, the account may be caused to transfer funds, which may further cause a lot of risks and damages.
Disclosure of Invention
In one aspect, one or more embodiments of the present disclosure provide a service processing method, which is applied to a first server, including: and generating a request identifier of the service processing request based on the service processing request of the target service. And sending the service processing request to a synchronous service interface of the second server. The synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service. And acquiring the synchronous processing result from the synchronous service interface, and generating a processing record corresponding to the target service based on the synchronous processing result. And carrying out asynchronous processing on the business meeting the asynchronous processing conditions in the target business according to the request identification of the business processing request and the processing record.
In another aspect, one or more embodiments of the present disclosure provide a service processing method, which is applied to a risk identification system, including: generating a request identifier of an account service request based on the account service request of a target account; the account service request includes a request to prohibit an account from performing a specified class of operation. And sending the account service request to a synchronous service interface of a remote call protocol server. The synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account. And acquiring the synchronous service result from the synchronous service interface, and generating a service record corresponding to the target account based on the synchronous service result. And carrying out asynchronous service on the accounts meeting the asynchronous service condition in the target accounts according to the request identification of the account service request and the service record.
In still another aspect, one or more embodiments of the present disclosure provide a service processing apparatus, applied to a first server, including: the first generation module is used for generating a request identifier of a service processing request based on the service processing request of the target service. And the first sending module is used for sending the business processing request to the synchronous service interface of the second server. The synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service. The first acquisition module acquires the synchronous processing result from the synchronous service interface and generates a processing record corresponding to the target service based on the synchronous processing result. And the asynchronous processing module performs asynchronous processing on the business meeting the asynchronous processing condition in the target business according to the request identification of the business processing request and the processing record.
In yet another aspect, one or more embodiments of the present disclosure provide a service processing apparatus, applied to a risk identification system, including: and the second generation module is used for generating a request identifier of the account service request based on the account service request of the target account. The account service request includes a request to prohibit an account from performing a specified class of operation. And the second sending module is used for sending the account service request to a synchronous service interface of a remote call protocol server. The synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account. And the second acquisition module acquires the synchronous service result from the synchronous service interface and generates a service record corresponding to the target account based on the synchronous service result. And the asynchronous service module performs asynchronous service on the accounts meeting the asynchronous service condition in the target accounts according to the request identification of the account service request and the service record.
In still another aspect, one or more embodiments of the present disclosure provide a service processing apparatus, applied to a first server, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to: and generating a request identifier of the service processing request based on the service processing request of the target service. And sending the service processing request to a synchronous service interface of the second server. The synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service. And acquiring the synchronous processing result from the synchronous service interface, and generating a processing record corresponding to the target service based on the synchronous processing result. And carrying out asynchronous processing on the business meeting the asynchronous processing conditions in the target business according to the request identification of the business processing request and the processing record.
In yet another aspect, one or more embodiments of the present disclosure provide a service processing device, applied to a risk identification system, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to: generating a request identifier of an account service request based on the account service request of a target account; the account service request includes a request to prohibit an account from performing a specified class of operation. And sending the account service request to a synchronous service interface of a remote call protocol server. The synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account. And acquiring the synchronous service result from the synchronous service interface, and generating a service record corresponding to the target account based on the synchronous service result. And carrying out asynchronous service on the accounts meeting the asynchronous service condition in the target accounts according to the request identification of the account service request and the service record.
In yet another aspect, embodiments of the present application provide a storage medium storing computer-executable instructions that, when executed, implement the following: and generating a request identifier of the service processing request based on the service processing request of the target service. And sending the service processing request to a synchronous service interface of the second server. The synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service. And acquiring the synchronous processing result from the synchronous service interface, and generating a processing record corresponding to the target service based on the synchronous processing result. And carrying out asynchronous processing on the business meeting the asynchronous processing conditions in the target business according to the request identification of the business processing request and the processing record.
In yet another aspect, embodiments of the present application provide a storage medium storing computer-executable instructions that, when executed, implement the following: generating a request identifier of an account service request based on the account service request of a target account; the account service request includes a request to prohibit an account from performing a specified class of operation. And sending the account service request to a synchronous service interface of a remote call protocol server. The synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account. And acquiring the synchronous service result from the synchronous service interface, and generating a service record corresponding to the target account based on the synchronous service result. And carrying out asynchronous service on the accounts meeting the asynchronous service condition in the target accounts according to the request identification of the account service request and the service record.
Drawings
In order to more clearly illustrate one or more embodiments of the present specification or the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described, it being apparent that the drawings in the following description are only some of the embodiments described in one or more embodiments of the present specification, and that other drawings may be obtained from these drawings without inventive faculty for a person of ordinary skill in the art.
FIG. 1 is a schematic block diagram of a business processing system according to an embodiment of the present description;
FIG. 2 is a schematic flow chart diagram of a business processing method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of a business processing method according to another embodiment of the present specification;
FIG. 4 is a schematic block diagram of a business processing system according to another embodiment of the present disclosure;
FIG. 5 is a schematic flow chart diagram of a business processing method according to another embodiment of the present disclosure;
fig. 6 is a schematic block diagram of a service processing apparatus according to an embodiment of the present specification;
fig. 7 is a schematic block diagram of a service processing apparatus according to another embodiment of the present specification;
fig. 8 is a schematic block diagram of a service processing apparatus according to an embodiment of the present specification;
fig. 9 is a schematic block diagram of a service processing apparatus according to another embodiment of the present specification.
Detailed Description
One or more embodiments of the present disclosure provide a service processing method and apparatus, so as to solve the problem of low service processing reliability in the prior art.
In order to enable a person skilled in the art to better understand the technical solutions in one or more embodiments of the present specification, the technical solutions in one or more embodiments of the present specification will be clearly and completely described below with reference to the drawings in one or more embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which may be made by one of ordinary skill in the art based on one or more embodiments of the present disclosure without departing from the scope of the invention as defined by the claims.
Fig. 1 is a schematic block diagram of a business processing system according to an embodiment of the present specification. As shown in fig. 1, the service processing system includes a first server 110 and a second server 120. Wherein, the first server 110 is configured to respond to the service processing request and send the service processing request to the second server 120; the second server 120 is configured to process the service processing request, including synchronous processing and/or asynchronous processing. To ensure a highly reliable RPC service, the business processing system provides a near-end RPC service, e.g., the first server needs to invoke the second server, which may provide a near-end service package and run integrated into the application system of the first server. How to implement business processing using the near-end service package integrated by the second server within the first server will be described in detail below.
Fig. 2 is a schematic flowchart of a service processing method according to an embodiment of the present disclosure, and as shown in fig. 2, the method is applied to the first server 110 shown in fig. 1, and includes:
s202, based on the service processing request of the target service, a request identification of the service processing request is generated.
The first server generates a unique request identifier for each service processing request, and the characterization mode of the request identifier is not limited, such as any identifier of serial number, letter, number and the like.
S204, the service processing request is sent to a synchronous service interface of the second server, and the synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service.
S206, obtaining the synchronous processing result from the synchronous service interface and generating a processing record corresponding to the target service based on the synchronous processing result.
The processing record corresponding to the target service may include a corresponding relationship between a request identifier of the target service and a synchronous processing result. The synchronization processing results may include success of synchronization processing, failure of synchronization processing, abnormality of synchronization processing, timeout of synchronization processing, and the like.
S208, according to the request identification and the processing record of the service processing request, the service meeting the asynchronous processing condition in the target service is processed asynchronously.
The service meeting the asynchronous processing condition may include a service with a synchronous processing result of synchronous processing failure, abnormal synchronous processing, or overtime synchronous processing, etc. Based on the above, by asynchronously processing the service such as failure of synchronous processing, abnormal synchronous processing or overtime synchronous processing, the success rate of service processing can be further improved, and the reliability of service processing can be ensured.
In this embodiment, the target service may be one or more. When the target service includes a plurality of target services, the first server may simultaneously transmit service processing requests of the plurality of target services to the second server.
It can be seen that, by adopting the technical solutions provided in one or more embodiments of the present disclosure, the first server performs synchronization processing by generating a request identifier of a service processing request of a target service, and sending the service processing request to a synchronization service interface of the second server. And the synchronous processing request of the synchronous service interface to the target service is obtained, and a processing record corresponding to the target service is generated based on the synchronous processing result, so that the service meeting the asynchronous processing condition is asynchronously processed according to the request identification and the processing record of the service processing request. Therefore, the purpose of processing the service by calling other servers is achieved, the processed rate and the processing success rate of the target service are ensured by asynchronously processing the service, and the condition that service processing failure is easily caused when only synchronously processing the service is avoided. Furthermore, since most of the operations in the business process are integrated into the first server (i.e., the near-end server) to be performed, the reliability of the business process is ensured.
In one embodiment, the processing record includes a correspondence between a request identifier of the target service and a synchronization processing result, where the synchronization processing result includes a synchronization processing success, a synchronization processing failure, a synchronization processing exception, a synchronization processing timeout, and the like. Asynchronous processing conditions include at least one of: and the synchronous processing result is abnormal synchronous processing, and the processing record does not comprise the synchronous processing result corresponding to the target service. Based on this, when asynchronous processing is performed on the service meeting the asynchronous processing condition in the target service according to the request identifier and the processing record of the service processing request (i.e., S208), the synchronous processing result corresponding to the target service may be queried from the processing record according to the request identifier of the service processing request; then, according to the inquired synchronous processing result, determining the business meeting the asynchronous processing condition in the target business; and further carrying out asynchronous processing on the business meeting the asynchronous processing condition in the target business.
In one embodiment, when asynchronous processing is performed on a service meeting an asynchronous processing condition in a target service, if a synchronous processing result corresponding to the target service is abnormal in synchronous processing, an asynchronous message corresponding to the target service is sent to a second server, and the second server is used for performing asynchronous processing on the target service and generating an asynchronous processing result corresponding to the target service. And if the processing record does not contain the synchronous processing result corresponding to the target service, carrying out asynchronous processing on the target service according to the current service state of the user corresponding to the target service.
In this embodiment, if the processing record does not include the synchronous processing result corresponding to the target service, the service type corresponding to the target service may be determined, and the current service state of the user corresponding to the target service may be determined; judging whether the service type corresponding to the target service is matched with the current service state or not; and if the service type corresponding to the target service is not matched with the current service state of the user, sending the asynchronous message corresponding to the target service to a second server. The second server is used for carrying out asynchronous processing on the target service and generating an asynchronous processing result corresponding to the target service. If the service type corresponding to the target service is matched with the current service state of the user, the target service can be determined to be processed successfully, and the processing record corresponding to the target service can be updated according to the information that the target service is processed successfully, for example, the corresponding relation between the request identifier corresponding to the target service and the processing result is added in the processing record.
Wherein the service type may be determined based on the service content. For example, in a wind-controlled scenario, where the service content is a frozen account, a prohibited account login, etc., the service type may be classified into a frozen account type, a prohibited account login type, etc. The user corresponding to the target service may be understood as the user initiating the target service, and may also be understood as the user associated with the target service (such as an account corresponding to the target service).
For example, the service type corresponding to the target service is a frozen account type, and the current service state of the user corresponding to the target service can be determined by querying the account state. Assuming that the current account state is frozen, it is indicated that the current account state is matched with the service type corresponding to the target service (i.e. frozen account type), and at this time, the processing record corresponding to the target service can be updated according to the information that the target service has been successfully processed. If the current account state is not frozen, the current account state is not matched with the service type (namely the frozen account type) corresponding to the target service, and at the moment, an asynchronous message corresponding to the target service can be sent to a second server, and the second server carries out asynchronous processing on the target service.
In one embodiment, before asynchronous processing is performed on a service meeting an asynchronous processing condition in the target service, log information corresponding to the service processing request may be generated according to a preset log format. And further converting the log information corresponding to the service processing request into an asynchronous message to obtain the asynchronous message corresponding to the target service.
In this embodiment, since the log generation process corresponds to the write operation of the local disk, the log information corresponding to the service processing request must be successfully generated and written into the local area of the first server, so as to ensure that the first server converts to obtain the asynchronous information corresponding to the target service. In addition, the log format to which the log information should conform is not limited in this embodiment.
In one embodiment, after the asynchronous message corresponding to the target service is sent to the second server, the processing record corresponding to the target service may be updated according to the asynchronous processing result of the second server on the target service. Specifically, if the asynchronous processing result corresponding to the target service is that the asynchronous processing is successful, the asynchronous processing result and the request identifier corresponding to the target service are added to the processing record corresponding to the target service, so as to update the processing record corresponding to the target service. If the asynchronous processing result corresponding to the target service is asynchronous processing failure or asynchronous processing abnormality (such as asynchronous processing overtime, etc.), determining the asynchronous processing times of the target service, and determining the processing mode of the target service based on the asynchronous processing times of the target service.
In one embodiment, if the asynchronous processing result corresponding to the target service is an asynchronous processing failure or an asynchronous processing exception (such as an asynchronous processing timeout, etc.), the processing manner of the target service is determined based on the number of asynchronous processing times of the target service. The specific steps can be as follows: judging whether the asynchronous processing times of the target service are larger than a preset threshold value or not; if yes, outputting log information for identifying failure of processing the target service; if not, continuing to asynchronously process the target service.
In this embodiment, if the number of times of asynchronous processing of the target service is not greater than a preset value, the asynchronous processing of the target service is continued. The process is specifically executable as follows: and sending the asynchronous message corresponding to the target service to a second server, and carrying out asynchronous processing on the target service by the second server, and generating an asynchronous processing result corresponding to the target service.
In one embodiment, before asynchronous processing is performed on the service meeting the asynchronous processing condition in the target service, the message duration of the asynchronous message corresponding to the target service can be determined, wherein the message duration comprises the duration from the generation time point of the asynchronous message to the current time point; judging whether the message duration of the asynchronous message is less than a preset duration; if yes, prolonging the message duration of the asynchronous message by a first time duration, so that the prolonged message duration is greater than or equal to the preset duration; if not, the asynchronous message corresponding to the target service is sent to the second server, the second server carries out asynchronous processing on the target service, and an asynchronous processing result corresponding to the target service is generated.
For example, the preset duration is 30 seconds, if the message duration of the asynchronous message corresponding to the target service (i.e., the duration from the generation time point of the asynchronous message to the current time point) is less than 30 seconds, the message duration of the asynchronous message is prolonged to 30 seconds or more, and then the delayed asynchronous message is sent to the second server.
In this embodiment, when the asynchronous message is sent to the second server, the asynchronous message with the message duration smaller than the preset duration needs to be delayed, so that the time for the asynchronous message to reach the second server is prevented from being later than the time for the synchronous processing request to reach the second server. That is, the service processing request based on the target service is firstly processed synchronously, and the service meeting the asynchronous processing condition is processed asynchronously after the synchronous processing is completed.
Fig. 3 is a schematic flowchart of a service processing method according to another embodiment of the present disclosure, and as shown in fig. 3, the method is applied to the first server 110 shown in fig. 1, and includes:
s301, checking basic parameters and basic logic. If the check is passed, continuing to execute S302; if the check is not passed, S312 is performed.
Wherein the base parameters may include any one or more parameters in the first server; the base logic may include business processing logic preset in an application system of the first server. The checking of the basic parameters and the basic logic ensures that the first server normally operates the business processing flow.
S302, based on the service processing request of the target service, generating a request identifier of the service processing request, and generating log information corresponding to the service processing request according to a preset log format.
The first server generates a unique request identifier for each service processing request, and the characterization mode of the request identifier is not limited, such as any identifier of serial number, letter, number and the like.
The log information corresponding to the service processing request can be converted into an asynchronous message of the log, namely an asynchronous message corresponding to the target service, through a near-end service package (provided by the second server) deployed in the first server.
S303, the service processing request of the target service is sent to the synchronous service interface of the second server.
The synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service.
S304, a synchronous processing result corresponding to the target service is obtained from a synchronous service interface of the second server, and a processing record corresponding to the target service is generated based on the synchronous processing result.
The processing record corresponding to the target service may include a corresponding relationship between a request identifier of the target service and a synchronous processing result. The synchronization processing results may include success of synchronization processing, failure of synchronization processing, abnormality of synchronization processing, timeout of synchronization processing, and the like.
In this step, if a processing record exists in the first server, the process of generating the processing record corresponding to the target service may be completed by adding the synchronization processing result corresponding to the target service to the processing record. If there is no processing record in the first server, a new processing record containing the synchronization processing result corresponding to the target service can be generated.
S305, determining that the synchronous processing result in the target service is a service with abnormal synchronous processing and a service which does not comprise the synchronous processing result in the processing record. For the service (marked as the first service in fig. 3) whose synchronization processing result is abnormal, jumping to S307 for execution; for a service (labeled as a second service in fig. 3) in which the synchronization processing result is not included in the processing record, the process proceeds to S306 for execution.
Among other things, synchronization anomalies may be caused by various situations, such as a synchronization timeout, etc.
S306, judging whether the service type corresponding to the target service is matched with the current service state of the user corresponding to the target service; if yes, executing S311; if not, S307 is performed.
S307, acquiring an asynchronous message corresponding to the target service, and judging whether the message duration of the asynchronous message is greater than or equal to a preset duration; if yes, then execute S309; if not, then S308 is performed.
Wherein the message duration of the asynchronous message includes a duration from a generation time point of the asynchronous message to a current time point. The asynchronous message may be generated when S302 is performed, that is, after log information corresponding to the service processing request is generated, the near-end service packet (provided by the second server) deployed in the first server is converted into an asynchronous message of the log, that is, an asynchronous message corresponding to the target service.
S308, prolonging the message duration of the asynchronous message by a first time duration, so that the prolonged message duration is greater than or equal to the preset duration.
S309, the asynchronous message corresponding to the target service is sent to the second server, the second server carries out asynchronous processing on the target service, and an asynchronous processing result corresponding to the target service is generated.
S310, obtaining an asynchronous processing result corresponding to the target service from the second server, and updating a processing record corresponding to the target service based on the asynchronous processing result.
For example, the request identifier corresponding to the target service and the asynchronous processing result are correspondingly added into the processing record.
In this step, the asynchronous processing result may also include asynchronous processing failure, asynchronous processing exception, etc., in which case the processing manner of the target service may be determined based on the number of asynchronous processing times of the target service. Specifically, if the asynchronous processing times of the target service are greater than a preset threshold, outputting log information for identifying failure of processing the target service; if the number of times of asynchronous processing of the target service is not greater than the preset threshold, continuing to perform asynchronous processing on the target service, namely returning to S309 for execution.
S311, updating the processing record corresponding to the target service based on the information that the target service has been successfully processed.
For example, the request identifier corresponding to the target service and the processing result are correspondingly added into the processing record.
S312, returning an error code and ending the flow.
As can be seen from the above, the present embodiment not only achieves the purpose of processing the service by calling other servers (such as the second server), but also ensures the processing rate and the processing success rate of the target service by asynchronously processing the service, thereby avoiding the situation that the service processing is easy to fail when only synchronously processing the service. Furthermore, since most of the operations in the business process are integrated into the first server (i.e., the near-end server) to be performed, the reliability of the business process is ensured.
The business processing method provided by the above embodiment is described below by taking a wind control scenario as an example.
Fig. 4 is a schematic block diagram of a business processing system according to an embodiment of the present specification. As shown in fig. 4, the business processing system includes a risk identification system 410 and a remote invocation protocol server (e.g., a penalty system 420). Wherein penalty system 420 provides a near-end service package to risk identification system 410 and integrates the near-end service package into an application system of risk identification system 410 for operation.
As shown in fig. 4, risk identification system 410 includes, in addition to its own risk identification units, a service distribution unit and an Agent collection unit deployed by penalty system 420. Penalty system 420 includes a synchronous service interface and an asynchronous service interface. The service distribution unit is configured to send a service processing request of the target service to a synchronous service interface of the penalty system 420, and the synchronous service interface performs synchronous processing on the target service. The Agent acquisition unit is configured to generate an asynchronous message corresponding to a service meeting an asynchronous processing condition in the target service, delay the asynchronous message to be delayed, send the asynchronous message to an asynchronous service interface of the punishment system 420, and perform asynchronous processing on the service meeting the asynchronous processing condition in the target service by using the asynchronous service interface.
Fig. 5 is a schematic flowchart of a service processing method according to an embodiment of the present disclosure, as shown in fig. 5, where the method is applied to the risk identification system 410 shown in fig. 4, and includes:
s502, generating a request identification of the account service request based on the account service request of the target account.
Wherein the account service request includes a request to prohibit an account from performing a specified class of operation, such as prohibit an account login, prohibit an account presentation, prohibit an account transfer, freeze an account, etc.
The risk identification system 410 generates a unique request identifier for each account service request, and the characterization mode of the request identifier is not limited, such as any identifier of serial number, letter, number, etc. For example, the request identifications of the account service requests are ID01, ID02, ID03, and the like, respectively.
S504, sending the account service request to a synchronous service interface of a remote call protocol server; the synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account.
S506, acquiring a synchronous service result from a synchronous service interface; and generating a service record corresponding to the target account based on the synchronous service result.
The service record corresponding to the target account may include a corresponding relationship between the request identifier of the target account and the synchronous service result. The synchronization service results may include synchronization service success, synchronization service failure, synchronization service anomaly, synchronization service timeout, and the like.
Table 1 schematically shows a partial service record corresponding to the target account. The method comprises the following steps of: the request identification corresponding to the target account, the punishment main body (such as identification information of the punishment main body), the punishment action and a return result of the punishment system. The punishment action can be understood as a service type for performing service on the target account, and the return result is a synchronous service result for performing synchronous service on the target account.
TABLE 1
Request identification Punishment subject Penalty actions Returning the result
ID01 Uid01 Prohibiting transfers Successful
ID02 Uid02 Login is prohibited Abnormality of
S508, according to the request identification and the service record of the account service request, asynchronous service is carried out on the accounts which meet the asynchronous service condition in the target accounts.
The account meeting the asynchronous service condition can comprise an account with synchronous service failure, abnormal synchronous service or overtime synchronous service and the like as a synchronous service result. Based on the method, the account service success rate can be further improved and the account service reliability can be ensured by carrying out asynchronous service on the account with failed synchronous service, abnormal synchronous service or overtime synchronous service and the like.
In this embodiment, the target account may be one or more. When the target account includes multiple accounts, risk identification system 410 may send account service requests for multiple target accounts simultaneously to the synchronous service interface of penalty system 420.
In one embodiment, when asynchronous service is performed on an account meeting an asynchronous service condition in a target account, if a synchronous service result corresponding to the target account is abnormal synchronous service, an asynchronous message corresponding to the target account is sent to a punishment system, and the punishment system is used for performing asynchronous service on the target account and generating an asynchronous service result corresponding to the target account. And if the service record does not contain the synchronous service result corresponding to the target account, carrying out asynchronous service on the target account according to the current account state of the user corresponding to the target account.
In this embodiment, if the service record does not include the synchronous service result corresponding to the target account, the service type corresponding to the target account may be determined, and the current account state of the user (such as the punishment subject shown in table 1) corresponding to the target account may be determined; judging whether the service type corresponding to the target account is matched with the current account state or not; and if the service type corresponding to the target account is not matched with the current account state of the user, sending the asynchronous message corresponding to the target account to a punishment system. The punishment system is used for carrying out asynchronous service on the target account and generating an asynchronous service result corresponding to the target account. If the service type corresponding to the target account is matched with the current account state of the user, the target account can be determined to be successfully served, and the service record corresponding to the target account can be updated according to the information that the target account is successfully served, for example, the corresponding relation between the request identifier corresponding to the target account and the service result is added in the service record.
Wherein the service type may be determined based on the penalty action. For example, the penalty action is to freeze an account, prohibit an account login, etc., and the service type may be classified into a freeze account type, prohibit an account login type, etc.
For example, the service type corresponding to the target account is a frozen account type, and the current account state of the user corresponding to the target account can be determined by querying the account state. Assuming that the current account state is frozen, the current account state is matched with the service type (namely the frozen account type) corresponding to the target account, and at the moment, the service record corresponding to the target account can be updated according to the successful information that the target account is serviced. If the current account state is not frozen, the current account state is not matched with the service type (namely the frozen account type) corresponding to the target account, and at the moment, an asynchronous message corresponding to the target account can be sent to a punishment system, and the punishment system carries out asynchronous service on the target account.
In one embodiment, before asynchronous service is performed on an account meeting the asynchronous service condition in the target account, log information corresponding to the account service request may be generated according to a preset log format. And further converting the log information corresponding to the account service request into an asynchronous message to obtain the asynchronous message corresponding to the target account.
In this embodiment, since the log generation process is equivalent to the write operation of the local disk, the log information corresponding to the service request must be successfully generated and written into the risk identification system, so as to ensure that the risk identification system converts the asynchronous information corresponding to the target account. In addition, the log format to which the log information should conform is not limited in this embodiment.
In one embodiment, after the asynchronous message corresponding to the target account is sent to the penalty system, the service record corresponding to the target account may be updated according to the asynchronous service result of the penalty system to the target account. Specifically, if the asynchronous service result corresponding to the target account is that the asynchronous service is successful, the asynchronous service result and the request identifier corresponding to the target account are added to the service record corresponding to the target account, so as to update the service record corresponding to the target account. If the asynchronous service result corresponding to the target account is asynchronous service failure or asynchronous service abnormality (such as asynchronous service timeout, etc.), determining the asynchronous service times of the target account, and determining the service mode of the target account based on the asynchronous service times of the target account.
In one embodiment, if the asynchronous service result corresponding to the target account is an asynchronous service failure or an asynchronous service abnormality (such as an asynchronous service timeout, etc.), the service mode for the target account is determined based on the number of asynchronous services of the target account. The specific steps can be as follows: judging whether the asynchronous service times of the target account are larger than a preset threshold value or not; if yes, outputting log information for identifying service failure of the target account; if not, continuing to carry out asynchronous service on the target account.
In this embodiment, if the number of asynchronous service times of the target account is not greater than the preset value, the asynchronous service is continued to be performed on the target account. The process is specifically executable as follows: and sending the asynchronous message corresponding to the target account to a punishment system, carrying out asynchronous service on the target account by the punishment system, and generating an asynchronous service result corresponding to the target account.
In one embodiment, before the account meeting the asynchronous service condition in the target account is subjected to asynchronous service, the message duration of the asynchronous message corresponding to the target account can be determined, wherein the message duration comprises the duration from the generation time point of the asynchronous message to the current time point; judging whether the message duration of the asynchronous message is less than a preset duration; if yes, prolonging the message duration of the asynchronous message by a first time duration, so that the prolonged message duration is greater than or equal to the preset duration; if not, sending the asynchronous message corresponding to the target account to the punishment system, carrying out asynchronous service on the target account by the punishment system, and generating an asynchronous service result corresponding to the target account.
For example, if the preset duration is 30 seconds, and if the message duration of the asynchronous message corresponding to the target account (i.e., the duration from the generation time point of the asynchronous message to the current time point) is less than 30 seconds, the message duration of the asynchronous message is prolonged to 30 seconds or more, and then the delayed asynchronous message is sent to the penalty system.
In this embodiment, when the asynchronous message is sent to the penalty system, the asynchronous message with the message duration smaller than the preset duration needs to be delayed, so that the time for the asynchronous message to reach the penalty system is prevented from being later than the time for the synchronous service request to reach the penalty system. That is, based on the account service request of the target account, synchronous service is firstly performed, and after the synchronous service is completed, asynchronous service is performed on the account meeting the asynchronous service condition.
Therefore, by adopting the technical scheme provided by the embodiment of the specification, the risk identification system generates the request identifier of the account service request of the target account and sends the account service request to the synchronous service interface of the punishment system for synchronous service. And the synchronous service request of the synchronous service interface to the target account is obtained, and the service record corresponding to the target account is generated based on the synchronous service result, so that the account meeting the asynchronous service condition is subjected to asynchronous service according to the request identification of the account service request and the service record. Therefore, the purpose of serving accounts by calling other servers (such as a punishment system) is achieved, the served rate and the service success rate of the target account are ensured through the asynchronous service account, and the situation that account service failure is easily caused when only the service account is synchronous is avoided. Furthermore, since most of the operations in the account service process are integrated into the risk identification system to be performed, reliability of the account service is ensured.
In summary, particular embodiments of the present subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may be advantageous.
The service processing method provided for one or more embodiments of the present disclosure further provides a service processing device based on the same concept.
Fig. 6 is a schematic block diagram of a service processing apparatus according to an embodiment of the present specification, and as shown in fig. 6, the apparatus is applied to a first server, including:
a first generating module 610, configured to generate a request identifier of a service processing request based on a service processing request of a target service;
the first sending module 620 sends the service processing request to the synchronous service interface of the second server; the synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service;
A first obtaining module 630, configured to obtain the synchronization processing result from the synchronization service interface; and generating a processing record corresponding to the target service based on the synchronous processing result;
and the asynchronous processing module 640 performs asynchronous processing on the service meeting the asynchronous processing condition in the target service according to the request identifier of the service processing request and the processing record.
In one embodiment, the processing record includes a correspondence between the request identifier of the target service and the synchronization processing result; the synchronous processing result comprises at least one of successful synchronous processing, failure synchronous processing and abnormal synchronous processing;
the asynchronous processing module 640 includes:
the inquiring unit inquires the synchronous processing result corresponding to the target service from the processing record according to the request identifier of the service processing request;
the determining unit is used for determining the business meeting the asynchronous processing condition in the target business according to the inquired synchronous processing result; the asynchronous processing conditions include at least one of: the synchronous processing result is abnormal synchronous processing, and the processing record does not contain the synchronous processing result corresponding to the target service;
And the asynchronous processing unit performs asynchronous processing on the business meeting the asynchronous processing condition in the target business.
In an embodiment, the asynchronous processing unit is further configured to:
if the synchronous processing result corresponding to the target service is abnormal in synchronous processing, sending an asynchronous message corresponding to the target service to the second server; the second server is used for carrying out asynchronous processing on the target service and generating an asynchronous processing result corresponding to the target service;
and if the processing record does not contain the synchronous processing result corresponding to the target service, carrying out asynchronous processing on the target service according to the current service state of the user corresponding to the target service.
In an embodiment, the asynchronous processing unit is further configured to:
determining a service type corresponding to the target service; and determining the current service state of the user corresponding to the target service;
judging whether the service type corresponding to the target service is matched with the current service state or not;
if not, sending the asynchronous message corresponding to the target service to the second server; the second server is used for carrying out asynchronous processing on the target service and generating an asynchronous processing result corresponding to the target service.
In one embodiment, the apparatus further comprises:
the generation module is used for generating log information corresponding to the service processing request according to a preset log format before asynchronous processing is carried out on the service meeting the asynchronous processing condition in the target service;
and the conversion module is used for converting the log information corresponding to the service processing request into an asynchronous message to obtain the asynchronous message corresponding to the target service.
In one embodiment, the apparatus further comprises:
the updating module is used for adding the asynchronous processing result and the corresponding request identifier into the processing record to update the processing record if the asynchronous processing result is that the asynchronous processing is successful after the asynchronous message corresponding to the target service is sent to the second server;
the first determining module is used for determining the asynchronous processing times of the target service if the asynchronous processing result is asynchronous processing failure or asynchronous processing abnormality; and determining the processing mode of the target service based on the asynchronous processing times.
In one embodiment, the determining module is further configured to:
judging whether the asynchronous processing times are larger than a preset threshold value or not;
If yes, outputting log information for identifying the processing failure of the target service;
if not, continuing to asynchronously process the target service.
In one embodiment, the apparatus further comprises:
the second determining module is used for determining the message duration of the asynchronous message corresponding to the target service before the asynchronous processing of the service meeting the asynchronous processing condition in the target service; the message duration comprises a duration from a generation time point to a current time point of the asynchronous message;
the judging module is used for judging whether the message duration of the asynchronous message is smaller than a preset duration;
the delay module is used for prolonging the message duration of the asynchronous message by a first time duration if the asynchronous message is received; the prolonged message time length is greater than or equal to the preset time length;
and the execution module is used for executing the step of sending the asynchronous message to the second server if not.
By adopting the device provided by one or more embodiments of the present disclosure, the first server performs synchronization processing by generating the request identifier of the service processing request of the target service, and sending the service processing request to the synchronization service interface of the second server. And the synchronous processing request of the synchronous service interface to the target service is obtained, and a processing record corresponding to the target service is generated based on the synchronous processing result, so that the service meeting the asynchronous processing condition is asynchronously processed according to the request identification and the processing record of the service processing request. Therefore, the purpose of processing the service by calling other servers is achieved, the processed rate and the processing success rate of the target service are ensured by asynchronously processing the service, and the condition that service processing failure is easily caused when only synchronously processing the service is avoided. Furthermore, since most of the operations in the business process are integrated into the first server (i.e., the near-end server) to be performed, the reliability of the business process is ensured.
It should be understood by those skilled in the art that the above-mentioned service processing apparatus can be used to implement the service processing method described above, and the detailed description thereof should be similar to that of the method described above, so as to avoid complexity, and details are not repeated here.
Fig. 7 is a schematic block diagram of a service processing apparatus according to another embodiment of the present specification, and as shown in fig. 7, the apparatus is applied to a risk identification system, and includes:
a second generating module 710, configured to generate a request identifier of an account service request based on the account service request of the target account; the account service request comprises a request for prohibiting an account from executing a specified class of operation;
a second sending module 720, configured to send the account service request to a synchronous service interface of a remote call protocol server; the synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account;
a second obtaining module 730, configured to obtain the synchronization service result from the synchronization service interface; generating a service record corresponding to the target account based on the synchronous service result;
and the asynchronous service module 740 performs asynchronous service on the account meeting the asynchronous service condition in the target account according to the request identifier of the account service request and the service record.
By adopting the device provided by the embodiment of the specification, the risk identification system generates the request identifier of the account service request of the target account and sends the account service request to the synchronous service interface of the punishment system to carry out synchronous service. And the synchronous service request of the synchronous service interface to the target account is obtained, and the service record corresponding to the target account is generated based on the synchronous service result, so that the account meeting the asynchronous service condition is subjected to asynchronous service according to the request identification of the account service request and the service record. Therefore, the purpose of serving accounts by calling other servers (such as a punishment system) is achieved, the served rate and the service success rate of the target account are ensured through the asynchronous service account, and the situation that account service failure is easily caused when only the service account is synchronous is avoided. Furthermore, since most of the operations in the account service process are integrated into the risk identification system to be performed, reliability of the account service is ensured.
It should be understood by those skilled in the art that the above-mentioned service processing apparatus can be used to implement the service processing method described above, and the detailed description thereof should be similar to that of the method described above, so as to avoid complexity, and details are not repeated here.
Based on the same idea, one or more embodiments of the present disclosure further provide a service processing device, as shown in fig. 8. The service processing device may be configured or configured differently to provide a relatively large variance, and may include one or more processors 801 and memory 802, where the memory 802 may store one or more stored applications or data. Wherein the memory 802 may be transient storage or persistent storage. The application programs stored in memory 802 may include one or more modules (not shown in the figures), each of which may include a series of computer executable instructions for use in a business processing device. Still further, the processor 801 may be configured to communicate with a memory 802 and execute a series of computer executable instructions in the memory 802 on a service processing device. The traffic handling device may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input/output interfaces 805, one or more keyboards 806.
In particular, in this embodiment, the service processing device includes a memory, and one or more programs, where the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the service processing device, and the one or more programs configured to be executed by the one or more processors include computer executable instructions for:
Generating a request identifier of a service processing request based on the service processing request of a target service;
the service processing request is sent to a synchronous service interface of a second server; the synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service;
acquiring the synchronous processing result from the synchronous service interface; and generating a processing record corresponding to the target service based on the synchronous processing result;
and carrying out asynchronous processing on the business meeting the asynchronous processing conditions in the target business according to the request identification of the business processing request and the processing record.
Optionally, the processing record includes a correspondence between a request identifier of the target service and the synchronization processing result; the synchronous processing result comprises at least one of successful synchronous processing, failure synchronous processing and abnormal synchronous processing;
the computer executable instructions, when executed, may further cause the processor to:
inquiring the synchronous processing result corresponding to the target service from the processing record according to the request identifier of the service processing request;
Determining the business meeting the asynchronous processing condition in the target business according to the inquired synchronous processing result; the asynchronous processing conditions include at least one of: the synchronous processing result is abnormal synchronous processing, and the processing record does not contain the synchronous processing result corresponding to the target service;
and carrying out asynchronous processing on the business meeting the asynchronous processing condition in the target business.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
if the synchronous processing result corresponding to the target service is abnormal in synchronous processing, sending an asynchronous message corresponding to the target service to the second server; the second server is used for carrying out asynchronous processing on the target service and generating an asynchronous processing result corresponding to the target service;
and if the processing record does not contain the synchronous processing result corresponding to the target service, carrying out asynchronous processing on the target service according to the current service state of the user corresponding to the target service.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
Determining a service type corresponding to the target service; and determining the current service state of the user corresponding to the target service;
judging whether the service type corresponding to the target service is matched with the current service state or not;
if not, sending the asynchronous message corresponding to the target service to the second server; the second server is used for carrying out asynchronous processing on the target service and generating an asynchronous processing result corresponding to the target service.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
before asynchronous processing is carried out on the business meeting the asynchronous processing conditions in the target business, generating log information corresponding to the business processing request according to a preset log format;
and converting the log information corresponding to the service processing request into an asynchronous message to obtain the asynchronous message corresponding to the target service.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
after the asynchronous message corresponding to the target service is sent to the second server, if the asynchronous processing result is that the asynchronous processing is successful, adding the asynchronous processing result and the corresponding request identifier into the processing record to update the processing record;
If the asynchronous processing result is that the asynchronous processing fails or is abnormal, determining the asynchronous processing times of the target service; and determining the processing mode of the target service based on the asynchronous processing times.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
judging whether the asynchronous processing times are larger than a preset threshold value or not;
if yes, outputting log information for identifying the processing failure of the target service;
if not, continuing to asynchronously process the target service.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
before asynchronous processing is carried out on the business meeting the asynchronous processing condition in the target business, determining the message duration of the asynchronous message corresponding to the target business; the message duration comprises a duration from a generation time point to a current time point of the asynchronous message;
judging whether the message duration of the asynchronous message is smaller than a preset duration;
if yes, prolonging the message duration of the asynchronous message by a first time duration; the prolonged message time length is greater than or equal to the preset time length;
If not, the step of sending the asynchronous message to the second server is performed.
Based on the same idea, one or more embodiments of the present disclosure further provide a service processing device, as shown in fig. 9. The service processing device may be configured or configured differently to produce a relatively large variance, and may include one or more processors 901 and a memory 902, where the memory 902 may store one or more storage applications or data. Wherein the memory 902 may be transient storage or persistent storage. The application programs stored in the memory 902 may include one or more modules (not shown in the figures), each of which may include a series of computer executable instructions for use in a business processing device. Still further, the processor 901 may be provided in communication with a memory 902 for executing a series of computer executable instructions in the memory 902 on a business processing device. The traffic handling device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input output interfaces 905, and one or more keyboards 906.
In particular, in this embodiment, the service processing device includes a memory, and one or more programs, where the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the service processing device, and the one or more programs configured to be executed by the one or more processors include computer executable instructions for:
Generating a request identifier of an account service request based on the account service request of a target account; the account service request comprises a request for prohibiting an account from executing a specified class of operation;
the account service request is sent to a synchronous service interface of a remote call protocol server; the synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account;
acquiring the synchronous service result from the synchronous service interface; generating a service record corresponding to the target account based on the synchronous service result;
and carrying out asynchronous service on the accounts meeting the asynchronous service condition in the target accounts according to the request identification of the account service request and the service record.
One or more embodiments of the present specification also provide a computer-readable storage medium storing one or more programs, the one or more programs including instructions, which when executed by an electronic device comprising a plurality of application programs, enable the electronic device to perform the above-described business processing method, and in particular to perform:
Generating a request identifier of a service processing request based on the service processing request of a target service;
the service processing request is sent to a synchronous service interface of a second server; the synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service;
acquiring the synchronous processing result from the synchronous service interface; and generating a processing record corresponding to the target service based on the synchronous processing result;
and carrying out asynchronous processing on the business meeting the asynchronous processing conditions in the target business according to the request identification of the business processing request and the processing record.
One or more embodiments of the present specification also provide a computer-readable storage medium storing one or more programs, the one or more programs including instructions, which when executed by an electronic device comprising a plurality of application programs, enable the electronic device to perform the above-described business processing method, and in particular to perform:
generating a request identifier of an account service request based on the account service request of a target account; the account service request comprises a request for prohibiting an account from executing a specified class of operation;
The account service request is sent to a synchronous service interface of a remote call protocol server; the synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account;
acquiring the synchronous service result from the synchronous service interface; generating a service record corresponding to the target account based on the synchronous service result;
and carrying out asynchronous service on the accounts meeting the asynchronous service condition in the target accounts according to the request identification of the account service request and the service record.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing one or more embodiments of the present description.
One skilled in the art will appreciate that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
One or more embodiments of the present specification are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (trans itory media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
One or more embodiments of the present specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is merely one or more embodiments of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of one or more embodiments of the present disclosure, are intended to be included within the scope of the claims of one or more embodiments of the present disclosure.

Claims (18)

1. A business processing method is applied to a first server and comprises the following steps:
generating a request identifier of a service processing request based on the service processing request of a target service;
the service processing request is sent to a synchronous service interface of a second server; the synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service;
acquiring the synchronous processing result from the synchronous service interface; and generating a processing record corresponding to the target service based on the synchronous processing result;
and carrying out asynchronous processing on the business meeting the asynchronous processing conditions in the target business according to the request identification of the business processing request and the processing record, wherein the business meeting the asynchronous processing conditions comprises a business with synchronous processing results of synchronous processing failure, abnormal synchronous processing or overtime synchronous processing.
2. The method of claim 1, wherein the processing record includes a correspondence between a request identifier of the target service and the synchronization processing result; the synchronous processing result comprises at least one of successful synchronous processing, failure synchronous processing and abnormal synchronous processing;
And carrying out asynchronous processing on the business meeting the asynchronous processing condition in the target business according to the request identifier of the business processing request and the processing record, wherein the asynchronous processing comprises the following steps:
inquiring the synchronous processing result corresponding to the target service from the processing record according to the request identifier of the service processing request;
determining the business meeting the asynchronous processing condition in the target business according to the inquired synchronous processing result; the asynchronous processing conditions include at least one of: the synchronous processing result is abnormal synchronous processing, and the processing record does not contain the synchronous processing result corresponding to the target service;
and carrying out asynchronous processing on the business meeting the asynchronous processing condition in the target business.
3. The method of claim 2, wherein the asynchronous processing of the traffic meeting the asynchronous processing condition in the target traffic comprises:
if the synchronous processing result corresponding to the target service is abnormal in synchronous processing, sending an asynchronous message corresponding to the target service to the second server; the second server is used for carrying out asynchronous processing on the target service and generating an asynchronous processing result corresponding to the target service;
And if the processing record does not contain the synchronous processing result corresponding to the target service, carrying out asynchronous processing on the target service according to the current service state of the user corresponding to the target service.
4. A method according to claim 3, wherein said asynchronous processing of said target service according to the current service state of the user corresponding to said target service comprises:
determining a service type corresponding to the target service; and determining the current service state of the user corresponding to the target service;
judging whether the service type corresponding to the target service is matched with the current service state or not;
if not, sending the asynchronous message corresponding to the target service to the second server; the second server is used for carrying out asynchronous processing on the target service and generating an asynchronous processing result corresponding to the target service.
5. The method according to claim 3 or 4, before the asynchronous processing is performed on the traffic meeting the asynchronous processing condition in the target traffic, further comprising:
generating log information corresponding to the service processing request according to a preset log format;
and converting the log information corresponding to the service processing request into an asynchronous message to obtain the asynchronous message corresponding to the target service.
6. The method according to claim 3 or 4, further comprising, after the sending the asynchronous message corresponding to the target service to the second server:
if the asynchronous processing result is that the asynchronous processing is successful, adding the asynchronous processing result and the corresponding request identifier into the processing record to update the processing record;
if the asynchronous processing result is that the asynchronous processing fails or is abnormal, determining the asynchronous processing times of the target service; and determining the processing mode of the target service based on the asynchronous processing times.
7. The method of claim 6, wherein the determining the processing manner of the target service based on the asynchronous processing times comprises:
judging whether the asynchronous processing times are larger than a preset threshold value or not;
if yes, outputting log information for identifying the processing failure of the target service;
if not, continuing to asynchronously process the target service.
8. The method of claim 5, further comprising, prior to asynchronously processing the traffic meeting the asynchronous processing condition in the target traffic:
determining the message duration of the asynchronous message corresponding to the target service; the message duration comprises a duration from a generation time point to a current time point of the asynchronous message;
Judging whether the message duration of the asynchronous message is smaller than a preset duration;
if yes, prolonging the message duration of the asynchronous message by a first time duration; the prolonged message time length is greater than or equal to the preset time length;
if not, the step of sending the asynchronous message to the second server is performed.
9. A business processing method is applied to a risk identification system, and comprises the following steps:
generating a request identifier of an account service request based on the account service request of a target account; the account service request comprises a request for prohibiting an account from executing a specified class of operation;
the account service request is sent to a synchronous service interface of a remote call protocol server; the synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account;
acquiring the synchronous service result from the synchronous service interface; generating a service record corresponding to the target account based on the synchronous service result;
and carrying out asynchronous service on the accounts meeting the asynchronous service condition in the target accounts according to the request identification of the account service request and the service record, wherein the accounts meeting the asynchronous service condition comprise accounts with synchronous service failure, abnormal synchronous service or overtime synchronous service as synchronous service results.
10. A service processing apparatus, applied to a first server, comprising:
the first generation module is used for generating a request identifier of a service processing request based on the service processing request of a target service;
the first sending module is used for sending the business processing request to a synchronous service interface of the second server; the synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service;
the first acquisition module acquires the synchronous processing result from the synchronous service interface; and generating a processing record corresponding to the target service based on the synchronous processing result;
and the asynchronous processing module performs asynchronous processing on the business meeting the asynchronous processing conditions in the target business according to the request identification of the business processing request and the processing record, wherein the business meeting the asynchronous processing conditions comprises a business with synchronous processing failure, abnormal synchronous processing or overtime synchronous processing as a synchronous processing result.
11. The apparatus of claim 10, the processing record comprising a correspondence between a request identification of the target service and the synchronization processing result; the synchronous processing result comprises at least one of successful synchronous processing, failure synchronous processing and abnormal synchronous processing;
The asynchronous processing module comprises:
the inquiring unit inquires the synchronous processing result corresponding to the target service from the processing record according to the request identifier of the service processing request;
the determining unit is used for determining the business meeting the asynchronous processing condition in the target business according to the inquired synchronous processing result; the asynchronous processing conditions include at least one of: the synchronous processing result is abnormal synchronous processing, and the processing record does not contain the synchronous processing result corresponding to the target service;
and the asynchronous processing unit performs asynchronous processing on the business meeting the asynchronous processing condition in the target business.
12. The apparatus of claim 11, the asynchronous processing unit further to:
if the synchronous processing result corresponding to the target service is abnormal in synchronous processing, sending an asynchronous message corresponding to the target service to the second server; the second server is used for carrying out asynchronous processing on the target service and generating an asynchronous processing result corresponding to the target service;
and if the processing record does not contain the synchronous processing result corresponding to the target service, carrying out asynchronous processing on the target service according to the current service state of the user corresponding to the target service.
13. The apparatus of claim 12, the asynchronous processing unit further to:
determining a service type corresponding to the target service; and determining the current service state of the user corresponding to the target service;
judging whether the service type corresponding to the target service is matched with the current service state or not;
if not, sending the asynchronous message corresponding to the target service to the second server; the second server is used for carrying out asynchronous processing on the target service and generating an asynchronous processing result corresponding to the target service.
14. A business processing device applied to a risk identification system, comprising:
the second generation module is used for generating a request identifier of the account service request based on the account service request of the target account; the account service request comprises a request for prohibiting an account from executing a specified class of operation;
the second sending module is used for sending the account service request to a synchronous service interface of a remote call protocol server; the synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account;
The second acquisition module acquires the synchronous service result from the synchronous service interface; generating a service record corresponding to the target account based on the synchronous service result;
and the asynchronous service module performs asynchronous service on the accounts meeting the asynchronous service condition in the target accounts according to the request identification of the account service request and the service record, wherein the accounts meeting the asynchronous service condition comprise accounts with synchronous service failure, abnormal synchronous service or overtime synchronous service as synchronous service results.
15. A service processing device, applied to a first server, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
generating a request identifier of a service processing request based on the service processing request of a target service;
the service processing request is sent to a synchronous service interface of a second server; the synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service;
acquiring the synchronous processing result from the synchronous service interface; and generating a processing record corresponding to the target service based on the synchronous processing result;
And carrying out asynchronous processing on the business meeting the asynchronous processing conditions in the target business according to the request identification of the business processing request and the processing record, wherein the business meeting the asynchronous processing conditions comprises a business with synchronous processing results of synchronous processing failure, abnormal synchronous processing or overtime synchronous processing.
16. A business processing device, applied to a risk identification system, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
generating a request identifier of an account service request based on the account service request of a target account; the account service request comprises a request for prohibiting an account from executing a specified class of operation;
the account service request is sent to a synchronous service interface of a remote call protocol server; the synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account;
acquiring the synchronous service result from the synchronous service interface; generating a service record corresponding to the target account based on the synchronous service result;
And carrying out asynchronous service on the accounts meeting the asynchronous service condition in the target accounts according to the request identification of the account service request and the service record, wherein the accounts meeting the asynchronous service condition comprise accounts with synchronous service failure, abnormal synchronous service or overtime synchronous service as synchronous service results.
17. A storage medium storing computer-executable instructions that when executed implement the following:
generating a request identifier of a service processing request based on the service processing request of a target service;
the service processing request is sent to a synchronous service interface of a second server; the synchronous service interface is used for carrying out synchronous processing on the target service based on the service processing request and generating a synchronous processing result corresponding to the target service;
acquiring the synchronous processing result from the synchronous service interface; and generating a processing record corresponding to the target service based on the synchronous processing result;
and carrying out asynchronous processing on the business meeting the asynchronous processing conditions in the target business according to the request identification of the business processing request and the processing record, wherein the business meeting the asynchronous processing conditions comprises a business with synchronous processing results of synchronous processing failure, abnormal synchronous processing or overtime synchronous processing.
18. A storage medium storing computer-executable instructions that when executed implement the following:
generating a request identifier of an account service request based on the account service request of a target account; the account service request comprises a request for prohibiting an account from executing a specified class of operation;
the account service request is sent to a synchronous service interface of a remote call protocol server; the synchronous service interface is used for carrying out synchronous service on the target account based on the account service request and generating a synchronous service result corresponding to the target account;
acquiring the synchronous service result from the synchronous service interface; generating a service record corresponding to the target account based on the synchronous service result;
and carrying out asynchronous service on the accounts meeting the asynchronous service condition in the target accounts according to the request identification of the account service request and the service record, wherein the accounts meeting the asynchronous service condition comprise accounts with synchronous service failure, abnormal synchronous service or overtime synchronous service as synchronous service results.
CN202010086202.8A 2020-02-11 2020-02-11 Service processing method and device Active CN111290866B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010086202.8A CN111290866B (en) 2020-02-11 2020-02-11 Service processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010086202.8A CN111290866B (en) 2020-02-11 2020-02-11 Service processing method and device

Publications (2)

Publication Number Publication Date
CN111290866A CN111290866A (en) 2020-06-16
CN111290866B true CN111290866B (en) 2023-06-30

Family

ID=71029214

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010086202.8A Active CN111290866B (en) 2020-02-11 2020-02-11 Service processing method and device

Country Status (1)

Country Link
CN (1) CN111290866B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311883B (en) * 2020-10-30 2023-04-07 杭州安恒信息安全技术有限公司 Data synchronization method and system
CN112579622B (en) * 2020-12-10 2022-09-02 腾讯科技(深圳)有限公司 Method, device and equipment for processing service data
CN112929431B (en) * 2021-02-01 2022-12-20 深圳市科漫达智能管理科技有限公司 Message synchronous and asynchronous response conversion method and device based on micro-service framework
CN113034178A (en) * 2021-03-15 2021-06-25 深圳市麦谷科技有限公司 Multi-system integral calculation method and device, terminal equipment and storage medium
CN113256373B (en) * 2021-05-17 2023-11-07 北京京东振世信息技术有限公司 Document distribution method, device and server
CN113448931B (en) * 2021-07-01 2024-05-17 京东科技控股股份有限公司 Data processing method, business transaction platform and business providing platform
CN113535782B (en) * 2021-07-22 2024-05-07 成都数之联科技股份有限公司 BI report query response method, system, electronic equipment and computer readable storage medium
CN115328670B (en) * 2022-06-27 2023-11-17 光大环境科技(中国)有限公司 Asynchronous task processing method, system and server
CN115412592B (en) * 2022-08-19 2023-08-22 恒生电子股份有限公司 Service processing system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014191655A (en) * 2013-03-27 2014-10-06 Toyota Motor Corp Multiprocessor, electronic control device, and program
CN110442481A (en) * 2019-07-10 2019-11-12 阿里巴巴集团控股有限公司 Method for processing business, Service Component container and electronic equipment
WO2019223390A1 (en) * 2018-05-21 2019-11-28 阿里巴巴集团控股有限公司 Authorization guidance data processing method, apparatus, device and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9152401B2 (en) * 2009-05-02 2015-10-06 Citrix Systems, Inc. Methods and systems for generating and delivering an interactive application delivery store
US9880860B2 (en) * 2010-05-05 2018-01-30 Microsoft Technology Licensing, Llc Automatic return to synchronization context for asynchronous computations
CN104717132B (en) * 2015-02-13 2017-10-13 腾讯科技(深圳)有限公司 Message method, device and system
CN107741885B (en) * 2017-10-09 2020-12-01 用友网络科技股份有限公司 Transaction and service association method and system based on CS framework
CN109635020A (en) * 2018-10-29 2019-04-16 阿里巴巴集团控股有限公司 A kind of processing method of business, device, equipment and system
CN110457142B (en) * 2019-07-10 2023-05-09 创新先进技术有限公司 Service processing method, system, machine room, architecture and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014191655A (en) * 2013-03-27 2014-10-06 Toyota Motor Corp Multiprocessor, electronic control device, and program
WO2019223390A1 (en) * 2018-05-21 2019-11-28 阿里巴巴集团控股有限公司 Authorization guidance data processing method, apparatus, device and system
CN110442481A (en) * 2019-07-10 2019-11-12 阿里巴巴集团控股有限公司 Method for processing business, Service Component container and electronic equipment

Also Published As

Publication number Publication date
CN111290866A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN111290866B (en) Service processing method and device
CN110046023B (en) Data processing method and system based on intelligent contract of block chain
CN109933404B (en) Encoding and decoding method and system based on block chain intelligent contract
US20200304580A1 (en) Network information processing
CN110992188B (en) Transaction processing method, device and equipment
CN106034138A (en) Remote service calling method and remote service calling device
CN110046991B (en) Data processing method and system based on intelligent contract of block chain
CN110599305A (en) Service processing method, device and storage medium
EP3428796A1 (en) Resource loading method, and service function implementing method and device for application (app)
CN104503768A (en) Call method and device for application programming interface (API)
CN114416224B (en) Method and device for calling micro service under multi-micro service environment
CN114020444B (en) Calling system and method for resource service application in enterprise digital middle station
CN111078468A (en) Service rollback method and device under micro-service architecture
CN108647102B (en) Service request processing method and device of heterogeneous system and electronic equipment
CN111159298B (en) Service request processing method and device, electronic equipment and storage medium
CN110764930B (en) Request or response processing method and device based on message mode
CN107169752B (en) Resource transfer method and device
CN105988949A (en) Terminal equipment and data interactive processing method and system
CN110620734A (en) TCP link data processing method and device
CN114244898A (en) Service grid-based workload preheating method and device
CN111435320B (en) Data processing method and device
CN109067611B (en) Method, device, storage medium and processor for detecting communication state between systems
CN113485758A (en) Micro-service issuing method and device, electronic equipment and storage medium
CN114528264A (en) Data synchronization method and system
CN111383025B (en) Method and device for forwarding wind control data and electronic equipment

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
GR01 Patent grant
GR01 Patent grant