A task processing method and device based on a digital password

CN115659315BActive Publication Date: 2026-09-22INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210972661.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2026-09-22
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

然而,这种方式在基于队列的分布式任务处理模式中,往往会出现同一个任务被不同节点重复执行,从而会导致资源的浪费和任务处理的异常

Benefits of technology

[0029]本发明实施例提供的基于数字口令的任务处理方法及装置,在执行与服务节点领取的口令相对应的任务时,根据服务节点中目标进程的状态,验证所述口令是否有效,其中,所述服务节点的口令维护在口令信息表中,所述口令信息表中的每个口令对应有一个任务;若所述口令失效,则停止执行与所述口令相对应的任务并清理所述服务节点中存储的口令信息;继续领取所述口令信息表中开放的口令并执行该口令对应的任务。这样,服务节点领取口令之后,服务节点中的目标进程在运行过程中会主动验证口令是否失效,若所述口令失效,则停止执行与所述口令相对应的任务并清理所述服务节点中存储的口令信息,解决了现有技术中由于服务节点的口令更新进程(口令更新进程由所述服务节点之外的其他服务节点执行)异常导致的服务节点假死,从而该服务节点的口令被错误释放,进而出现多个服务节点重复获取到口令并出现任务被多个服务节点重复执行的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115659315B_ABST
    Figure CN115659315B_ABST
Patent Text Reader

Abstract

The application provides a task processing method and device based on a digital password, which can be used in the financial field or other technical fields. The method comprises the following steps: when a task corresponding to a password collected by a service node is executed, whether the password is valid is verified according to a state of a target process in the service node, wherein the password of the service node is maintained in a password information table, and each password in the password information table corresponds to a task; if the password is invalid, the task corresponding to the password is stopped from being executed, and the password information stored in the service node is cleaned up; and the password opened in the password information table is continuously collected, and the task corresponding to the password is executed. The device is used to execute the above method. The embodiment of the application can solve the problem that the service node is falsely dead due to the abnormal password update process, so that the password of the service node is released incorrectly, and then the problem that multiple service nodes repeatedly collect the password and the task is repeatedly executed by the multiple service nodes occurs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed architecture technology, and specifically to a task processing method and apparatus based on digital passwords. Background Technology

[0002] With the continuous and in-depth application of cloud technology, traditional Java applications and functions are gradually migrating to the cloud, achieving a transformation to a distributed architecture. To better leverage the multi-node concurrency advantages of distributed architecture, traditional service functions have shifted from a single-node model to a multi-node concurrent model. Furthermore, backend service functions often store pending tasks in a database or equivalent storage device, with distributed processing nodes concurrently retrieving and processing the tasks. However, this approach often requires manual intervention when individual service nodes fail to connect. Therefore, ensuring the high availability of the task processing cluster in a distributed architecture model is becoming increasingly important.

[0003] In existing technologies, containers can automatically restart in a PaaS cluster-based distributed architecture environment. However, in queue-based distributed task processing modes, this approach often results in the same task being executed repeatedly on different nodes, leading to resource waste and task processing anomalies. Summary of the Invention

[0004] To address the problems in the prior art, embodiments of the present invention provide a task processing method and apparatus based on digital passwords, which can at least partially solve the problems existing in the prior art.

[0005] On one hand, this invention proposes a task processing method based on digital passwords, comprising:

[0006] When executing a task corresponding to a password obtained from a service node, the validity of the password is verified based on the status of the target process in the service node. The passwords in the service node are maintained in a password information table, and each password in the password information table corresponds to a task. If the password is invalid, the execution of the task corresponding to the password is stopped and the password information stored in the service node is cleared. Then, the service node continues to obtain open passwords from the password information table and execute the tasks corresponding to those passwords.

[0007] Optionally, verifying the validity of the password based on the state of the target process in the service node includes:

[0008] The password is validated when the target process in the service node enters the core function processing flow; and / or the password is validated when the target process in the service node completes the core function processing flow.

[0009] Optionally, the method further includes: if the password is valid, then continuing to execute the task corresponding to the password.

[0010] Optionally, the method further includes: when executing a task corresponding to the password obtained by the service node, updating the timestamp in the target process according to the status of the target process in the service node; periodically verifying the validity of the timestamp in the target process according to a preset time period; if the timestamp in the target process is valid, updating the status of the password obtained by the service node in the password information table.

