CN114257637B - Task execution method, device, terminal equipment and readable storage medium - Google Patents

Task execution method, device, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN114257637B
CN114257637B CN202111526055.2A CN202111526055A CN114257637B CN 114257637 B CN114257637 B CN 114257637B CN 202111526055 A CN202111526055 A CN 202111526055A CN 114257637 B CN114257637 B CN 114257637B
Authority
CN
China
Prior art keywords
task data
offline
terminal equipment
task
working mode
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.)
Active
Application number
CN202111526055.2A
Other languages
Chinese (zh)
Other versions
CN114257637A (en
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.)
Youmo Network Technology Shenzhen Co ltd
Original Assignee
Youmo Network Technology Shenzhen 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 Youmo Network Technology Shenzhen Co ltd filed Critical Youmo Network Technology Shenzhen Co ltd
Priority to CN202111526055.2A priority Critical patent/CN114257637B/en
Publication of CN114257637A publication Critical patent/CN114257637A/en
Application granted granted Critical
Publication of CN114257637B publication Critical patent/CN114257637B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The application discloses a task execution method, a device, a terminal device and a readable storage medium, wherein the method comprises the steps of carrying out serialization processing on offline task data generated by the terminal device in an offline working mode when the terminal device enters the offline working mode so as to obtain serialized task data; storing the serialized task data in the terminal equipment; when the terminal equipment enters an online working mode, performing deserialization processing on the serialized task data stored in the terminal equipment so as to restore the serialized task data into the offline task data; and uploading the recovered offline task data to a target end. When the network is disconnected or the network is poor, the off-line task data are stored in the terminal equipment after the terminal equipment enters the off-line working mode, and when the terminal equipment is on-line, the off-line task data are uploaded, so that the working efficiency of practitioners relying on the network can be effectively improved, and the normal working of the work is ensured.

Description

