Time-out information configuration method and device, storage medium and computer device

CN115700483BActive Publication Date: 2026-10-20PINGAN YIQIANBAO E COMMERCE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211391526.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-08
Publication Date
2026-10-20
Estimated Expiration
2042-11-08

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明提供一种超时时间信息配置方法及装置、存储介质、计算机设备,主要目的在于现有涉及多系统调用的业务,业务处理的成功率较低的问题

Benefits of technology

[0054]本发明提供了一种超时时间信息配置方法及装置、存储介质、计算机设备,本发明实施例通过响应于关联节点的节点任务完成指令,获取剩余任务执行时间、目标调用节点的节点信息,所述关联节点为多个医疗服务系统调用过程中的任一非末位节点,所述节点信息包括资源配置信息、目标节点任务;根据所述资源配置信息、所述目标节点任务,确定所述目标调用节点的预期目标节点任务耗时;根据所述预期目标节点任务耗时与所述剩余任务执行时间的比较结果、及预设超时时间配置策略配置剩余任务超时时间,大大减少了运行资源消耗、提升各个被调用系统的响应能力,实现对剩余任务超时时间的动态调节,从而在有效提升多系统调用任务的成功率的同时,确保任务执行效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115700483B_ABST
    Figure CN115700483B_ABST
Patent Text Reader

Abstract

The application discloses a kind of overtime information configuration method and device, storage medium, computer equipment, it is related to information processing technical field, main purpose is to solve the problem of low accuracy of overtime information configuration. Mainly including response to the node task completion instruction of associated node, obtain remaining task execution time, the node information of target calling node, the associated node is any non-terminal node in the calling process of multiple medical service systems, the node information includes resource configuration information, target node task;According to the resource configuration information, the expected target node task time consumption of the target calling node is determined according to the target node task;According to the comparison result of the expected target node task time consumption and the remaining task execution time, and the remaining task timeout time is configured according to preset timeout time configuration strategy. Mainly used to configure the timeout time of multiple medical service system calling process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information processing, and in particular to a method and apparatus for configuring timeout information, a storage medium, and a computer device. Background Technology

[0002] With the development of internet technology, the connections between different business systems are becoming increasingly close. The execution of a business task often involves multi-level calls between multiple systems. For example, querying the supplier of a certain drug requires calling the drug management system from the hospital management system, and then calling the drug procurement management system from the drug management system – a multi-level call process. To ensure the timeliness of business processing and avoid indefinite calls due to problems in any part of the multi-system process, a timeout is often set to limit the duration of the task execution.

[0003] The current configuration of timeout information typically involves setting the timeout period at the first node of task execution, which then keeps track of it. If the timeout exceeds the set timeout period, the first node to process the service interrupts the service execution. However, during the entire service processing process, the processing speed of each node is affected by various factors and fluctuates significantly. This can easily lead to situations where the service processing time exceeds the preset timeout, causing service interruption. Consequently, services involving multiple system calls have a low success rate. Summary of the Invention

[0004] In view of this, the present invention provides a method and apparatus for configuring timeout information, a storage medium, and a computer device, the main purpose of which is to address the problem of low success rate in existing services involving multiple system calls.

[0005] According to one aspect of the present invention, a method for configuring timeout information is provided, comprising:

[0006] In response to the node task completion instruction of the associated node, the remaining task execution time and the node information of the target calling node are obtained. The associated node is any non-last node in the process of calling multiple medical service systems. The node information includes resource configuration information and target node task.

[0007] Based on the resource configuration information and the target node task, determine the expected target node task time for the target calling node;

[0008] Configure the remaining task timeout based on the comparison result between the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy.

[0009] Further, configuring the remaining task timeout based on the comparison result of the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy, includes:

[0010] If the expected target node task timeout is less than or equal to the remaining task execution time, then configure the remaining task timeout based on the remaining task execution time.

[0011] If the expected target node task timeout is greater than the remaining task execution time, and the ratio of the difference between the expected target node task timeout and the remaining task execution time to the remaining task execution time is less than a preset ratio threshold, then the remaining task timeout time is configured based on the expected target node task timeout.

