CN111736995A - Resource channel state switching method, device, equipment and storage medium - Google Patents

Resource channel state switching method, device, equipment and storage medium Download PDF

Info

Publication number
CN111736995A
CN111736995A CN202010546471.8A CN202010546471A CN111736995A CN 111736995 A CN111736995 A CN 111736995A CN 202010546471 A CN202010546471 A CN 202010546471A CN 111736995 A CN111736995 A CN 111736995A
Authority
CN
China
Prior art keywords
resource
channel
resource transfer
maintenance
state
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.)
Withdrawn
Application number
CN202010546471.8A
Other languages
Chinese (zh)
Inventor
张琦
尹航
王彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202010546471.8A priority Critical patent/CN111736995A/en
Publication of CN111736995A publication Critical patent/CN111736995A/en
Withdrawn legal-status Critical Current

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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • G06Q20/108Remote banking, e.g. home banking
    • 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

Landscapes

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

Abstract

The application discloses a method, a device, equipment and a storage medium for switching states of resource channels, and belongs to the field of computer programs. The method comprises the following steps: determining a first type of resource transfer request corresponding to a maintenance reason in at least two types of resource transfer requests supported by a resource channel in a maintenance state; detecting a resource channel by adopting a first type of resource transfer request to obtain a detection result; determining the channel success rate of the resource channel during resource transfer according to the detection result; and responding to the channel success rate larger than the success rate threshold value, and switching the state of the resource channel from the maintenance state to the available state. The method can automatically switch the state of the resource channel on the service platform into the available state in time when the state of the resource channel is converted into the available state, does not need to wait for the notification of the recovery use of the resource channel of the third-party platform, and improves the recovery efficiency of the resource channel on the service platform.

Description