Task execution method, device, terminal equipment and readable storage medium
Technical Field
The present application relates to the field of terminal control technologies, and in particular, to a task execution method, a task execution device, a terminal device, and a readable storage medium.
Background
With the rapid development of the internet and the rapid popularization of terminal devices such as mobile phones and computers, the terminal devices have penetrated various industries, and in most industries, practitioners work with the internet and the terminal devices, for example, some industries which need to upload pictures, videos or work documents in real time.
However, the network environment is unstable, and the situation of network disconnection or network weakness may occur, so that for a practitioner who relies on the network, the network disconnection or network weakness will work normally, and the working efficiency is reduced.
Disclosure of Invention
In view of the above problems, the present application proposes a task execution method, apparatus, terminal device, and readable storage medium, so that a user can work normally in an off-network or poor network environment, and work efficiency is improved.
In a first aspect, an embodiment of the present application provides a task execution method, where the method includes:
when a terminal device enters an offline working mode, carrying out serialization processing on offline task data generated by the terminal device in the offline working mode to obtain serialized task data;
storing the serialized task data in the terminal equipment;
when the terminal equipment enters an online working mode, performing deserialization processing on the serialized task data stored in the terminal equipment so as to restore the serialized task data into the offline task data;
and uploading the recovered offline task data to a target end.
The task execution method of the embodiment of the application carries out serialization processing on the offline task data generated by the terminal equipment in the offline working mode, and comprises the following steps:
compressing the offline task data to obtain compressed task data;
judging whether the volume of the compressed task data is smaller than a volume threshold value or not;
if the volume threshold value is greater than or equal to the volume threshold value, returning to the step of compressing the offline task data to obtain compressed task data;
if the compressed task data is smaller than the volume threshold value, storing the compressed task data in an application sandbox;
acquiring a storage path corresponding to the compressed task data in the application sandbox;
and constructing an entity class based on the storage path and the compressed task data, converting the entity class into a binary stream by calling a binary stream conversion interface, and carrying out serialization processing on the binary stream by calling a serialization method.
The task execution method provided by the embodiment of the application further comprises the following steps before the terminal equipment enters the offline working mode:
judging whether the terminal equipment is manually started in the offline working mode;
if the offline working mode is not started manually, monitoring the throughput of the terminal equipment in real time;
and when the throughput is smaller than a throughput threshold, controlling the terminal equipment to automatically enter the offline working mode.
The task execution method provided by the embodiment of the application further comprises the following steps before the terminal equipment enters the offline working mode:
respectively acquiring a first task list to be executed in a server and a second task list to be executed in a local cache of the terminal equipment from the server and the local cache;
comparing the first task list to be executed with the second task list to be executed;
adding the tasks to be executed which exist in the first task list to be executed and are not in the second task list to be executed, so that the terminal equipment executes the tasks according to the second task list to be executed.
The task execution method provided by the embodiment of the application further comprises the following steps before the terminal equipment enters the online working mode:
judging whether the terminal equipment is manually closed to the offline working mode;
if the offline working mode is not manually closed, monitoring the throughput of the terminal equipment in real time;
and when the throughput is greater than or equal to a throughput threshold, controlling the terminal equipment to automatically enter the online working mode.
The task execution method of the embodiment of the application further comprises the following steps before uploading the recovered offline task data to a target end:
judging whether the online working mode is manually entered;
if the terminal equipment is manually entered, judging whether the throughput of the terminal equipment in the WiFi environment is smaller than a throughput threshold value or not;
if the throughput threshold value is smaller than the throughput threshold value, prompt information of insufficient current throughput is sent out so as to remind a user of uploading the offline task data to the target end by utilizing the flow of the terminal equipment, and/or remind the user of continuously waiting until the WiFi environment is stable and uploading the offline task data to the target end.
The task execution method provided by the embodiment of the application further comprises the following steps:
judging whether the offline task data is successfully uploaded to the target end;
if the uploading is not successful to the target end, recording the number of times of uploading errors;
returning to the step of uploading the recovered offline task data to a target end when the uplink error number is smaller than a number threshold;
and stopping uploading the offline task data to the target end when the uplink error number is greater than or equal to the number threshold, and sending out prompt information of failed uploading.
In a second aspect, an embodiment of the present application further proposes a task execution device, where the device includes:
the serialization module is used for serializing the offline task data generated by the terminal equipment in the offline working mode when the terminal equipment enters the offline working mode so as to obtain serialized task data;
the data storage module is used for storing the serialized task data in the terminal equipment;
the deserialization module is used for deserializing the serialized task data stored in the terminal equipment when the terminal equipment enters an online working mode so as to restore the serialized task data into the offline task data;
and the data uploading module is used for uploading the recovered offline task data to a target end.
In a third aspect, an embodiment of the present application further provides a terminal device, including a memory and a processor, where the memory stores a computer program, and the computer program executes the task execution method according to the embodiment of the present application when running on the processor.
In a fourth aspect, the embodiment of the present application further proposes a readable storage medium storing a computer program, where the computer program executes the task execution method according to the embodiment of the present application when running on a processor.
In the application, when the terminal equipment enters an offline working mode, the offline task data generated by the terminal equipment in the offline working mode is subjected to serialization processing to obtain serialized task data; storing the serialized task data in the terminal equipment; when the terminal equipment enters an online working mode, performing deserialization processing on the serialized task data stored in the terminal equipment so as to restore the serialized task data into the offline task data; and uploading the recovered offline task data to a target end. On one hand, when the network is disconnected or the network is poor, after the terminal equipment enters an offline working mode, the offline task data are stored in the terminal equipment, and when the terminal equipment is online, the offline task data are uploaded, so that the working efficiency of practitioners relying on the network can be effectively improved, and the normal working of the work is ensured; on the other hand, through serialization processing, offline task data leakage or loss can be effectively avoided, and data safety is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are required for the embodiments will be briefly described, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope of the present application. Like elements are numbered alike in the various figures.
Fig. 1 shows a flow chart of a task execution method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of an offline working mode entering mode in a task execution method according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a task list obtaining manner in a task execution method according to an embodiment of the present application;
fig. 4 is a schematic flow chart of an online working mode entering mode in a task execution method according to an embodiment of the present application;
fig. 5 is a schematic flow chart of a network environment determination method in a task execution method according to an embodiment of the present application;
FIG. 6 is a schematic flow chart of a fault-tolerant method in a task execution method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a task execution device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments.
The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
The terms "comprises," "comprising," "including," or any other variation thereof, are intended to cover a specific feature, number, step, operation, element, component, or combination of the foregoing, which may be used in various embodiments of the present application, and are not intended to first exclude the presence of or increase the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is the same as the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments of the application.
Example 1
An embodiment of the present application provides a task execution method, which is applied to a terminal device, and can keep normal operation in a network disconnection or in a poor network environment of the terminal device, so as to improve the working efficiency of a user.
For example, referring to fig. 1, the task execution method includes the following steps S100 to S400:
step S100, when the terminal equipment enters an offline working mode, serializing the offline task data generated by the terminal equipment in the offline working mode to obtain serialized task data.
The offline task data can be directly subjected to serialization processing, but the offline task data is directly subjected to serialization processing, which may result in excessively long serialization processing time, excessive time occupation, and excessive memory occupation of the serialized task data obtained after the serialization processing.
In this embodiment, in order to avoid excessive serialization processing time and excessive memory occupied by the serialized task data, an implementation of the serialization processing procedure is provided, and offline task data is compressed to obtain compressed task data; judging whether the volume of the compressed task data is smaller than a volume threshold value or not; if the volume threshold value is greater than or equal to the volume threshold value, returning to the step of compressing the offline task data to obtain compressed task data; if the compressed task data is smaller than the volume threshold value, storing the compressed task data in an application sandbox; acquiring a storage path corresponding to the compressed task data in the application sandbox; and constructing an entity class based on the storage path and the compressed task data, converting the entity class into a binary stream by calling a binary stream conversion interface, and carrying out serialization processing on the binary stream by calling a serialization method.
Illustratively, the binary stream conversion interface may be a Parcelable interface, which may be specifically expressed as:
public class Bean implements Parcelable{
private List<String>files;
private String text;
}
the file set stores a storage path corresponding to the compressed task data, the text field stores the compressed task data, the Parcelable interface converts entity classes comprising the storage path and the compressed task data into binary streams, and the binary streams are subjected to serialization processing by calling a serialization method to obtain corresponding files of the type 'bat'.
It can be appreciated that by compressing the offline task data and performing serialization processing on the compressed task data smaller than the volume threshold, the embodiment not only can shorten the serialization processing time, but also can reduce the memory occupied by the serialized task data.
And step S200, storing the serialized task data in the terminal equipment.
And (3) storing the serialized task data (which can be a bat type file) obtained through serialization processing in the terminal equipment, wherein the serialized task data cannot be used even if being obtained by other equipment, and can be deserialized into a java entity only in the corresponding application, so that the offline task data can be effectively prevented from being leaked or lost.
And step S300, when the terminal equipment enters an online working mode, performing deserialization processing on the serialized task data stored in the terminal equipment so as to restore the serialized task data into the offline task data.
It can be understood that the data after the serialization processing of the terminal device can be restored to the original offline task data only after the deserialization processing of the terminal device, so that when the terminal device enters the online working mode, the deserialization processing can be performed on the serialized task data stored in the terminal device to restore the serialized task data to the offline task data.
For example, after the information such as package names exist in the bat type file obtained after the serialization processing, after the deserialization processing is performed on the bat type file, the package names are checked when the bat type file is restored to offline task data, if the package names are not right, the initial offline task data cannot be restored, and further, the information in the files set and text field cannot be obtained, so that even if other devices obtain the serialized task data, the content of the opened file is binary messy codes and cannot be normally used.
Step S400, uploading the recovered offline task data to a target terminal.
And uploading the recovered offline task data to a target end, so as to ensure that the work of a user can be normally performed.
In this embodiment, when a terminal device enters an offline working mode, serializing processing is performed on offline task data generated by the terminal device in the offline working mode to obtain serialized task data; storing the serialized task data in the terminal equipment; when the terminal equipment enters an online working mode, performing deserialization processing on the serialized task data stored in the terminal equipment so as to restore the serialized task data into the offline task data; and uploading the recovered offline task data to a target end. According to the embodiment, on one hand, when the network is disconnected or the network is poor, after the terminal equipment enters an offline working mode, the offline task data are stored in the terminal equipment, and when the terminal equipment is online, the offline task data are uploaded, so that the working efficiency of a practitioner relying on the network can be effectively improved, and the normal working of the work is ensured; on the other hand, through serialization processing, offline task data leakage or loss can be effectively avoided, and data safety is ensured.
Example 2
Referring to fig. 2, in a second embodiment of the present application, the proposed task execution method further includes steps S10 to S30 before the step S100:
step S10, determining whether the terminal device has been manually turned on the offline operation mode.
And step S20, if the offline working mode is not started manually, monitoring the throughput of the terminal equipment in real time.
And step S30, when the throughput is smaller than a throughput threshold, controlling the terminal equipment to automatically enter the offline working mode.
It can be appreciated that in this embodiment, a terminal device is provided to support a manual offline operation mode, if the terminal device is manually in the offline operation mode, a user wants the terminal device to enter the offline operation mode (for example, a network overhaul period, a company unified network disconnection period, etc.), at this time, the terminal device enters the offline operation mode, if the terminal device is not manually opened in the offline operation mode, the terminal device needs to monitor, in real time, the throughput of the terminal device to monitor the network environment in which the terminal device is located, so that the terminal device can automatically enter the offline operation mode under the condition that the network environment is poor or the network is disconnected, and then normally operate in the offline operation mode, thereby avoiding that the terminal device does not enter the offline operation mode under the condition that the network environment is poor or the network is disconnected, and causing operation failure.
Example 3
Referring to fig. 3, in a third embodiment of the present application, the task execution method further includes, before the step S100:
step S40, a first task list to be executed in the server and a second task list to be executed in the local cache are respectively obtained from the local caches of the server and the terminal equipment.
Step S50, comparing the first task list to be executed with the second task list to be executed.
Step S60, adding a task to be executed that exists in the first task to be executed list and does not exist in the second task to be executed list to the second task to be executed list, so that the terminal device executes the task according to the second task to be executed list.
In this embodiment, the terminal device acquires the task from the server, and needs to ensure consistency between the first task list to be executed in the server and the second task list to be executed in the local cache of the terminal device, so as to ensure that when the terminal device enters the offline working mode, the task can be continuously executed based on the second task list to be executed in the local cache, and the persistence of the task execution process can be ensured to the greatest extent.
Example 4
Referring to fig. 4, in a fourth embodiment of the present application, the task execution method further includes, before the step S300:
step S210, determining whether the terminal device has been manually turned off the offline operation mode.
Step S220, if the offline operation mode is not manually turned off, monitoring the throughput of the terminal device in real time.
And step S230, when the throughput is greater than or equal to a throughput threshold, controlling the terminal equipment to automatically enter the online working mode.
It can be appreciated that in this embodiment, a terminal device is provided to support a manual off-line mode, if the terminal device is in the manual off-line mode, the terminal device automatically enters an on-line mode, and if the terminal device is not in the manual off-line mode, the terminal device needs to monitor the network environment where the terminal device is located by monitoring the throughput of the terminal device in real time, so that the terminal device can automatically enter the on-line mode under the condition that the network environment is stable, and further, the data uploading work can be timely executed in the on-line mode, thereby ensuring the working efficiency.
Example 5
Referring to fig. 5, in a fifth embodiment of the present application, the task execution method further includes, before the step S400:
step S310, determining whether the online operation mode is manually entered.
Step S320, if the manual entry is the manual entry, determining whether the throughput of the terminal device in the WiFi environment is less than a throughput threshold.
And step S330, if the throughput threshold is smaller than the throughput threshold, sending out prompt information of insufficient current throughput so as to remind a user to upload the offline task data to the target end by utilizing the flow of the terminal equipment, and/or remind the user to continuously wait until the WiFi environment is stable, and uploading the offline task data to the target end.
It can be understood that in this embodiment, if the online working mode is a manual mode, that is, the offline mode of the terminal device is manually turned off, whether the current network environment is good or not is determined according to the throughput of the terminal device in the WiFi environment, that is, whether to support uploading of data is determined, so that when the throughput of the terminal device in the WiFi environment is smaller than the throughput threshold, a prompt message of insufficient current throughput is sent to remind a user to upload offline task data to the target terminal by using the flow of the terminal device, and/or remind the user to continuously wait until the WiFi environment reaches stability, and upload the offline task data to the target terminal.
Example 6
Referring to fig. 6, in a sixth embodiment of the present application, the proposed task execution method further includes, after the step S400:
and step S500, judging whether the offline task data is successfully uploaded to the target end.
Step S600, if the uploading to the target end is unsuccessful, recording the number of outgoing errors.
Step S700, judging whether the error times is smaller than the times threshold.
And when the number of the uplink transmission errors is smaller than the number threshold, returning to the step S400, and when the number of the uplink transmission errors is larger than or equal to the number threshold, executing the step S800, stopping uploading the offline task data to the target end, and sending out prompt information of failed uploading.
It can be appreciated that in this embodiment, a fault tolerance technique is provided, that is, when the number of outgoing errors is smaller than the number threshold, the step of uploading the recovered offline task data to the target end is returned, so that uploading abnormality caused by accidental errors is avoided, and uploading efficiency is ensured.
Example 7
Referring to fig. 7, a seventh embodiment of the present application provides a task execution device 10, which includes: a serialization module 11, a data saving module 12, a de-serialization module 13 and a data uploading module 14.
The serialization module 11 is configured to perform serialization processing on offline task data generated by the terminal device in an offline working mode when the terminal device enters the offline working mode, so as to obtain serialized task data; a data storage module 12, configured to store the serialized task data in the terminal device; the deserializing module 13 is configured to deserialize the serialized task data stored in the terminal device when the terminal device enters an online working mode, so as to restore the serialized task data into the offline task data; and the data uploading module 14 is configured to upload the recovered offline task data to a target end.
In this embodiment, the task execution device 10 is configured to execute the task execution method described in the foregoing embodiment through the cooperation of the serialization module 11, the data saving module 12, the anti-serialization module 13 and the data uploading module 14, and the implementation and the beneficial effects related to the foregoing embodiment are also applicable in this embodiment and are not repeated herein.
Example 8
An eighth embodiment of the present application proposes a terminal device, comprising a memory and a processor, the memory storing a computer program, which when run on the processor performs the task execution method according to the embodiment of the present application.
Example 9
A ninth embodiment of the present application proposes a readable storage medium storing a computer program which, when run on a processor, performs the task execution method according to the above-described embodiment of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in various embodiments of the application may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application.