[0012] If the expected target node task time is greater than the remaining task execution time, and the difference between the expected target node task time and the remaining task execution time accounts for a proportion greater than or equal to a preset proportion threshold, then the calling task for the target calling node is interrupted, and a timeout exception is generated.

[0013] Further, the resource configuration information includes hardware configuration information and network configuration information. The step of determining the expected target node task time of the target calling node based on the resource configuration information and the target node task includes:

[0014] The time consumption of the first target node task is calculated based on the historical time consumption data corresponding to the target node task.

[0015] The time taken for the second target node task is calculated based on the task content of the target node task, the hardware configuration information, and the network configuration information.

[0016] The larger of the time values ​​of the first target node task time and the second target node task time is determined as the expected target node task time.

[0017] Further, the step of calculating the time consumption of the first target node task based on the historical time consumption data corresponding to the target node task includes:

[0018] Obtain historical time data of the target calling node executing the target node task within a preset historical time period, the historical time data including the time taken to complete the target node task and the time taken to fail the target node task;

[0019] The distribution data between task completion rate and task time is calculated based on the historical time consumption data, and the task time corresponding to the maximum task completion rate in the distribution data is determined as the task time of the first target node.

[0020] Furthermore, before responding to the node task completion instruction from the associated node and obtaining the remaining task execution time and the node information of the target calling node, the method further includes:

[0021] In response to the initial task execution instruction, the execution process of the associated node executing the initial task execution instruction is monitored to determine the time taken for the completed node task and the target calling node. The initial task execution instruction carries the initial task timeout.

[0022] The remaining task execution time is calculated based on the initial task timeout and the time consumed by the completed node tasks.

[0023] Furthermore, after calculating the remaining task execution time based on the initial task timeout and the time consumed by the completed node tasks, the method further includes:

[0024] If the remaining task execution time is less than a preset remaining time threshold, a timeout exception message is generated to indicate that the global task execution has timed out.

[0025] The timeout exception information is sent to the previous node of the associated node or the target terminal.

[0026] Furthermore, after configuring the remaining task timeout based on the comparison result of the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy, the method further includes:

[0027] The remaining task timeout time is sent to the associated node, so that the associated node generates a target task execution instruction to be sent to the target calling node based on the remaining task timeout time and the target node task. The execution process of the target task execution instruction includes calling at least one node.

[0028] According to another aspect of the present invention, a time information configuration device is provided, comprising:

[0029] The acquisition module is used to respond to the node task completion instruction of the associated node, acquire the remaining task execution time and the node information of the target calling node. The associated node is any non-last node in the process of calling multiple medical service systems. The node information includes resource configuration information and target node task.

[0030] The determination module is used to determine the expected target node task time of the target calling node based on the resource configuration information and the target node task;

[0031] The configuration module is used to configure the remaining task timeout based on the comparison result between the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy.

[0032] Furthermore, the configuration module includes:

[0033] The first configuration unit is configured to configure a remaining task timeout based on the remaining task execution time if the expected target node task timeout is less than or equal to the remaining task execution time.

[0034] The second configuration unit is configured to configure the remaining task timeout time based on the expected target node task timeout if the expected target node task timeout is greater than the remaining task execution time, and the ratio of the difference between the expected target node task timeout and the remaining task execution time to the remaining task execution time is less than a preset ratio threshold.

[0035] The generation unit is configured to interrupt the calling task of the target calling node and generate timeout exception information if the expected target node task timeout is greater than the remaining task execution time, and the difference between the expected target node task timeout and the remaining task execution time accounts for a proportion greater than or equal to a preset proportion threshold.

[0036] Furthermore, the determining module includes:

[0037] The first calculation unit is used to calculate the time consumption of the first target node task based on the historical time consumption data corresponding to the target node task.

[0038] The second calculation unit is used to calculate the time consumption of the second target node task based on the task content of the target node task, the hardware configuration information, and the network configuration information.

[0039] The determining unit is used to determine the larger of the time values ​​of the first target node task time and the second target node task time as the expected target node task time.

[0040] Furthermore, in a specific application scenario, the determining unit is specifically used to obtain historical time consumption data of the target calling node executing the target node task within a preset historical time period. The historical time consumption data includes the time consumed to complete the target node task and the time consumed to fail the target node task.