Resource channel state switching method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer programs, and in particular, to a method, an apparatus, a device, and a storage medium for switching states of resource channels.
Background
On the service platform, if a user needs to transfer resources from one account to another account, the resources can be transferred by using a resource channel provided by a third-party platform.
Illustratively, a client of a service platform runs on a terminal, a resource transfer request is triggered by the client, and the service platform calls a resource channel on a third-party platform to process the resource transfer request, so that resources in one account are transferred to another account. The operator of the third-party platform maintains the resource channel at variable time to eliminate faults and errors of the resource channel.
After the maintenance of the resource channel is completed, if the service platform uses the resource channel, the operator of the service platform needs to reset the resource channel, so that the order transaction on the service platform can realize resource transfer by using the resource channel.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for switching states of a resource channel, under the condition that the resource channel provided by a third-party platform is in a maintenance state, if only part of resource transfer requests of the types cannot be successfully processed in at least two types of resource transfer requests supported by the resource channel, the resource channel is detected by adopting the resource transfer requests of the types which cannot be successfully processed, so that the state of the resource channel is more accurately detected, the resource channel is timely switched back to an available state after the resource channel recovers the available state, a recovery notice of the third-party platform is not required to be waited, and the recovery efficiency of the resource channel on a service platform is improved. The technical scheme is as follows:
according to an aspect of the present application, a method for switching states of a resource channel is provided, which is applied to a service platform, where the service platform is a computer device between a client and a third-party platform that provides the resource channel, and the method includes:
determining a first type of resource transfer request corresponding to a maintenance reason in at least two types of resource transfer requests supported by a resource channel in a maintenance state;
detecting a resource channel by adopting a first type of resource transfer request to obtain a detection result;
determining the channel success rate of the resource channel during resource transfer according to the detection result;
and responding to the channel success rate larger than the success rate threshold value, and switching the state of the resource channel from the maintenance state to the available state.
According to another aspect of the present application, there is provided a status switching apparatus of a resource channel, the apparatus including:
the determining module is used for determining a first type of resource transfer request corresponding to the maintenance reason in at least two types of resource transfer requests supported by the resource channel in the maintenance state;
the detection module is used for detecting the resource channel by adopting the first type of resource transfer request to obtain a detection result;
the operation module is used for determining the channel success rate of the resource channel during resource transfer according to the detection result;
and the switching module is used for responding to the channel success rate larger than the success rate threshold value and switching the state of the resource channel from the maintenance state to the available state.
According to another aspect of the present application, there is provided a server, including: a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the resource channel state switching method according to the above aspect.
According to another aspect of the present application, there is provided a computer-readable storage medium having a computer program stored therein, the computer program being loaded and executed by a processor to implement the method for switching the state of a resource channel according to the above aspect.
According to another aspect of the present application, a computer program product is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the state switching method of the resource channel according to the aspect.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
when the service platform determines that the resource channel is in the maintenance state, determining a first type of resource transfer request corresponding to the maintenance reason from at least two types of resource transfer requests supported by the resource channel; the method comprises the steps of adopting a first-class resource transfer request to perform channel detection on a resource channel aiming at maintenance reasons, so as to timely and accurately acquire state change of the resource channel, if the channel success rate of the resource channel during resource transfer is greater than a success rate threshold value, indicating that the resource channel is successfully maintained, timely and automatically switching the state of the resource channel on a service platform into an available state, and not needing to wait for a notification of recovery use of the resource channel of a third-party platform, thereby improving the recovery efficiency of the resource channel on the service platform, being capable of more timely processing the unprocessed first-class resource transfer request, and shortening the processing delay of the first-class resource transfer request.
The method only carries out channel detection aiming at the maintenance reason, can not influence the processing of other types of resource transfer requests except the first type, namely, the resource channel is continuously called to process the other types of resource transfer requests, and the timeliness of the processing of the other types of resource transfer requests is also ensured.
According to the method, after the service platform detects that the resource channel is recovered to the available state, the maintenance state is automatically switched to the available state without manual setting by an operator of the service platform, so that the recovery efficiency of the resource channel is improved, and meanwhile, the waste of human resources is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 illustrates a block diagram of a computer system provided in an exemplary embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for switching states of resource channels according to an exemplary embodiment of the present application;
fig. 3 is a flowchart illustrating a method for switching states of resource channels according to another exemplary embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for switching states of resource channels according to another exemplary embodiment of the present application;
FIG. 5 is a flowchart illustrating a method for switching states of resource channels according to another exemplary embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for switching states of resource channels according to another exemplary embodiment of the present application;
fig. 7 is a flowchart illustrating a method for switching states of resource channels according to another exemplary embodiment of the present application;
FIG. 8 illustrates a flow chart of a method for determining a probe time provided by an exemplary embodiment of the present application;
fig. 9 is a flowchart illustrating a method for switching states of resource channels according to another exemplary embodiment of the present application;
FIG. 10 is a flowchart illustrating a method for detecting a status of a resource channel according to an exemplary embodiment of the present application;
FIG. 11 is a diagram illustrating a state switching device for resource channels according to an exemplary embodiment of the present application;
fig. 12 shows a schematic structural diagram of a computer device provided in an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Reference will first be made to several terms referred to in this application:
the resource channel refers to a channel for resource transfer. Resource transfer refers to the transfer of resources from one account to another account, and illustratively, the transfer of funds between two accounts, such as payroll payments, subscription payments, transaction payments, red envelope issuances, and the like. The resources may include currency, such as electronic currency, circulating in the transaction system. The channel used for transferring the resources from one account to another account is a resource channel, for example, a cross-bank transfer channel provided by XXX bank is used for transferring the funds from XXX bank account 123xxxxxxxxxxxx to YYY bank account 456 yyyyyyyyyyyy.
The resource channels provided in the present application support at least two types of resource transfer requests. The types of the resource transfer requests are divided according to account sources and account types of the accounts of the two parties of the resource transfer. For example, the account sources may include banks, loan institutions, and other types of financial institutions; taking the account source as a bank for example, the account types may include a private debit card account, a private credit card account, a private passbook account, a public account, and the like. For example, taking the account source as a bank, the resource transfer type division is exemplified as follows: if both accounts of the resource transfer request belong to the private passbook account of the first bank, the resource transfer request can be divided into an X-type resource transfer request; if one account of the resource transfer request belongs to the private debit card account of the second bank and the other account belongs to the private credit card account of the third bank, the resource transfer request can be divided into an X +1 type resource transfer request, wherein X is a positive integer.
Referring to FIG. 1, a block diagram of a computer system 100 provided in an exemplary embodiment of the present application is shown. The computer system 100 includes: terminal 120, server 140, and server 160.
In some embodiments, the terminal 120 may be a terminal held by a user, and a client is running on the terminal 120; optionally, the client is a client of a service platform, or an applet of the service platform runs in the client, or a service platform of a web page version runs in the client; the service platform is used for providing resource transfer service for users. Optionally, the service platform is a computer device between a client and a third-party platform providing a resource channel, and/or is a computer device between an applet and the third-party platform.
Optionally, the client may be at least one of a lifestyle service client, a payment client, a financial client, a communication client, and a game client, and the type of the client is not limited in this application.
Illustratively, the terminal 120 may include at least one of a smart phone, a tablet computer, an e-book reader, an MP3(Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, a laptop portable computer, a desktop computer, and a notebook computer.
The terminal 120 and the server 140 communicate with each other through a wireless network or a wired network, and the server 140 is loaded with a service platform; the server 140 and the server 160 also communicate through a wireless network or a wired network, and a third-party platform is loaded on the server 160 and provides a resource channel required by resource transfer; the server 140 is used for invoking a resource channel on the server 160 to provide the resource transfer service for the terminal 120.
Exemplarily, taking a resource transfer scenario as an order payment scenario as an example, a client is operated on a terminal 120 held by a user, an order payment interface is opened in the client, the client receives an order payment operation triggered by the user and generates an order payment request correspondingly, and the client sends the order payment request to a server 140; the server 140 receives the order payment request, the service platform processes the order payment request, and requests the server 160 to invoke the resource channel provided by the third party platform, so as to transfer the payment funds from the payment account to the paid account.
Exemplarily, taking an asset transfer scenario as an example, a client is operated on a terminal 120 held by a user, a transfer interface is opened in the client, and the transfer interface includes a set transfer amount and a set transferred account; the client receives a transfer operation triggered by a user, correspondingly generates a transfer request, and sends the transfer request to the server 140; the server 140 receives the transfer request, the service platform processes the transfer request, and requests the server 160 to call a resource channel provided by a third-party platform, so that funds corresponding to the transfer amount are transferred from the transfer account to the transferred account.
The resource channel on the third-party platform may be maintained at irregular time, at this time, the server 140 stops the call to the resource channel, and the resource transfer request on the resource channel in the server 140 cannot be processed, and then the resource transfer request on the resource channel is placed in the waiting task queue to wait for processing. When the resource channel on the third-party platform is in the maintenance state, the server 140 executes the resource state switching method provided by the present application, detects the resource channel by using the first type of resource transfer request corresponding to the maintenance reason, and automatically switches the state of the resource channel on the service platform from the maintenance state to the available state when the resource channel recovers the available state; and when the resource channel is in the maintenance state, the resource channel is continuously called to process the resource transfer requests of other types except the first type, and the processing of the resource transfer requests of other types is not influenced.
Illustratively, when a resource channel provided by a third-party platform is in a maintenance state, the server 140 determines a first type of resource transfer request corresponding to a maintenance reason from at least two types of resource transfer requests supported by the resource channel; detecting a resource channel by adopting a first type of resource transfer request to obtain a detection result; determining the channel success rate of the resource channel during resource transfer according to the detection result; responding to the channel success rate larger than the success rate threshold value, and switching the state of the resource channel from a maintenance state to an available state; after the state of the resource channel is switched to the available state, the server 140 releases the first type resource transfer requests in the waiting task queue, and sequentially processes the unprocessed first type resource transfer requests. Illustratively, the server 140 further feeds back the processing result to the client on the terminal 120 after processing the resource transfer request.
The server 140 also provides other background services related to resource transfers. For example, the server 140 provides a storage service for data related to resource transfer; as another example, server 140 may also provide query services for data related to resource transfers.
The server 140 may include at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center; the server 160 may also include at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center. Those skilled in the art will appreciate that the number of terminals described above may be greater or fewer. For example, the number of the terminals may be only one, or the number of the terminals may be several tens or several hundreds, or more, and the number of the terminals and the type of the device are not limited in the embodiment of the present application.
And providing a resource transfer service for the user on the service platform, wherein the service platform realizes resource transfer through a resource channel provided by the third-party platform. Resource channels on the third party platform require occasional maintenance to clear the resource channels of faults and errors. Generally, before maintaining the resource channel, an operator of the third-party platform sends a maintenance notification to the service platform through the third-party platform. After the operator of the service platform knows the maintenance time, the operator can set the resource channel on the service platform, so that the resource channel is unavailable within the maintenance time range. The method comprises the following steps that an operator of a service platform manually modifies the state of a resource channel on the service platform back to an available state after obtaining a notice of completion of maintenance; or the maintenance time comprises maintenance ending time, and the operator of the service platform manually modifies the state of the resource channel on the service platform back to the available state at the maintenance ending time.
However, for a resource channel supporting at least two types of resource channel transfer requests, there is a case where only a partial type of resource transfer request cannot be successfully processed, and if the resource channel is set to be unavailable, the processing progress of other types of resource transfer requests other than the partial type is affected. Secondly, the actual maintenance duration of the resource channel is usually shorter than the expected maintenance duration given by an operator of the third-party platform, or the time for the third-party platform to send a maintenance completion notification to the service platform is usually later than the actual maintenance completion time of the resource channel, so that the resource channel on the service platform cannot be timely restored to an available state, and the processing delay of the resource transfer request is prolonged; and the state of the resource channel on the service platform is manually modified by the operator of the service platform, which wastes human resources.
In view of the foregoing problems, the present application provides a method for switching states of resource channels, and please refer to the following embodiments for detailed implementation steps of the method.
Referring to fig. 2, a flowchart of a method for switching states of resource channels according to an exemplary embodiment of the present application is shown. The present embodiment is illustrated by applying the method to the server 140 shown in fig. 1. The method comprises the following steps:
step 201, detecting the state of the resource channel.
Step 202, determine whether the state of the resource channel is a maintenance state.
In step 203, if the resource channel is in the maintenance state, a first state detection is performed.
If the resource channel is in the maintenance state, determining a first type of resource transfer request corresponding to the maintenance reason from at least two types of resource transfer requests supported by the resource channel; detecting a resource channel by adopting a first batch of unprocessed first-class resource transfer requests to obtain a first detection result, wherein the first detection result comprises resource transfer failure and resource transfer success; and calculating the ratio of the number of successfully transferred requests of the resources in the first batch to the total number of requests to obtain the success rate of the first channel of the resource transfer.
The maintenance reason refers to a reason for maintaining the resource channel, for example, the resource channel is maintained because the resource channel cannot successfully process the first type of resource transfer request.
Step 204, determining whether the success rate of the first channel is greater than or equal to a success rate threshold.
In step 205, if the success rate of the first channel is greater than or equal to the success rate threshold, performing a second state detection.
If the success rate of the first channel is greater than or equal to the success rate threshold value, acquiring a second batch of unprocessed first-class resource transfer requests; detecting the resource channel by adopting a second batch of unprocessed first-class resource transfer requests to obtain a second detection result, wherein the second detection result comprises resource transfer failure and resource transfer success; and calculating the ratio of the number of successfully transferred requests of the resources in the second batch to the total number of requests to obtain the success rate of the second channel of the resource transfer.
In step 206, it is determined whether the second channel success rate is greater than or equal to the success rate threshold.
Step 207, if the success rate of the second channel is greater than or equal to the success rate threshold, the state of the resource channel is switched from the maintenance state to the available state.
And 208, if the success rate of the first channel or the success rate of the second channel is smaller than the success rate threshold, determining that the resource channel is still in a maintenance state, and re-executing the step 201 according to a specified period.
Step 209, if the state of the resource channel is not in the maintenance state, determining that the resource channel is in the available state, and ending the process.
To sum up, in the method for switching states of resource channels provided in this embodiment, when a service platform detects that a resource channel is in a maintenance state, a first type of resource transfer request corresponding to a maintenance reason is obtained from at least two types of resource transfer requests supported by the resource channel, and the first type of resource channel is called to detect the resource channel, so as to timely and accurately obtain a state change of the resource channel, the method calculates a channel success rate for transferring resources of the resource channel based on detection results of success of resource transfer and failure of resource transfer, determines a state of the resource channel according to the channel success rate for resource transfer, that is, detects the state of the resource channel by using the unprocessed first type of resource transfer request, and automatically switches the state of the resource channel on the service platform into an available state when the state of the resource channel is converted into the available state, the resource channel recovery using notification of the third-party platform is not required to be waited, the resource channel recovery efficiency on the service platform is improved, the unprocessed resource transfer request can be processed more timely, and the processing delay of the resource transfer request is shortened.
The method only carries out channel detection aiming at the maintenance reason, can not influence the processing of other types of resource transfer requests except the first type, namely, the resource channel is continuously called to process the other types of resource transfer requests, and the timeliness of the processing of the other types of resource transfer requests is also ensured.
According to the method, after the service platform detects that the resource channel is recovered to the available state, the maintenance state is automatically switched to the available state without manual setting by an operator of the service platform, so that the recovery efficiency of the resource channel is improved, and meanwhile, the waste of human resources is reduced.
Referring to fig. 3, a flowchart of a method for switching states of resource channels according to an exemplary embodiment of the present application is shown. The present embodiment is illustrated by applying the method to the server 140 shown in fig. 1. The method comprises the following steps:
step 301, determining a first type resource transfer request corresponding to a maintenance reason from at least two types of resource transfer requests supported by a resource channel processing a maintenance state.
The server monitors the state of each resource channel on the service platform; when the resource channel is in a maintenance state, the server determines the maintenance reason of the resource channel and determines a first type of resource transfer request corresponding to the maintenance reason; the server then places the received resource transfer requests of the first type into a waiting task queue. The server detects the state of the resource channel in the maintenance state according to a first period, and obtains unprocessed first-class resource transfer requests from the waiting task queue.
Illustratively, in response to determining that the resource channel is in the maintenance state, the server randomly obtains n unprocessed first-class resource transfer requests from the waiting task queue; or, acquiring n unprocessed first-class resource transfer requests from the waiting task queue according to the time sequence, for example, acquiring unprocessed first-class resource transfer requests located at the first n bits in the time sequence; or, n unprocessed first-class resource transfer requests are obtained from the waiting task queue according to the priority of the service, for example, the waiting task queue has first-class resource transfer requests triggered by different types of services, the priorities of the different types of services are different, the priorities of the tasks of the corresponding first-class resource transfer requests are different, and the n unprocessed first-class resource transfer requests are obtained from the waiting task queue according to the sequence of the priorities from back to front.
Optionally, the first type of resource transfer request includes a channel identifier of the resource channel, where the channel identifier is used to indicate the resource channel used by the first type of resource transfer request; the server determines a first type of resource transfer request requesting to use the resource channel from the waiting task queue based on the channel identifier in response to the determination that the resource channel is in the maintenance state, namely the first type of resource transfer request is a candidate resource transfer request, and then determines n unprocessed first type of resource transfer requests from the candidate resource transfer request; wherein n is a positive integer.
Step 302, detecting the resource channel by using the first type of resource transfer request to obtain a detection result.
After obtaining the unprocessed first-class resource transfer request, the server detects the resource channel by using the unprocessed first-class resource transfer request to obtain a detection result. Illustratively, the server calls the corresponding resource channels to perform one-to-one processing on the n first-class resource transfer requests, and transfers the resources from one account to another account to obtain a result of the resource transfer, that is, a detection result. Wherein, the detection result of the resource channel comprises at least one of success of resource transfer and failure of resource transfer; the resource transfer success refers to the resource transfer success requested to be transferred in the first type of resource transfer request through the corresponding resource channel, and the resource transfer failure refers to the resource transfer failure requested to be transferred in the first type of resource transfer request through the corresponding resource channel.
Illustratively, for n first-class resource transfer requests, the server calls a resource channel to perform resource transfer, the transfer requested resource in the i first-class resource transfer requests is successfully transferred, and the transfer requested resource in the (n-i) first-class resource transfer requests is failed; wherein i is less than or equal to n, and i is an integer greater than or equal to zero.
And step 303, determining a channel success rate of the resource transfer channel during resource transfer according to the detection result.
Illustratively, the server calls the resource channel a to process n first-class resource transfer requests, counts up the number i of the resource transfer requests with the detection result of successful resource transfer after the processing is completed, and calculates the ratio of i to n to obtain the channel success rate when the resource channel a transfers resources.
And 304, responding to the channel success rate being greater than or equal to the success rate threshold value, and switching the state of the resource channel from the maintenance state to the available state.
A success rate threshold value is set in the server and used for determining the state of the resource channel; when the channel success rate during resource transfer of the resource channel is greater than or equal to the success rate threshold value, the server determines that the state of the resource channel is an available state, and switches the state of the resource channel on the service platform from a maintenance state to the available state; when the channel success rate of the resource channel during resource transfer is smaller than the success rate threshold, the server determines that the state of the resource channel is still a maintenance state, and does not change the state of the resource channel on the service platform.
For example, in the case of being in an available state, the resource channels of different types process the resource transfer request, and the success rate of the resource transfer may be different; therefore, different types of resource channels in the server are correspondingly provided with different success rate thresholds. Illustratively, as shown in table 1, the success rate threshold corresponding to the resource channel a is H1The success rate threshold corresponding to the resource channel b is H2The success rate threshold corresponding to the resource channel c is H3. When the state of the resource channel b is judged, the channel success rate of the server responding to the resource transfer of the resource channel b is more than or equal to H2Switching the state of the resource channel b from a maintenance state to an available state; responding to the channel b, the channel success rate in the resource transfer is less than H2Maintaining a resource channelb is unchanged in maintenance state.
TABLE 1
Resource channel Success rate threshold
Resource channel a H1
Resource channel b H2
Resource channel c H3
In summary, in the method for switching states of a resource channel provided in this embodiment, when determining that the resource channel is in a maintenance state, a service platform determines a first type of resource transfer request corresponding to a maintenance reason from at least two types of resource transfer requests supported by the resource channel; the method comprises the steps of adopting a first-class resource transfer request to perform channel detection on a resource channel aiming at maintenance reasons, so as to timely and accurately acquire state change of the resource channel, if the channel success rate of the resource channel during resource transfer is greater than a success rate threshold value, indicating that the resource channel is successfully maintained, timely and automatically switching the state of the resource channel on a service platform into an available state, and not needing to wait for a notification of recovery use of the resource channel of a third-party platform, thereby improving the recovery efficiency of the resource channel on the service platform, being capable of more timely processing the unprocessed first-class resource transfer request, and shortening the processing delay of the first-class resource transfer request.
The method only carries out channel detection aiming at the maintenance reason, can not influence the processing of other types of resource transfer requests except the first type, namely, the resource channel is continuously called to process the other types of resource transfer requests, and the timeliness of the processing of the other types of resource transfer requests is also ensured.
According to the method, after the service platform detects that the resource channel is recovered to the available state, the maintenance state is automatically switched to the available state without manual setting by an operator of the service platform, so that the recovery efficiency of the resource channel is improved, and meanwhile, the waste of human resources is reduced.
The maintenance reason refers to a reason for maintaining the resource channel, that is, a problem occurring in the resource channel. For example, a problem occurring in a resource channel may include that the resource channel cannot successfully process a resource transfer request, and further, the resource channel cannot successfully process a certain type of resource transfer request. The maintenance reason can be determined in at least one of the following two ways:
1) determining a maintenance reason of the resource channel based on the historical data;
2) and acquiring the maintenance reason of the resource channel from the maintenance notice.
Thus, in some embodiments, step 301 shown in fig. 3 may include steps 3011 to 3013, as in fig. 4, the steps are as follows:
step 3011, obtain the historical processing data of each type of resource transfer request in the first time period.
The first time period refers to a historical time period of a specified time period before the state of the resource channel is changed, where the state change refers to a change of the state of the resource channel from an available state to a maintenance state, the specified time period may be 30 seconds, 1 minute, 5 minutes, 15 minutes, and the like, and the specified time period is not limited in this embodiment.
Illustratively, the time of state change is 12:00, the specified time duration is 20 minutes, and the corresponding historical time period is 11:40 to 12: 00; or the time of state change is 18:00:00, the specified time length is 50 seconds, and the corresponding historical time period is 17:59:10 to 18:00: 00.
Illustratively, the server determines a first time period, and obtains historical processing data of each type of resource transfer request in the first time period, wherein the historical processing data is obtained after the resource transfer request is processed through the resource channel.
Step 3012, calculate the failure rate of resource transfer after the processing of each type of resource transfer request is completed according to the history processing data.
The historical processing data comprises resource transfer results, and the server calculates the failure rate of resource transfer after the processing of the resource transfer request is completed according to the resource transfer result corresponding to each resource transfer request; the resource transfer result of each type of resource transfer request in the first time period comprises at least one of resource transfer success and resource transfer failure. Illustratively, taking calculation of the failure rate of the kth resource transfer request as an example, the server obtains w resource transfer results of the kth resource transfer request, counts results of u resource transfer failures in the w resource transfer results, and obtains the failure rate of the kth resource transfer request as u/w, where k and w are positive integers, and u is a positive integer less than or equal to w.
Step 3013, determine the resource transfer request with failure rate greater than the failure rate threshold from the at least two types of resource transfer requests, and obtain the first type of resource transfer request corresponding to the maintenance reason.
The failure rate threshold is preset in the server, and is used for determining the first type of resource transfer request corresponding to the maintenance reason. After the failure rates corresponding to the at least two types of resource transfer requests are obtained through calculation, the resource transfer requests with the failure rates larger than the failure rate threshold are determined, and the first type of resource transfer requests corresponding to the maintenance reasons are obtained, that is, the resource channel is maintained only if the first type of resource transfer requests cannot be successfully processed. Optionally, the first type of resource transfer request includes a v type of resource transfer request, where v is a positive integer.
Optionally, there are at least two maintenance reasons corresponding to different types of resource transfer requests. Illustratively, there are a maintenance reason 1 and a maintenance reason 2, where the maintenance reason 1 corresponds to the first type of resource transfer request, and the maintenance reason 2 corresponds to the second type of resource transfer request.
In other embodiments, step 301 shown in fig. 3 may include steps 3014 to 3015, as shown in fig. 5, the steps are as follows:
step 3014, obtain the maintenance reason from the maintenance notification of the resource channel.
The server obtains the maintenance notice of the resource channel, identifies the text content in the maintenance notice, and determines the maintenance reason of the resource channel from the text content. For example, for obtaining the maintenance reason in the maintenance notification, the server may identify the maintenance reason in the maintenance notification by using a reason identification model, where the reason identification model is a model trained by using a machine learning model. Optionally, the machine learning model may be at least one of the following neural network models: a Recurrent Neural Networks (RNN) model, a Long Short Term Memory (LSTM) model, and a Convolutional Neural Networks (CNN) model; in the present embodiment, the type of the machine learning model is not limited.
For example, for obtaining the maintenance reason from the maintenance notification, the server may further determine the maintenance reason from the maintenance notification by using a semantic analysis method.
Step 3015, obtain the first kind of resource transfer request corresponding to the maintenance reason from at least two kinds of resource transfer requests.
In summary, the method for switching the state of the resource channel provided in this embodiment can determine the type of the resource transfer request required by the resource channel to be detected more clearly by determining the maintenance reason, so as to detect the state of the resource channel in a targeted manner, and further determine the state of the resource channel more timely.
Based on the embodiment shown in fig. 3, the state of the resource channel is detected, and in order to improve the accuracy of the determined state of the resource channel, the server may further perform multiple detections, and then the steps 301 to 302 may include steps 401 to 405, as shown in fig. 6, the steps are as follows:
step 401, obtaining a first type resource transfer request of a specified batch according to a first cycle.
The first period is preset in the server and is the interval time between two detections when the state of the resource channel is circularly detected. When the detection times are smaller than the time threshold value, the server acquires the first type resource transfer request of the next unprocessed batch after a first period is separated from the current detection. Illustratively, if the current detection is the nth detection, the server obtains the first type of resource transfer request of the nth batch; after a first period, the server acquires the first type resource transfer request of the (N + 1) th batch by the (N + 1) th detection.
Optionally, the obtained unprocessed resource transfer requests of the first type are different in number from batch to batch. The resource transfer requests of the designated batch comprise unprocessed M first-class resource transfer requests; for the calculation of M, the server may determine the number M of unprocessed first-type resource transfer requests required to be obtained by a specified batch based on the corresponding relationship between the number of batches and the number of requests; m first-class resource transfer requests of a specified batch are obtained according to a first period, wherein the number of batches and the number of the requests are in a direct proportion relation, and M is a positive integer.
For example, the later the batch is, the greater the number of the acquired resource transfer requests is, for example, as shown in table 2, the correspondence between the batch and the request number is shown, and the request number corresponding to the 1 st batch is 20; the number of requests for batch 2 is 40 and the number of requests for batch 3 is 80.
TABLE 2
Number of batches Number of requests
1 20
2 40
3 80
Optionally, the server takes the batch number of the specified batch as an index and inputs the index into an exponential function, and calculates to obtain the request number M of the first type resource transfer request of the specified batch; and acquiring M first-class resource transfer requests of a specified batch according to a first period. Illustratively, the correspondence between the number of batches and the number of requests is shown in relation (1):
M=pow(j,N)(1);
wherein pow represents an exponential function, and pow (j, N) represents the power N of j; the index N of the exponential function represents the batch number of the first type resource transfer request of the specified batch; the base of the exponential function is preset, for example, the base may be 10.
Optionally, the server determines the request number M of the first type resource transfer request of the specified batch from the corresponding relationship between the success rate of the ith detection and the request number of the (i + 1) th detection, wherein i and M are positive integers; and acquiring M first-class resource transfer requests of a specified batch according to a first period. The success rate of the first detection is in direct proportion to the request number of the (i + 1) th detection. Illustratively, as shown in table 3, the success rate of the 3 rd batch is greater than or equal to 60% and less than 70%, and the number of requests corresponding to the 4 th batch is 30; the success rate of the 4 th batch is more than or equal to 70% and less than 80%, and the corresponding request number of the 5 th batch is 50; the success rate of the 5 th batch is more than or equal to 80% and less than 90%, and the number of requests corresponding to the 6 th batch is 70.
TABLE 3
The ith batch Success rate of ith batch Number of requests for i +1 th batch
4 More than or equal to 60 percent and less than 70 percent 30
5 More than or equal to 70 percent and less than 80 percent 50
6 More than or equal to 80 percent and less than 90 percent 70
Step 402, detecting the resource channel by using the first type of resource transfer request of the designated batch to obtain a pending detection result.
Illustratively, the server detects the resource channel by using M first-type resource transfer requests of a specified batch to obtain M detection results corresponding to the M first-type resource transfer requests.
And 403, recording the detection times j of the resource channel in response to the undetermined detection result meeting the available channel condition.
Wherein j is a positive integer. Optionally, the channel availability condition includes that a channel success rate corresponding to the undetermined detection result is greater than or equal to a target success rate threshold, the target success rate threshold is preset in the server, and the target success rate threshold is used for determining whether the undetermined detection result meets the channel availability condition. Optionally, the target success rate threshold is the same as or different from the success rate threshold.
Optionally, the server calculates a channel success rate corresponding to the to-be-determined detection result, and records the detection times j of the resource channel in response to the channel success rate corresponding to the to-be-determined detection result being greater than or equal to the target success rate threshold. For example, if the present detection adopts the first type resource transfer request of the jth batch, the detection time of the present detection is j, that is, the number of batches of the specified batch is the detection time; for example, the current detection adopts a first type resource transfer request of a 2 nd batch, and the server records the detection times 2 of the resource channel.
Step 404, in response to the detection time j being less than the time threshold, setting the j +1 th batch as the designated batch, and repeatedly executing the above 3 steps.
That is, when the recorded number of times of probing j is less than the number threshold, the j +1 th lot is set as the designated lot, and steps 401 to 403 are repeatedly performed until the number of times of probing is equal to the number threshold, and step 405 is performed. Illustratively, the number of probing 5 recorded in step 403 is less than the number threshold 8, the server sets 6 as the designated batch, and then repeats steps 401 to 403 until the number of probing equals to the number threshold 8, and then executes step 405.
In response to the detection times being equal to the time threshold, the result to be detected is determined as a detection result, step 405.
And when the detection times are equal to the time threshold, taking the undetermined detection result corresponding to the detection times as a final detection result so as to determine the state of the resource channel.
In summary, the method for switching states of resource channels provided in this embodiment performs multiple detections on the states of the resource channels, and switches the states of the resource channels from the maintenance state to the available state when the result of each detection is that the channel success rate of resource transfer is greater than or equal to the success rate threshold, that is, the states of the resource channels are switched only when the result of each detection is that the resource channels are in the available state, so that the accuracy of determining the available states of the resource channels is improved.
According to the method, the number of the resource transfer requests adopted for each detection is different, as shown in the embodiment, the request number presents an increasing trend, and the cyclic detection method can know that the higher the detection times, the higher the success rate of the resource transfer, and the higher the possibility that the resource channel recovers the available state, the more resource transfer requests are adopted for detection, so that the calculation accuracy of the success rate is increased, the problem of a large number of resource transfer failures caused by adopting the resource transfer requests for state detection under the condition that the state of the resource channel is not clear is avoided, and the negative influence of the resource transfer success rate caused by adopting the resource transfer requests for state detection is reduced.
In order to ensure the accuracy of the determined state of the resource channel, when the channel success rate corresponding to the detection result of any one detection is smaller than the success rate threshold or the target success rate threshold, the server restarts detecting the resource channel, illustratively, based on the embodiment shown in fig. 3, steps 305 to 306 are added, as shown in fig. 7, and the steps are as follows:
step 305, in response to the channel success rate being less than the success rate threshold, determining that the resource channel is still in a maintenance state.
Step 306, according to the second cycle, re-executing the first type resource transfer request corresponding to the maintenance reason from the at least two types of resource transfer requests supported by the resource channel in the maintenance state; detecting a resource channel by adopting a first type of resource transfer request to obtain a detection result; determining the channel success rate of resource channel resource transfer according to the detection result; and switching the state of the resource channel from the maintenance state to the available state in response to the channel success rate being greater than the success rate threshold.
I.e. step 301 to step 304 are re-executed according to the second periodicity. The second period is preset in the server and refers to the interval time between the current detection and the restart of the detection of the state of the resource channel; that is, after the current state detection of the resource channel is completed and the success rate of the channel is determined to be smaller than the success rate threshold, the time interval required for detecting the state of the resource channel is restarted. For example, this detection determines that the channel success rate is smaller than the success rate threshold, and step 301 is restarted after 5 minutes. The duration of the second period may be in units of seconds, minutes, hours, and the like, and the duration of the second period is not particularly limited in this embodiment.
It should be noted that the method may also be applied to the embodiment shown in fig. 6, where the server determines that the resource channel is still in the maintenance state in response to the channel success rate threshold being smaller than the target success rate threshold, and re-executes steps 401 to 405 according to a second period; that is, no matter whether the number of probing is less than the threshold or equal to the number of probing, when the channel success rate is less than the target success rate threshold, the server determines that the resource channel is still in the maintenance state, and then re-executes steps 401 to 405 according to the second period. The above-mentioned restart detection means that the resource channel status is detected again s times from step 401, where s is equal to the time threshold, and s is a positive integer. Accordingly, after determining that the resource channel handles the maintenance state, the server resets the number of probing times to an initial value, and returns to perform step 301. Illustratively, the initial value is 1.
In summary, the method for switching states of resource channels provided in this embodiment performs multiple detections on the states of the resource channels, and switches the states of the resource channels from the maintenance state to the available state when the result of each detection is that the channel success rate of resource transfer is greater than or equal to the success rate threshold or the target success rate, that is, switches the states of the resource channels when the result of each detection is that the resource channels are in the available state; if the channel success rate of the resource transfer is smaller than the success rate threshold or the target success rate threshold, restarting the detection of the resource channel; and further, the accuracy of determining the available state of the resource channel is improved.
Based on the embodiment shown in fig. 3, in order to improve the accuracy of each state determination, before determining whether the success rate is greater than or equal to the success rate threshold, the server further dynamically obtains the success rate threshold corresponding to the resource channel, for example, as shown in fig. 9, taking steps 601 to 602 added before step 304 as an example, the dynamically obtained success rate threshold is described as follows:
step 601, obtaining historical processing data of the resource channel responding to the first type of resource transfer request in the second time period.
The second time period is a time period before the current time preset in the server, the duration of the second time period may be one day, one week, or one month, and the duration of the second time period is not limited in this application. Illustratively, the server obtains historical processing data of the resource channel responding to the first type of resource transfer request within the previous 7 days. The history processing data is correspondingly generated after the first type of resource transfer request is processed, and comprises history processing results of resource transfer success and resource transfer failure.
Step 602, calculating a historical success rate of the resource channel for the first-class resource transfer request response based on the historical processing data, and obtaining a success rate threshold.
Illustratively, the server counts the total amount S of the historical processing data in the second time period, and further counts the amount V of the historical processing data with successful resource transfer, and then calculates the ratio of S to V to obtain the historical success rate, which is the success rate threshold.
Illustratively, the server calculates a success rate threshold value based on the resource transfer data in the previous U days, and firstly, the server calculates the historical success rate of the resource transfer of the resource channel in each day to obtain U historical success rates; secondly, the server calculates the average value of the U historical success rates to obtain a success rate threshold value.
It should be noted that, calculating the average success rate may be calculating the historical success rate of the historical processing data in one week, one day, or one hour, and then calculating the average value.
In summary, the method for switching the state of the resource channel provided in this embodiment dynamically calculates the success rate threshold based on the historical processing data corresponding to the first type of resource transfer request, so that the success rate threshold more conforms to the characteristic of the resource channel and is closer to the success rate of resource transfer when the resource channel is in the available state, thereby improving the accuracy of determining the available state of the resource channel.
It should be further noted that the channel types of the resource channels include a main resource channel and a standby resource channel, where the main resource channel refers to a resource channel located at the first L bits in the priority, and L is a positive integer; before detecting the resource channel, the server also determines the channel type of the resource channel so as to use a detection mode matched with the channel type. Illustratively, steps 701 to 706 are performed before probing the resource channel is started, as shown in fig. 10, the steps are as follows:
step 701, a first channel priority of a resource channel is obtained.
Exemplarily, the attribute information of the resource channel includes a first channel priority; therefore, the server acquires the first channel priority of the resource channel from the attribute information of the resource channel.
Step 702, obtaining the channel type corresponding to the first channel priority by querying from the corresponding relationship between the channel priority and the channel type.
For example, as shown in table 4, the channel priority of the primary resource channel is marked as one, two, and three, i.e., the primary resource channel is the resource channel located in the first three bits in the priority order; the channel priority of the standby resource channel is marked as four and five, namely the standby resource channel is the resource channel positioned at the last two bits in the priority sequence. When the mark of the first channel priority is one, the resource channel is a main resource channel; when the first channel priority flag is four, the resource channel is a standby resource channel.
TABLE 4
Channel priority Channel type
One, two and three Main resource channel
Four, five Standby resource channel
After determining the channel type of the resource channel, the server performs step 703 or step 706.
Step 703, in response to the channel type being the standby resource channel, acquiring the current detection time.
Optionally, the current probing time is a time when the resource channel starts to be probed. The server acquires the current probing time in response to the channel type being the standby resource channel, and then executes step 704 or 705.
Step 704, in response to the detection time being in the resource transfer peak period, stopping the detection of the resource channel, and setting the next detection time of the resource channel.
And the server responds to the detection time in the resource transfer peak period, stops detecting the standby resource channel and sets the next detection time of the standby resource channel, wherein the next detection time is in the non-resource transfer peak period. Exemplarily, the server determines a starting time of entering a non-resource transfer peak period as a next detection time; or, the server randomly selects a moment from the non-resource transfer peak period to determine as the next detection moment.
Step 705, in response to the detection time being in the non-resource transfer peak period, determining to continue detecting the resource channel.
And the server responds to the detection time in the non-resource transfer peak period and continues to detect the standby resource channel.
Step 706, in response to the channel type being the primary resource channel, determining to continue probing the resource channel.
And the server responds to the channel type as the main resource channel and continues to detect the main resource channel.
In summary, according to the method for switching the states of the resource channels provided in this embodiment, for the main resource channel in the maintenance state, whether the detection time is in the resource transfer peak period or not, the main resource channel can be detected, and the available state of the resource channel can be recovered in time, so that the processing delay of the resource transfer request is prevented from being too long; for the standby resource channel in the maintenance state, if the current detection time is in the resource transfer peak period, the detection time in the non-resource transfer peak period is determined again, namely, the detection is not carried out in the resource transfer peak period, so as to ensure the success rate of the resource transfer.
Referring to fig. 11, a block diagram of a state switching device of a resource channel according to an exemplary embodiment of the present application is shown. The apparatus can be implemented as part or all of a server by software, hardware, or a combination of the two, and includes: a determination module 810, a detection module 820, an operation module 830, and a switching module 840.
A determining module 810, configured to determine, in at least two types of resource transfer requests supported by a resource channel in a maintenance state, a first type of resource transfer request corresponding to a maintenance reason;
a detection module 820, configured to detect a resource channel by using a first type of resource transfer request to obtain a detection result;
the operation module 830 is configured to determine a channel success rate of the resource channel during resource transfer according to the detection result;
a switching module 840, configured to switch the state of the resource channel from the maintenance state to the available state in response to the channel success rate being greater than the success rate threshold.
In some embodiments, the determining module 810 is configured to obtain historical processing data of each type of resource transfer request in a first time period; calculating the failure rate of resource transfer after the processing of each type of resource transfer request is finished according to historical processing data; and determining the resource transfer request with the failure rate larger than the failure rate threshold value from at least two types of resource transfer requests to obtain a first type of resource transfer request corresponding to the maintenance reason.
In some embodiments, the determining module 810 is configured to obtain a maintenance reason from the maintenance notification of the resource channel; and acquiring a first type of resource transfer request corresponding to the maintenance reason from at least two types of resource transfer requests.
In some embodiments, there are at least two maintenance reasons corresponding to different types of resource transfer requests.
In some embodiments, the apparatus further comprises: a response module 850;
the determining module 810 is configured to obtain a first class resource transfer request of a specified batch according to a first cycle;
a detection module 820, configured to detect a resource channel by using a first type of resource transfer request in a specified batch, to obtain a to-be-detected detection result;
a response module 850, configured to record, in response to that a to-be-detected detection result meets a channel availability condition, the number j of times j of detection on a resource channel, where j is a positive integer; and in response to the detection times j being smaller than the time threshold, setting the (j + 1) th batch as a designated batch, repeatedly executing the 3 modules until the detection times are equal to the time threshold, and determining the detection result to be determined as the detection result.
In some embodiments, the determining module 810 is further configured to input the number of batches of the specified batch as an index into an exponential function, and calculate the number M of requests for the first type of resource transfer request of the specified batch, where M is a positive integer; acquiring M first-class resource transfer requests of a specified batch according to a first period;
or determining the request number M of the first-class resource transfer request of the specified batch from the corresponding relation between the success rate of the ith detection and the request number of the (i + 1) th detection, wherein i and M are positive integers; and acquiring M first-class resource transfer requests of a specified batch according to a first period.
In some embodiments, the apparatus further comprises: a response module 850 and an execution module 860;
a response module 850, configured to determine that the resource channel is still in the maintenance state in response to the channel success rate being less than the success rate threshold;
an executing module 860, configured to re-execute, according to the second cycle, the first type resource transfer request corresponding to the maintenance reason in the at least two types of resource transfer requests supported by the resource channel in the maintenance state; detecting a resource channel by adopting a first type of resource transfer request to obtain a detection result; determining the channel success rate of resource channel resource transfer according to the detection result; and switching the state of the resource channel from the maintenance state to the available state in response to the channel success rate being greater than the success rate threshold.
In some embodiments, the determining module 810 is further configured to extract a maintenance time from the maintenance notification of the resource channel, where the maintenance time includes a start time and an end time; determining a preset maintenance time length according to the starting time and the ending time; inquiring a target interval duration corresponding to a preset maintenance duration from a corresponding relation between the maintenance duration and the interval duration, wherein the target interval duration is used for indicating the interval duration between the starting time and the detection time; and determining the detection time according to the starting time and the target interval duration, wherein the detection time is used for indicating the time for starting detection of the resource channel.
In some embodiments, the operation module 830 is further configured to obtain historical processing data of the resource channel responding to the first type of resource transfer request in the second time period; and calculating the historical success rate of the resource channel responding to the first type of resource transfer request based on the historical processing data to obtain a success rate threshold value.
In some embodiments, the apparatus further comprises: a response module 850;
a determining module 810, further configured to obtain a first channel priority of the resource channel; inquiring to obtain a channel type corresponding to the first channel priority from the corresponding relation between the channel priorities and the channel types, wherein the channel types comprise a main resource channel and a standby resource channel, the main resource channel refers to a resource channel positioned at the front L in the priority sequence, and L is a positive integer;
a response module 850, configured to obtain a current detection time in response to that the channel type is a standby resource channel; stopping the detection of the resource channel in response to the detection time being in the resource transfer peak period, and setting the next detection time of the resource channel; determining to continue the detection of the resource channel in response to the detection time being in a non-resource transfer peak period;
and a response module 850, configured to determine to continue probing the resource channel in response to the channel type being the primary resource channel.
To sum up, in the state switching apparatus for a resource channel provided in this embodiment, when it is determined that the resource channel is in the maintenance state, a first type of resource transfer request corresponding to the maintenance reason is determined from at least two types of resource transfer requests supported by the resource channel; the method comprises the steps of adopting a first-class resource transfer request to perform channel detection on a resource channel aiming at maintenance reasons, so as to timely and accurately acquire state change of the resource channel, if the channel success rate of the resource channel during resource transfer is greater than a success rate threshold value, indicating that the resource channel is successfully maintained, timely and automatically switching the state of the resource channel on a service platform into an available state, and not needing to wait for a notification of recovery use of the resource channel of a third-party platform, thereby improving the recovery efficiency of the resource channel on the service platform, being capable of more timely processing the unprocessed first-class resource transfer request, and shortening the processing delay of the first-class resource transfer request.
The device only carries out channel detection aiming at maintenance reasons, can not influence the processing of other types of resource transfer requests except the first type, namely, the resource channel is continuously called to process the other types of resource transfer requests, and the timeliness of the processing of the other types of resource transfer requests is also ensured.
The device automatically switches the maintenance state to the available state after the service platform detects that the resource channel recovers the available state, and does not need manual setting of an operator of the service platform, so that the recovery efficiency of the resource channel is improved, and meanwhile, the waste of human resources is reduced.
Referring to fig. 12, a schematic structural diagram of a computer device according to an exemplary embodiment of the present application is shown. The computer device may be a server that performs the resource channel state switching method as provided herein. Specifically, the method comprises the following steps:
the computer apparatus 900 includes a Central Processing Unit (CPU) 901, a system Memory 904 including a Random Access Memory (RAM) 902 and a Read Only Memory (ROM) 903, and a system bus 905 connecting the system Memory 904 and the Central Processing Unit 901. The computer device 900 also includes a basic Input/Output System (I/O) 906 for facilitating information transfer between devices within the computer, and a mass storage device 907 for storing an operating System 913, application programs 914, and other program modules 915.
The basic input/output system 906 includes a display 908 for displaying information and an input device 909 such as a mouse, keyboard, etc. for user input of information. Wherein a display 908 and an input device 909 are connected to the central processing unit 901 through an input-output controller 910 connected to the system bus 905. The basic input/output system 906 may also include an input/output controller 910 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input-output controller 910 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer-readable media provide non-volatile storage for the computer device 900. That is, mass storage device 907 may include a computer-readable medium (not shown) such as a hard disk or Compact disk Read Only Memory (CD-ROM) drive.
Computer-readable media may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash Memory or other Solid State Memory technology, CD-ROM, Digital Versatile Disks (DVD), or Solid State Drives (SSD), other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage, or other magnetic storage devices. The Random Access Memory may include a resistive Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM). Of course, those skilled in the art will appreciate that computer storage media is not limited to the foregoing. The system memory 904 and mass storage device 907 described above may be collectively referred to as memory.
According to various embodiments of the present application, the computer device 900 may also operate as a remote computer connected to a network via a network, such as the Internet. That is, the computer device 900 may be connected to the network 912 through the network interface unit 911 on the system bus 905, or may be connected to another type of network or remote computer system (not shown) using the network interface unit 911.
The memory further includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.
In an alternative embodiment, a computer device is provided that includes a processor and a memory having at least one instruction, at least one program, set of codes, or set of instructions stored therein, the at least one instruction, at least one program, set of codes, or set of instructions being loaded and executed by the processor to implement the method for stateful switchover of a resource channel as described above.
In an alternative embodiment, a computer readable storage medium is provided having at least one instruction, at least one program, set of codes, or set of instructions stored therein, which is loaded and executed by a processor to implement the method for switching states of a resource channel as described above.
Optionally, the computer-readable storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a Solid State Drive (SSD), or an optical disc. The Random Access Memory may include a resistive Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM). The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The present application further provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set, or an instruction set is stored, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method for switching states of resource channels provided by the above method embodiments.
The present application also provides a computer program product comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the state switching method of the resource channel provided by the method embodiments.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (13)