Claims (9)

1. A method of task execution, the method comprising:
when a terminal device enters an offline working mode, carrying out serialization processing on offline task data generated by the terminal device in the offline working mode to obtain serialized task data;
storing the serialized task data in the terminal equipment;
when the terminal equipment enters an online working mode, performing deserialization processing on the serialized task data stored in the terminal equipment so as to restore the serialized task data into the offline task data;
uploading the recovered offline task data to a target end;
the serializing the offline task data generated by the terminal device in the offline working mode includes:
compressing the offline task data to obtain compressed task data;
judging whether the volume of the compressed task data is smaller than a volume threshold value or not;
if the volume threshold value is greater than or equal to the volume threshold value, returning to the step of compressing the offline task data to obtain compressed task data;
if the compressed task data is smaller than the volume threshold value, storing the compressed task data in an application sandbox;
acquiring a storage path corresponding to the compressed task data in the application sandbox;
and constructing an entity class based on the storage path and the compressed task data, converting the entity class into a binary stream by calling a binary stream conversion interface, and carrying out serialization processing on the binary stream by calling a serialization method.
2. The task execution method according to claim 1, further comprising, before the terminal device enters the offline operation mode:
judging whether the terminal equipment is manually started in the offline working mode;
if the offline working mode is not started manually, monitoring the throughput of the terminal equipment in real time;
and when the throughput is smaller than a throughput threshold, controlling the terminal equipment to automatically enter the offline working mode.
3. The task execution method according to claim 1, further comprising, before the terminal device enters the offline operation mode:
respectively acquiring a first task list to be executed in a server and a second task list to be executed in a local cache of the terminal equipment from the server and the local cache;
comparing the first task list to be executed with the second task list to be executed;
adding the tasks to be executed which exist in the first task list to be executed and are not in the second task list to be executed, so that the terminal equipment executes the tasks according to the second task list to be executed.
4. The task execution method according to claim 1, further comprising, before the terminal device enters an online operation mode:
judging whether the terminal equipment is manually closed to the offline working mode;
if the offline working mode is not manually closed, monitoring the throughput of the terminal equipment in real time;
and when the throughput is greater than or equal to a throughput threshold, controlling the terminal equipment to automatically enter the online working mode.
5. The task execution method according to claim 1, further comprising, before the uploading the recovered offline task data to a target end:
judging whether the online working mode is manually entered;
if the terminal equipment is manually entered, judging whether the throughput of the terminal equipment in the WiFi environment is smaller than a throughput threshold value or not;
if the throughput threshold value is smaller than the throughput threshold value, prompt information of insufficient current throughput is sent out so as to remind a user of uploading the offline task data to the target end by utilizing the flow of the terminal equipment, and/or remind the user of continuously waiting until the WiFi environment is stable and uploading the offline task data to the target end.
6. The task execution method according to any one of claims 1 to 5, characterized by further comprising:
judging whether the offline task data is successfully uploaded to the target end;
if the uploading is not successful to the target end, recording the number of times of uploading errors;
returning to the step of uploading the recovered offline task data to a target end when the uplink error number is smaller than a number threshold;
and stopping uploading the offline task data to the target end when the uplink error number is greater than or equal to the number threshold, and sending out prompt information of failed uploading.
7. A task execution device, the device comprising:
the serialization module is used for serializing the offline task data generated by the terminal equipment in the offline working mode when the terminal equipment enters the offline working mode so as to obtain serialized task data;
the data storage module is used for storing the serialized task data in the terminal equipment;
the deserialization module is used for deserializing the serialized task data stored in the terminal equipment when the terminal equipment enters an online working mode so as to restore the serialized task data into the offline task data;
the data uploading module is used for uploading the recovered offline task data to a target end;
the serialization module is further used for compressing the offline task data to obtain compressed task data; judging whether the volume of the compressed task data is smaller than a volume threshold value or not; if the volume threshold value is greater than or equal to the volume threshold value, returning to the step of compressing the offline task data to obtain compressed task data; if the compressed task data is smaller than the volume threshold value, storing the compressed task data in an application sandbox; acquiring a storage path corresponding to the compressed task data in the application sandbox; and constructing an entity class based on the storage path and the compressed task data, converting the entity class into a binary stream by calling a binary stream conversion interface, and carrying out serialization processing on the binary stream by calling a serialization method.
8. A terminal device comprising a memory and a processor, the memory storing a computer program which, when run on the processor, performs the task execution method of any one of claims 1 to 6.
9. A readable storage medium, characterized in that it stores a computer program which, when run on a processor, performs the task execution method of any one of claims 1 to 6.
CN202111526055.2A 2021-12-14 2021-12-14 Task execution method, device, terminal equipment and readable storage medium Active CN114257637B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111526055.2A CN114257637B (en) 2021-12-14 2021-12-14 Task execution method, device, terminal equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111526055.2A CN114257637B (en) 2021-12-14 2021-12-14 Task execution method, device, terminal equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN114257637A CN114257637A (en) 2022-03-29
CN114257637B true CN114257637B (en) 2023-12-08