[0041] The distribution data between task completion rate and task time is calculated based on the historical time consumption data, and the task time corresponding to the maximum task completion rate in the distribution data is determined as the task time of the first target node.

[0042] Furthermore, the device also includes:

[0043] The monitoring module is used to monitor the execution process of the associated node executing the initial task execution instruction in response to the initial task execution instruction, and to determine the time taken for the completed node task and the target calling node. The initial task execution instruction carries the initial task timeout time.

[0044] The calculation module is also used to calculate the remaining task execution time based on the initial task timeout and the time consumed by the completed node tasks.

[0045] Furthermore, the device also includes:

[0046] The generation module is used to generate timeout exception information to indicate that the global task execution timeout is less than a preset remaining time threshold if the remaining task execution time is less than a preset remaining time threshold.

[0047] The first sending module is used to send the timeout exception information to the previous node of the associated node or the target terminal.

[0048] Furthermore, the device also includes:

[0049] The second sending module is used to send the remaining task timeout time to the associated node, so that the associated node generates a target task execution instruction to be sent to the target calling node based on the remaining task timeout time and the target node task. The execution process of the target task execution instruction includes calling at least one node.

[0050] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform an operation corresponding to the timeout information configuration method described above.

[0051] According to another aspect of the present invention, a computer device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0052] The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the above-described timeout information configuration method.

[0053] By employing the above-described technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages:

[0054] This invention provides a method and apparatus for configuring timeout information, a storage medium, and a computer device. In embodiments of this invention, in response to a node task completion instruction from an associated node, the remaining task execution time and node information of the target calling node are obtained. The associated node is any non-last node in the process of calling multiple medical service systems. The node information includes resource configuration information and the target node task. Based on the resource configuration information and the target node task, the expected target node task time of the target calling node is determined. The remaining task timeout is configured based on a comparison between the expected target node task time and the remaining task execution time, and a preset timeout configuration strategy. This significantly reduces runtime resource consumption, improves the responsiveness of each called system, and achieves dynamic adjustment of the remaining task timeout, thereby effectively improving the success rate of multi-system calling tasks while ensuring task execution efficiency.

[0055] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0056] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0057] Figure 1 A flowchart of a timeout information configuration method provided by an embodiment of the present invention is shown;

[0058] Figure 2 This invention provides a flowchart of another timeout information configuration method according to an embodiment of the invention.

[0059] Figure 3 This invention provides a flowchart of another timeout information configuration method according to an embodiment of the invention.

[0060] Figure 4 This diagram illustrates a block diagram of a timeout information configuration device provided in an embodiment of the present invention.

[0061] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0062] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0063] To address the technical problem of low success rate in business processing due to existing timeout information configurations, this invention provides a timeout information configuration method, such as... Figure 1 As shown, the method includes:

[0064] 101. In response to the node task completion instruction of the associated node, obtain the remaining task execution time and the node information of the target calling node.

[0065] In this embodiment of the invention, the task to be executed involves calls between multiple medical service systems. Each called system is a node, and the node task is the part of the task that the current node needs to execute. Each system in the call process is configured with a timeout information configuration plugin. The timeout information configuration plugin is used to configure the timeout information of subsequent nodes, which is the execution subject. For the timeout information configuration plugin, the system where the plugin is located is its associated node. The associated node can be any non-last node in the call process of multiple medical service systems. That is, the associated node can be the initial node or an intermediate node in the multi-system call process. The remaining task execution time is the time remaining for task execution after the current associated node completes its node task, based on the timeout time set by the previous node. The target calling node is the next system (node) that the current associated node needs to call during the execution of the task. The node information of the target calling node includes resource configuration information and the target node task.

[0066] It's important to note that existing timeout configuration methods only inform the task initiating node of the timeout information, while candidate called nodes remain unaware. This leads to a situation where, when the task initiating node interrupts the task due to processing time exceeding the timeout, the called nodes continue executing the interrupted task, causing unnecessary resource consumption. By configuring a timeout information plugin for each expected called system to obtain the remaining task execution time, any called node can become aware of the timeout. When the timeout is exceeded, task execution can be stopped promptly, thereby reducing runtime resource consumption and improving the responsiveness of each system.

[0067] 102. Based on the resource configuration information and the target node task, determine the expected target node task time of the target calling node.

