CN113873026A - Dynamic timeout response method, device, terminal equipment and storage medium - Google Patents

Dynamic timeout response method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN113873026A
CN113873026A CN202111121910.1A CN202111121910A CN113873026A CN 113873026 A CN113873026 A CN 113873026A CN 202111121910 A CN202111121910 A CN 202111121910A CN 113873026 A CN113873026 A CN 113873026A
Authority
CN
China
Prior art keywords
data
target
timeout response
execution
target service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111121910.1A
Other languages
Chinese (zh)
Inventor
刘均
李森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202111121910.1A priority Critical patent/CN113873026A/en
Publication of CN113873026A publication Critical patent/CN113873026A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/142Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application is applicable to the technical field of data transmission, and provides a dynamic timeout response method, a dynamic timeout response device, a terminal device and a storage medium, wherein the method comprises the following steps: determining a target service to be executed currently, acquiring the execution time length of the last execution of the target service, updating the data timeout response time length of currently received target data according to the execution time length, and sending the target data by external equipment and executing the target service. According to the method and the device, after the target service to be executed next is determined, the actual execution time consumed when the target service is executed last time is obtained, and the data overtime response time of the target data required by the currently received target service is dynamically adjusted. Therefore, the method and the device can dynamically adjust the data overtime response time according to the target service to be executed next, and when the received data is overtime, the response can be made as soon as possible, and the data receiving can be recovered as soon as possible, so that the phenomenon of data loss or confusion is reduced, and the user experience is improved.

Description

