CN113781154A - Information rollback method, system, electronic equipment and storage medium - Google Patents

Information rollback method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN113781154A
CN113781154A CN202110299687.3A CN202110299687A CN113781154A CN 113781154 A CN113781154 A CN 113781154A CN 202110299687 A CN202110299687 A CN 202110299687A CN 113781154 A CN113781154 A CN 113781154A
Authority
CN
China
Prior art keywords
rollback
virtual asset
asset information
information
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110299687.3A
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 Jingdong Tuoxian Technology Co Ltd
Original Assignee
Beijing Jingdong Tuoxian 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 Jingdong Tuoxian Technology Co Ltd filed Critical Beijing Jingdong Tuoxian Technology Co Ltd
Priority to CN202110299687.3A priority Critical patent/CN113781154A/en
Publication of CN113781154A publication Critical patent/CN113781154A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Abstract

The present disclosure provides an information rollback method, including: constructing a rollback queue according to at least one type of virtual asset information associated with the target order, wherein the rollback queue records the at least one type of virtual asset information; under the condition that the target order fails to be submitted, respectively creating an automatic rollback task according to each type of virtual asset information in the rollback queue to obtain at least one automatic rollback task; sequentially executing each automatic rollback task, and rolling back the virtual asset information to a target system corresponding to the virtual asset information; and under the condition that the rollback of the virtual asset information is successful, deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue. The present disclosure also provides an information rollback system, an electronic device, a storage medium, and a computer program product.

Description