[0068] In this embodiment of the invention, since a fixed timeout period cannot detect the task processing progress of the target calling node, it is prone to being judged as a timeout exception when the target calling node is about to complete task processing, resulting in unnecessary system call failures, increasing the number of retries, and prolonging the task processing time. To achieve timeout configuration that is aware of the node's task processing status, the expected target node task processing time is determined based on the task processing capacity and speed represented by the target calling node's resource configuration information and the task volume represented by the target node task. The target node task is the part of the task that needs to be executed by the target calling node. The expected target node task processing time is the expected value of the time required for the target calling node to execute the target node task corresponding to that node. By determining the expected target node task processing time, the task processing time of the target calling node can be estimated, providing accurate data for the dynamic configuration of the remaining task timeout time. This ensures that the configuration of the remaining task timeout time better meets the target calling node's requirements for the target node task execution time, thereby effectively improving the execution success rate of tasks involving multiple medical service system calls.

[0069] 103. Based on the comparison result between the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy, configure the remaining task timeout.

[0070] In this embodiment of the invention, after obtaining the expected target node task duration, to minimize the risk of timeout exceptions and task failures, it is necessary to ensure that the configured remaining task timeout is greater than or equal to the expected target node task duration. However, to guarantee task execution efficiency, the remaining task timeout cannot be configured indefinitely according to the expected target node task duration. Therefore, the remaining task timeout needs to be configured based on the comparison between the expected target node task duration and the remaining task execution time, and a preset timeout configuration strategy. Specifically, the preset timeout configuration strategy can determine the remaining task timeout based on the comparison between the expected target node task duration and the remaining task execution time, and the proportion of the difference between the expected target node task duration and the remaining task execution time to the remaining task execution time. For example, if the expected target node task duration is less than or equal to the remaining task execution time, then the remaining task execution time is configured as the remaining task timeout. If the expected execution time of the target node task is greater than the remaining execution time of the task, and the proportion of the difference between the expected execution time of the target node task and the remaining execution time of the task to the remaining execution time of the task is less than a preset proportion threshold, then the expected execution time of the target node task will be configured as the remaining task timeout time. If the proportion of the difference between the expected execution time of the target node task and the remaining execution time of the task to the remaining execution time of the task is greater than the preset proportion threshold, then the current task will be interrupted and a timeout exception will be thrown.

[0071] It should be noted that by comparing the expected target node task time with the remaining task execution time and using the preset timeout configuration strategy, the remaining task timeout is configured to ensure that the remaining task timeout is within a reasonable range, maximizing the satisfaction of the node task processing time requirements, and realizing dynamic adjustment of the remaining task timeout. This greatly improves the success rate of multi-system task calls while ensuring task execution efficiency.

[0072] In one embodiment of the present invention, for further illustration and limitation, such as Figure 2 As shown, step 103, which involves configuring the remaining task timeout based on the comparison between the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy, includes:

[0073] 201. If the expected target node task timeout is less than or equal to the remaining task execution time, then configure the remaining task timeout based on the remaining task execution time.

[0074] 202. If the expected target node task timeout is greater than the remaining task execution time, and the ratio of the difference between the expected target node task timeout and the remaining task execution time to the remaining task execution time is less than a preset ratio threshold, then the remaining task timeout timeout is configured based on the expected target node task timeout.

[0075] 203. If the expected target node task time is greater than the remaining task execution time, and the difference between the expected target node task time and the remaining task execution time accounts for a proportion greater than or equal to a preset proportion threshold, then the calling task of the target calling node is interrupted, and a timeout exception message is generated.

[0076] In this embodiment of the invention, the expected execution time of the target node task is compared with the remaining task execution time to determine whether the remaining task execution time is sufficient for the target calling node to complete the target node task. If it is sufficient, the sum of the remaining task execution time and a preset time parameter can be used as the remaining task timeout to limit the execution time of the remaining task. The preset time parameter can be 0s, 1s, etc., or can be customized according to actual needs; this embodiment of the invention does not impose specific limitations. If it is not sufficient, it is necessary to further determine whether the expected target node task execution time will cause the global task execution time to be too long. That is, the ratio of the difference between the expected target node task execution time and the remaining task execution time to the remaining task execution time is compared with a preset ratio threshold. The preset ratio threshold can be 0.2, 0.5, etc., or can be customized according to specific application scenarios. For example, a preset ratio threshold of 0.5 indicates that the expected target node task execution time exceeds 0.5 times the remaining task execution time, resulting in excessive time consumption, requiring the current task to be interrupted and a timeout exception to be thrown.

