CN109246187A - Form data method for uploading and device - Google Patents

Form data method for uploading and device Download PDF

Info

Publication number
CN109246187A
CN109246187A CN201810868780.XA CN201810868780A CN109246187A CN 109246187 A CN109246187 A CN 109246187A CN 201810868780 A CN201810868780 A CN 201810868780A CN 109246187 A CN109246187 A CN 109246187A
Authority
CN
China
Prior art keywords
form data
state
list
labeled
upload
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810868780.XA
Other languages
Chinese (zh)
Inventor
孙忠跃
顾志丰
李秋霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Middle Peasants Online Agel Ecommerce Ltd
Original Assignee
Zhejiang Middle Peasants Online Agel Ecommerce 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 Zhejiang Middle Peasants Online Agel Ecommerce Ltd filed Critical Zhejiang Middle Peasants Online Agel Ecommerce Ltd
Priority to CN201810868780.XA priority Critical patent/CN109246187A/en
Publication of CN109246187A publication Critical patent/CN109246187A/en
Pending legal-status Critical Current

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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity

Abstract

The present invention provides one kind can guarantee the form data method for uploading that form data is not lost under no network or weak net state.It the described method comprises the following steps: when list creates, form data being stored in local;In response to user's list upload request for the first time, the form data is labeled as state three, the form data is labeled as state four by the again or multiple list upload request in response to user;If the form data uploads successfully, marking the form data is state one, if the form data is local or uploads failure, marking the form data is state two;Form data and upload of the timing inquiry labeled as state three or state four.Present invention simultaneously provides a kind of device for realizing the above method, described device includes memory module, first state module, the second block of state, enquiry module.

Description