1. A state switching method of a resource channel is applied to a service platform, wherein the service platform is a computer device between a client and a third-party platform providing the resource channel, and the method comprises the following steps:
determining a first type of resource transfer request corresponding to a maintenance reason in at least two types of resource transfer requests supported by the resource channel in the maintenance state;
detecting the resource channel by adopting the first type of resource transfer request to obtain a detection result;
determining the channel success rate of the resource channel during resource transfer according to the detection result;
and responding to the channel success rate larger than a success rate threshold value, and switching the state of the resource channel from the maintenance state to an available state.
2. The method according to claim 1, wherein the determining, among the at least two types of resource transfer requests supported by the resource channel in the maintenance state, a first type of resource transfer request corresponding to a maintenance reason comprises:
acquiring historical processing data of each type of resource transfer request in a first time period;
calculating the failure rate of resource transfer after the processing of each type of resource transfer request is finished according to the historical processing data;
and determining the resource transfer request with the failure rate larger than a failure rate threshold value from the at least two types of resource transfer requests to obtain the first type of resource transfer request corresponding to the maintenance reason.
3. The method according to claim 1, wherein the determining, among the at least two types of resource transfer requests supported by the resource channel in the maintenance state, a first type of resource transfer request corresponding to a maintenance reason comprises:
acquiring the maintenance reason from the maintenance notice of the resource channel;
and acquiring the first type of resource transfer request corresponding to the maintenance reason from the at least two types of resource transfer requests.
4. A method according to any one of claims 1 to 3, wherein there are at least two maintenance reasons for different types of resource transfer requests.
5. The method according to any one of claims 1 to 3, wherein the first type of resource transfer request corresponding to the maintenance reason is determined from at least two types of resource transfer requests supported by the resource channel in the maintenance state; detecting the support state of the resource channel by using the first type of resource transfer request to obtain a detection result, including:
acquiring the first type resource transfer request of a specified batch according to a first period;
detecting the resource channel by adopting the first type of resource transfer request of the specified batch to obtain a to-be-detected detection result;
responding to the undetermined detection result to meet the available channel condition, and recording the detection times j of the resource channel, wherein j is a positive integer;
and in response to the detection times j being smaller than a time threshold, setting the j +1 th batch as the designated batch, repeatedly executing the above 3 steps until the detection times are equal to the time threshold, and determining the undetermined detection result as the detection result.
6. The method as claimed in claim 5, wherein said obtaining the first type resource transfer request of the specified batch according to the first cycle comprises:
taking the number of the designated batches as an index to input an exponential function, and calculating to obtain a request number M of the first-class resource transfer request of the designated batches, wherein M is a positive integer; acquiring M first-class resource transfer requests of the specified batch according to the first period;
or the like, or, alternatively,
determining the request number M of the first-class resource transfer request of the specified batch from the corresponding relation between the success rate of the ith detection and the request number of the (i + 1) th detection, wherein i and M are positive integers; and acquiring the M first-class resource transfer requests of the specified batch according to the first period.
7. The method of any of claims 1 to 3, further comprising:
determining that the resource channel is still in the maintenance state in response to the channel success rate being less than the success rate threshold;
according to a second period, re-executing the first type resource transfer request corresponding to the maintenance reason in the at least two types of resource transfer requests supported by the resource channel in the maintenance state; detecting the resource channel by adopting the first type of resource transfer request to obtain a detection result; determining the channel success rate of the resource channel resource transfer according to the detection result; and switching the state of the resource channel from the maintenance state to an available state in response to the channel success rate being greater than a success rate threshold.
8. The method according to any one of claims 1 to 3, wherein before determining the first type of resource transfer request corresponding to the maintenance reason among the at least two types of resource transfer requests supported by the resource channel in the maintenance state, the method further comprises:
extracting maintenance time from the maintenance notice of the resource channel, wherein the maintenance time comprises a starting time and an ending time;
determining a preset maintenance time length according to the starting time and the ending time;
inquiring a target interval duration corresponding to the preset maintenance duration from a corresponding relation between the maintenance duration and the interval duration, wherein the target interval duration is used for indicating the interval duration between the starting time and the detection time;
and determining a detection time according to the starting time and the target interval duration, wherein the detection time is used for indicating the time for starting detection of the resource channel.
9. The method according to any one of claims 1 to 3, wherein the responding to the channel success rate being greater than the success rate threshold comprises:
acquiring historical processing data of the resource channel responding to the first type of resource transfer request in a second time period;
and calculating the historical success rate of the response of the resource channel to the first type of resource transfer request based on the historical processing data to obtain the success rate threshold.
10. The method according to any one of claims 1 to 3, wherein before determining the first type of resource transfer request corresponding to the maintenance reason among the at least two types of resource transfer requests supported by the resource channel in the maintenance state, the method further comprises:
acquiring a first channel priority of the resource channel;
inquiring to obtain a channel type corresponding to the first channel priority from a corresponding relation between the channel priority and the channel type, wherein the channel type comprises a main resource channel and a standby resource channel, the main resource channel is a resource channel positioned at the front L position in the priority sequence, and L is a positive integer;
responding to the channel type as the standby resource channel, and acquiring the current detection time; stopping the detection of the resource channel in response to the detection time being in the resource transfer peak period, and setting the next detection time of the resource channel; determining to continue probing the resource channel in response to the probing time being in a non-resource transfer peak period;
determining to continue probing the resource channel in response to the channel type being the primary resource channel.
11. An apparatus for switching states of resource channels, the apparatus comprising:
a determining module, configured to determine, in at least two types of resource transfer requests supported by the resource channel in the maintenance state, a first type of resource transfer request corresponding to a maintenance reason;
the detection module is used for detecting the resource channel by adopting the first type of resource transfer request to obtain a detection result;
the operation module is used for determining the channel success rate of the resource channel during resource transfer according to the detection result;
and the switching module is used for responding to the channel success rate larger than the success rate threshold value and switching the state of the resource channel from the maintenance state to the available state.
12. A server, characterized in that the server comprises: a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the method of switching states of a resource channel of any of claims 1 to 10.
13. A computer-readable storage medium, in which a computer program is stored, the computer program being loaded and executed by a processor to implement the method for switching the state of a resource channel according to any one of claims 1 to 10.
CN202010546471.8A 2020-06-15 2020-06-15 Resource channel state switching method, device, equipment and storage medium Withdrawn CN111736995A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010546471.8A CN111736995A (en) 2020-06-15 2020-06-15 Resource channel state switching method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010546471.8A CN111736995A (en) 2020-06-15 2020-06-15 Resource channel state switching method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111736995A true CN111736995A (en) 2020-10-02

