Command timeout calculation method and device for wireless system, equipment and storage medium

By dynamically adjusting the timeout time of the control command in the wireless system, combining the actual running time and network environment, the time waste caused by unified setting of the timeout time is solved, and wireless communication efficiency and system stability are improved.

CN118945606APending Publication Date: 2024-11-12SHENZHEN K FREE WIRELESS INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410996382.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In wireless systems, setting the timeout time uniformly leads to wasting time and reducing work efficiency. Especially under the influence of signal interference and equipment failures, control commands cannot be received in time or accurately, resulting in a long wait timeout.

Method used

By setting the maximum timeout and actual running time of each control command, dynamically adjust the timeout time, using the data structure table to store and calculate the actual running time, calculate the transmission time based on the transmission rate and number of bytes, and combining the network environment and the number of relay stations Make adjustments.

Benefits of technology

It effectively shortens the waiting timeout time, improves wireless communication speed and system efficiency, ensures that control commands are retryed in time when no reply is received, and improves system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945606A_ABST
    Figure CN118945606A_ABST
Patent Text Reader

Abstract

The invention provides a command timeout calculation method and device for a wireless system, equipment and a storage medium, and the method comprises the steps: setting the longest timeout time of each control command, and generating a first data structure table; creating a second data structure table, and storing the actual operation time of each control command by using the second data structure table; when the current control command is executed, judging whether the second data structure table has the corresponding inter-operation time or not; if the corresponding actual operation time exists in the second data structure table, obtaining command timeout time according to the actual operation time; and if the second data structure table does not have the corresponding actual operation time, obtaining the command timeout time according to the first data structure table. The timeout time is dynamically calculated by combining the longest timeout time and the actual operation time of the control command of the wireless system, so that the wireless communication speed is greatly improved, and the working efficiency and the stability of the wireless system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communication technology, and in particular to a command timeout calculation method, device, equipment and storage medium for a wireless system. Background Art

[0002] In the wireless detonation system of industrial electronic digital detonators or the fully wireless industrial digital electronic detonator system, wireless transmission is used to accurately transmit and execute control commands. In some simple or short-distance application scenarios, the detonator can directly operate the target detonator through wireless signals, while in complex or long-distance application scenarios, it may be necessary to transmit control commands through multiple relay stations. The relay station is responsible for receiving the command of the detonator and forwarding it to the target detonator. In wireless systems, due to various factors such as signal interference, transmission distance and equipment failure, the control command may not be received by the detonator in a timely or accurate manner. Therefore, in the entire system, the control command needs to set a timeout, that is, after the detonator sends a command, how long does it take to receive a reply? If not, it will resend the command or determine that the command has timed out and failed, and send the next control command.

[0003] Since in different usage environments, relay stations may not be used, or one or more relay stations may be used, it is necessary to effectively set the timeout of each command. At present, the most commonly used method is to uniformly calculate and set the timeout for each control command according to the maximum number of relay stations used. Although this method is feasible, it will seriously affect the efficiency of the wireless system. For example, if the A command response is uniformly set to 10 seconds, when the detonator is directly connected to the wireless detonator, the normal communication A command response time will be within 1 second, but no matter how many levels of connection are used, when the wireless communication is interfered and the A command times out, the wireless system will wait for 10 seconds before repeating or executing the next command, resulting in a waste of blasting time and reducing the working efficiency of the wireless system. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a command timeout calculation method, device, equipment and storage medium for a wireless system, which effectively solves the problem in the prior art that uniformly setting the timeout time leads to time waste and reduces the working efficiency of the wireless system.

[0005] In a first aspect, the present invention provides a command timeout calculation method for a wireless system, the method comprising:

[0006] Setting the maximum timeout period for each control command and generating a first data structure table;

[0007] Creating a second data structure table, and using the second data structure table to store the actual running time of each of the control commands;

[0008] When executing the current control command, determining whether the second data structure table has the corresponding actual running time;

[0009] If the second data structure table has the corresponding actual running time, obtaining the command timeout time according to the actual running time;

[0010] If the corresponding actual running time is not available in the second data structure table, the command timeout time is obtained according to the first data structure table.

[0011] Further, the setting of the maximum timeout period of each control command includes:

[0012] Obtaining the running time of each of the control commands;

[0013] Calculating the transmission time according to the transmission rate and the number of bytes of each of the control commands;

[0014] The maximum timeout time is obtained by adding the running time and the transmission time.

[0015] Furthermore, the first data structure table includes at least two attribute fields: command keyword and maximum timeout period; and the second data structure table includes at least two attribute fields: command keyword and actual command running time.

[0016] Further, obtaining the command timeout time according to the actual running time includes:

[0017] Acquire the actual running time, and multiply the actual running time by a set multiple to obtain the command timeout time;

[0018] The obtaining the command timeout period according to the first data structure table includes:

[0019] The longest timeout time corresponding to the current control command in the first data structure table is obtained, and the longest timeout time is used as the command timeout time.

[0020] Further, the using the second data structure table to store the actual running time of each of the control commands includes:

[0021] Execute each of the control commands, obtain a first actual running time from when the control command is executed to when a result is obtained, and use the first actual running time as an initial actual running time;

[0022] Execute each of the control commands again, obtain a second actual running time from when the control command is executed to when a result is obtained, and compare the second actual running time with the initial actual running time;

[0023] If the second actual running time is greater than the initial actual running time, taking the second actual running time as the actual running time;

[0024] If the second actual running time is less than or equal to the initial actual running time, the initial actual running time is used as the actual running time.

[0025] Furthermore, the method further comprises:

[0026] Generate a third data structure table according to the first data structure table and the second data structure table, wherein the third data structure table includes at least three attribute fields: command keyword, maximum timeout time and actual command running time;

[0027] When executing the current control command, determining whether the actual running time of the command corresponding to the current control command is 0;

[0028] If the actual running time of the command is 0, the longest timeout time corresponding to the current control command is used as the command timeout time;

[0029] If the actual running time of the command is not 0, the actual running time is multiplied by a set multiple to obtain the command timeout time.

[0030] In a second aspect, the present invention provides a command timeout calculation device for a wireless system, the device comprising:

[0031] A first creation module, used for setting a maximum timeout period for each control command and generating a first data structure table;

[0032] A second creation module, used for creating a second data structure table, and using the second data structure table to store the actual running time of each of the control commands;

[0033] A first judgment module, used for judging whether the corresponding actual running time is available in the second data structure table when executing the current control command;

[0034] A first calculation module, configured to obtain a command timeout time according to the actual running time if the corresponding actual running time is available in the second data structure table;

[0035] The second calculation module is used to obtain the command timeout time according to the first data structure table if the corresponding actual running time is not available in the second data structure table.

[0036] Furthermore, the device also includes:

[0037] A third creation module, configured to generate a third data structure table according to the first data structure table and the second data structure table, wherein the third data structure table includes at least three attribute fields: a command keyword, a maximum timeout time and an actual command running time;

[0038] A second judgment module is used to judge whether the actual running time of the command corresponding to the current control command is 0 when executing the current control command;

[0039] a third calculation module, configured to use the longest timeout time corresponding to the current control command as the command timeout time if the actual running time of the command is 0;

[0040] The fourth calculation module is used to multiply the actual running time by a set multiple to obtain the command timeout time if the actual running time of the command is not 0.

[0041] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the command timeout calculation method for the wireless system as described in the first aspect of the present invention.

[0042] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the command timeout calculation method for a wireless system as described in the first aspect of the present invention is implemented.

[0043] The present invention provides a method, device, equipment and storage medium for calculating the command timeout of a wireless system. By combining the longest timeout time and the actual running time of the wireless system control command, the timeout time of the control command can be effectively adjusted according to the current network environment, such as the air transmission rate and the number of relay stations, effectively shortening the waiting timeout time when the network communication is unstable. At the same time, the running time of the same control command is adjusted according to the time when the control command normally runs the command, which greatly improves the speed of wireless communication and the working efficiency of the wireless system. By calculating the optimal timeout time, the control command can be retried in time with the least waiting time when no reply is received, effectively improving the stability of the wireless system. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 is a schematic diagram of a first flow chart of a command timeout calculation method for a wireless system provided by an embodiment of the present invention;

[0046] Figure 2 is a schematic diagram of a second flow chart of a command timeout calculation method for a wireless system provided by an embodiment of the present invention;

[0047] Figure 3 is a schematic diagram of a third flow chart of a command timeout calculation method for a wireless system provided by an embodiment of the present invention;

[0048] Figure 4 is a schematic diagram of a fourth flow chart of a command timeout calculation method for a wireless system provided by an embodiment of the present invention;

[0049] Figure 5 is a first structural diagram of a command timeout calculation device for a wireless system provided by an embodiment of the present invention;

[0050] Figure 6 is a second structural diagram of a command timeout calculation device for a wireless system provided by an embodiment of the present invention;

[0051] Figure 7 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention.

[0052] Description of main component symbols:

[0053] 500. A command timeout calculation device for a wireless system; 510. A first creation module; 520. A second creation module; 530. A first judgment module; 540. A first calculation module; 550. A second calculation module; 560. A third creation module; 570. A second judgment module; 580. A third calculation module; 590. A fourth calculation module; 700. An electronic device; 710. A processor; 720. A communication interface; 730. A memory; 740. A communication bus. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be further clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. It should be noted that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0055] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0057] In wireless systems, due to various factors such as signal interference, transmission distance, and equipment failure, control commands may not be received by the detonator in a timely or accurate manner, and control commands need to be set with a timeout. Since in different usage environments, relay stations may not be used, or one or more relay stations may be used, it is necessary to effectively set the timeout for each command. At present, the most commonly used method is to uniformly calculate and set the timeout for each control command according to the maximum number of relay stations used. Although this method is feasible, it will seriously affect the efficiency of the wireless system. For example, if the A command reply is uniformly set to 10 seconds, when the detonator is directly connected to the wireless detonator, the normal communication A command reply time will be within 1 second, but no matter how many levels of connection are used, when the wireless communication is interfered and the A command times out, the wireless system will wait for 10 seconds before repeating or executing the next command, resulting in a waste of blasting time and reducing the working efficiency of the wireless system.

[0058] Example 1

[0059] In view of the above-mentioned deficiencies in the prior art, an embodiment of the present invention provides a command timeout calculation method for a wireless system, which effectively solves the problem in the prior art that uniformly setting a timeout time leads to time waste and reduces the working efficiency of the wireless system. Figure 1 FIG. 1 is a schematic diagram of a first flow chart of a command timeout calculation method for a wireless system provided by an embodiment of the present invention. Figure 1 As shown, the calculation method includes the following steps:

[0060] S100, setting the maximum timeout time of each control command, and generating a first data structure table;

[0061] In the embodiment of the present invention, taking a wireless detonation or wireless detonator system as an example, there are many different control commands in the wireless system, and the running time of each control command is different. The longest timeout time can be calculated based on the running time and transmission time of each control command. Figure 2FIG. 2 is a schematic diagram of a second flow chart of a command timeout calculation method for a wireless system provided by an embodiment of the present invention. Figure 2 As shown, the calculation of the maximum timeout period includes the following steps:

[0062] S110, obtaining the running time of each control command;

[0063] The processing time of each control command is determined by the system designer according to the design. The running time of the control command can be directly obtained.

[0064] S120, calculating the transmission time according to the transmission rate and number of bytes of each control command;

[0065] The transmission time is basically calculated based on the transmission rate and number of bytes of the control command. For example, the transmission rate of a control command in the air is 9000bps. Since one byte is 8 bits, the transmission rate of 9600bps means that 9600 / 8=1200 bytes can be transmitted per second. Then the time required to transmit one byte is 1 second divided by 1200, which is about 0.8333 milliseconds. The entire path transmission time of the control command can be calculated based on the bytes sent and returned by the control command. If multiple relay stations are used for forwarding in wireless transmission, the transmission time needs to be increased accordingly.

[0066] S130: Add the running time and the transmission time to obtain the longest timeout time.

[0067] By calculating the maximum timeout period of each control command and combining the command keyword of the control command, a first data structure table is generated. The first data structure table includes at least two attribute fields: command keyword and maximum timeout period. Table 1 is a table of the first data structure table in an embodiment of the present invention.

[0068] Table 1. The first data structure represents the meaning of

[0069] Command Keywords Maximum timeout period / ms C1 1000 C2 1500 C3 2000 … …

[0070] S200: Create a second data structure table, and use the second data structure table to store the actual running time of each control command.

[0071] When the control command of the entire wireless system starts to be executed, an empty second data structure table is created, and the second data structure table includes at least two attribute fields: command keyword and command actual running time. The second data structure table is used to store the actual running time of each control command. Figure 3 FIG. 3 is a schematic diagram of a third flow chart of a command timeout calculation method for a wireless system provided by an embodiment of the present invention. Figure 3 As shown, step S200 specifically includes the following steps:

[0072] S210, executing each control command, obtaining a first actual running time from when the control command is executed to when a result is obtained, and taking the first actual running time as an initial actual running time;

[0073] Optionally, if the control command with the command keyword C1 is executed, the time from the start of execution to obtaining a reply is taken as the first actual running time. If the first actual running time is 300 milliseconds, the time is added to the second data structure table as the initial actual running time, as shown in Table 2.

[0074] Table 2. Schematic diagram of the first actual running time of the second data structure table

[0075] Command Keywords Actual running time / ms C1 300 … …

[0076] S220 , executing each control command again, obtaining a second actual running time from the start of execution of the control command to obtaining a result, and comparing the second actual running time with the initial actual running time.

[0077] When the control command with the command keyword C1 is executed again, the timing starts when the control command is running, and stops when the result is obtained. The second actual running time of the C1 control command is recorded. If it is 310 milliseconds, the initial actual running time of the C1 control command is found in the second data structure table for comparison.

[0078] S230: If the second actual running time is greater than the initial actual running time, use the second actual running time as the actual running time.

[0079] Since the second actual running time 310 milliseconds is greater than the original initial actual running time 300, the actual running time of the C1 control command in the second data structure table is updated to 310 milliseconds, as shown in Table 3.

[0080] Table 3. Schematic diagram of the second actual running time of the second data structure table

[0081] Command Keywords Actual running time / ms C1 300 … …

[0082] S240: If the second actual running time is less than or equal to the initial actual running time, the initial actual running time is used as the actual running time.

[0083] If it is less, the second data structure table is not updated, that is, the actual running time in the second data structure table retains the longest time used when each control command is running.

[0084] S300: When executing the current control command, determine whether the second data structure table has the corresponding actual running time.

[0085] When the wireless system is to execute a control command with a command keyword C1, it first searches the second data structure table for the actual running time corresponding to the current command keyword C1.

[0086] S400: If the second data structure table has the corresponding actual running time, obtain the command timeout time according to the actual running time.

[0087] If the actual running time corresponding to the command keyword C1 is found in the second data structure table, the actual running time is multiplied by the set multiple to obtain the command timeout time. In the embodiment of the present invention, the set multiple is set to 1.2, and the set multiple can be adjusted according to the actual situation of different wireless systems. If the actual running time corresponding to the command keyword C1 is 300 milliseconds, the corresponding command timeout time is 300×1.2=360 milliseconds. If the actual running time corresponding to the command keyword C1 is 310 milliseconds, the corresponding command timeout time is 310×1.2=372 milliseconds.

[0088] S500: If the second data structure table does not contain the corresponding actual running time, obtain the command timeout time according to the first data structure table.

[0089] If the actual running time corresponding to the command keyword C1 is not found in the second data structure table, the longest timeout time corresponding to the command keyword C1 in the first data structure table is obtained, and the longest timeout time is used as the command timeout time, that is, the command timeout time is 1000 milliseconds.

[0090] As a preferred implementation of the present invention, Figure 4 FIG. 4 is a schematic diagram of a fourth flow chart of a command timeout calculation method for a wireless system provided by an embodiment of the present invention. Figure 4 As shown, the calculation method also includes the following steps:

[0091] S600: Generate a third data structure table according to the first data structure table and the second data structure table, where the third data structure table includes at least three attribute fields: command keyword, maximum timeout time, and actual command running time.

[0092] The first data structure table and the second data structure table are combined to generate a third data structure table, as shown in Table 4. Each time the wireless system needs to dynamically recalculate the actual running time, the value of the actual running time column in the third data structure table is cleared, wherein the actual running time is calculated according to the above steps S210 to S240.

[0093] Table 4. The third data structure represents the meaning of

[0094] Command Keywords Maximum timeout Actual running time C1 1000 0 C2 1500 0 C3 2000 0 … … …

[0095] S700, when executing the current control command, determining whether the actual command running time corresponding to the current control command is 0;

[0096] S800: If the actual command running time is 0, the longest timeout time corresponding to the current control command is used as the command timeout time;

[0097] S900: If the actual running time of the command is not 0, multiply the actual running time by the set multiple to obtain the command timeout time.

[0098] According to the control command running process with the command keyword C1, it can be concluded that if a control command does not receive a reply, it is necessary to wait for a timeout of 1000 milliseconds before executing the next command. When multiple control commands fail to communicate successfully, a lot of time will be wasted. After dynamic adjustment by the calculation method of the embodiment of the present invention, the timeout of the next control command is set according to the actual running time of the control command running successfully, and only 360 milliseconds of waiting time are required. That is, if no reply is received within 360 milliseconds, the next control command is executed or the execution of the current control command is repeated.

[0099] The command timeout calculation method for a wireless system provided in an embodiment of the present invention can effectively adjust the timeout time of a control command according to the current network environment, such as the air transmission rate and the number of relay stations, by combining the maximum timeout time and the actual running time of the wireless system control command, thereby effectively shortening the waiting timeout time when the network communication is unstable.

[0100] Example 2

[0101] Based on the same technical concept as the method embodiment of the above embodiment 1, the embodiment of the present invention provides a command timeout calculation device for a wireless system. Figure 5 FIG. 1 is a schematic diagram of a command timeout calculation device for a wireless system provided by an embodiment of the present invention. Figure 5 As shown, the command timeout calculation device 500 of the wireless system includes:

[0102] A first creation module 510, configured to set a maximum timeout period for each control command and generate a first data structure table;

[0103] A second creation module 520, used to create a second data structure table, and use the second data structure table to store the actual running time of each control command;

[0104] A first judgment module 530 is used to judge whether there is a corresponding actual running time in the second data structure table when executing the current control command;

[0105] A first calculation module 540 is configured to obtain a command timeout time according to the actual running time if the second data structure table has a corresponding actual running time;

[0106] The second calculation module 550 is configured to obtain a command timeout time according to the first data structure table if the second data structure table does not have the corresponding actual running time.

[0107] As a preferred implementation of the present invention, Figure 6 is a second structural diagram of a command timeout calculation device for a wireless system provided by an embodiment of the present invention, such as Figure 6 As shown, the command timeout calculation device 500 of the wireless system further includes:

[0108] A third creation module 560 is used to generate a third data structure table according to the first data structure table and the second data structure table, wherein the third data structure table includes at least three attribute fields: command keyword, maximum timeout time and actual command running time;

[0109] The second judgment module 570 is used to judge whether the actual running time of the command corresponding to the current control command is 0 when executing the current control command;

[0110] The third calculation module 580 is used to use the longest timeout time corresponding to the current control command as the command timeout time if the actual command running time is 0;

[0111] The fourth calculation module 590 is used to multiply the actual running time by a set multiple to obtain a command timeout time if the actual running time of the command is not 0.

[0112] The command timeout calculation device for the wireless system provided by the embodiment of the present invention adjusts the running time of the next same control command according to the normal running time of the control command, which greatly improves the speed of wireless communication and the working efficiency of the wireless system. By calculating the optimal timeout time, the control command can be retried in time with the minimum waiting time when no reply is received, which effectively improves the stability of the wireless system.

[0113] It can be understood that the implementation method of the command timeout calculation method of the wireless system described in the above embodiment 1 is also applicable to this embodiment and can achieve the same technical effect, so it will not be repeated here.

[0114] Example 3

[0115] Based on the same concept, an embodiment of the present invention further provides an electronic device, Figure 7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 7As shown, the electronic device 700 may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the steps of the command timeout calculation method of the wireless system as described in the above embodiments. For example, it includes:

[0116] S100, setting the maximum timeout time of each control command, and generating a first data structure table;

[0117] S200, creating a second data structure table, and using the second data structure table to store the actual running time of each control command;

[0118] S300, when executing the current control command, determining whether the second data structure table has the corresponding actual running time;

[0119] S400: if the second data structure table has the corresponding actual running time, obtain the command timeout time according to the actual running time;

[0120] S500: If the second data structure table does not contain the corresponding actual running time, obtain the command timeout time according to the first data structure table.

[0121] The processor 710 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0122] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0123] The memory 730 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0124] Example 4

[0125] Based on the same concept, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, and the computer program includes at least one code segment, which can be executed by a main control device to control the main control device to implement the steps of the command timeout calculation method of the wireless system described in the above embodiments. For example, it includes:

[0126] S100, setting the maximum timeout time of each control command, and generating a first data structure table;

[0127] S200, creating a second data structure table, and using the second data structure table to store the actual running time of each control command;

[0128] S300, when executing the current control command, determining whether the second data structure table has the corresponding actual running time;

[0129] S400: if the second data structure table has the corresponding actual running time, obtain the command timeout time according to the actual running time;

[0130] S500: If the second data structure table does not contain the corresponding actual running time, obtain the command timeout time according to the first data structure table.

[0131] Based on the same technical concept, an embodiment of the present invention further provides a computer program, which is used to implement the above method embodiment when executed by a main control device.

[0132] The computer program may be stored in whole or in part on a computer-readable storage medium packaged with the processor, or may be stored in whole or in part on a memory not packaged with the processor.

[0133] Based on the same technical concept, an embodiment of the present invention further provides a processor, which is used to implement the above method embodiment. The above processor can be a chip.

[0134] In summary, the present invention provides a method, device, equipment and storage medium for calculating the command timeout of a wireless system. By combining the longest timeout time and the actual running time of the wireless system control command, it can effectively adjust the timeout time of the control command according to the current network environment, such as the air transmission rate and the number of relay stations, and effectively shorten the waiting timeout time when the network communication is unstable. At the same time, according to the time when the control command normally runs the command, the running time of the same control command next time is adjusted, which greatly improves the speed of wireless communication and improves the working efficiency of the wireless system. By calculating the optimal timeout time, the control command can be retried in time with the least waiting time when no reply is received, effectively improving the stability of the wireless system.

[0135] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0136] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A command timeout calculation method for a wireless system, characterized in that: The method comprises: Setting the maximum timeout period for each control command and generating a first data structure table; Creating a second data structure table, and using the second data structure table to store the actual running time of each of the control commands; When executing the current control command, determining whether the second data structure table has the corresponding actual running time; If the second data structure table has the corresponding actual running time, obtaining the command timeout time according to the actual running time; If the corresponding actual running time is not available in the second data structure table, the command timeout time is obtained according to the first data structure table.

2. The command timeout calculation method of the wireless system according to claim 1, characterized in that: The maximum timeout period for each control command is set as follows: Obtaining the running time of each of the control commands; Calculating the transmission time according to the transmission rate and the number of bytes of each of the control commands; The maximum timeout time is obtained by adding the running time and the transmission time.

3. The command timeout calculation method of the wireless system according to claim 1, characterized in that: The first data structure table includes at least two attribute fields: command keyword and maximum timeout period; the second data structure table includes at least two attribute fields: command keyword and actual command running time.

4. The command timeout calculation method of the wireless system according to claim 1, characterized in that: The obtaining of the command timeout period according to the actual running time includes: Acquire the actual running time, and multiply the actual running time by a set multiple to obtain the command timeout time; The obtaining the command timeout period according to the first data structure table includes: The longest timeout time corresponding to the current control command in the first data structure table is obtained, and the longest timeout time is used as the command timeout time.

5. The command timeout calculation method of the wireless system according to claim 3, characterized in that: The using the second data structure table to store the actual running time of each control command includes: Execute each of the control commands, obtain a first actual running time from when the control command is executed to when a result is obtained, and use the first actual running time as an initial actual running time; Execute each of the control commands again, obtain a second actual running time from when the control command is executed to when a result is obtained, and compare the second actual running time with the initial actual running time; If the second actual running time is greater than the initial actual running time, taking the second actual running time as the actual running time; If the second actual running time is less than or equal to the initial actual running time, the initial actual running time is used as the actual running time.

6. The command timeout calculation method of the wireless system according to claim 1, characterized in that: The method further comprises: Generate a third data structure table according to the first data structure table and the second data structure table, wherein the third data structure table includes at least three attribute fields: command keyword, maximum timeout time and actual command running time; When executing the current control command, determining whether the actual running time of the command corresponding to the current control command is 0; If the actual running time of the command is 0, the longest timeout time corresponding to the current control command is used as the command timeout time; If the actual running time of the command is not 0, the actual running time is multiplied by a set multiple to obtain the command timeout time.

7. A command timeout calculation device for a wireless system, characterized in that: The device comprises: A first creation module, used for setting a maximum timeout period for each control command and generating a first data structure table; A second creation module, used for creating a second data structure table, and using the second data structure table to store the actual running time of each of the control commands; A first judgment module, used for judging whether the corresponding actual running time is available in the second data structure table when executing the current control command; A first calculation module, configured to obtain a command timeout time according to the actual running time if the corresponding actual running time is available in the second data structure table; The second calculation module is used to obtain the command timeout time according to the first data structure table if the corresponding actual running time is not available in the second data structure table.

8. The command timeout calculation device for a wireless system according to claim 7, characterized in that: The device also includes: A third creation module, configured to generate a third data structure table according to the first data structure table and the second data structure table, wherein the third data structure table includes at least three attribute fields: command keyword, maximum timeout time and actual command running time; A second judgment module is used to judge whether the actual running time of the command corresponding to the current control command is 0 when executing the current control command; a third calculation module, configured to use the longest timeout time corresponding to the current control command as the command timeout time if the actual running time of the command is 0; The fourth calculation module is used to multiply the actual running time by a set multiple to obtain the command timeout time if the actual running time of the command is not 0.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the computer program to implement the command timeout calculation method for the wireless system according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the command timeout calculation method for a wireless system according to any one of claims 1 to 6 is implemented.