Form data method for uploading and device
Technical field
The present invention relates to the methods that computer technology field of communication technology more particularly to mobile terminal form data upload.
Background technique
In mobile terminal application now, it often may require that some list content uploadings of creation to server.Existing skill List content is all directly to carry out data upload in the case where there is net mostly in art.But ought occur suspension, network wave suddenly It moves or is switched in no net mode situation, data upload failure, and existing system can directly ignore this list, list list Displayed page that table just created would not occur.Existing solution is to re-create table after waiting networking to restore Single, original form data can be lost, thus need user to re-create list and fill in operation, can thus seriously affect use Family experience.
Summary of the invention
The present invention be in order to overcome the above-mentioned shortcoming in mobile terminal application list uploading file in the prior art, Form data method for uploading and device that form data is not lost can be guaranteed under no network or weak net state by providing one kind.
To achieve the above object, the invention adopts the following technical scheme:
A kind of form data method for uploading of the invention, the described method comprises the following steps:
When list creates, form data is stored in local;
In response to user's list upload request for the first time, the form data is labeled as state three, again in response to user Or multiple list upload request, the form data is labeled as state four;
If the form data uploads successfully, marking the form data is state one, if the form data is this Ground uploads failure, then marking the form data is state two;
Form data and upload of the timing inquiry labeled as state three or state four.
Preferably, it is described in response to user's list upload request for the first time, the form data is labeled as state three, is rung Should be in the again or multiple list upload request of user, the step of form data is labeled as state four, further comprises: ringing A list upload button should be clicked in user, obtain the form data state;If form data is labeled as state two, by institute Stating form data flag update is state three;If form data is labeled as state three, it is by the form data flag update State four.
Preferably, the step of form data and upload labeled as state three or state four, is inquired in the timing, into one Step includes: the form data of timing inquiry state three and state four, and preferentially uploads the form data of state four, then uploads shape The form data of state three;It is state one that form data is updated if uploading successfully;It is shape that form data is updated if upper production failure State two.
Preferably, the form data include each network request list table data and newly-built list.
Preferably, further comprising the steps of: the form data that state one is shown in front end is to have uploaded list, shows shape The form data of state two is to upload failure, shows that the form data of state three or state four is upper crossing.
Present invention simultaneously provides a kind of form datas to upload device, and described device includes:
Form data is stored in local when for list creation by memory module;
First state module, if uploading successfully for the form data, marking the form data is state one, if The form data is local or uploads failure, then marking the form data is state two;
Second block of state, in response to user's list upload request for the first time, the form data to be labeled as state Three, the form data is labeled as state four by the again or multiple list upload request in response to user;
Enquiry module inquires form data and upload labeled as state three or state four for timing.
Preferably, second block of state includes:
Acquiring unit obtains the form data state for clicking a list upload button in response to user;
The form data flag update is shape if being labeled as state two for form data by the first execution unit State three;
The form data flag update is shape if being labeled as state three for form data by the second execution unit State four.
Preferably, the enquiry module includes:
Uploading unit for periodically inquiring the form data of state three and state four, and preferentially uploads the list of state four Then data upload the form data of state three;
Third execution unit is state one for updating form data if uploading successfully;
4th execution unit is state two for updating form data if upper production failure.
Preferably, the form data include each network request list table data and newly-built list.
Preferably, described device further includes display module, the display module, for showing the table of state one in front end Forms data is to have uploaded list, and the form data of display state two is to upload failure, shows the list number of state three or state four According to for upper crossing.
Technical solution of the present invention by the way that newly created form data is stored in local, has prevented Network Abnormal from leading first The case where form data of cause is lost, and list can be also created under no net state.Simultaneously by carrying out shape to form data Body label is distinguished, and the form data uploaded is state one, and uploading failure or residing in local form data is state two, The form data that user has initiated a upload request is state three, and the form data that user has initiated multiple upload request is shape State four.For being user's request upload labeled as the form data of state three and state four, but may be due to originals such as Network Abnormals Cause not yet obtains and uploads result uploads data halted state (whether acquisition server-side feedback uploads success), by fixed When inquire these form datas after network recovery by being uploaded from the background, guarantee that form data is not lost, and be easy to client List state is checked in management.
Detailed description of the invention
Fig. 1 is a kind of flow chart of form data method for uploading of the invention.
Fig. 2 is the flow chart of another form data method for uploading of the invention.
Fig. 3 is the functional block diagram that another form data of the invention uploads device.
Fig. 4 is the functional block diagram that another form data of the invention uploads device.
Specific embodiment
The present invention is described further with reference to the accompanying drawings and detailed description.
Embodiment one:
As shown in Figure 1, the embodiment of the present invention provides a kind of form data method for uploading, the described method comprises the following steps:
When S101 list creates, form data is stored in local.The form data includes the table of each network request Single table data and newly-built list.
S102 is labeled as state three in response to user's list upload request for the first time, by the form data, in response to user The form data is labeled as state four by again or repeatedly list upload request.
If the S103 form data uploads successfully, marking the form data is state one, if the form data For local or upload failure, then marking the form data is state two.
Form data and upload of the S104 timing inquiry labeled as state three or state four.
It is illustrated by an application example: with tools such as JQFMDB by the list list number of each network request It is stored into local sqlite database according to newly-built list.
The field that an Isupload is added in the table of database, by marking list to Isupload field assignment The state of data.Form data is uploaded labeled as state one, Isupload is assigned a value of 0;Local form data is labeled as shape State two, Isupload is assigned a value of 1;Labeled as the form data of state three, Isupload is assigned a value of 2;Labeled as the table of state four Forms data, Isupload are assigned a value of 3.
An asynchronous thread is opened up in the overall situation, adds a timer, is 2 or 3 according to the Isupload in database table When, it executes and uploads process.
Technical solution of the present invention by the way that newly created form data is stored in local, has prevented Network Abnormal from leading first The case where form data of cause is lost, and list can be also created under no net state.Simultaneously by carrying out shape to form data Body label is distinguished, and the form data uploaded is state one, and uploading failure or residing in local form data is state two, The form data that user has initiated a upload request is state three, and the form data that user has initiated multiple upload request is shape State four.For being user's request upload labeled as the form data of state three and state four, but may be due to originals such as Network Abnormals Cause not yet obtains and uploads result uploads data halted state (whether acquisition server-side feedback uploads success), by fixed When inquire these form datas after network recovery by being uploaded from the background, guarantee that form data is not lost, and be easy to client List state is checked in management.
Embodiment two:
As shown in Fig. 2, the embodiment of the present invention provides another form data method for uploading more optimized, the method packet Include following steps:
When S201 list creates, form data is stored in local, the form data includes the table of each network request Single table data and newly-built list.
In the present embodiment, the list table data of each network request and newly-built list are stored up with tools such as JQFMDB It is stored in local sqlite database.
The field that an Isupload is added in the table of database, by marking list to Isupload field assignment The state of data.Form data is uploaded labeled as state one, Isupload is assigned a value of 0;Local form data is labeled as shape State two, Isupload is assigned a value of 1;Labeled as the form data of state three, Isupload is assigned a value of 2;Labeled as the table of state four Forms data, Isupload are assigned a value of 3.
S202 clicks a list upload button in response to user, obtains the form data state.
By obtaining the assignment of Isupload, to obtain the state of the form data.
It is state three by the form data flag update if S203 form data is labeled as state two.
That is, Isupload=1, then be updated to 2 for Isupload.
It is state four by the form data flag update if S204 form data is labeled as state three.
That is, Isupload=2, then illustrate that the form data has clicked the operation of a upload button via user, this When Isupload is updated to 3, i.e., state four represent form data via user click upload twice or more than twice by Button belongs to the higher form data for uploading priority.
If the S205 form data uploads successfully, marking the form data is state one, if the form data For local or upload failure, then marking the form data is state two.
It uploads result according to the list to update again, the state of form data uploads and successfully then updates Isupload more New is 0, demarcates this form data and uploading operation is completed.If uploading failure, updates Isupload and be updated to 1.
The form data of state three and state four is inquired in S206 timing, and preferentially uploads the form data of state four, then The form data of upload state three.
The form data that state three and state four (i.e. Isupload=2 or 3) are had been described that in previous step is user The form data of upload button is had clicked on, this part form data may be due to abnormal problems such as network fluctuations, in upload Halted state.By opening up an asynchronous thread in the overall situation, a timer is added, is according to the Isupload in database table When 2 or 3, executes and upload process, it is ensured that this part form data is in backstage upload in network recovery.And state four The form data priority of (i.e. Isupload=3) is higher, so uploading the form data of state four first.
It is state one that S207 updates form data if uploading successfully.Update Isupload=0.
It is state two that S208 updates form data if upper production failure.Update Isupload=1.
S209 shows that the form data of state one is to have uploaded list in front end, and the form data of display state two is to upload Failure shows that the form data of state three or state four is upper crossing.
Which list user can clearly upload, which list does not upload.
Embodiment three:
As shown in figure 3, present invention simultaneously provides a kind of form datas to upload device, described device includes:
Form data is stored in local when for list creation by memory module 301.The form data includes each The list table data of network request and newly-built list.
First state module 302, if uploading successfully for the form data, marking the form data is state One, if the form data is local or uploads failure, marking the form data is state two.
Second block of state 303, in response to user's list upload request for the first time, the form data to be labeled as shape State three, the again or multiple list upload request in response to user, is labeled as state four for the form data.
Enquiry module 304 inquires form data and upload labeled as state three or state four for timing.
One of the present embodiment form data, which uploads device, may be implemented one of above-described embodiment one form data Method for uploading.
Example IV:
As shown in figure 4, the present embodiment advanced optimizes on the basis of embodiment three, provides another form data and upload Device, described device include:
Form data is stored in local when for list creation by memory module 301.The form data includes each The list table data of network request and newly-built list.
First state module 302, if uploading successfully for the form data, marking the form data is state One, if the form data is local or uploads failure, marking the form data is state two.
Second block of state 303, in response to user's list upload request for the first time, the form data to be labeled as shape State three, the again or multiple list upload request in response to user, is labeled as state four for the form data.
Enquiry module 304 inquires form data and upload labeled as state three or state four for timing.
Display module 305 shows the table of state two for showing that the form data of state one is to have uploaded list in front end Forms data is to upload failure, shows that the form data of state three or state four is upper crossing.
Second state, 303 module includes:
Acquiring unit 401 obtains the form data state for clicking a list upload button in response to user.
First execution unit 402, if being by the form data flag update labeled as state two for form data State three.
Second execution unit 403, if being by the form data flag update labeled as state three for form data State four.
The enquiry module 304 includes:
Uploading unit 404 for periodically inquiring the form data of state three and state four, and preferentially uploads the table of state four Then forms data uploads the form data of state three.
Third execution unit 405 is state one for updating form data if uploading successfully.
4th execution unit 406 is state two for updating form data if upper production failure.
One of the present embodiment form data, which uploads device, may be implemented one of above-described embodiment two form data Method for uploading.The case where having prevented form data caused by Network Abnormal from losing, and list can be also created under no net state. It is distinguished simultaneously by carrying out shape body label to form data, the form data uploaded is state one, uploads failure or retains It is state two in local form data, the form data that user has initiated a upload request is state three, and user has initiated The form data of multiple upload request is state four.It is in user's request for the form data labeled as state three and state four It passes, but may be due to Network Abnormal etc., not yet obtaining and uploading result is to upload data halted state (not obtain server-side Whether feedback uploads success), by periodically inquiring these form datas after network recovery by being uploaded from the background, guarantee list Data are not lost, and are easy to customer account management and are checked list state.