Family

ID=72649321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010546471.8A Withdrawn CN111736995A (en) 2020-06-15 2020-06-15 Resource channel state switching method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111736995A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105574624A (en) * 2014-10-09 2016-05-11 阿里巴巴集团控股有限公司 Abnormal data processing method and device and monitoring system
US20170132627A1 (en) * 2015-11-09 2017-05-11 Paypal, Inc. Integration platform for interfacing with third party channels
CN108320147A (en) * 2018-02-28 2018-07-24 深圳前海桔子信息技术有限公司 A kind of exchange management method, device, server and storage medium
CN108665251A (en) * 2018-05-11 2018-10-16 阿里巴巴集团控股有限公司 A kind of processing method and processing device that channel of disbursement restores
CN110175830A (en) * 2019-05-22 2019-08-27 深圳乐信软件技术有限公司 Management method, device, server and the storage medium of trading channel
CN110264171A (en) * 2019-06-06 2019-09-20 深圳前海微众银行股份有限公司 Distributed bill processing method, device, equipment and computer readable storage medium
CN111275415A (en) * 2020-01-13 2020-06-12 北京三快在线科技有限公司 Resource channel switching method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105574624A (en) * 2014-10-09 2016-05-11 阿里巴巴集团控股有限公司 Abnormal data processing method and device and monitoring system
US20170132627A1 (en) * 2015-11-09 2017-05-11 Paypal, Inc. Integration platform for interfacing with third party channels
CN108320147A (en) * 2018-02-28 2018-07-24 深圳前海桔子信息技术有限公司 A kind of exchange management method, device, server and storage medium
CN108665251A (en) * 2018-05-11 2018-10-16 阿里巴巴集团控股有限公司 A kind of processing method and processing device that channel of disbursement restores
CN110175830A (en) * 2019-05-22 2019-08-27 深圳乐信软件技术有限公司 Management method, device, server and the storage medium of trading channel
CN110264171A (en) * 2019-06-06 2019-09-20 深圳前海微众银行股份有限公司 Distributed bill processing method, device, equipment and computer readable storage medium
CN111275415A (en) * 2020-01-13 2020-06-12 北京三快在线科技有限公司 Resource channel switching method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
苗苗 加志: "《支付通道自动化管理的实践之路》", Retrieved from the Internet <URL:https://tech.meituan.com/2017/10/27/pay-paygw-automation-system.html> *