Information rollback method, system, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to an information rollback method, system, electronic device, storage medium, and computer program product.
Background
The e-commerce system usually uses various virtual assets to stimulate user consumption, and when a user purchases a commodity to submit an order, the user often has a scenario of using multiple virtual assets simultaneously, but when the user submits the order, the user may have a situation of failed submission, for example, the virtual asset is already deducted, but because of network interruption or insufficient inventory, the order submission is failed, and at this time, the deducted virtual asset needs to be returned to the user.
In the process of implementing the invention, the inventor finds that due to the conditions of long-time delay of a network, poor performance of a virtual asset rollback system or failure, and the like, the existing method has low asset rollback success rate, needs a large amount of manual intervention, and returns assets manually, so that on one hand, a large amount of user complaints are caused, and on the other hand, human resources are wasted.
Disclosure of Invention
In view of the above, the present disclosure provides an information rollback method, system, electronic device, readable storage medium, and computer program product.
One aspect of the present disclosure provides an information rollback method, including:
constructing a rollback queue according to at least one type of virtual asset information associated with the target order, wherein the at least one type of virtual asset information is recorded in the rollback queue;
under the condition that the target order fails to be submitted, respectively creating an automatic rollback task according to each type of virtual asset information in the rollback queue to obtain at least one automatic rollback task;
sequentially executing each automatic rollback task, and rolling back the virtual asset information to a target system corresponding to the virtual asset information;
and deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue under the condition that the rollback of the virtual asset information is successful.
According to an embodiment of the present disclosure, in the case that the target order information fails to be submitted, the method further includes:
respectively sending asset rollback asynchronous information to a target system corresponding to the virtual asset information;
detecting the rollback state of each virtual asset information;
and deleting the asset rollback asynchronous information corresponding to the virtual asset information when the virtual asset information is detected to have rolled back.
According to an embodiment of the present disclosure, the asset rollback asynchronous information at least includes the target order number and identification information of the virtual asset information.
According to an embodiment of the present disclosure, the information rollback method further includes:
and when the rollback of the virtual asset information fails, executing the automatic rollback task again until the virtual asset information is rolled back to the target system corresponding to the virtual asset information.
According to an embodiment of the present disclosure, the sequentially executing the automatic rollback task and rolling back the virtual asset information to a target system corresponding to the virtual asset information includes:
and sequentially calling rollback interfaces of the target system, and rolling back the virtual asset information to the target system corresponding to the virtual asset information.
According to an embodiment of the present disclosure, the rollback queue at least includes the target order number and at least one identification information of the virtual asset information.
According to an embodiment of the present disclosure, in the case that the rollback of the virtual asset information is successful, deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue includes:
receiving a rollback result of the virtual asset information corresponding to the automatic rollback task, which is fed back by the target system, when the rollback of the virtual asset information is successful;
and deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue in response to the rollback result.
Another aspect of the present disclosure provides an information rollback system, comprising:
the system comprises a building module, a processing module and a processing module, wherein the building module is used for building a rollback queue according to at least one type of virtual asset information associated with a target order, and the at least one type of virtual asset information is recorded in the rollback queue;
a creating module, configured to create an automatic rollback task according to each piece of virtual asset information in the rollback queue, respectively, under a condition that the target order fails to be submitted, and obtain at least one automatic rollback task;
a first execution module, configured to execute each automatic rollback task in sequence, and rollback the virtual asset information to a target system corresponding to the virtual asset information;
and the first deleting module is used for deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue under the condition that the rollback of the virtual asset information is successful.
According to an embodiment of the present disclosure, the information rollback system further includes:
a sending module, configured to send asset rollback asynchronous information to a target system corresponding to the virtual asset information when the target order fails to be submitted;
the detection module is used for detecting the rollback state of each type of virtual asset information;
and the second deleting module deletes the asset rollback asynchronous information corresponding to the virtual asset information under the condition that the virtual asset information is detected to have rolled back.
According to an embodiment of the present disclosure, the information rollback system further includes:
and a second execution module, configured to, when the rollback of the virtual asset information fails, execute the automatic rollback task again until the virtual asset information is rolled back to the target system corresponding to the virtual asset information.
According to an embodiment of the present disclosure, the first execution module includes:
and the rollback unit is used for sequentially calling rollback interfaces of the target systems and rolling back the virtual asset information to the target systems corresponding to the virtual asset information.
According to an embodiment of the present disclosure, the first deleting module includes:
a feedback unit, configured to receive a rollback result of the virtual asset information corresponding to the automatic rollback task, which is fed back by the target system, when the rollback of the virtual asset information is successful;
and the deleting unit is used for responding to the rollback result and deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue.
Another aspect of the present disclosure provides an electronic device including:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the present disclosure provides a computer program product comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, the rollback queue is constructed according to the associated virtual asset information in the target order, the automatic rollback task corresponding to the virtual asset information is created in the rollback process, the success rate of the virtual asset rollback can be ensured through the automatic rollback task, and a large amount of manual intervention is not needed, so that the problems that in the prior art, due to the fact that the success rate of the asset rollback is low and the assets are manually returned due to the fact that a network is delayed for a long time, the performance of a virtual asset rollback system is poor or the system is broken easily and the like are at least partially solved, and therefore the accuracy of the virtual asset rollback is improved, and the technical effect of user experience is improved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an exemplary system architecture to which the information rollback method and system of the present disclosure may be applied.
Fig. 2 schematically shows a flow chart of an information rollback method according to an embodiment of the present disclosure.
Fig. 3 schematically shows a flow chart of an information rollback method according to another embodiment of the present disclosure.
Fig. 4 schematically illustrates a block schematic diagram of an information rollback system, according to an embodiment of the present disclosure.
Fig. 5 schematically shows a block diagram of an electronic device adapted to implement the information rollback method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The inventor finds that the success rate of virtual asset rollback is low in the related technology due to long-time delay of a network, poor performance of a virtual asset rollback system or outages in a real time mode.
In view of the foregoing problems, embodiments of the present disclosure provide an information rollback method, system, electronic device, and readable storage medium, where the method includes: constructing a rollback queue according to at least one type of virtual asset information associated with the target order, wherein the rollback queue records the at least one type of virtual asset information; under the condition that the target order fails to be submitted, respectively creating an automatic rollback task according to each type of virtual asset information in the rollback queue to obtain at least one automatic rollback task; sequentially executing each automatic rollback task, and rolling back the virtual asset information to a target system corresponding to the virtual asset information; and under the condition that the rollback of the virtual asset information is successful, deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which the information rollback method and system of the present disclosure may be applied, according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, and/or social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the information rollback method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the information rollback system provided by the disclosed embodiments may be generally disposed in the server 105. The information rollback method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the information rollback system provided by the embodiment of the present disclosure may also be provided in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Alternatively, the information rollback method provided by the embodiment of the present disclosure may also be executed by the terminal device 101, 102, or 103, or may also be executed by another terminal device different from the terminal device 101, 102, or 103. Accordingly, the information rollback system provided by the embodiment of the present disclosure may also be provided in the terminal device 101, 102, or 103, or in another terminal device different from the terminal device 101, 102, or 103.
For example, the information to be processed may be originally stored in any one of the terminal apparatuses 101, 102, or 103 (for example, the terminal apparatus 101, but not limited thereto). Then, the terminal device 101 may locally execute the information rollback method provided by the embodiment of the present disclosure, or send the information to be processed to another terminal device, a server, or a server cluster, and execute the information rollback method provided by the embodiment of the present disclosure by another terminal device, a server, or a server cluster that receives the information to be processed.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically shows a flow chart of an information rollback method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S204.
In operation S201, a rollback queue is constructed according to at least one type of virtual asset information associated with the target order, wherein the rollback queue records the at least one type of virtual asset information.
According to an embodiment of the present disclosure, the manner of associating the target order with the virtual asset information may include, for example, that the virtual asset information is recorded within the target order or other manner that enables the target order and the virtual asset information to be associated.
According to the embodiment of the present disclosure, the virtual asset information may be, for example, identification information of a virtual asset such as a coupon, a gift card, a red packet, etc., and may include, for example, a coupon number, a gift card number, a red packet serial number, or other identification information capable of representing the virtual asset.
According to an embodiment of the present disclosure, the rollback queue constructed according to the virtual asset information may be of a list data type, and the form of data storage may include, for example, "< order number 1: coupon number, order number 1: gift card number … >. It should be noted that the above-mentioned data storage forms are exemplary embodiments, and the data storage forms of the rollback queue according to the embodiments of the present disclosure may be other data storage forms that can achieve the same technical effect.
According to the embodiment of the disclosure, after the creation of the rollback queue is completed, the rollback queue may be saved to a cache, for example. According to an embodiment of the present disclosure, the expiration time set in the cache may be, for example, 24 hours, 48 hours, and so on. It should be noted that the expiration time set in the cache may be any other time according to the implementation requirement.
In operation S202, in case of a failure in submitting a target order, an automatic rollback task is respectively created according to each type of virtual asset information in the rollback queue, resulting in at least one automatic rollback task.
According to the embodiment of the disclosure, after the target order submission failure of the user is detected, the rollback operation of the virtual asset associated with the target order is required. And creating an automatic rollback task according to the virtual asset information of the rollback queue, reading the virtual asset information in the rollback queue through the automatic rollback task, and sequentially performing rollback operation on the virtual assets.
In operation S203, each automatic rollback task is sequentially executed to rollback the virtual asset information to the target system corresponding to the virtual asset information.
According to the embodiment of the present disclosure, the method for rolling back the virtual asset information to the target system corresponding to the virtual asset information may include, for example, calling a roll-back interface of the target system, and then rolling back the virtual asset information to the target system, or other methods capable of achieving the same technical effect according to implementation requirements.
According to the embodiment of the disclosure, the virtual asset information may include, for example, identification information of a virtual asset such as a coupon, a red package, and the like, and the target system may include, for example, a coupon system corresponding to the coupon, the red package system, and the like. According to the embodiment of the disclosure, when the virtual asset information is taken as the identification information of the coupon and the target system is taken as the coupon system, the rollback interface of the coupon system is called, and then the coupon is rolled back to the coupon system. It should be noted that the types of the virtual asset information and the types of the target systems described above are exemplary embodiments, and the virtual asset information and the target systems of the present disclosure may also be other virtual asset information and target systems.
In operation S204, in case that the rollback of the virtual asset information is successful, the virtual asset information corresponding to the automatic rollback task in the rollback queue is deleted.
According to the embodiment of the present disclosure, the method for obtaining the information that the rollback of the virtual asset information is successful may be, for example, the target system sends the rollback result after detecting that the rollback of the virtual asset information is completed, determines that the rollback of the virtual asset information is successful after receiving the rollback result, and performs the operation of deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue. In this embodiment, the method for obtaining the information that the rollback of the virtual asset information is successful is only an exemplary method, and according to implementation requirements, other methods capable of achieving the same technical effect may be used.
According to the embodiment of the disclosure, the rollback queue is constructed according to the associated virtual asset information in the target order, the automatic rollback task corresponding to the virtual asset information is created in the rollback process, the success rate of the virtual asset rollback can be ensured through the automatic rollback task, and a large amount of manual intervention is not needed, so that the problems that in the prior art, due to the fact that the success rate of the asset rollback is low and the assets are manually returned due to the fact that a network is delayed for a long time, the performance of a virtual asset rollback system is poor or the system is broken easily and the like are at least partially solved, and therefore the accuracy of the virtual asset rollback is improved, and the technical effect of user experience is improved.
Fig. 3 schematically shows a flow chart of an information rollback method according to another embodiment of the present disclosure. According to the embodiment of the present disclosure, as shown in fig. 3, in the case that the target order information fails to be submitted, the information rollback method further includes operations S211 to S213. It should be noted that, in this embodiment, the description about operations S201 to S204 may refer to the description about fig. 2, and for the sake of brevity of description, the description is not repeated herein.
In operation S211, asset rollback asynchronous information is transmitted to target systems corresponding to the virtual asset information, respectively.
In accordance with an embodiment of the present disclosure, the asset rollback asynchronous message may be, for example, an MQ message sent by the asset rollback MQ (i.e., message queue), which in this embodiment sends an MQ message to the system corresponding to each type of virtual asset information, depending on the type of virtual asset information. For example, if the virtual assets associated with the target order are a coupon and a red envelope, an MQ message is sent to the coupon system and the red envelope system, respectively.
According to the embodiment of the disclosure, the MQ message may include information such as a target order number and identification information of the virtual asset information, for example, the MQ message transmitted to the coupon system may include information such as a target order number and a coupon number, for example, the data format of the MQ message may be { target order number: coupon number }.
It should be noted that the above contents of the asset rollback asynchronous information are exemplary information, and other technical solutions capable of achieving the same technical effect may be adopted according to specific implementation needs.
In operation S212, a rollback state of each virtual asset information is detected.
In operation S213, in case it is detected that the virtual asset information has been rolled back, the asset roll-back asynchronous information corresponding to the virtual asset information is deleted.
According to the embodiment of the disclosure, in the technical scheme of implementing asset rollback asynchronous information correlation, when the virtual asset information is detected to have rolled back, the asset rollback asynchronous information corresponding to the virtual asset information is deleted to meet the idempotent judgment.
According to the embodiment of the disclosure, the rollback queue is constructed according to the associated virtual asset information in the target order, the rollback task is created according to the rollback queue, the asset rollback asynchronous information is sent to the target system corresponding to the virtual asset information, and the rollback success rate of the virtual asset is improved through idempotent design in the rollback process, so that the technical problem that the rollback success rate of the virtual asset is low due to the conditions that a network is delayed for a long time, the performance of the virtual asset rollback system is poor or the virtual asset rolls down and the like in the prior art is at least partially solved, and the technical effects of ensuring the accuracy of the virtual asset rollback of a user and improving the user experience are achieved.
According to an embodiment of the present disclosure, the asset rollback asynchronous information includes at least a target order number and identification information of the virtual asset information.
In accordance with an embodiment of the present disclosure, the asset rollback asynchronous message may be, for example, an MQ message sent by the asset rollback MQ (i.e., message queue), which in this embodiment sends an MQ message to the system corresponding to each type of virtual asset information, depending on the type of virtual asset information. For example, if the virtual assets associated with the target order are a coupon and a red envelope, an MQ message is sent to the coupon system and the red envelope system, respectively.
According to the embodiment of the disclosure, the MQ message may include information such as a target order number and identification information of the virtual asset information, for example, the MQ message transmitted to the coupon system may include information such as a target order number and a coupon number, for example, the data format of the MQ message may be { target order number: coupon number }.
According to the embodiment of the present disclosure, in conjunction with fig. 3, in the case that the rollback of the virtual asset information fails, the automatic rollback task is executed again until the virtual asset information is rolled back into the target system corresponding to the virtual asset information.
According to the embodiment of the disclosure, the number of times of executing the automatic rollback task may be set when the rollback of the virtual asset information fails, and in this embodiment, the number of times of cyclically executing the automatic rollback task may be, for example, 5 to 10 times, or any other number of cycles as needed.
According to the embodiment of the present disclosure, sequentially executing the automatic rollback task, and rolling back the virtual asset information to the target system corresponding to the virtual asset information includes: and sequentially calling rollback interfaces of the target system, and rolling back the virtual asset information to the target system corresponding to the virtual asset information.
According to the embodiment of the present disclosure, the method for rolling back the virtual asset information to the target system corresponding to the virtual asset information may include, for example, calling a roll-back interface of the target system, and then rolling back the virtual asset information to the target system, or other methods capable of achieving the same technical effect according to the implementation requirement.
According to the embodiment of the disclosure, the rollback queue at least comprises a target order number and identification information of at least one type of virtual asset information.
According to the embodiment of the present disclosure, the virtual asset information may be, for example, identification information of a virtual asset such as a coupon, a gift card, a red packet, etc., and may include, for example, a coupon number, a gift card number, a red packet serial number, or other identification information capable of representing the virtual asset.
According to an embodiment of the present disclosure, the rollback queue constructed according to the virtual asset information may be of a list data type, and the form of data storage may include, for example, "< order number 1: coupon number, order number 1: gift card number … >. It should be noted that the above-mentioned data storage forms are exemplary embodiments, and the data storage forms of the rollback queue according to the embodiments of the present disclosure may be other data storage forms that can achieve the same technical effect.
According to the embodiment of the present disclosure, in the case that the rollback of the virtual asset information is successful, deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue includes:
in the case that the rollback of the virtual asset information is successful, for example, a rollback result of the virtual asset information corresponding to the automatic rollback task, which is fed back by the target system, may be received;
and in response to the rollback result, deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue.
According to the embodiment of the disclosure, under the condition that the rollback of the virtual asset information is determined to be successful, the virtual asset information is deleted from the rollback queue, so that resource waste caused by repeated rollback of the virtual asset information can be avoided, and the effects of saving resources and improving the rollback efficiency of the virtual asset are achieved.
Fig. 4 schematically illustrates a block schematic diagram of an information rollback system 400, according to an embodiment of the present disclosure.
According to an embodiment of the present disclosure, as shown in fig. 3, the information rollback system 400 includes: a building module 410, a creating module 420, a first executing module 430, and a first deleting module 340.
The building module 410 is configured to build a rollback queue according to at least one type of virtual asset information associated with the target order, where the rollback queue records the at least one type of virtual asset information;
the creating module 420 is configured to, when the target order fails to be submitted, create an automatic rollback task according to each virtual asset information in the rollback queue, respectively, to obtain at least one automatic rollback task;
the first execution module 430 is configured to sequentially execute each automatic rollback task, and rollback the virtual asset information to a target system corresponding to the virtual asset information;
the first deleting module 440 is configured to delete the virtual asset information corresponding to the automatic rollback task in the rollback queue if the rollback of the virtual asset information is successful.
According to the embodiment of the disclosure, the rollback queue is constructed according to the associated virtual asset information in the target order, the automatic rollback task corresponding to the virtual asset information is created in the rollback process, the success rate of the virtual asset rollback can be ensured through the automatic rollback task, and a large amount of manual intervention is not needed, so that the problems that in the prior art, due to the fact that the success rate of the asset rollback is low and the assets are manually returned due to the fact that a network is delayed for a long time, the performance of a virtual asset rollback system is poor or the system is broken easily and the like are at least partially solved, and therefore the accuracy of the virtual asset rollback is improved, and the technical effect of user experience is improved.
According to an embodiment of the present disclosure, the information rollback system 400 further includes a sending module, a detecting module, and a second deleting module.
The sending module is used for sending the asset rollback asynchronous information to a target system corresponding to the virtual asset information under the condition that the target order fails to be submitted;
the detection module is used for detecting the rollback state of each type of virtual asset information;
and the second deleting module is used for deleting the asset rollback asynchronous information corresponding to the virtual asset information under the condition that the virtual asset information is detected to have been rolled back.
According to the embodiment of the disclosure, the rollback queue is constructed according to the associated virtual asset information in the target order, the rollback task is created according to the rollback queue, the asset rollback asynchronous information is sent to the target system corresponding to the virtual asset information, and the rollback success rate of the virtual asset is improved through idempotent design in the rollback process, so that the technical problem that the rollback success rate of the virtual asset is low due to the conditions that a network is delayed for a long time, the performance of the virtual asset rollback system is poor or the virtual asset rolls down and the like in the prior art is at least partially solved, and the technical effects of ensuring the accuracy of the virtual asset rollback of a user and improving the user experience are achieved.
The information rollback system 400 further includes a second execution module, according to an embodiment of the present disclosure.
And the second execution module is used for executing the automatic rollback task again under the condition that the rollback of the virtual asset information fails until the virtual asset information is rolled back to the target system corresponding to the virtual asset information.
According to an embodiment of the present disclosure, the first execution module 430 includes a rollback unit.
And the rollback unit is used for sequentially calling rollback interfaces of the target system and rolling back the virtual asset information to the target system corresponding to the virtual asset information.
According to an embodiment of the present disclosure, the first deletion module 440 includes a feedback unit and a deletion unit.
The feedback unit is used for receiving a rollback result of the virtual asset information corresponding to the automatic rollback task, which is fed back by the target system, under the condition that the rollback of the virtual asset information is successful;
and the deleting unit is used for responding to the rollback result and deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any number of the building module 410, the creating module 420, the first executing module 430, and the first deleting module 440 may be combined and implemented in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the building module 410, the creating module 420, the first executing module 430, and the first deleting module 440 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in any suitable combination of any of them. Alternatively, at least one of the building module 410, the creating module 420, the first executing module 430 and the first deleting module 440 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
It should be noted that, the information rollback system 400 portion in the embodiment of the present disclosure corresponds to the information rollback method portion in the embodiment of the present disclosure, and the description of the information rollback system 400 portion specifically refers to the data processing method portion, which is not described herein again.
Fig. 5 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, an electronic device 500 according to an embodiment of the present disclosure includes a processor 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. The processor 501 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 501 may also include onboard memory for caching purposes. Processor 501 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. The processor 501 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 502 and/or the RAM 503. Note that the programs may also be stored in one or more memories other than the ROM 502 and the RAM 503. The processor 501 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, electronic device 500 may also include an input/output (I/O) interface 505, input/output (I/O) interface 505 also being connected to bus 504. The system 500 may also include one or more of the following components connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program, when executed by the processor 501, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include ROM 502 and/or RAM 503 and/or one or more memories other than ROM 502 and RAM 503 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method provided by the embodiments of the present disclosure, when the computer program product is run on an electronic device, the program code being adapted to cause the electronic device to carry out the method of roll-back of information provided by the embodiments of the present disclosure.
The computer program, when executed by the processor 501, performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, downloaded and installed through the communication section 509, and/or installed from the removable medium 511. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (11)