Claims (10)

1. a kind of form data method for uploading, characterized in that described method includes following steps:
When list creates, form data is stored in local;
In response to user's list upload request for the first time, the form data is labeled as state three, it is again or more in response to user The form data is labeled as state four by secondary list upload request;
If the form data uploads successfully, marking the form data is state one, if the form data be it is local or Failure is uploaded, then marking the form data is state two;
Form data and upload of the timing inquiry labeled as state three or state four.
2. a kind of form data method for uploading according to claim 1, characterized in that described in response to user's list for the first time The form data is labeled as state three by upload request, the again or multiple list upload request in response to user, by the table Forms data is labeled as the step of state four, further comprises:
A list upload button is clicked in response to user, obtains the form data state;
It is state three by the form data flag update if form data is labeled as state two;
It is state four by the form data flag update if form data is labeled as state three.
3. a kind of form data method for uploading according to claim 1, characterized in that the timing inquiry is labeled as state Three or state four form data and upload the step of, further comprise:
The form data of state three and state four is inquired in timing, and preferentially uploads the form data of state four, then uploads state Three form data;
It is state one that form data is updated if uploading successfully;
It is state two that form data is updated if upper production failure.
4. a kind of form data method for uploading according to claim 1, characterized in that the form data includes each net The list table data of network request and newly-built list.
5. a kind of form data method for uploading according to claim 1, characterized in that further comprising the steps of:
The form data that state one is shown in front end is to have uploaded list, and the form data of display state two is to upload failure, is shown The form data for showing state three or state four is upper crossing.
6. a kind of form data uploads device, characterized in that described device includes:
Form data is stored in local when for list creation by memory module;
First state module, for the form data being labeled as state three, is rung in response to user's list upload request for the first time The form data should be labeled as state four in user's again or multiple list upload request;
Second block of state, if uploading successfully for the form data, marking the form data is state one, if described Form data is local or uploads failure, then marking the form data is state two;
Enquiry module inquires form data and upload labeled as state three or state four for timing.
7. a kind of form data according to claim 6 uploads device, characterized in that the first state module includes:
Acquiring unit obtains the form data state for clicking a list upload button in response to user;
The form data flag update is state three if being labeled as state two for form data by the first execution unit;
The form data flag update is state four if being labeled as state three for form data by the second execution unit.
8. a kind of form data according to claim 6 uploads device, characterized in that the enquiry module includes:
Uploading unit for periodically inquiring the form data of state three and state four, and preferentially uploads the form data of state four, Then the form data of state three is uploaded;
Third execution unit is state one for updating form data if uploading successfully;
4th execution unit is state two for updating form data if upper production failure.
9. a kind of form data according to claim 6 uploads device, characterized in that the form data includes each net The list table data of network request and newly-built list.
10. a kind of form data according to claim 6 uploads device, characterized in that described device further includes that display is single Member,
The display unit shows the list of state two for showing that the form data of state one is to have uploaded list in front end Data are to upload failure, show that the form data of state three or state four is upper crossing.
CN201810868780.XA 2018-08-02 2018-08-02 Form data method for uploading and device Pending CN109246187A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810868780.XA CN109246187A (en) 2018-08-02 2018-08-02 Form data method for uploading and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810868780.XA CN109246187A (en) 2018-08-02 2018-08-02 Form data method for uploading and device