[0077] It should be noted that when the expected execution time of the target node task is greater than the remaining task execution time, further judgment is made based on the proportion of the difference between the expected execution time of the target node task and the remaining task execution time to the remaining task execution time, as well as a preset proportion threshold. This can promptly detect situations where the time taken for the target calling node to process the task is far greater than the remaining task execution time. This avoids processing the target node task when the remaining task execution time is clearly insufficient, which would lead to a waste of resources for the target calling node and thus effectively reduce resource consumption caused by timeout exceptions.

[0078] In one embodiment of the present invention, for further illustration and limitation, such as Figure 3 As shown, step 102, which involves determining the expected target node task time of the target calling node based on the resource configuration information and the target node task, includes:

[0079] 301. Calculate the time consumption of the first target node task based on the historical time consumption data corresponding to the target node task.

[0080] 302. Calculate the time consumed by the second node task based on the task content of the target node task, the hardware configuration information, and the network configuration information.

[0081] 303. The larger of the time values ​​of the first node task time and the second node task time is determined as the expected target node task time.

[0082] In this embodiment of the invention, since the target node task is a call task between medical service systems, it is frequently used and the task implementation process is relatively fixed. Historical time consumption data corresponding to each target node task can be obtained. Based on the analysis and statistics of this historical time consumption data, the distribution of historical time consumption data can be determined, thereby obtaining the first target node task time consumption determined from the perspective of historical data analysis. In addition, the resource configuration information of the system corresponding to the target calling node also plays a decisive role in the processing time of the target node task. The resource configuration information includes hardware configuration information and network configuration information. Hardware configuration information, such as running memory and memory usage, can reflect the processing efficiency of the target calling node on the task; network configuration information, such as network bandwidth and current network status, can reflect the response speed of the target calling node on the task. Therefore, the second target node task time consumption can be determined from the perspective of server processing efficiency by analyzing the hardware configuration, network configuration, and task content of the target node task. To make the expected target node task time more inclusive, the time consumption of the first target node task and the second target node task, whichever is longer, is taken as the expected target node task time.

[0083] It should be noted that by combining historical data analysis and server processing efficiency to evaluate the expected task time of the target node, a comprehensive assessment of the target calling node's task processing capability can be achieved, thereby improving the accuracy of the expected task time prediction.

[0084] In one embodiment of the present invention, for further explanation and limitation, step 301, which involves calculating the time consumption of the first target node task based on the historical time consumption data corresponding to the target node task, includes:

[0085] Obtain historical time data of the target calling node executing the target node task within a preset historical time period.

[0086] The distribution data between task completion rate and task time is calculated based on the historical time consumption data, and the task time corresponding to the maximum task completion rate in the distribution data is determined as the task time of the first target node.

[0087] In this embodiment of the invention, historical time consumption data includes the time consumed to complete the target node task and the time consumed when the target node task fails. Since task processing can result in both success and failure, the historical time consumption data should be statistically calculated by combining the target node task completion time and the target node task failure time to obtain a normal distribution of data between the task completion rate and the task consumption time. The task consumption time corresponding to the maximum task completion rate in the normal distribution data is then taken as the first target node task consumption time. By statistically analyzing historical time consumption data to obtain a normal distribution of data between the task completion rate and the task consumption time, the task processing time that maximizes the task completion rate can be accurately captured, thereby improving the effectiveness of the first target node task consumption time.

[0088] In one embodiment of the present invention, for further explanation and limitation, before obtaining the remaining task execution time and the node information of the target calling node in response to the node task completion instruction of the associated node, the method further includes:

[0089] In response to the initial task execution instruction, the execution process of the associated node executing the initial task execution instruction is monitored to determine the time taken for the completed node task and the target calling node.

[0090] The remaining task execution time is calculated based on the initial task timeout and the time consumed by the completed node tasks.