1. An information rollback method comprising:
constructing a rollback queue according to at least one type of virtual asset information associated with a target order, wherein the at least one type of virtual asset information is recorded in the rollback queue;
under the condition that the target order fails to be submitted, respectively creating an automatic rollback task according to each type of virtual asset information in the rollback queue to obtain at least one automatic rollback task;
sequentially executing each automatic rollback task, and rolling back the virtual asset information to a target system corresponding to the virtual asset information;
and under the condition that the rollback of the virtual asset information is successful, deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue.
2. The method of claim 1, wherein in the event of a failure to submit the target order information, the method further comprises:
respectively sending asset rollback asynchronous information to a target system corresponding to the virtual asset information;
detecting a rollback state of each of the virtual asset information;
and deleting the asset rollback asynchronous information corresponding to the virtual asset information under the condition that the virtual asset information is detected to have rolled back.
3. The method of claim 2, wherein the asset rollback asynchronous information includes at least the target order number and identification information of the virtual asset information.
4. The method of claim 1, further comprising:
and under the condition that the rollback of the virtual asset information fails, executing the automatic rollback task again until the virtual asset information is rolled back to a target system corresponding to the virtual asset information.
5. The method of claim 1, wherein said sequentially executing the automatic rollback tasks to rollback the virtual asset information to a target system corresponding to the virtual asset information comprises:
and sequentially calling rollback interfaces of the target system, and rolling back the virtual asset information to the target system corresponding to the virtual asset information.
6. The method of claim 1, wherein the rollback queue includes at least the target order number and identification information of at least one of the virtual asset information.
7. The method of claim 1, wherein, in the case that the rollback of the virtual asset information is successful, deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue comprises:
receiving a rollback result of the virtual asset information corresponding to the automatic rollback task, which is fed back by the target system, under the condition that the rollback of the virtual asset information is successful;
and in response to the rollback result, deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue.
8. An information rollback system, comprising:
the system comprises a building module, a rollback module and a processing module, wherein the building module is used for building a rollback queue according to at least one type of virtual asset information associated with a target order, and the at least one type of virtual asset information is recorded in the rollback queue;
the creating module is used for respectively creating automatic rollback tasks according to each type of virtual asset information in the rollback queue under the condition that the target order fails to be submitted, so as to obtain at least one automatic rollback task;
the first execution module is used for sequentially executing each automatic rollback task and rolling back the virtual asset information to a target system corresponding to the virtual asset information;
and the first deleting module is used for deleting the virtual asset information corresponding to the automatic rollback task in the rollback queue under the condition that the rollback of the virtual asset information is successful.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
11. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 7 when executed.
CN202110299687.3A 2021-03-19 2021-03-19 Information rollback method, system, electronic equipment and storage medium Pending CN113781154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110299687.3A CN113781154A (en) 2021-03-19 2021-03-19 Information rollback method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110299687.3A CN113781154A (en) 2021-03-19 2021-03-19 Information rollback method, system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113781154A true CN113781154A (en) 2021-12-10

