Log data uploading progress display method, terminal, system and storage medium
Patent Information
- Application Number
- CN202411989330.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-02
Smart Images

Figure CN119922179A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of log synchronization technology, and in particular to a method, terminal, system and computer-readable storage medium for displaying the upload progress of log data. Background Art
[0002] At present, when lawn mowers, snow blowers and other mobile devices upload log data to the terminal, the log upload progress value of the uploaded log data needs to be synchronized to the terminal. When the terminal is in an unstable network environment, the terminal cannot normally receive the log upload progress value reported by the device or the log upload progress value is lost, so that the log upload progress value received by the terminal cannot be updated in time, which creates the illusion that the log upload progress value transmission has failed, resulting in frequent errors during the log upload progress value transmission process. Summary of the invention
[0003] The present application provides a log data upload progress display method, terminal, system and computer-readable storage medium, which solves the problem that when the terminal is in an unstable network environment, the log upload progress value cannot be updated in time, resulting in frequent errors in the terminal.
[0004] In a first aspect, the present application provides a method for displaying the upload progress of log data, which is applied to a terminal, and the method includes:
[0005] The first log upload progress value reported by the receiving device at the initial moment;
[0006] In response to the reporting operation of the device end, triggering the log upload progress self-increment instruction of the terminal;
[0007] In response to the log upload progress self-increment instruction, the first log upload progress value is self-incremented to obtain the first log upload progress value after self-increment;
[0008] Compare the self-incremented first log upload progress value with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment;
[0009] The target log upload progress value at the current moment is displayed on the terminal.
[0010] In some embodiments, the step of incrementing the first log upload progress value to obtain the first log upload progress value after the increment includes:
[0011] Based on the preset self-increment value and the first time threshold, the first log upload progress value is self-incremented to obtain the first log upload progress value after each self-increment.
[0012] In some embodiments, the current moment is separated from the initial moment by the first time threshold.
[0013] In some embodiments, the method of self-incrementing the first log upload progress value to obtain the self-incremented first log upload progress value further includes:
[0014] If the accumulated value of the first log upload progress value after the self-increment is greater than the preset progress threshold, the self-increment of the first log upload progress value is stopped.
[0015] In some embodiments, comparing the self-incremented first log upload progress value with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment includes:
[0016] If the first log upload progress value after the self-increment is greater than the second log upload progress value, determining the first log upload progress value after the self-increment as the target log upload progress value;
[0017] If the self-incremented first log upload progress value is not greater than the second log upload progress value, the second log upload progress value is determined as the target log upload progress value.
[0018] In some embodiments, the first log upload progress value after self-increment is compared with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment, and the method further includes:
[0019] Compare the second log upload progress value with the target log upload progress value at a historical moment;
[0020] If the second log upload progress value is greater than or equal to the target log upload progress value at the historical moment, determining the second log upload progress value as the target log upload progress value at the current moment;
[0021] If the second log upload progress value is less than the target log upload progress value at the historical moment, the first log upload progress value after self-increment is determined as the target log upload progress value at the current moment;
[0022] The current moment is separated from the historical moment by the first time threshold, and the target log upload progress value at the historical moment is the target log upload progress value displayed at the terminal at the historical moment.
[0023] In some embodiments, after the receiving device reports the first log upload progress value at the initial time, the method further includes:
[0024] If the log upload progress value reported by the device is not received within a preset time period, the self-increment of the first log upload progress value is stopped, and an abnormal prompt is output, wherein the abnormal prompt is used to instruct the device to disconnect the communication connection with the terminal.
[0025] In a second aspect, the present application further provides a terminal, the terminal comprising a memory and a processor;
[0026] The memory is used to store computer programs;
[0027] The processor is used to execute the computer program and implement the above-mentioned method for displaying the upload progress of log data when executing the computer program.
[0028] In a third aspect, the present application also provides a system for displaying the upload progress of log data, the system comprising:
[0029] The above terminal;
[0030] The device side is used to report log data and a first log upload progress value of the log data to the terminal.
[0031] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method for displaying the upload progress of log data as described above.
[0032] The log data upload progress display method, terminal, system and computer-readable storage medium provided in the embodiments of the present application, in response to the log upload progress self-increment instruction, the first log upload progress value reported by the device end at the initial time is self-incremented to obtain the first log upload progress value after self-increment, and the first log upload progress value after self-increment is compared with the second log upload progress value reported by the device end at the current time to obtain the target log upload progress value at the current time, and the log upload progress value can be dynamically updated within a period of time after the log upload progress value reported by the device end is received, so as to realize dynamic and smooth update of the log upload progress value, and even if the terminal is temporarily disconnected from the network with the device end, the terminal can still display the log upload progress value normally, which can greatly reduce the number of frequent errors occurring during the transmission of the log upload progress value, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0034] Figure 1 It is a structural diagram of a log data upload progress display system provided in an embodiment of the present application;
[0035] Figure 2 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0036] Figure 3 It is a schematic flow chart of a method for displaying the progress of uploading log data provided in an embodiment of the present application;
[0037] Figure 4 It is a schematic flowchart of a method for displaying the upload progress of log data provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0040] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0041] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0042] At present, when lawn mowers, snow blowers and other mobile devices upload log data to the terminal, the log upload progress value of the uploaded log data needs to be synchronized to the terminal. When the terminal is in an unstable network environment, the terminal cannot normally receive the log upload progress value reported by the device or the log upload progress value is lost, so that the log upload progress value received by the terminal cannot be updated in time, which creates the illusion that the log upload progress value transmission has failed, resulting in frequent errors during the log upload progress value transmission process.
[0043] To this end, the embodiment of the present application provides a log data upload progress display method, terminal, system and computer-readable storage medium, by responding to the log upload progress self-increment instruction, the first log upload progress value reported by the device end at the initial moment is self-incremented to obtain the first log upload progress value after self-increment, and the first log upload progress value after self-increment is compared with the second log upload progress value reported by the device end at the current moment to obtain the target log upload progress value at the current moment, and the log upload progress value can be dynamically updated within a period of time after receiving the log upload progress value reported by the device end, so as to realize the dynamic and smooth update of the log upload progress value, and even if the terminal is temporarily disconnected from the network connection with the device end, the terminal can display the log upload progress value normally, which can greatly reduce the number of frequent errors in the transmission process of the log upload progress value, and improve the user experience. The following is a detailed description of the log data upload progress display method.
[0044] See also Figure 1 , Figure 1 1 is a schematic diagram of a log data upload progress display system 10 provided in an embodiment of the present application. Figure 1 As shown, the upload progress display system 10 may include a terminal 100 and a device 101. The device 101 is used to report log data and a first log upload progress value of the log data to the terminal 100.
[0045] The device end 101 may include but is not limited to movable devices such as lawn mowers, snowplows, sweeping robots, food delivery robots, and welcoming robots.
[0046] Exemplarily, the device end 101 may include a wireless communication module. Among them, the wireless communication module may be a LoRa (Long Range Radio) module, and of course it may also be other types of radio frequency modules, which are not limited here. Among them, the LoRa module may include a LoRa wireless transmission module and a LoRa wireless receiving module. The device end 101 may be connected to the terminal 100 for communication via the wireless communication module, and the device end 101 uploads the collected log data to the terminal 100, and uploads the log upload progress value of the log data to the terminal 100.
[0047] Exemplarily, the terminal 100 may be a server, or an electronic device such as a smart phone, a tablet computer, a laptop computer, or a desktop computer. The server may be an independent server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0048] See also Figure 2 , Figure 2 1 is a schematic diagram of a terminal 100 provided in an embodiment of the present application. The terminal 100 may include a processor 1001 and a memory 1002, wherein the processor 1001 and the memory 1002 may be connected via a bus, and the bus may be any applicable bus such as an Inter-integrated Circuit (I2C) bus.
[0049] The memory 1002 may include a storage medium and an internal memory. The storage medium may store an operating system and a computer program. The computer program includes program instructions, which, when executed, may cause the processor to execute the method for displaying the upload progress of log data described in any embodiment.
[0050] The processor 1001 is used to provide computing and control capabilities to support the operation of the entire terminal 100 .
[0051] The processor 1001 may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other types of processors such as programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components. A general-purpose processor may be a microprocessor, or a general-purpose processor may be any conventional processor.
[0052] In one embodiment, the processor 1001 is used to run a computer program stored in the memory 1002 to implement the following steps:
[0053] A first log upload progress value reported by a receiving device at an initial moment; in response to a reporting operation by the device, a log upload progress self-increment instruction of a terminal is triggered; in response to the log upload progress self-increment instruction, the first log upload progress value is self-incremented to obtain the first log upload progress value after self-increment; the first log upload progress value after self-increment is compared with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment; and the target log upload progress value at the current moment is displayed on the terminal.
[0054] In one embodiment, when the processor 1001 implements the self-incrementing of the first log upload progress value to obtain the self-incremented first log upload progress value, it is configured to implement:
[0055] Based on the preset self-increment value and the first time threshold, the first log upload progress value is self-incremented to obtain the first log upload progress value after each self-increment.
[0056] In one embodiment, the processor 1001 is further configured to implement the following when implementing the self-incrementing of the first log upload progress value to obtain the self-incremented first log upload progress value:
[0057] If the accumulated value of the first log upload progress value after the self-increment is greater than the preset progress threshold, the self-increment of the first log upload progress value is stopped.
[0058] In one embodiment, when the processor 1001 compares the first log upload progress value after self-increment with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment, it is used to implement:
[0059] If the first log upload progress value after self-increment is greater than the second log upload progress value, the first log upload progress value after self-increment is determined as the target log upload progress value; if the first log upload progress value after self-increment is not greater than the second log upload progress value, the second log upload progress value is determined as the target log upload progress value.
[0060] In one embodiment, when the processor 1001 compares the first log upload progress value after the self-increment with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment, it is also used to implement:
[0061] The second log upload progress value is compared with the target log upload progress value at the historical moment; if the second log upload progress value is greater than or equal to the target log upload progress value at the historical moment, the second log upload progress value is determined as the target log upload progress value at the current moment; if the second log upload progress value is less than the target log upload progress value at the historical moment, the first log upload progress value after self-increment is determined as the target log upload progress value at the current moment; wherein, the current moment and the historical moment are separated by a first time threshold, and the target log upload progress value at the historical moment is the target log upload progress value displayed on the terminal at the historical moment.
[0062] In one embodiment, after receiving the first log upload progress value reported by the receiving device at the initial time, the processor 1001 is further configured to implement:
[0063] If the log upload progress value reported by the device is not received within the preset time, the self-increment of the first log upload progress value is stopped, and an abnormal prompt is output, which is used to indicate that the device is disconnected from the terminal.
[0064] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features of the embodiments can be combined with each other. Figure 3 , Figure 3 is a schematic flow chart of a method for displaying the progress of uploading log data provided by an embodiment of the present application. Figure 3 As shown, the method for displaying the upload progress of log data includes steps S201 to S205.
[0065] Step S201: receiving a first log upload progress value reported by a device at an initial time.
[0066] Exemplarily, the terminal can receive the first log upload progress value reported by the device at the initial moment. The initial moment can be the moment when the device reports the log upload progress value for the first time in the process of uploading log data to the terminal, or it can be any moment when the log upload progress value is reported. In the embodiment of the present application, for ease of explanation, the initial moment can be set to moment t0, and the log upload progress value reported at the initial moment (i.e., moment t0) is determined as the first log upload progress value.
[0067] Step S202: In response to the reporting operation of the device, trigger the terminal's log upload progress self-increment instruction.
[0068] Exemplarily, the reporting operation may be an operation of the device end reporting the first log upload progress value to the terminal, or an operation of the device end reporting log data to the terminal. In some implementations, the terminal may trigger a log upload progress self-increment instruction of the terminal in response to the reporting operation of the device end.
[0069] Among them, the self-increment of the log upload progress means that on the basis of the first log upload progress value, the terminal self-increments the first log upload progress value according to a certain self-increment value and interval time, and updates the first log upload progress value, without waiting for the device to report a new log upload progress value before updating the first log upload progress value.
[0070] Step S203: In response to the log upload progress self-increment instruction, the first log upload progress value is self-incremented to obtain the first log upload progress value after self-increment.
[0071] Exemplarily, the terminal may respond to the log upload progress self-increment instruction and self-increment the first log upload progress value to obtain the first log upload progress value after self-increment. For example, the first log upload progress value may be self-incremented once or multiple times until the log upload progress value reported by the device is received again or the self-incremented cumulative value of the first log upload progress value after self-increment is greater than the preset progress threshold.
[0072] In some embodiments, incrementing the first log upload progress value to obtain the first log upload progress value after self-increment may include: based on a preset self-increment value and a first time threshold, incrementing the first log upload progress value to obtain the first log upload progress value after each self-increment.
[0073] Exemplarily, the terminal can increment the first log upload progress value within the first time threshold based on the preset self-increment value and interval time, and obtain the first log upload progress value after each self-increment. Among them, the preset self-increment value, interval time, and first time threshold can be set according to actual conditions, and the specific values are not limited here. For example, the self-increment value can be 1%, the interval time is 5s, and the first time threshold is 50s. That is, within 50s, the first log upload progress value is incremented by 1% every 5s to obtain the first log upload progress value after each self-increment.
[0074] In the above embodiment, the first log upload progress value is incremented based on a preset increment value and a first time threshold to obtain the first log upload progress value after each increment. The log upload progress value can be dynamically updated within a period of time after receiving the log upload progress value reported by the device, thereby realizing dynamic and smooth update of the log upload progress value.
[0075] Step S204: compare the self-incremented first log upload progress value with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment.
[0076] Exemplarily, when receiving the second log upload progress value reported by the device at the current moment, the first log upload progress value after self-increment can be compared with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment. The first log upload progress value after self-increment refers to the log upload progress value after self-increment before the current moment.
[0077] Exemplarily, the current time may be represented as t1. For example, the first log upload progress value after self-increment before time t1 may be compared with the second log upload progress value reported by the device at time t1 to obtain the target log upload progress value at time t1.
[0078] In some embodiments, the current moment is separated from the initial moment by a first time threshold. Exemplarily, when the first time threshold is 50 seconds, if the initial moment t0 is the 0th second, the current moment is the 50th second. For example, the first log upload progress value after the 50th second self-increment can be compared with the second log upload progress value reported by the device at the 50th second to obtain the target log upload progress value at the 50th second.
[0079] It should be noted that, by configuring the first time threshold between the current moment and the initial moment, it is possible to compare the first log upload progress value that has been self-incremented within the first time threshold with the second log upload progress value reported by the device at the current moment, thereby avoiding excessive self-increment of the first log upload progress value, which may lead to a large deviation between the first log upload progress value that has been self-incremented and the actual second log upload progress value reported by the device.
[0080] In some embodiments, the first log upload progress value after self-increment is compared with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment, including: if the first log upload progress value after self-increment is greater than the second log upload progress value, the first log upload progress value after self-increment is determined as the target log upload progress value; if the first log upload progress value after self-increment is not greater than the second log upload progress value, the second log upload progress value is determined as the target log upload progress value.
[0081] Exemplarily, at the current moment of 50s, the first log upload progress value after self-increment at 50s can be compared with the second log upload progress value reported by the device at 50s. If the first log upload progress value after self-increment at 50s is greater than the second log upload progress value, the first log upload progress value after self-increment at 50s is determined as the target log upload progress value; if the first log upload progress value after self-increment at 50s is less than or equal to the second log upload progress value, the second log upload progress value is determined as the target log upload progress value. For example, when the first log upload progress value after self-increment at 50s is 30%, and the second log upload progress value is 29%, 30% is determined as the target log upload progress value at 50s. For another example, if the first log upload progress value after self-increment at 50s is 30%, and the second log upload progress value is 31%, 31% is determined as the target log upload progress value at 50s.
[0082] In the above embodiment, by comparing the self-incremented first log upload progress value with the second log upload progress value reported by the device at the current moment, and determining the larger one as the target log upload progress value at the current moment, not only can the dynamic and smooth update of the log upload progress value be achieved, but also the regression of the log upload progress value can be avoided.
[0083] In other embodiments, the first log upload progress value after self-increment is compared with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment, and it can also include: comparing the second log upload progress value with the target log upload progress value at the historical moment; if the second log upload progress value is greater than or equal to the target log upload progress value at the historical moment, then the second log upload progress value is determined as the target log upload progress value at the current moment; if the second log upload progress value is less than the target log upload progress value at the historical moment, then the first log upload progress value after self-increment is determined as the target log upload progress value at the current moment. Among them, the current moment and the historical moment are separated by a first time threshold, and the target log upload progress value at the historical moment is the target log upload progress value displayed on the terminal at the historical moment.
[0084] For example, if the first time threshold is 50s, the current moment is the 60th second, and the historical moment is the 10th second. The second log upload progress value can be compared with the target log upload progress value of the 10th second. If the second log upload progress value is less than the target log upload progress value of the 10th second, the first log upload progress value after self-increment at the 60th second is determined as the target log upload progress value of the 60th second; if the second log upload progress value is greater than or equal to the target log upload progress value of the 10th second, the second log upload progress value is determined as the target log upload progress value of the 60th second.
[0085] For example, if the target log upload progress value at the 10th second of the historical moment is 18%, the second log upload progress value is 17%, and the first log upload progress value after self-increment at the 60th second of the current moment is 20%, then the target log upload progress value at the 60th second of the current moment can be determined to be 20%. It is understandable that since the target log upload progress value is already 18% on the terminal at the 10th second of the historical moment, and the second log upload progress value is 17%, which is less than the target log upload progress value at the 10th second of the historical moment, if the second log upload progress value is displayed on the terminal as 17%, the progress will go backwards, reducing the user experience.
[0086] For another example, if the target log upload progress value at the 10th second of the historical moment is 18%, the second log upload progress value is 19%, and the first log upload progress value after self-increment at the 60th second of the current moment is 20%, then the target log upload progress value at the 60th second of the current moment can be determined to be 19%. It should be noted that since the second log upload progress value is greater than the target log upload progress value displayed on the terminal at the 10th second of the historical moment, and the first log upload progress value after self-increment at the 60th second of the current moment is a predicted value, it is necessary to display the second log upload progress value on the terminal, so that the real log upload progress value can be displayed, thereby improving the accuracy of the displayed log upload progress value.
[0087] In the above embodiment, by comparing the second log upload progress value with the target log upload progress value at the historical moment, the second log upload progress value is determined as the target log upload progress value at the current moment when the second log upload progress value is greater than or equal to the target log upload progress value at the historical moment, and when the second log upload progress value is less than the target log upload progress value at the historical moment, the first log upload progress value after self-increment is determined as the target log upload progress value at the current moment. This can not only avoid the situation where the progress is backward, but also improve the accuracy of the displayed log upload progress value.
[0088] Step S205: Display the target log upload progress value at the current moment on the terminal.
[0089] Exemplarily, after comparing the self-incremented first log upload progress value with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment, the terminal can display the target log upload progress value at the current moment on the terminal.
[0090] For example, the terminal may display the target log upload progress value at the current moment on the display interface of the terminal based on a preset display mode, wherein the preset display mode may include but is not limited to a linear progress bar, a circular progress bar, and the like.
[0091] The method for displaying the upload progress of log data provided in the above embodiment responds to the log upload progress self-increment instruction, self-increments the first log upload progress value reported by the device end at the initial moment to obtain the first log upload progress value after self-increment, and compares the first log upload progress value after self-increment with the second log upload progress value reported by the device end at the current moment to obtain the target log upload progress value at the current moment. The log upload progress value can be dynamically updated within a period of time after the log upload progress value reported by the device end is received, so as to realize dynamic and smooth update of the log upload progress value. Even if the terminal is temporarily disconnected from the network with the device end, the terminal can still display the log upload progress value normally, which can greatly reduce the number of frequent errors occurring during the transmission of the log upload progress value and improve the user experience.
[0092] In some embodiments, after receiving the first log upload progress value reported by the device end at the initial moment, it also includes: if the log upload progress value reported by the device end is not received within a preset time period, the first log upload progress value is stopped from being incremented, and an abnormal prompt is output, and the abnormal prompt is used to indicate that the device end is disconnected from the terminal.
[0093] Exemplarily, the preset duration can be set according to actual conditions, and the specific value is not limited here. In an embodiment of the present application, the preset duration is greater than the first time threshold. If the first time threshold is 50s, the preset duration is greater than 50s. For example, the preset duration is 300s. If the log upload progress value reported by the device is not received within 300s, the first log upload progress value is stopped from being incremented, and an abnormal prompt is output to indicate that the device is disconnected from the terminal.
[0094] It should be noted that if the log upload progress value reported by the device is not received for a long time, it means that the device and the terminal are disconnected from the communication connection. At this time, if the first log upload progress value continues to be incremented, the deviation between the log upload progress value reported after the device and the terminal restore the communication connection and the first log upload progress value after the increment will be too large, which will lead to a large error in the displayed target log upload progress value.
[0095] In the above embodiment, if the log upload progress value reported by the device is not received within the preset time period, the self-increment of the first log upload progress value is stopped and an abnormal prompt is output. This can avoid the device from continuing to self-increment the first log upload progress value after the communication connection with the terminal is disconnected, thereby avoiding a large error in the displayed target log upload progress value.
[0096] See also Figure 4 , Figure 4 FIG. 1 is a schematic flow chart of another method for displaying the progress of uploading log data provided by an embodiment of the present application. Figure 4As shown, the method for displaying the upload progress of log data includes steps S301 to S304.
[0097] Step S301: receiving a first log upload progress value reported by a device at an initial time.
[0098] Step S302: In response to the reporting operation of the device, trigger the terminal's log upload progress self-increment instruction.
[0099] Step S303: In response to the log upload progress self-increment instruction, the first log upload progress value is self-incremented to obtain the first log upload progress value after self-increment.
[0100] It can be understood that steps S301 to S303 are the same as the above-mentioned steps S201 to S203, and are not described in detail here.
[0101] Step S304: If the accumulated value of the first log upload progress value after the self-increment is greater than the preset progress threshold, the self-increment of the first log upload progress value is stopped.
[0102] Exemplarily, when the first log upload progress value is incremented to obtain the first log upload progress value after the increment, the accumulated accumulated value of the first log upload progress value after each increment can be counted, and when the accumulated accumulated value of the first log upload progress value after the increment is greater than a preset progress threshold, the first log upload progress value is stopped from being incremented. The progress threshold can be set according to actual conditions, and the specific value is not limited here. For example, the progress threshold can be 10%. When the accumulated accumulated value of the first log upload progress value after the increment is greater than 10%, the first log upload progress value is stopped from being incremented.
[0103] In the above embodiment, by stopping the self-increment of the first log upload progress value when it is determined that the self-increment cumulative value of the first log upload progress value after self-increment is greater than the preset progress threshold, it is possible to avoid excessive self-increment of the first log upload progress value resulting in a large deviation between the first log upload progress value after self-increment and the actual second log upload progress value reported by the device, thereby improving the accuracy of the target log upload progress value displayed on the terminal.
[0104] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program. The computer program includes program instructions. The processor executes the program instructions to implement any log data upload progress display method provided in the embodiment of the present application.
[0105] For example, the program is loaded by the processor and may execute the following steps:
[0106] A first log upload progress value reported by a receiving device at an initial moment; in response to a reporting operation by the device, a log upload progress self-increment instruction of a terminal is triggered; in response to the log upload progress self-increment instruction, the first log upload progress value is self-incremented to obtain the first log upload progress value after self-increment; the first log upload progress value after self-increment is compared with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment; and the target log upload progress value at the current moment is displayed on the terminal.
[0107] The computer-readable storage medium may be an internal storage unit of the terminal in the aforementioned embodiment, such as a hard disk or memory of the terminal. The computer-readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital card (Secure Digital Card, SDCard), a flash card (Flash Card), etc. equipped on the terminal.
[0108] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0109] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for displaying the upload progress of log data, characterized in that: Applied to a terminal, the method comprises: The first log upload progress value reported by the receiving device at the initial moment; In response to the reporting operation of the device end, triggering the log upload progress self-increment instruction of the terminal; In response to the log upload progress self-increment instruction, the first log upload progress value is self-incremented to obtain the first log upload progress value after self-increment; Compare the self-incremented first log upload progress value with the second log upload progress value reported by the device at the current moment to obtain the target log upload progress value at the current moment; The target log upload progress value at the current moment is displayed on the terminal.
2. The method for displaying the upload progress of log data according to claim 1, characterized in that: The step of automatically incrementing the first log upload progress value to obtain the first log upload progress value after the automatic increment includes: Based on the preset self-increment value and the first time threshold, the first log upload progress value is self-incremented to obtain the first log upload progress value after each self-increment.
3. The method for displaying the upload progress of log data according to claim 2, characterized in that: The current moment is separated from the initial moment by the first time threshold.
4. The method for displaying the upload progress of log data according to any one of claims 1 to 3, characterized in that: The method further includes: self-incrementing the first log upload progress value to obtain the self-incremented first log upload progress value. If the accumulated value of the first log upload progress value after the self-increment is greater than the preset progress threshold, the self-increment of the first log upload progress value is stopped.
5. The method for displaying the upload progress of log data according to claim 1, characterized in that: The step of comparing the self-incremented first log upload progress value with the second log upload progress value reported by the device at the current moment to obtain a target log upload progress value at the current moment includes: If the first log upload progress value after the self-increment is greater than the second log upload progress value, determining the first log upload progress value after the self-increment as the target log upload progress value; If the self-incremented first log upload progress value is not greater than the second log upload progress value, the second log upload progress value is determined as the target log upload progress value.
6. The method for displaying the upload progress of log data according to claim 2, characterized in that: The method further comprises: comparing the self-incremented first log upload progress value with the second log upload progress value reported by the device at the current moment to obtain a target log upload progress value at the current moment; Compare the second log upload progress value with the target log upload progress value at a historical moment; If the second log upload progress value is greater than or equal to the target log upload progress value at the historical moment, determining the second log upload progress value as the target log upload progress value at the current moment; If the second log upload progress value is less than the target log upload progress value at the historical moment, the first log upload progress value after self-increment is determined as the target log upload progress value at the current moment; The current moment is separated from the historical moment by the first time threshold, and the target log upload progress value at the historical moment is the target log upload progress value displayed at the terminal at the historical moment.
7. The method for displaying the upload progress of log data according to claim 1, characterized in that: After the receiving device reports the first log upload progress value at the initial time, the method further includes: If the log upload progress value reported by the device is not received within a preset time period, the self-increment of the first log upload progress value is stopped, and an abnormal prompt is output, wherein the abnormal prompt is used to instruct the device to disconnect the communication connection with the terminal.
8. A terminal, characterized in that: The terminal includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the method for displaying the upload progress of log data according to any one of claims 1 to 8 when executing the computer program.
9. A log data upload progress display system, characterized in that: The system comprises: The terminal according to claim 8; The device side is used to report log data and a first log upload progress value of the log data to the terminal.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method for displaying the upload progress of log data according to any one of claims 1 to 7.