[0011] Optionally, after periodically verifying the validity of the timestamps in the target process according to a preset time period, the method further includes: if the timestamps in the target process are invalid, then clearing the password information stored in the service node.

[0012] Optionally, updating the timestamp in the target process according to the state of the target process in the service node includes updating the timestamp in the target process when the target process in the service node enters the core function processing flow.

[0013] Optionally, the method further includes: if the timestamp update in the target process fails, then stop executing the task corresponding to the password obtained from the service node and clear the password information stored in the service node.

[0014] On the other hand, the present invention proposes a task processing device based on a digital password, comprising:

[0015] The verification module is used to verify the validity of the password based on the status of the target process in the service node when executing the task corresponding to the password obtained from the service node. The password of the service node is maintained in a password information table, and each password in the password information table corresponds to a task.

[0016] The processing module is used to stop executing the task corresponding to the password and clear the password information stored in the service node if the password is invalid.

[0017] The execution module is used to continue to retrieve the open passwords in the password information table and execute the tasks corresponding to those passwords.

[0018] Optionally, the verification module is specifically used to: verify the validity of the password when the target process in the service node enters the core function processing flow; and / or verify the validity of the password when the target process in the service node completes the core function processing flow.

[0019] Optionally, the execution module is further configured to: if the password is valid, continue to execute the task corresponding to the password.

[0020] Optionally, the device further includes:

[0021] The first update module is used to update the timestamp in the target process according to the status of the target process in the service node when executing the task corresponding to the password obtained from the service node.

[0022] The verification module is used to periodically verify the validity of the time stamps in the target process according to a preset time period.

[0023] The second update module is used to update the status of the password obtained by the service node in the password information table if the timestamp in the target process is valid.

[0024] Optionally, the device further includes: a first cleaning module, used to clean up the password information stored in the service node if the timestamp in the target process becomes invalid.

[0025] Optionally, the first update module is specifically used to update the timestamp in the target process when the target process in the service node enters the core function processing flow.

[0026] Optionally, the device further includes a second cleanup module, used to stop executing the task corresponding to the password obtained by the service node and clean up the password information stored in the service node if the timestamp update in the target process fails.

[0027] In another aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the task processing method based on digital password described in any of the above embodiments.

[0028] In another aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the task processing method based on a digital password as described in any of the above embodiments.

[0029] The task processing method and apparatus based on digital passwords provided in this invention, when executing a task corresponding to a password obtained by a service node, verifies the validity of the password based on the state of the target process in the service node. The passwords in the service node are maintained in a password information table, and each password in the password information table corresponds to a task. If the password is invalid, the execution of the task corresponding to the password is stopped and the password information stored in the service node is cleared. Then, the system continues to obtain open passwords from the password information table and execute the tasks corresponding to those passwords. In this way, after the service node obtains a password, the target process in the service node actively verifies whether the password is invalid during operation. If the password is invalid, the execution of the task corresponding to the password is stopped and the password information stored in the service node is cleared. This solves the problem in the prior art where an abnormal password update process (executed by a service node other than the service node itself) causes the service node to appear dead, resulting in the incorrect release of the password and multiple service nodes repeatedly obtaining passwords and executing tasks repeatedly. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0031] Figure 1 This is a flowchart illustrating a task processing method based on a digital password provided in an embodiment of the present invention.

[0032] Figure 2 This is a partial flowchart of a task processing method based on digital passwords provided in an embodiment of the present invention.

[0033] Figure 3 This is a partial flowchart of a task processing method based on digital passwords provided in an embodiment of the present invention.

[0034] Figure 4 This is a schematic diagram of the structure of a task processing device based on a digital password provided in an embodiment of the present invention.

[0035] Figure 5 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments and descriptions of the present invention are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.

[0037] To better understand this invention, the research background of this invention will be briefly introduced below.

[0038] To better leverage the multi-node concurrency advantages of distributed architectures, a high-availability mechanism based on digital passwords has been implemented during the transition of traditional service functions from single-node to multi-node concurrent modes. This mechanism ensures that service functions on multiple container nodes within a PaaS-based distributed framework can process queued tasks concurrently without interference or contention. Furthermore, by fully utilizing the self-recovery mechanism of the PaaS cluster, it guarantees service continuity and availability. Even after a container node fails to connect, a newly allocated container can accurately retrieve the task information of the previously failed container using the digital password, thus continuing uninterrupted service processing and ensuring high availability.