[0091] In this embodiment of the invention, the initial task execution instruction carries an initial task timeout. The time taken for completed node tasks is the time taken for associated nodes to process the current task. The initial task execution instruction is either a call instruction received by the associated node from the previous node, or a complete task execution instruction when the associated node is the initial task execution node. When the associated node is the initial node, the initial task timeout is the system-preset timeout. When the associated node is an intermediate node, the initial task timeout is the remaining task timeout configured by the timeout information configuration plugin associated with the previous node. By analyzing the task execution time of the associated nodes and the call action to the next node, the time taken for completed node tasks and the target calling node are determined, thereby determining the remaining task execution time.

[0092] In one embodiment of the present invention, for further explanation and limitation, after calculating the remaining task execution time based on the initial task timeout time and the time consumed by the completed node tasks, the method further includes:

[0093] If the remaining task execution time is less than a preset remaining time threshold, a timeout exception message is generated to indicate that the global task execution has timed out.

[0094] The timeout exception information is sent to the previous node of the associated node or the target terminal.

[0095] In this embodiment of the invention, if it is detected that the remaining time after the current associated node executes its task is too short, for example, the remaining task execution time is 0.5 seconds, it indicates that the current associated node has been taking too long. No further analysis or judgment is needed; it is known that the next target calling node does not have sufficient time to process the remaining task, so the task is directly interrupted. If the current associated node is the initial node, a timeout exception information is sent to the corresponding terminal. If the current associated node is an intermediate node, a timeout exception information is fed back to the previous node, and so on, passing the timeout exception information layer by layer to the terminal that needs to receive it. By determining the remaining task execution time based on a preset remaining time threshold after obtaining the remaining task execution time, it is possible to initially screen the remaining task execution time, promptly detect situations where the current associated node has been taking too long or the remaining task execution time is too short, and interrupt the task in a timely manner, thereby reducing resource consumption and improving task processing efficiency.

[0096] In one embodiment of the present invention, for further explanation and limitation, after configuring the remaining task timeout based on the comparison result of the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy, the method further includes:

[0097] The remaining task timeout time is sent to the associated node, so that the associated node generates a target task execution instruction to be sent to the target calling node based on the remaining task timeout time and the target node task.

[0098] In this embodiment of the invention, the execution entity is a timeout information configuration plugin, and the remaining task timeout needs to be transmitted to the target calling node based on the associated node. Therefore, after configuring the remaining task timeout, the configured remaining task timeout needs to be sent to the associated node. The associated node then generates a target task execution instruction based on the remaining task timeout and the target node's task, and sends the target task execution instruction to the target calling node. The target task execution instruction is the initial task execution instruction of the target calling node.

[0099] This invention provides a method for configuring timeout information. In this embodiment, in response to a node task completion instruction from an associated node, the remaining task execution time and node information of the target calling node are obtained. The associated node is any non-last node in the process of calling multiple medical service systems. The node information includes resource configuration information and the target node task. Based on the resource configuration information and the target node task, the expected target node task time of the target calling node is determined. The remaining task timeout is configured based on a comparison between the expected target node task time and the remaining task execution time, and a preset timeout configuration strategy. This significantly reduces runtime resource consumption, improves the responsiveness of each called system, and achieves dynamic adjustment of the remaining task timeout, thereby effectively improving the success rate of multi-system calling tasks while ensuring task execution efficiency.

[0100] Furthermore, as a response to the above Figure 1 To implement the method shown, this embodiment of the invention provides an apparatus, such as... Figure 4 As shown, the device includes:

[0101] The acquisition module 41 is used to respond to the node task completion instruction of the associated node, acquire the remaining task execution time and the node information of the target calling node. The associated node is any non-last node in the process of calling multiple medical service systems. The node information includes resource configuration information and target node task.

[0102] The determining module 42 is used to determine the expected target node task consumption time of the target calling node based on the resource configuration information and the target node task;

[0103] Configuration module 43 is used to configure the remaining task timeout based on the comparison result of the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy.

[0104] Furthermore, the configuration module 43 includes:

[0105] The first configuration unit is configured to configure a remaining task timeout based on the remaining task execution time if the expected target node task timeout is less than or equal to the remaining task execution time.