Family

ID=78835563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110299687.3A Pending CN113781154A (en) 2021-03-19 2021-03-19 Information rollback method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113781154A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024027057A1 (en) * 2022-08-04 2024-02-08 深圳计算科学研究院 Data rollback method and apparatus, and device and storage medium therefor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019097811A1 (en) * 2017-11-17 2019-05-23 日本電気株式会社 Virtual resource provision device, virtual network function provision system, virtual resource provision method, and program
CN110490568A (en) * 2018-05-15 2019-11-22 腾讯科技(深圳)有限公司 The replacement method and device of object, storage medium, electronic device
CN111309745A (en) * 2020-02-10 2020-06-19 腾讯科技(深圳)有限公司 Virtual resource processing method and device, electronic equipment and storage medium
CN111311360A (en) * 2020-02-03 2020-06-19 网银在线(北京)科技有限公司 Resource return method and device, storage medium and electronic device
CN111784443A (en) * 2015-05-08 2020-10-16 阿里巴巴集团控股有限公司 Order information processing method and device
CN112016921A (en) * 2020-03-03 2020-12-01 支付宝(杭州)信息技术有限公司 Transaction processing method, device and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111784443A (en) * 2015-05-08 2020-10-16 阿里巴巴集团控股有限公司 Order information processing method and device
WO2019097811A1 (en) * 2017-11-17 2019-05-23 日本電気株式会社 Virtual resource provision device, virtual network function provision system, virtual resource provision method, and program
CN110490568A (en) * 2018-05-15 2019-11-22 腾讯科技(深圳)有限公司 The replacement method and device of object, storage medium, electronic device
CN111311360A (en) * 2020-02-03 2020-06-19 网银在线(北京)科技有限公司 Resource return method and device, storage medium and electronic device
CN111309745A (en) * 2020-02-10 2020-06-19 腾讯科技(深圳)有限公司 Virtual resource processing method and device, electronic equipment and storage medium
CN112016921A (en) * 2020-03-03 2020-12-01 支付宝(杭州)信息技术有限公司 Transaction processing method, device and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024027057A1 (en) * 2022-08-04 2024-02-08 深圳计算科学研究院 Data rollback method and apparatus, and device and storage medium therefor