Family

ID=80792174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111526055.2A Active CN114257637B (en) 2021-12-14 2021-12-14 Task execution method, device, terminal equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114257637B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1787511A (en) * 2004-12-07 2006-06-14 联想(北京)有限公司 Method and system for realizing off-line application of computer
CN103458000A (en) * 2013-08-07 2013-12-18 广东电网公司佛山供电局 Terminal data synchronizing system and method
WO2018054217A1 (en) * 2016-09-21 2018-03-29 中国科学院信息工程研究所 Method, system, and apparatus for monitoring network traffic and generating summary
WO2020037919A1 (en) * 2018-08-22 2020-02-27 平安科技(深圳)有限公司 User behavior recognition method and device employing prediction model
CN111898055A (en) * 2020-08-10 2020-11-06 冯帆 Screen recording and playback method for browser webpage
CN111897846A (en) * 2020-07-31 2020-11-06 平安普惠企业管理有限公司 Cache data verification method, device, equipment and storage medium
CN112256989A (en) * 2020-10-21 2021-01-22 平安科技(深圳)有限公司 Page loading method and device based on offline package, terminal equipment and storage medium
CN112581233A (en) * 2020-12-24 2021-03-30 北京顺达同行科技有限公司 Method, device, equipment and computer-readable storage medium for order offline operation
CN112786188A (en) * 2021-02-05 2021-05-11 北京致医健康信息技术有限公司 Offline working method and device of auxiliary diagnosis system, terminal equipment and medium
CN112948393A (en) * 2021-03-26 2021-06-11 山东浪潮通软信息科技有限公司 Web application program service data processing method, equipment and medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1787511A (en) * 2004-12-07 2006-06-14 联想(北京)有限公司 Method and system for realizing off-line application of computer
CN103458000A (en) * 2013-08-07 2013-12-18 广东电网公司佛山供电局 Terminal data synchronizing system and method
WO2018054217A1 (en) * 2016-09-21 2018-03-29 中国科学院信息工程研究所 Method, system, and apparatus for monitoring network traffic and generating summary
WO2020037919A1 (en) * 2018-08-22 2020-02-27 平安科技(深圳)有限公司 User behavior recognition method and device employing prediction model
CN111897846A (en) * 2020-07-31 2020-11-06 平安普惠企业管理有限公司 Cache data verification method, device, equipment and storage medium
CN111898055A (en) * 2020-08-10 2020-11-06 冯帆 Screen recording and playback method for browser webpage
CN112256989A (en) * 2020-10-21 2021-01-22 平安科技(深圳)有限公司 Page loading method and device based on offline package, terminal equipment and storage medium
CN112581233A (en) * 2020-12-24 2021-03-30 北京顺达同行科技有限公司 Method, device, equipment and computer-readable storage medium for order offline operation
CN112786188A (en) * 2021-02-05 2021-05-11 北京致医健康信息技术有限公司 Offline working method and device of auxiliary diagnosis system, terminal equipment and medium
CN112948393A (en) * 2021-03-26 2021-06-11 山东浪潮通软信息科技有限公司 Web application program service data processing method, equipment and medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
"Classification of transaction models in mobile database system";AOA Salem等;《IEEE》;全文 *
"基于差分算法的离线资源更新平台的研究与实现";徐健;《中国优秀硕士学位论文全文数据库》;全文 *
Hadoop环境下医学影像存储的设计;郭文亮;;中国医疗设备(第09期);全文 *
序列化技术的综述和展望;赵冬;;电脑与电信(第09期);全文 *
郭文亮 ; .Hadoop环境下医学影像存储的设计.中国医疗设备.2017,(第09期),全文. *