Similar Documents

Publication Publication Date Title
US8849776B2 (en) Method and system for resolving data inconsistency
US11790375B2 (en) Flexible capacity in an electronic environment
CN109104336A (en) Service request processing method, device, computer equipment and storage medium
CN109214676B (en) Business order processing method, device, server and storage medium
US10467055B2 (en) Computer resource provisioning failure mitigation
CN111400600A (en) Message pushing method, device, equipment and storage medium
CN112200450A (en) Customer service distribution method, device and medium
CN111461776A (en) Resource distribution method, device, equipment and storage medium
CN111586177B (en) Cluster session loss prevention method and system
CN110351327B (en) Resource processing platform confirmation method and device, electronic equipment and medium
CN111680914B (en) Event distribution method, event distribution device, storage medium, and electronic device
US11283929B2 (en) Identifying unreported issues through customer service interactions and website analytics
CN111736995A (en) Resource channel state switching method, device, equipment and storage medium
US20220414684A1 (en) Multi-Modal Regression to Predict Customer Intent to Contact a Merchant
CN115328891A (en) Data migration method and device, storage medium and electronic equipment
CN114219486A (en) Batch transaction processing method and device, computer equipment and storage medium
CN110033242B (en) Working time determining method, device, equipment and medium
CN114282940A (en) Method and apparatus for intention recognition, storage medium, and electronic device
CN112818204A (en) Service processing method, device, equipment and storage medium
CN111045823A (en) Context data load distribution method, device, equipment and storage medium
CN110908821A (en) Method, device, equipment and storage medium for task failure management
CN110727898B (en) OTA website event assisted processing method, system, equipment and storage medium
CN114553806B (en) Optimization method, device and equipment for instant messaging and storage medium
CN117539643B (en) Credit card sorting and counting platform, batch task processing method and server
CN115168203A (en) Interface simulation method, device, system, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20201002