Similar Documents

Publication Publication Date Title
CN110287146B (en) Method, device and computer storage medium for downloading application
CN110019496B (en) Data reading and writing method and system
CN112346794A (en) Interface calling method, device, equipment and medium
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
CN113076224B (en) Data backup method, data backup system, electronic device and readable storage medium
CN112965916B (en) Page testing method, page testing device, electronic equipment and readable storage medium
CN113051055A (en) Task processing method and device
CN113781154A (en) Information rollback method, system, electronic equipment and storage medium
CN110717992B (en) Method, apparatus, computer system and readable storage medium for scheduling model
CN113132400B (en) Business processing method, device, computer system and storage medium
CN115934378A (en) Service data processing method and device, electronic equipment and storage medium
CN112953769B (en) Data transmission method, device, computer system and readable storage medium
CN116503005A (en) Method, device, system and storage medium for dynamically modifying flow
CN113076175B (en) Memory sharing method and device for virtual machine
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN114780361A (en) Log generation method, device, computer system and readable storage medium
CN111580882B (en) Application program starting method, device, computer system and medium
CN113986833A (en) File merging method, system, computer system and storage medium
CN113656041A (en) Data processing method, device, equipment and storage medium
CN113778631A (en) Distributed transaction compensation method and device, electronic equipment and readable storage medium
CN115333871B (en) Firewall operation and maintenance method and device, electronic equipment and readable storage medium
CN114936006A (en) Data migration method, device, medium, and program product for mailbox system
CN114595061A (en) Resource allocation method and device, electronic equipment and computer readable storage medium
CN114782135A (en) Information processing method and device, electronic equipment and computer readable 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