[0039] However, this mechanism has the following defects and shortcomings:

[0040] 1. The password information update is not synchronized with the node's main process, which may cause the main process to hang abnormally while the password is not released, making the service appear to have been taken over by the container but actually not effectively processing tasks.

[0041] 2. Because the password information is not updated in sync with the main process, the main process may be normal, but the password may have expired. This may lead to the same task being taken over by different container nodes and resulting in duplicate processing.

[0042] To address the shortcomings of the above-mentioned technical solutions, this application provides an improved method for the aforementioned high-availability service mechanism based on digital passwords. This method ensures that the password information status is synchronized with the main process status in real time, accurately reflecting whether the container can continue service processing. It also avoids situations where multiple nodes process the same task due to inaccurate password information status.

[0043] The following example uses a specific application scenario to illustrate the implementation plan in this manual. Specifically, Figure 1 This is a flowchart illustrating one embodiment of a task processing method based on a digital password provided in this specification. While this specification provides method operation steps or apparatus structures as shown in the following embodiments or figures, the method or apparatus may include more or fewer operation steps or module units, either conventionally or without inventive effort.

[0044] The embodiment provided in this specification can be applied to clients, servers, etc. The client may include terminal devices such as smartphones, tablets, etc. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed system server structure, etc.

[0045] It should be noted that the following embodiments are not intended to limit the technical solutions in other application scenarios that can be extended to this specification. One specific implementation is as follows: Figure 1 As shown in this specification, in one embodiment of a task processing method based on a digital password, the method may include the following steps:

[0046] S101. When executing a task corresponding to the password obtained from the service node, the validity of the password is verified according to the status of the target process in the service node. The password of the service node is maintained in a password information table, and each password in the password information table corresponds to a task.

[0047] In step S101, the service node refers to a container used to provide service functions. The digital password obtained by the service node is stored in the memory object of the service node and in the password information table. The password information table is used to maintain the association between service nodes, passwords, and tasks. After a service node obtains a password from the password information table, the information of the service node is recorded in the password information table and associated with the password. After the service node releases the password or when the service node encounters an abnormality, the password update process clears the information of the service node from the password information table. That is, the password information table records the status information of the password.

[0048] At least one process runs on the service node. The target process can be the main process of the service node, which generally refers to the main process of the container for task processing and is a core module of the container. It can be a scheduled task process or a task pending a request process. The target process can include multiple threads, including threads for executing core functions. The state of the target process can include: starting execution, entering the core function processing flow, core function processing completed, execution ended, etc. During operation, the target process can actively obtain the status of the password in the password information table and verify whether the password is valid, thereby deciding whether to continue task processing.

[0049] S102. If the password is invalid, stop executing the task corresponding to the password and clear the password information stored in the service node.

[0050] In step S102, if the password obtained by the service node has expired and is unusable, the target process and other processes of the service node are paused, and the password information stored in the memory object of the service node is cleared to ensure that there are no usable passwords in the current service node. No further task processing is performed, and the process waits for a usable password to become available again, or for the node to restart and wait for a usable password to become available again. For detailed procedures, please refer to [link to relevant documentation]. Figure 2 .

[0051] S103. Continue to retrieve the open passwords from the password information table and execute the tasks corresponding to those passwords.

[0052] In step S103, when another password is opened in the password information table, the service node continues to retrieve the opened password and execute the task corresponding to the password.

[0053] This invention provides a task processing method based on digital passwords. When executing a task corresponding to a password obtained from a service node, the method verifies the validity of the password based on the state of the target process within the service node. The service node maintains passwords in a password information table, and each password in the table corresponds to a task. If the password is invalid, the execution of the task corresponding to that password is stopped, and the password information stored in the service node is cleared. The method then continues to obtain open passwords from the password information table and execute the tasks corresponding to those passwords. In this way, after the service node obtains a password, the target process within the service node actively verifies the password's validity during operation. If the password is invalid, the execution of the task corresponding to that password is stopped, and the password information stored in the service node is cleared. This solves the problem in the prior art where an abnormal password update process (executed by a service node other than the service node itself) causes the service node to appear dead, resulting in the incorrect release of the password and multiple service nodes repeatedly obtaining passwords and executing tasks repeatedly.