Also Published As

Publication number Publication date
CN114257637A (en) 2022-03-29

Similar Documents

Publication Publication Date Title
CN108665239B (en) Workflow processing method, workflow processing device, computer equipment and storage medium
CN109901881B (en) Plug-in loading method and device of application program, computer equipment and storage medium
CN113050598B (en) Data acquisition method, equipment and storage medium
CN111881022A (en) Method, device and equipment for generating test case based on test scene
CN110308880B (en) Log printing method, system, computer device and computer readable storage medium
CN108874441B (en) Board card configuration method, device, server and storage medium
CN110727581A (en) Collapse positioning method and electronic equipment
CN113672306B (en) Server component self-checking abnormity recovery method, device, system and medium
CN114257637B (en) Task execution method, device, terminal equipment and readable storage medium
CN110879756B (en) Collaborative process exception handling method, collaborative process exception handling device, computer equipment and storage medium
CN111124417B (en) Industrial control program compiling method and device, computer equipment and storage medium
CN111966508A (en) Message batch sending method and device, computer equipment and storage medium
CN110764835A (en) File configuration method and device of application environment, computer equipment and storage medium
CN114706622B (en) Method, device, equipment, medium and product for starting model service
CN104536892A (en) Software online debugging method and system
CN112395194B (en) Method and device for accessing test platform
CN111414270B (en) Exception handling method and device
CN114610446A (en) Method, device and system for automatically injecting probe
CN115994098B (en) Analysis method and system for software operation abnormality based on artificial intelligence
CN114327682B (en) WebView white screen detection method, system, electronic equipment and storage medium
CN115729530B (en) Cross-system logic statement generation method, device, storage medium and equipment
CN111600928B (en) Simulation service control method, intelligent terminal and storage medium
CN116107609A (en) Configuration file management method and device, electronic equipment and storage medium
CN107547751B (en) Media resource saving method, media resource saving device and terminal equipment
CN111367666A (en) Data reading and writing method and system

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
GR01 Patent grant
GR01 Patent grant