Dynamic timeout response method, device, terminal equipment and storage medium
Technical Field
The present application belongs to the technical field of data transmission, and in particular, to a dynamic timeout response method, apparatus, terminal device, and storage medium.
Background
In the process of data transmission, problems that communication is abnormal, data cannot be received in time and the like usually occur, and the efficiency of data reception is affected.
A related data transmission method generally sets a fixed timeout detection time, reestablishes a communication connection when a timeout is detected, and receives corresponding data. However, the method has the problems of poor flexibility, high time-out misjudgment rate, large data loss amount or low time-out detection efficiency.
Disclosure of Invention
The embodiment of the application provides a dynamic timeout response method, a dynamic timeout response device, a terminal device and a storage medium, and can solve the problems of poor flexibility, high timeout misjudgment rate or low timeout detection efficiency of a related data transmission method.
In a first aspect, an embodiment of the present application provides a dynamic timeout response method, which is applied to a terminal device, and includes:
determining a target service to be executed currently;
acquiring the execution duration of the last execution of the target service;
and updating the data timeout response time of the currently received target data according to the execution time, wherein the target data is sent by external equipment and used for executing the target service.
In one embodiment, after the updating the data timeout duration of the currently received data according to the execution duration, the method further includes:
detecting whether the target data is received within the data timeout response duration;
if not, the communication connection with the external equipment is reestablished, and the target data is received based on the data overtime response time length.
In one embodiment, the detecting after whether the target data is received within the data timeout response duration comprises:
and if the target data is received within the data overtime response time, reading the target data and storing the target data into a data buffer area.
In one embodiment, the method further comprises:
and recording the execution time length of the target service when the target service is executed each time.
In one embodiment, updating the data timeout response duration of the currently received target data according to the execution duration includes:
and setting the data timeout response time length as a preset multiple of the execution time length.
In one embodiment, after the reestablishing the communication connection with the external device, the method further includes:
and if the number of times of reestablishing the communication connection with the external equipment reaches a specified threshold value, stopping receiving the target data and sending a prompt signal.
In one embodiment, the method further comprises:
and after receiving a target operation instruction of a user, setting the data timeout response time length as a target value.
In a second aspect, an embodiment of the present application provides a dynamic timeout response apparatus, which is applied to a terminal device, and includes:
the determining module is used for determining the current target service to be executed;
the acquisition module is used for acquiring the execution duration of the last execution of the target service;
and the updating module is used for updating the data timeout response time of the currently received target data according to the execution time, and the target data is sent by the external equipment and is used for executing the target service.
In one embodiment, the apparatus further comprises:
the data receiving module is used for detecting whether the target data is received within the data overtime response duration or not;
and the communication module is used for reestablishing the communication connection with the external equipment if the target data is not received, and receiving the target data based on the data overtime response time.
In one embodiment, the apparatus further comprises:
and the storage module is used for reading the target data and storing the target data into a data buffer area if the target data is received within the data overtime response time.
In one embodiment, the apparatus further comprises:
and the calculation module is used for recording the execution duration of the target service when the target service is executed each time.
In one embodiment, an update module includes:
and the updating unit is used for setting the data overtime response time length as a preset multiple of the execution time length.
In one embodiment, the apparatus further comprises:
and the control module is used for stopping receiving the target data and sending out a prompt signal if the number of times of reestablishing the communication connection with the external equipment reaches a specified threshold value.
In one embodiment, the apparatus further comprises:
and the instruction receiving module is used for setting the data timeout response duration as a target value after receiving a target operation instruction of a user.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the dynamic timeout response method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the dynamic timeout response method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the dynamic timeout response method described in the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that: after the target service to be executed next is determined, the actual execution time length consumed when the target service is executed last time is obtained, so as to dynamically adjust the data timeout response time length of the target data required by the currently received target service. Therefore, the method and the device can dynamically adjust the data overtime response time according to the target service to be executed next, and when the received data is overtime, the response can be made as soon as possible, and the data receiving can be recovered as soon as possible, so that the phenomenon of data loss or confusion is reduced, and the user experience is improved.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a dynamic timeout response system provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a dynamic timeout response method according to an embodiment of the present application;
fig. 3 is another schematic flowchart of a dynamic timeout response method according to a second embodiment of the present application;
fig. 4 is a schematic structural diagram of a dynamic timeout response apparatus according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The dynamic timeout response method provided by the embodiment of the application can be applied to terminal equipment. The terminal device may be a Mobile phone, a tablet Computer, a vehicle-mounted device, a notebook Computer, a super-Mobile Personal Computer (UMPC), a netbook, a Personal Digital Assistant (PDA), or other terminal devices, and the specific type of the terminal device is not limited in this embodiment of the application. In this application, the terminal device includes a service processing thread and a data receiving thread when running a program. The two threads together complete the dynamic timeout response method of the present application.
The data receiving thread receives data sent by external equipment through a serial port or a network and the like, and the service processing thread acquires the data received by the data receiving thread for processing services. Both run in parallel. It can be understood that, when a service is executed in an embedded system, all service operations included in the service cannot be executed at one time. For example, in a GPS positioning reporting service, a GPS positioning module reports a round of positioning data every other preset time period (e.g., a preset time period is one second), correspondingly, receives complete positioning data every other preset time period, and executes a corresponding positioning data reporting service (i.e., completes a round of circular positioning reporting service) based on the received positioning data, where the positioning data reporting operation is repeated continuously and needs to create a special thread to process the repeated positioning reporting service.
In the actual use process, due to various reasons, communication abnormality can inevitably occur in the data receiving thread, and when the received data is overtime, the connection needs to be reestablished in time to recover the data receiving. At this time, how to set timeout is very important, if the timeout time is too short, misjudgment and frequent reconnection may be caused, and if the timeout time is too long, data is not recovered for a long time, which affects user experience. However, since the time consumption of a round of circulation of the business processing thread is very different due to processing different businesses, it is obviously difficult to achieve the best effect by setting the fixed timeout in the prior art. For example: there are three services (including service 1, service 2, and service 3) that take 1 ms, 10 ms, and 100 ms, respectively. Then to be compatible with 3 services, the fixed timeout is necessarily longer than 100 ms, and assuming we set it to 200 ms, when communication abnormality occurs, it is obvious that much data has been lost for service 1 and service 2.
To solve the problem, the present application provides a dynamic timeout response method, a dynamic timeout response apparatus, a terminal device, and a computer-readable storage medium.
To implement the technical solution proposed in the present application, a dynamic timeout response system 1 may be first constructed. Referring to fig. 1, the dynamic timeout response system 1 is composed of a data receiving module 11 and a service processing module 12, the data receiving module 11 is in communication connection with an external device (or an external network), and data interaction is performed between the data receiving module 11 and the service processing module 12.
The data receiving module 11 is a thread that receives target data from an external device (or an external network) within a data timeout response duration. The business processing module 12 is a thread that performs a target business operation according to the target data.
In the process of dynamic timeout response, the service processing module 12 executes a target service operation according to the target data, determines an execution duration of the target service according to an execution start time point and an execution completion time point of the target service in real time, and sends the execution duration to the data receiving module 11; the data receiving module 11 receives the execution duration of the last target service sent by the service processing module 12 in real time, dynamically adjusts the data timeout response duration, receives the target data within the data timeout response duration, and sends the received target data to the service processing module 12 to execute the current target service.
In order to explain the technical solution proposed in the present application, the following description will be given by way of specific examples.
Example one
Fig. 2 shows a schematic flow chart of a dynamic timeout response method provided by the present application, which may be applied to a terminal device including a data processing thread and a service processing thread, by way of example and not limitation, where the method includes:
s101, determining a target service to be executed currently.
In particular, there are many different services that need to be performed on the terminal device. The data processing thread determines the target service to be executed next currently, and specifically, how to determine the target service to be executed next may be determined by receiving an externally sent message in real time, or may be determined according to a preset service execution sequence.
S102, obtaining the execution duration of the last execution of the target service.
In particular, there is a large gap between the execution durations of different services.
After determining the target service to be determined next, the data processing thread acquires the execution time length of the target service in the last execution. The execution time length is the execution completion time point of the target service-the execution starting time point of the target service.
S103, updating the data timeout response time of the currently received target data according to the execution time, wherein the target data is sent by external equipment and used for executing the target service.
Specifically, the current data timeout response duration is updated through the actual execution duration consumed by executing the target service last time, so that the target data can be received according to the updated data timeout response duration. The target data refers to data which is sent by an external device and can be used for executing the current target business operation.
The service includes, but is not limited to, a communication service between the current terminal device and another platform, for example, a communication service between the current terminal device and the MCU, including a positioning reporting service, a heartbeat packet transmission task, and the like. Correspondingly, a separate thread is created for each service to handle the service. Usually, each service has an independent thread for independently processing its own data. That is, in one thread, the data processed and the execution time are similar in general, and therefore, the data timeout response time can be adjusted by the last execution time.
In this embodiment, after determining the target service to be executed next, the actual execution time length consumed when the target service is executed last time is obtained, so as to dynamically adjust the data timeout response time length of the target data required by the currently received target service. Therefore, the method and the device can dynamically adjust the data overtime response time according to the target service to be executed next, and when the received data is overtime, the response can be made as soon as possible, and the data receiving can be recovered as soon as possible, so that the phenomenon of data loss or confusion is reduced, and the user experience is improved.
Example two
The present embodiment is further described in the first embodiment, and reference may be specifically made to the related description of the first embodiment where the same or similar to the first embodiment, and details are not described herein again. As shown in fig. 3, after the updating the data timeout duration of the currently received data according to the execution duration in this embodiment, the method further includes:
s104, detecting whether the target data is received within the data overtime response duration;
and S105, if not, reestablishing the communication connection with the external equipment, and receiving the target data based on the data timeout response time length.
Specifically, the data receiving thread receives data within the data timeout response duration, detects whether the received data is target data, and detects whether the target data is complete. When detecting that no data is received within the data timeout response time, or the received data is not the target data, or the received target data is incomplete, reestablishing the communication connection relationship between the current terminal equipment and the external equipment, re-determining the data timeout response time, and receiving the target data within the re-determined data timeout response time.
For example, the current time is 10: 00: 03, if the data timeout response duration is 3s, then at 10: 00: 06 when the target data is not received or the received data amount is smaller than the transmission amount of the target data, the data reception is judged to be overtime.
The connection reestablishment mode includes but is not limited to reopening serial port communication, reestablishing socket communication, logging in again or handshaking again.
By way of example and not limitation, to improve data accuracy and avoid data confusion, when the data amount received by the data receiving thread within the data timeout response time is smaller than the target data (or the received data is not the target data), the data receiving thread discards the data, and after the communication connection relationship between the current terminal device and the external device is reestablished, receives the target data within the redetermined data timeout response time.
In one embodiment, the detecting after whether the target data is received within the data timeout response duration comprises:
and if the target data is received within the data overtime response time, reading the target data and storing the target data into a data buffer area.
Specifically, when the data receiving thread receives complete target data within the data timeout response duration, the target data is read and stored in a data buffer. And then the service processing thread of the target service acquires corresponding target data from the data buffer area to perform service processing. According to the data processing method and device, the data buffer area is arranged in the data processing thread, so that low-speed input and output equipment and a high-speed CPU can work in a coordinated mode, the low-speed input and output equipment is prevented from occupying the CPU, the CPU is liberated, and the high-efficiency work can be achieved.
In one embodiment, the method further comprises:
and recording the execution time length of the target service when the target service is executed each time.
Specifically, the service processing thread records an execution start time point of a target service each time the target service is executed, records an execution completion time point of the target service when the completion of the execution of the target service is detected, and determines the execution duration of the target service according to the execution start time point and the execution completion time point.
In one embodiment, updating the data timeout response duration of the currently received target data according to the execution duration includes:
and setting the data timeout response time length as a preset multiple of the execution time length.
Specifically, since there may be a delay problem in the data transmission process, the data timeout response duration may be dynamically adjusted according to the execution duration.
In this embodiment, the data timeout response duration is set to be a preset multiple of the execution duration. The preset multiple can be set according to the actual condition of data transmission.
For example, the preset multiple is set to 2 times. Correspondingly, when the execution time length is detected to be 10S, the data timeout response time length is 20S.
In one embodiment, the data timeout response duration is set to be the sum of the execution duration and the data delay duration; for example, the delay duration in the data transmission process is 3S, the execution duration is 10S, and the corresponding data timeout response duration is 13S.
In one embodiment, after the reestablishing the communication connection with the external device, the method further includes:
and if the number of times of reestablishing the communication connection with the external equipment reaches a specified threshold value, stopping receiving the target data and sending a prompt signal.
Specifically, each time the communication connection relationship between the external devices of the current terminal device is reestablished, the number of times of communication connection is marked plus one. And detecting the communication connection times in real time, stopping the operation of receiving the target data when detecting that the communication connection times of reestablishing the communication with the external equipment reaches a specified threshold value, and generating a prompt signal for prompting a user that the data transmission is overtime and the communication is failed.
It is understood that, when the communication connection relationship between the current terminal device and the external device is established for the first time, the number of communication connections is an initial value of 0.
In one embodiment, the method further comprises:
and after receiving a target operation instruction of a user, setting the data timeout response time length as a target value.
Specifically, after a target operation instruction sent by a user is received, the target operation instruction is analyzed to obtain a target value carried by the target operation instruction, and the data timeout response duration is updated to the target value. In this embodiment, the data timeout response duration may be dynamically adjusted in real time according to the execution duration of the target service, or may be set by a user in a customized manner to cope with different practical situations.
By way of example and not limitation, after the target data is received within the data timeout response duration, the corresponding service operation is executed, and the steps of step S101 and later are executed again, so as to implement the operation of executing the target service circularly.
In an embodiment, when it is detected that the initialization program of the thread is completed, the last executed target service does not exist, and the execution duration of the target service cannot be acquired correspondingly. Correspondingly, an overtime response time interval can be preset, so that the target data can be received in the overtime response time interval conveniently to execute the corresponding target business operation.
The data overtime response duration is dynamically adjusted through the execution duration of the last target service received in real time, dynamic overtime response detection is achieved, the misjudgment rate of overtime response is reduced, and the overtime response detection efficiency is improved.
According to the embodiment, when the target data is not received within the data timeout response time, the communication connection with the external equipment is reestablished, and the target data is received based on the data timeout response time, so that the communication connection is timely established to recover the communication and receive the target data again when the data transmission is timed out, the data loss is reduced, and the communication stability is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
EXAMPLE III
Corresponding to the dynamic timeout response method described in the first embodiment, fig. 4 shows a block diagram of a dynamic timeout response apparatus provided in this embodiment of the present application. For convenience of explanation, only portions related to the embodiments of the present application are shown.
Referring to fig. 4, the dynamic timeout response apparatus 100 includes:
a determining module 101, configured to determine a target service to be currently executed;
an obtaining module 102, configured to obtain an execution duration of a last execution of the target service;
an updating module 103, configured to update a data timeout response duration of currently received target data according to the execution duration, where the target data is sent by an external device and is used to execute the target service.
In one embodiment, the apparatus further comprises:
the data receiving module is used for detecting whether the target data is received within the data overtime response duration or not;
and the communication module is used for reestablishing the communication connection with the external equipment if the target data is not received, and receiving the target data based on the data overtime response time.
In one embodiment, the apparatus further comprises:
and the storage module is used for reading the target data and storing the target data into a data buffer area if the target data is received within the data overtime response time.
In one embodiment, the apparatus further comprises:
and the calculation module is used for recording the execution duration of the target service when the target service is executed each time.
In one embodiment, an update module includes:
and the updating unit is used for setting the data overtime response time length as a preset multiple of the execution time length.
In one embodiment, the apparatus further comprises:
and the control module is used for stopping receiving the target data and sending out a prompt signal if the number of times of reestablishing the communication connection with the external equipment reaches a specified threshold value.
In one embodiment, the apparatus further comprises:
and the instruction receiving module is used for setting the data timeout response duration as a target value after receiving a target operation instruction of a user.
After determining the target service to be executed next, the method and the device obtain the actual execution time consumed by executing the target service last time to dynamically adjust the data timeout response time of the target data required by the currently received target service. Therefore, the method and the device can dynamically adjust the data overtime response time according to the target service to be executed next, and when the received data is overtime, the response can be made as soon as possible, and the data receiving can be recovered as soon as possible, so that the phenomenon of data loss or confusion is reduced, and the user experience is improved.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Example four
Fig. 5 is a schematic structural diagram of the terminal device provided in this embodiment. As shown in fig. 5, the terminal device 5 of this embodiment includes: at least one processor 50 (only one shown in fig. 5), a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 implements the steps of any of the various dynamic timeout response method embodiments described above when executing the computer program 52.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is only an example of the terminal device 5, and does not constitute a limitation to the terminal device 5, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, and the like.
The Processor 50 may be a Central Processing Unit (CPU), and the Processor 50 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may in some embodiments be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. In other embodiments, the memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A dynamic timeout response method is applied to a terminal device, and the method comprises the following steps:
determining a target service to be executed currently;
acquiring the execution duration of the last execution of the target service;
and updating the data timeout response time of the currently received target data according to the execution time, wherein the target data is sent by external equipment and used for executing the target service.
2. The dynamic timeout response method according to claim 1, wherein after updating the data timeout duration of the currently received data according to the execution duration, further comprising:
detecting whether the target data is received within the data timeout response duration;
if not, the communication connection with the external equipment is reestablished, and the target data is received based on the data overtime response time length.
3. The dynamic timeout response method of claim 2, wherein said detecting whether the target data is received within the data timeout response duration comprises:
and if the target data is received within the data overtime response time, reading the target data and storing the target data into a data buffer area.
4. The dynamic timeout response method of claim 1, further comprising:
and recording the execution time length of the target service when the target service is executed each time.
5. The dynamic timeout response method according to claim 1, wherein updating the data timeout response duration of the currently received target data according to the execution duration comprises:
and setting the data timeout response time length as a preset multiple of the execution time length.
6. The dynamic timeout response method of claim 2, further comprising, after the reestablishing the communication connection with the external device:
and if the number of times of reestablishing the communication connection with the external equipment reaches a specified threshold value, stopping receiving the target data and sending a prompt signal.
7. The dynamic timeout response method of claim 1, further comprising:
and after receiving a target operation instruction of a user, setting the data timeout response time length as a target value.
8. A dynamic timeout response apparatus, applied to a terminal device, the apparatus comprising:
the determining module is used for determining the current target service to be executed;
the acquisition module is used for acquiring the execution duration of the last execution of the target service;
and the updating module is used for updating the data timeout response time of the currently received target data according to the execution time, and the target data is sent by the external equipment and is used for executing the target service.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202111121910.1A 2021-09-24 2021-09-24 Dynamic timeout response method, device, terminal equipment and storage medium Pending CN113873026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111121910.1A CN113873026A (en) 2021-09-24 2021-09-24 Dynamic timeout response method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111121910.1A CN113873026A (en) 2021-09-24 2021-09-24 Dynamic timeout response method, device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113873026A true CN113873026A (en) 2021-12-31