[0054] In some embodiments, the method further includes: if the password is valid, continuing to execute the task corresponding to the password.

[0055] If the password information is deemed valid, that is, if the password of the service node in the password information table is valid, then the target process and other processes of the service node continue to execute the task corresponding to the password obtained by the service node.

[0056] In some embodiments, verifying the validity of the password based on the state of the target process in the service node includes: verifying the validity of the password when the target process in the service node enters the core function processing flow; and / or verifying the validity of the password when the target process in the service node completes the core function processing flow.

[0057] The timestamp in the password information table is updated periodically by an independent password update process in the service node application. If the time recorded by the timestamp is more than a preset time value away from the current system time, the password obtained by the service node is deemed invalid, and the password is reopened. Since there is no dependency between the password update process and the target process, an anomaly in either one can lead to state desynchronization. In some embodiments of this invention, a synchronization operation for the password information timestamp is added to the target process (e.g., the main process) of the service node. When the task in the target process can be processed normally, for example, by setting a judgment step on the program's critical path to determine whether the program has entered the core function's processing flow, a password check is performed before processing the task to verify the validity of the current password. The specific verification method is to obtain the password information from the password information table, determine whether the time interval between the timestamp in the password information and the current system time of the server node is within a preset threshold (e.g., 15 seconds), and if the verification passes, update the timestamp of the password information to the current time and enter the core function's processing flow for task processing. See [link to specific verification process] for details. Figure 2 .

[0058] Alternatively, password verification can be performed once the core function is completed to ensure that the task execution time has not exceeded the limit, avoiding the problem that the password may have expired during task execution due to timeout. Alternatively, password verification can be performed once when the target process enters the core function's processing flow, and again after the core function is completed.

[0059] If either of the two password verification attempts fails, it indicates that the password has expired and is unusable. The target process and other processes on the service node are then paused, and the password information stored in the service node's memory object is cleared. This ensures that no usable passwords are currently available on the service node. No further task processing is performed until a usable password becomes available again, or the node restarts and waits for another usable password to become available. For detailed procedures, please refer to [link to relevant documentation]. Figure 2 .

[0060] In some embodiments, the method further includes:

[0061] S104. When executing the task corresponding to the password obtained from the service node, update the time tag in the target process according to the status of the target process in the service node.

[0062] In step S104, to ensure that the state of the target process is transparent to the password update process, a timestamp is also maintained in the target process. The target process updates the timestamp each time it runs to indicate that it is available and alive.

[0063] S105. Periodically verify the validity of the time stamps in the target process according to a preset time cycle;

[0064] In step S105, the password update process periodically updates the timestamp of the password obtained by the service node in the password information table according to a preset time period. During each password timestamp update, the process can first actively query the target process's timestamp to confirm whether the target process of the service node is available. Specifically, a time threshold is used to determine whether the timestamp obtained each time is within a specified range from the current system time. If it is within the specified range, the password update process continues to update the timestamp of the password in the password information table. If it is found to exceed the specified range, that is, the timestamp of the target process is abnormal, it indicates that the target process may be unavailable. In this case, the current service node should exit and can no longer process the task. The password update task is paused, and the password information in the service node's memory object is cleared, awaiting reallocation. See the detailed process below. Figure 3 .

[0065] S106. If the timestamp in the target process is valid, update the status of the password obtained by the service node in the password information table.

[0066] In step S106, if the timestamp in the target process is valid, it indicates that the target process of the service node is available. At this time, the password update process continues to update the password status in the password information table to indicate that the password is currently occupied. Specifically, the timestamp of the password in the password information table can be updated to the current time. When other service nodes read the password information in the password information table, they determine whether the node is occupied based on the timestamp information of the password. For example, if the time recorded by the timestamp of a password is not more than a specified value from the current time, it means that the password is occupied and cannot be claimed. Conversely, if the time recorded by the timestamp of a password is more than a specified value from the current time, it means that the password has been released and can be taken over.

[0067] In some embodiments, the state synchronization (availability) of the target process is performed by the password update process using an active challenge method. Alternatively, state synchronization can also be achieved through state push or shared access. For example, state push pushes the state of the current process to associated processes, but this increases the cost of state push when there are multiple target processes. Shared access stores the state identifiers of each process independently, and both the updater and the accessor access the state identifiers through an interface. Compared to active challenge, shared access increases the cost of identifier storage and access interface.