[0106] The second configuration unit is configured to configure the remaining task timeout time based on the expected target node task timeout if the expected target node task timeout is greater than the remaining task execution time, and the ratio of the difference between the expected target node task timeout and the remaining task execution time to the remaining task execution time is less than a preset ratio threshold.

[0107] The generation unit is configured to interrupt the calling task of the target calling node and generate timeout exception information if the expected target node task timeout is greater than the remaining task execution time, and the difference between the expected target node task timeout and the remaining task execution time accounts for a proportion greater than or equal to a preset proportion threshold.

[0108] Furthermore, the determining module 42 includes:

[0109] The first calculation unit is used to calculate the time consumption of the first target node task based on the historical time consumption data corresponding to the target node task.

[0110] The second calculation unit is used to calculate the time consumption of the second target node task based on the task content of the target node task, the hardware configuration information, and the network configuration information.

[0111] The determining unit is used to determine the larger of the time values ​​of the first target node task time and the second target node task time as the expected target node task time.

[0112] Furthermore, in a specific application scenario, the determining unit is specifically used to obtain historical time consumption data of the target calling node executing the target node task within a preset historical time period. The historical time consumption data includes the time consumed to complete the target node task and the time consumed to fail the target node task.

[0113] The distribution data between task completion rate and task time is calculated based on the historical time consumption data, and the task time corresponding to the maximum task completion rate in the distribution data is determined as the task time of the first target node.

[0114] Furthermore, the device also includes:

[0115] The monitoring module is used to monitor the execution process of the associated node executing the initial task execution instruction in response to the initial task execution instruction, and to determine the time taken for the completed node task and the target calling node. The initial task execution instruction carries the initial task timeout time.

[0116] The calculation module is also used to calculate the remaining task execution time based on the initial task timeout and the time consumed by the completed node tasks.

[0117] Furthermore, the device also includes:

[0118] The generation module is used to generate timeout exception information to indicate that the global task execution timeout is less than a preset remaining time threshold if the remaining task execution time is less than a preset remaining time threshold.

[0119] The first sending module is used to send the timeout exception information to the previous node of the associated node or the target terminal.

[0120] Furthermore, the device also includes:

[0121] The second sending module is used to send the remaining task timeout time to the associated node, so that the associated node generates a target task execution instruction to be sent to the target calling node based on the remaining task timeout time and the target node task. The execution process of the target task execution instruction includes calling at least one node.

[0122] This invention provides a timeout information configuration device. In embodiments of this invention, in response to a node task completion instruction from an associated node, the remaining task execution time and node information of the target calling node are obtained. The associated node is any non-last node in the process of calling multiple medical service systems. The node information includes resource configuration information and the target node task. Based on the resource configuration information and the target node task, the expected target node task time of the target calling node is determined. The remaining task timeout is configured based on a comparison between the expected target node task time and the remaining task execution time, and a preset timeout configuration strategy. This significantly reduces runtime resource consumption, improves the responsiveness of each called system, and achieves dynamic adjustment of the remaining task timeout, thereby effectively improving the success rate of multi-system calling tasks while ensuring task execution efficiency.

[0123] According to one embodiment of the present invention, a storage medium is provided, the storage medium storing at least one executable instruction, which can execute the timeout information configuration method in any of the above method embodiments.

[0124] Figure 5 The diagram illustrates a structural schematic of a computer device according to an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computer device.

[0125] like Figure 5 As shown, the computer device may include: a processor 502, a communications interface 504, a memory 506, and a communications bus 508.

[0126] The processor 502, communication interface 504, and memory 506 communicate with each other via communication bus 508.

[0127] Communication interface 504 is used to communicate with other network elements such as clients or other servers.

[0128] The processor 502 is used to execute program 510, specifically to execute the relevant steps in the above-described embodiment of the timeout information configuration method.

[0129] Specifically, program 510 may include program code that includes computer operation instructions.

[0130] Processor 502 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0131] Memory 506 is used to store program 510. Memory 506 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0132] Specifically, program 510 can be used to cause processor 502 to perform the following operations:

[0133] In response to the node task completion instruction of the associated node, the remaining task execution time and the node information of the target calling node are obtained. The associated node is any non-last node in the process of calling multiple medical service systems. The node information includes resource configuration information and target node task.

[0134] Based on the resource configuration information and the target node task, determine the expected target node task time for the target calling node;

[0135] Configure the remaining task timeout based on the comparison result between the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy.

[0136] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular hardware and software combination.

[0137] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. 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 method for configuring timeout information, characterized in that, The method is based on the execution of a timeout information configuration plugin for any non-last node deployed in the process of calling multiple medical service systems. The system where the timeout information configuration plugin is located is the associated node. The method includes: In response to the node task completion instruction of the associated node, the remaining task execution time and the node information of the target calling node are obtained. The associated node is any non-last node in the process of calling multiple medical service systems. The node information includes resource configuration information and target node task. The resource configuration information includes hardware configuration information and network configuration information. Based on the resource configuration information and the target node task, the expected target node task time of the target calling node is determined, specifically including: calculating the first target node task time based on the historical time consumption data corresponding to the target node task; calculating the second target node task time based on the task content of the target node task, the hardware configuration information, and the network configuration information; and determining the larger of the first target node task time and the second target node task time as the expected target node task time. Configure the remaining task timeout based on the comparison result between the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy; Before responding to the node task completion instruction from the associated node and obtaining the remaining task execution time and node information of the target calling node, the method further includes: In response to the initial task execution instruction, the execution process of the associated node executing the initial task execution instruction is monitored to determine the time taken for the completed node task and the target calling node. The initial task execution instruction carries the initial task timeout. The remaining task execution time is calculated based on the initial task timeout and the time consumed by the completed node tasks.

2. The method according to claim 1, characterized in that, The step of configuring the remaining task timeout based on the comparison result of the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy, includes: If the expected target node task timeout is less than or equal to the remaining task execution time, then configure the remaining task timeout based on the remaining task execution time. If the expected target node task timeout is greater than the remaining task execution time, and the ratio of the difference between the expected target node task timeout and the remaining task execution time to the remaining task execution time is less than a preset ratio threshold, then the remaining task timeout time is configured based on the expected target node task timeout. If the expected target node task time is greater than the remaining task execution time, and the difference between the expected target node task time and the remaining task execution time accounts for a proportion greater than or equal to a preset proportion threshold, then the calling task for the target calling node is interrupted, and a timeout exception is generated.

3. The method according to claim 1, characterized in that, The step of calculating the time consumption of the first target node task based on the historical time consumption data corresponding to the target node task includes: Obtain historical time data of the target calling node executing the target node task within a preset historical time period, the historical time data including the time taken to complete the target node task and the time taken to fail the target node task; The distribution data between task completion rate and task time is calculated based on the historical time consumption data, and the task time corresponding to the maximum task completion rate in the distribution data is determined as the task time of the first target node.

4. The method according to claim 1, characterized in that, After calculating the remaining task execution time based on the initial task timeout and the time consumed by the completed node tasks, the method further includes: If the remaining task execution time is less than a preset remaining time threshold, a timeout exception message is generated to indicate that the global task execution has timed out. The timeout exception information is sent to the previous node of the associated node or the target terminal.

5. The method according to claim 1, characterized in that, After configuring the remaining task timeout based on the comparison result of the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy, the method further includes: The remaining task timeout time is sent to the associated node, so that the associated node generates a target task execution instruction to be sent to the target calling node based on the remaining task timeout time and the target node task. The execution process of the target task execution instruction includes calling at least one node.

6. A timeout information configuration device, characterized in that, The device is used to perform the operation corresponding to the timeout information configuration method as described in any one of claims 1-5, including: The acquisition module is used to respond to the node task completion instruction of the associated node, acquire the remaining task execution time and the node information of the target calling node. The associated node is any non-last node in the process of calling multiple medical service systems. The node information includes resource configuration information and target node task. The determination module is used to determine the expected target node task time of the target calling node based on the resource configuration information and the target node task; The configuration module is used to configure the remaining task timeout based on the comparison result between the expected target node task timeout and the remaining task execution time, and the preset timeout configuration strategy.

7. A storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the timeout information configuration method as described in any one of claims 1-5.

8. A computer device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the timeout information configuration method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Task processing method, device and equipment and storage medium

    CN111475298A

  • Service timeout management method and device

    CN113783822A

  • Service timeout period control method and device, equipment and storage medium

    CN114048010A