Publications (1)

Publication Number Publication Date
CN109246187A true CN109246187A (en) 2019-01-18

Family

ID=65072724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810868780.XA Pending CN109246187A (en) 2018-08-02 2018-08-02 Form data method for uploading and device

Country Status (1)

Country Link
CN (1) CN109246187A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434034A (en) * 2020-11-20 2021-03-02 南京国通智能科技有限公司 Page table single data storage processing method and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101150494A (en) * 2006-09-22 2008-03-26 联想(北京)有限公司 Data packet transmission device, receiving device and method
US20080263213A1 (en) * 2007-04-19 2008-10-23 Masafumi Kinoshita Communication device and client device
CN102298636A (en) * 2011-08-29 2011-12-28 杭州海康威视数字技术股份有限公司 Global position system (GPS) data-based monitoring system and device and method for uploading GPS data
CN102710774A (en) * 2012-06-04 2012-10-03 深圳市宏电技术股份有限公司 Method and system for data transmission
CN103312477A (en) * 2013-05-10 2013-09-18 大唐移动通信设备有限公司 Method and equipment for transmitting retransmission data
CN103874218A (en) * 2012-12-12 2014-06-18 普天信息技术研究院有限公司 Resource scheduling method in semi-static transmission
CN104539739A (en) * 2015-01-26 2015-04-22 浙江大学 System, method and device for uploading files
CN105260439A (en) * 2015-09-30 2016-01-20 小米科技有限责任公司 Data release method and apparatus and terminal
CN105323123A (en) * 2014-05-29 2016-02-10 青岛海尔洗衣机有限公司 Internet-of-things home appliance and communication method thereof
CN107204834A (en) * 2017-05-25 2017-09-26 复旦大学 A kind of control method of the express network transmitting based on UDT agreements
CN107846309A (en) * 2017-10-20 2018-03-27 深圳益邦阳光有限公司 Suspension data forward method, electronic equipment and storage medium based on remote monitoring

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101150494A (en) * 2006-09-22 2008-03-26 联想(北京)有限公司 Data packet transmission device, receiving device and method
US20080263213A1 (en) * 2007-04-19 2008-10-23 Masafumi Kinoshita Communication device and client device
CN102298636A (en) * 2011-08-29 2011-12-28 杭州海康威视数字技术股份有限公司 Global position system (GPS) data-based monitoring system and device and method for uploading GPS data
CN102710774A (en) * 2012-06-04 2012-10-03 深圳市宏电技术股份有限公司 Method and system for data transmission
CN103874218A (en) * 2012-12-12 2014-06-18 普天信息技术研究院有限公司 Resource scheduling method in semi-static transmission
CN103312477A (en) * 2013-05-10 2013-09-18 大唐移动通信设备有限公司 Method and equipment for transmitting retransmission data
CN105323123A (en) * 2014-05-29 2016-02-10 青岛海尔洗衣机有限公司 Internet-of-things home appliance and communication method thereof
CN104539739A (en) * 2015-01-26 2015-04-22 浙江大学 System, method and device for uploading files
CN105260439A (en) * 2015-09-30 2016-01-20 小米科技有限责任公司 Data release method and apparatus and terminal
CN107204834A (en) * 2017-05-25 2017-09-26 复旦大学 A kind of control method of the express network transmitting based on UDT agreements
CN107846309A (en) * 2017-10-20 2018-03-27 深圳益邦阳光有限公司 Suspension data forward method, electronic equipment and storage medium based on remote monitoring

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434034A (en) * 2020-11-20 2021-03-02 南京国通智能科技有限公司 Page table single data storage processing method and device

Similar Documents

Publication Publication Date Title
CN104090889B (en) Data processing method and system
CN107203395A (en) Resource graded method, device and computer-readable recording medium and electronic equipment
CN112217656B (en) Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system
CN103457905A (en) Data synchronizing method, data synchronizing system and data synchronizing device
CN103377053B (en) Method, device and system for controlling application
CN101741830A (en) Method, system, client and server for realizing multi-client data synchronization
US20180357237A1 (en) Method and System for Defining an Object-Agnostic Offlinable Synchronization Model
CN102163197B (en) A kind of skin change method, system and device
CN102073527A (en) Method and device for updating input method word stock
CN112839067A (en) Data synchronization method and device
CN105808702A (en) Page content refreshing method and system, and page content synchronous refreshing management system
CN102026228B (en) Statistical method and equipment for communication network performance data
CN110019539A (en) A kind of method and apparatus that the data of data warehouse are synchronous
CN102625156A (en) information synchronization method and system
CN105338107A (en) Stronghold operation synchronous management system and stronghold operation synchronous management method
CN106789978A (en) A kind of convergence system and method
CN109246187A (en) Form data method for uploading and device
CN104298757A (en) Method and system allowing compatibility with mobile clients and databases different in version
CN104065613B (en) Synchronous method, system and the device of a kind of off-line operation data of application
CN105574114A (en) On-line plotting method based on telecom resource management standard control library
CN105930100B (en) A kind of implementation method optimizing usim card file read-write speed and frequency
CN103812912B (en) A kind of method and device of maintenance organization structural information
CN107786661B (en) Information synchronization method
CN117201635A (en) Data processing system and method
CN115543423A (en) Method, device and equipment for generating benchmarks and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190118