[0068] In some embodiments, updating the timestamp in the target process based on the state of the target process in the service node includes: updating the timestamp in the target process when the target process in the service node enters the core function processing flow. If the timestamp update is successful, the target process processes the core function; if the update fails, the core function is exited.

[0069] In some embodiments, after periodically verifying the validity of the timestamp in the target process according to a preset time period, the method further includes: if the timestamp in the target process is invalid, then clearing the password information stored in the service node. If the timestamp in the target process is invalid, it indicates that the target process is unavailable. At this time, the password update process clears the password information stored in the memory object in the current service node and suspends updating the timestamp of the password in the password information table.

[0070] In some embodiments, the method further includes: if the timestamp update in the target process fails, stopping the execution of the task corresponding to the password obtained from the service node and clearing the password information stored in the service node. If the timestamp update in the target process fails, it indicates that the target process is unavailable, and the core function needs to be exited.

[0071] The task processing method based on digital passwords provided in this embodiment of the invention has at least the following advantages:

[0072] 1. Password information updates are synchronized with the target process's status to avoid issues such as the target process being abnormal but password updates continuing, passwords not being released, and tasks failing to execute correctly and effectively. This ensures that if the target process becomes abnormal, the password on the current service node is released promptly, allowing other normal service nodes to take over the password and continue execution.

[0073] 2. By actively determining whether the password is valid during the target process's operation to verify whether task processing can continue, the problem of node apparent death caused by abnormal password update process is solved, which leads to the password being released incorrectly, resulting in multiple service nodes repeatedly obtaining the password and the task being executed repeatedly by multiple service nodes.

[0074] Figure 4 This is a schematic diagram of the structure of a task processing device based on a digital password provided in an embodiment of the present invention, as shown below. Figure 4 As shown, the task processing device based on digital password provided in this embodiment of the invention includes:

[0075] On the other hand, the present invention proposes a task processing device based on a digital password, comprising:

[0076] The verification module 21 is used to verify whether the password is valid based on the status of the target process in the service node when executing the task corresponding to the password obtained by the service node. The password of the service node is maintained in the password information table, and each password in the password information table corresponds to a task.

[0077] The processing module 22 is used to stop executing the task corresponding to the password and clear the password information stored in the service node if the password is invalid.

[0078] The execution module 23 is used to continue to retrieve the open passwords in the password information table and execute the tasks corresponding to the passwords.

[0079] This invention provides a task processing device based on digital passwords. When executing a task corresponding to a password obtained from a service node, the device verifies the validity of the password based on the state of the target process within the service node. The service node maintains passwords in a password information table, with each password corresponding to a task. If the password is invalid, the execution of the task corresponding to that password is stopped, and the password information stored in the service node is cleared. The device then continues to obtain open passwords from the password information table and execute the tasks corresponding to those passwords. In this way, after the service node obtains a password, the target process within the service node actively verifies the password's validity during operation. If the password is invalid, the execution of the task corresponding to that password is stopped, and the password information stored in the service node is cleared. This solves the problem in the prior art where an abnormal password update process (executed by a service node other than the service node itself) causes the service node to appear dead, resulting in the incorrect release of the password and multiple service nodes repeatedly obtaining passwords and executing tasks repeatedly.

[0080] Optionally, the verification module is specifically used to: verify the validity of the password when the target process in the service node enters the core function processing flow; and / or verify the validity of the password when the target process in the service node completes the core function processing flow.

[0081] Optionally, the execution module is further configured to: if the password is valid, continue to execute the task corresponding to the password.

[0082] Optionally, the device further includes:

[0083] The first update module is used to update the timestamp in the target process according to the status of the target process in the service node when executing the task corresponding to the password obtained from the service node.

[0084] The verification module is used to periodically verify the validity of the time stamps in the target process according to a preset time period.

[0085] The second update module is used to update the status of the password obtained by the service node in the password information table if the timestamp in the target process is valid.

[0086] Optionally, the device further includes: a first cleaning module, used to clean up the password information stored in the service node if the timestamp in the target process becomes invalid.

[0087] Optionally, the first update module is specifically used to update the timestamp in the target process when the target process in the service node enters the core function processing flow.