Family

ID=78993789

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111121910.1A Pending CN113873026A (en) 2021-09-24 2021-09-24 Dynamic timeout response method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113873026A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114255840A (en) * 2022-02-25 2022-03-29 广州科犁医学研究有限公司 Intelligent data processing system based on clinical research data

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102355327A (en) * 2011-08-26 2012-02-15 百度在线网络技术(北京)有限公司 Method, device and equipment for determining data transmission timeout duration
US20130311622A1 (en) * 2012-05-17 2013-11-21 International Business Machines Corporation Automated transaction tuning in application servers
US20140136659A1 (en) * 2012-11-13 2014-05-15 International Business Machines Corporation Timeout Value Adaptation
CN110166572A (en) * 2019-06-06 2019-08-23 北京达佳互联信息技术有限公司 Network processing method, device, electronic equipment and storage medium
CN110768861A (en) * 2019-09-20 2020-02-07 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for obtaining overtime threshold
CN112118329A (en) * 2020-08-31 2020-12-22 北京奇艺世纪科技有限公司 Network request processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102355327A (en) * 2011-08-26 2012-02-15 百度在线网络技术(北京)有限公司 Method, device and equipment for determining data transmission timeout duration
US20130311622A1 (en) * 2012-05-17 2013-11-21 International Business Machines Corporation Automated transaction tuning in application servers
US20140136659A1 (en) * 2012-11-13 2014-05-15 International Business Machines Corporation Timeout Value Adaptation
CN110166572A (en) * 2019-06-06 2019-08-23 北京达佳互联信息技术有限公司 Network processing method, device, electronic equipment and storage medium
CN110768861A (en) * 2019-09-20 2020-02-07 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for obtaining overtime threshold
CN112118329A (en) * 2020-08-31 2020-12-22 北京奇艺世纪科技有限公司 Network request processing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114255840A (en) * 2022-02-25 2022-03-29 广州科犁医学研究有限公司 Intelligent data processing system based on clinical research data
CN114255840B (en) * 2022-02-25 2022-06-24 广州科犁医学研究有限公司 Intelligent data processing system based on clinical research data