[0088] Optionally, the device further includes a second cleanup module, used to stop executing the task corresponding to the password obtained from the service node and clean up the password information stored in the service node if the timestamp update in the target process fails.

[0089] The embodiments of the apparatus provided in this invention can be used to execute the processing flow of the above method embodiments. Its functions will not be repeated here, but can be referred to the detailed description of the above method embodiments.

[0090] It should be noted that the task processing method and apparatus based on digital passwords provided in the embodiments of the present invention can be used in the financial field, or in any technical field other than the financial field. The embodiments of the present invention do not limit the application field of the task processing method and apparatus based on digital passwords.

[0091] Figure 5 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, as shown below. Figure 5As shown, the electronic device may include a processor 301, a communications interface 302, a memory 303, and a communication bus 304, wherein the processor 301, the communications interface 302, and the memory 303 communicate with each other via the communication bus 304. The processor 301 may call logical instructions in the memory 303 to execute the methods described in any of the above embodiments.

[0092] Furthermore, the logical instructions in the aforementioned memory 303 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0093] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments.

[0094] This embodiment provides a computer-readable storage medium storing a computer program that causes the computer to perform the methods provided in the above-described method embodiments.

[0095] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0096] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0097] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0098] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0099] In the description of this specification, the references to terms such as "an embodiment," "a specific embodiment," "some embodiments," "for example," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0100] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A task processing method based on digital passwords, characterized in that, include: When executing a task corresponding to a password obtained from a service node, the validity of the password is verified based on the status of the target process in the service node. The passwords of the service node are maintained in a password information table, and each password in the password information table corresponds to a task. The status of the target process includes: starting execution, entering the core function processing flow, core function processing completed, and execution ended. If the password expires, the task corresponding to the password will be stopped and the password information stored in the service node will be cleared. Continue to obtain the open passwords in the password information table and execute the tasks corresponding to those passwords; The method further includes: When executing the task corresponding to the password obtained from the service node, the timestamp in the target process is updated according to the status of the target process in the service node; The validity of the time stamps in the target process is periodically verified according to a preset time period. If the timestamp in the target process is valid, the password update process updates the status of the password obtained by the service node in the password information table; the status synchronization of the target process is performed by the password update process through active querying. The step of verifying the validity of the password based on the state of the target process in the service node includes: When the target process in the service node enters the core function's processing flow, the password is validated; and / or The password is validated when the target process in the service node completes the core function processing flow.

2. The method according to claim 1, characterized in that, The method further includes: If the password is valid, the task corresponding to the password will continue to be executed.

3. The method according to claim 1, characterized in that, After periodically verifying the validity of the timestamps in the target process according to a preset time period, the method further includes: If the timestamp in the target process becomes invalid, the password information stored in the service node is cleared.

4. The method according to claim 1, characterized in that, The step of updating the timestamp in the target process based on the state of the target process in the service node includes: When the target process in the service node enters the core function's processing flow, the timestamp in the target process is updated.

5. The method according to claim 1, characterized in that, The method further includes: If the timestamp update in the target process fails, the task corresponding to the password obtained from the service node will be stopped and the password information stored in the service node will be cleared.

6. A task processing device based on digital passwords, characterized in that, include: The verification module is used to verify the validity of the password based on the status of the target process in the service node when executing the task corresponding to the password obtained from the service node. The password of the service node is maintained in the password information table, and each password in the password information table corresponds to a task. The status of the target process includes: starting execution, entering the core function processing flow, core function processing completed, and execution ended. The processing module is used to stop executing the task corresponding to the password and clear the password information stored in the service node if the password is invalid. The execution module is used to continue to retrieve the open passwords in the password information table and execute the tasks corresponding to the passwords; The device further includes: The first update module is used to update the timestamp in the target process according to the status of the target process in the service node when executing the task corresponding to the password obtained from the service node. The verification module is used to periodically verify the validity of the time stamps in the target process according to a preset time period. The second update module is used to update the status of the password obtained by the service node in the password information table if the timestamp in the target process is valid; the status synchronization of the target process is performed by the password update process through active querying. Specifically, the verification module is used to verify the validity of the password when the target process in the service node enters the core function processing flow; and / or to verify the validity of the password when the target process in the service node completes the core function processing flow.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Test verification method and device for transaction system

    CN113821446A

  • Task processing method, device and equipment

    CN113839783A