Similar Documents

Publication Publication Date Title
CN108446947B (en) Real estate transaction method and device
WO2019232926A1 (en) Method and apparatus for data consistency checking and flow control, electronic device and storage medium
CN105468302A (en) Data processing method, apparatus and system
CN107864044B (en) Information processing method and device, terminal and readable storage medium
CN113873026A (en) Dynamic timeout response method, device, terminal equipment and storage medium
CN112818336A (en) Data access method, data access device and computer readable storage medium
CN111200653B (en) Multi-platform communication method, multi-platform communication device and intermediate server
CN109213589B (en) Message processing method and device
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN112912743A (en) Computing power control method, device, equipment and storage medium
CN113535020B (en) Method, apparatus, device, medium and product for generating application icons
CN112947955B (en) Architecture updating method and device of application program, electronic equipment and storage medium
CN112148470B (en) Parameter synchronization method, computer device and readable storage medium
CN109614246B (en) Message processing method and device and message processing server
CN113434423A (en) Interface test method and device
CN108809763B (en) Network performance parameter acquisition method, terminal device and storage medium
CN112673354B (en) System state detection method, system state device and terminal equipment
CN112835759A (en) Test data processing method and device, electronic equipment and storage medium
CN111061576A (en) Method and system for creating entity object
CN111538589B (en) Operation optimization method, device, terminal and medium for embedded OS thread blocking queue
CN113806069B (en) Nuclear power station system interaction method and device, peripheral system and storage medium
CN110046120B (en) Data processing method, device and system based on IIC protocol and storage medium
CN115048364A (en) Method and device for writing data into database and database server
CN112463125B (en) Timing method and equipment of virtual timer
CN108848187B (en) Method, device and equipment for establishing communication connection and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination