CN106713441A - Method and device for uploading terminal application data - Google Patents
Method and device for uploading terminal application data Download PDFInfo
- Publication number
- CN106713441A CN106713441A CN201611168541.0A CN201611168541A CN106713441A CN 106713441 A CN106713441 A CN 106713441A CN 201611168541 A CN201611168541 A CN 201611168541A CN 106713441 A CN106713441 A CN 106713441A
- Authority
- CN
- China
- Prior art keywords
- application
- timing
- network
- task
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/62—Establishing a time schedule for servicing the requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a method and device for uploading terminal application data. The method is used for executing and collectively managing uploading requests of a terminal application. The method comprises the following steps: receiving data uploading information provided by the application, wherein the data uploading information at least contains the uploading requests; detecting a current moment and a current network state, and when the network is in a connected state, obtaining an application in which the timing time is the current moment; when the network is in a disconnected state, resetting the timing time of the application in which the timing time is the current moment; and executing an uploading task of the application, and feeding back a response result and a corresponding request code to the application. According to the method provided by the invention, a unified application management mechanism is adopted, the data uploading of the terminal application is collectively managed, and the timing services of a plurality of applications are replaced by one timing service, thereby reducing the resource dissipation and facilitating the development of application programs at the same time.
Description
Technical field
The present invention relates to the field of computer technology, more particularly, to the method and apparatus that terminal applies data are uploaded.
Background technology
With continuing to develop for science and technology, people use the frequency more and more higher of the mobile terminals such as mobile phone, and in terminal
Most applications all be unable to do without network environment, therefore network data transmission function is particularly important.
Current terminal device is mainly surfed the Net by wireless network or data network.Because network environment is complicated more
Become, the situation of failure occurs in data transfer for terminal device.The application strong for some networked-induced delays, can point out user
Selection is operated in a good network environment.And for the application of non real-time nature, then periodically can enter with the webserver
The transmission of row data, and as a rule, this timed task can be remained on backstage.
However, in available data upload mechanism, this timed task timing typically compares fixation, does not consider
The online custom of user.But, for ordinary practice is in the user that daytime closes network using network and other time,
The data transfer that night is timed, then will necessarily fail.On the other hand, if multiple applies the timing in agreement to lead to
Later platform carries out uploading network request simultaneously, memory consumption and power consumption will certainly be caused to increase, or even terminal occur to show
The situation of interface interim card, influences Consumer's Experience.
In consideration of it, being necessary to provide a kind of more flexible easily terminal applies data upload mechanism.
The content of the invention
The purpose of embodiment of the present invention aims to provide a kind of more flexible easily terminal applies data upload mechanism.
According to another aspect of the present invention, there is provided a kind of method that terminal applies data are uploaded, perform and be managed collectively
The upload request of terminal applies, methods described includes:The data upload information provided via application is received, the data upload letter
The upload request is comprised at least in breath;Current time and current network state are detected, when network is in connection shape
During state, it is the application at current time to obtain timing;When network is off, when reset timing is current
The timing of the application at quarter;The upload task of the application is performed, response results and corresponding request code are fed back into institute
State application.
According to another aspect of the present invention, there is provided the equipment that a kind of terminal applies data are uploaded, it is suitable in upper layer application
Data and instruction are transmitted between program and underlying services device, the equipment includes:Using Registering modules, registration interface is adapted to provide for
With message callback interface, the data upload information provided via the upper level applications is received by the registration interface, it is right
The upper level applications are registered, and by the message callback interface by the response results from the underlying services device
And corresponding request code feeds back to the upper level applications;Task scheduling modules, are suitable to store registered upper layer application
Program, when timing is met, further detects to network state, when network is in connection status, sends timing
Time is the application information list at current time;When network is off, the timing that these are applied is re-started
Setting;Task processing module, is adapted for carrying out the upload task sent via the task scheduling modules, and when execution terminates
Afterwards, the response results and corresponding request code are fed back into the application Registering modules.
In various embodiments of the present invention, by employing unified application management mechanism, to the data of terminal applies
Upload unification to be managed, the timing services of multiple applications are replaced using a timing services, so that the loss of resource is reduced, together
When facilitate the exploitation of application program.
From the detailed description made below in conjunction with accompanying drawing, these and other advantages and features of the invention, together with it
The tissue and mode of operation will be apparent, wherein in whole some accompanying drawings described below, similar element will be with class
As number.
Brief description of the drawings
Fig. 1 is a kind of block schematic illustration of the equipment of terminal applies data upload in some implementation methods of the invention;
Fig. 2 is the time diagram of the network request that application N is performed using equipment shown in Fig. 1;
Fig. 3 is a kind of schematic flow sheet of the method for terminal applies data upload in some implementation methods of the invention;
Fig. 4 is the schematic flow sheet of step S2 in some implementation methods of the present invention as shown in Figure 3.
Specific embodiment
Present disclosure is described more fully below hereinafter with reference to accompanying drawing, wherein showing the reality of present disclosure in the accompanying drawings
Apply mode.But these implementation methods can be realized and should not be construed as being limited to described herein with many multi-forms
Implementation method.On the contrary, provide these examples with so that present disclosure will be thorough and complete, and will comprehensively to
Those skilled in the art expression scope of the present disclosure.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the device of various embodiments of the invention, method and computer journey
The architectural framework in the cards of sequence product, function and operation.At this point, each square frame in flow chart or block diagram can generation
One part for module, program segment or code of table a, part for the module, program segment or code includes one or more
Executable instruction for realizing predetermined logic function.It should also be noted that in some realizations as replacement, institute in square frame
The function of mark can also occur with different from the order marked in accompanying drawing.For example, two square frame reality for succeedingly representing
On can perform substantially in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also
It is noted that the combination of the square frame in each square frame and block diagram and/or flow chart in block diagram and/or flow chart, Ke Yiyong
Perform the function of regulation or the special hardware based system of operation to realize, or can be referred to computer with specialized hardware
The combination of order is realized.
Inventor has found that existing application uploads data generally using more fixed timing by studying so that
System resource cannot be effectively utilized, and Consumer's Experience is poor.After by many experiments and practical proof, inventor carries
The terminal applies data upload mechanism as disclosed in this programme is gone out.
With reference to Fig. 1, in one embodiment of the invention, there is provided the equipment 100 that a kind of terminal applies data are uploaded,
It is suitable to transmit data and instruction between upper layer application 200 and underlying services device 300, the equipment 100 includes:
Using Registering modules 110, registration interface and message callback interface are adapted to provide for, are received by the registration interface and passed through
Upper level applications 200 are registered by the data upload information provided by upper level applications 200, and are disappeared by described
Response results from underlying services device 300 and corresponding request code are fed back to upper level applications 200 by breath callback interface;
Task scheduling modules 120, are suitable to store registered upper level applications 200, when timing is met, enter one
Step is detected to network state, is the application information list at current time by timing when network is in connection status
Send to task processing module 130 and processed;When network is off, then task scheduling modules 120 apply these
Timing re-start setting;
Task processing module 130, is adapted for carrying out the upload task for receiving, and after execution terminates, by the response
Result and corresponding request code are fed back to using Registering modules 110.
Wherein, received in the data provided via upper level applications 200 by registration interface using Registering modules 110
The unique mark (such as bag name) of biography information, such as upper level applications 200 itself, task requests code, timing or timing
The information such as interval, upload network request (including network address URL, request header and content information etc.).Then, using Registering modules
110 transmit to task scheduling modules 120 data upload information.
After task scheduling modules 120 receive the data upload information, the application message is stored, and be the application
Create a task.Then, the corresponding timing of task is added to task scheduling modules 120 list of terminal timing services
Among.Then, task scheduling modules 120 persistently to it is current when whether meet timing and detect.When detecting satisfaction
During timing, task scheduling modules 120 further detect network state.When network is in connection status, task scheduling mould
The retrieval timing of block 120 is the application information list at current time, and these applications in list are sent to task treatment
Module 130, calling task processing module 130 is processed these applications;When network is off, then task scheduling
Module 120 can re-start setting to the timing that these are applied, and be added in the timing applications list of terminal system.
When network is in connection status, task processing module 130 receives the application that timing is current time, appoints
Business processing module 130 so that for each application open up a new thread perform correspondence application upload service request.When appoint
After business execution terminates, task processing module 130 is called and applies corresponding message callback interface with this using in Registering modules 110,
Network request code, server response results will be uploaded and send the upper level applications 200 to.Further, task processing module
130 also include, after task terminates, destroy the task object created for the application.
As described above, this equipment provides information registering, callback interface to upper layer application, and support lower floor's webserver
Request of data and response, unify to be managed by data upload requests to terminal upper layer application, use a timing to take
Business replaces the timing services of multiple applications, so that the loss of resource is reduced, while facilitating the exploitation of application program.
Fig. 2 is the timing diagram that network is asked using N.Wherein, using N by calling registration interface, carried to the equipment 100
This has been supplied to apply the bag name of N, task requests code, timing T, the network address URL of request, the letter such as request header and content information
Breath.Equipment 100 is received after log-on message, is stored this and is applied N, and for this creates task using N, and in timing services
Add the timing of the application.Then, when the condition for meeting the timing meets, this is regularly triggered, equipment 100 to
Network service is inquired about, and current network state is back to equipment 100 by network service.
When in network-in-dialing state, equipment 100 opens up a new thread to perform the service request using N.When
The upload is performed after terminating, and equipment 100 sends network request code and server response results to application by callback interface
N, and destroy the task object created for the application.
When network is off, equipment 100 is then reset using the timing of N, and is re-added to determine
When the list that services in.
With reference to Fig. 3, according to some embodiments of the present invention, it is further provided the side that a kind of terminal applies data are uploaded
Method, performs the upload request of simultaneously management terminal application, including:
Step S1, receives the data upload information provided via application, is comprised at least in the data upload information described
Upload request;
Step S2, detects to current time and current network state, when network is in connection status, obtains fixed
When the time be the application at current time, perform step S3;When network is off, when reset timing is current
The timing of the application at quarter;
Step S3, performs the upload task of the application, and response results and corresponding request code are fed back into described answering
With.
Wherein, the data upload information may include:Application unique mark (such as bag name), the task requests of itself
The information such as code, timing or fixed time interval, upload network request (including network address URL, request header and content information etc.).
Before detection current time and network state, step S2 may also include:Step S201, stores the number of the application
According to the information of upload, and for the application creates a task;, be added to the corresponding timing of task eventually by described by step S202
Among the list of end timing services.
Further, with reference to Fig. 4, step S2 may also include:Step S211, whether detection current time is timing,
When current time being timing, step S212 is performed, step S211 is otherwise performed always;Step S212, detects network
Whether state connects, and in connection, performs step S213, otherwise performs step S214;Step S213, retrieval timing is to work as
The application information list at preceding moment, obtains corresponding application;Step S214, it is the application at current time to reset timing
Timing.
In some embodiments, step S3 further may include:Step S31, receives the application, is each application
A new thread is opened up to perform the upload service request of the application;Step S32, after tasks carrying terminates, feedback uploads net
Network request code and server response results.Further, step S3 may also include, and after task terminates, it is the application to destroy
The task object of establishment.
Compared to prior art, each embodiment of the invention employs a unified application management mechanism, by right
The data of terminal applies upload unification and are managed, and the timing services of multiple applications are replaced using a timing services, so as to subtract
The loss of few resource, while facilitating the exploitation of application program.
Give specification of the invention for the purpose for showing and describe, but its be not intended to exhaustion or
Person is limited to the invention of disclosed form.Those skilled in the art are after present disclosure has been read, it is also conceivable to Hen Duoxiu
Change and variant.Above-described various implementation methods can be used alone or be used in various combinations, unless civilization up and down
Really point out.It will be appreciated by those skilled in the art that method and apparatus in embodiment of the present invention can be with software, hardware, solid
Part or its combination are realized.Appended power is fallen within all modifications and replacement without departing from the spirit of the invention, made
Profit is required in the scope of the present invention of definition.
Claims (9)
1. a kind of method that terminal applies data are uploaded, performs the upload request of simultaneously management terminal application, and methods described includes:
The data upload information provided via application is provided, the upload request is comprised at least in the data upload information;
Current time and current network state are detected, when network is in connection status, it is to work as to obtain timing
The application at preceding moment;When network is off, it is the timing of the application at current time to reset timing;
The upload task of the application is performed, response results and corresponding request code are fed back into the application.
2. the method for claim 1, it is characterised in that the data upload information includes:The application itself is only
One mark, task requests code, timing or fixed time interval, upload network request.
3. the method for claim 1, it is characterised in that before detection current time and network state, further bag
Include:
The data upload information of the application is stored, and for the application creates a task;
The corresponding timing of task is added among the list of terminal timing services by described.
4. method as claimed in claim 2, it is characterised in that further include:
Whether detection current time is the timing;
When current time being timing, whether detection network state connects;
When current network state is for connection, retrieval timing is the application information list at current time, obtains corresponding application;
Current network state is the timing of the application at current time when not connecting, to reset timing.
5. method as claimed in claim 4, it is characterised in that methods described is further included:
The application is received, is that each application opens up a new thread to perform the upload service request of the application;
After the tasks carrying terminates, feedback uploads network request code and server response results.
6. the equipment that a kind of terminal applies data are uploaded, be suitable to be transmitted between upper level applications and underlying services device data and
Instruction, the equipment includes:
Using Registering modules, registration interface and message callback interface are adapted to provide for, are received via described by the registration interface
The upper level applications are registered, and adjusted back by the message by the data upload information that upper level applications are provided
Response results and corresponding request code from the underlying services device are fed back to the upper level applications by interface;
Task scheduling modules, are suitable to store registered upper level applications, when timing is met, further to network-like
State is detected, when network is in connection status, it is the application information list at current time to send timing;At network
In off-state, setting is re-started to the timing that these are applied;
Task processing module, is adapted for carrying out the upload task sent via the task scheduling modules, and after execution terminates,
The response results and corresponding request code are fed back into the application Registering modules.
7. equipment as claimed in claim 6, it is characterised in that the data upload information bag that the application Registering modules are received
Include:The unique mark of the upper level applications itself, task requests code, timing or fixed time interval, upload network request.
8. equipment as claimed in claim 6, it is characterised in that the task scheduling modules are further included:Receive described
Data upload information, stores corresponding application message, and for the application creates a task;By the corresponding timing of task
Added among the list of terminal timing services.
9. equipment as claimed in claim 6, it is characterised in that when network is in connection status, the task processing module
Including:
Receive after the application that timing is current time, be that each is corresponding to perform using a new thread is opened up
Upload service is asked;
After tasks carrying terminates, corresponding message callback interface is called, feedback uploads network request code and server response
As a result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611168541.0A CN106713441A (en) | 2016-12-16 | 2016-12-16 | Method and device for uploading terminal application data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611168541.0A CN106713441A (en) | 2016-12-16 | 2016-12-16 | Method and device for uploading terminal application data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106713441A true CN106713441A (en) | 2017-05-24 |
Family
ID=58937964
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611168541.0A Pending CN106713441A (en) | 2016-12-16 | 2016-12-16 | Method and device for uploading terminal application data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106713441A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107124475A (en) * | 2017-06-30 | 2017-09-01 | 江西博瑞彤芸科技有限公司 | A kind of sharing method of view data |
CN112948121A (en) * | 2021-03-19 | 2021-06-11 | 深圳市泰祺科技有限公司 | Micro-control cloud data transmission method and system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104216785A (en) * | 2014-08-26 | 2014-12-17 | 烽火通信科技股份有限公司 | Common policy task system and implementing method thereof |
CN105306554A (en) * | 2015-09-30 | 2016-02-03 | 北京恒华伟业科技股份有限公司 | Data synchronization method and the local server |
CN106230928A (en) * | 2016-07-28 | 2016-12-14 | 天脉聚源(北京)教育科技有限公司 | A kind of method and device of files passe |
-
2016
- 2016-12-16 CN CN201611168541.0A patent/CN106713441A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104216785A (en) * | 2014-08-26 | 2014-12-17 | 烽火通信科技股份有限公司 | Common policy task system and implementing method thereof |
CN105306554A (en) * | 2015-09-30 | 2016-02-03 | 北京恒华伟业科技股份有限公司 | Data synchronization method and the local server |
CN106230928A (en) * | 2016-07-28 | 2016-12-14 | 天脉聚源(北京)教育科技有限公司 | A kind of method and device of files passe |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107124475A (en) * | 2017-06-30 | 2017-09-01 | 江西博瑞彤芸科技有限公司 | A kind of sharing method of view data |
CN112948121A (en) * | 2021-03-19 | 2021-06-11 | 深圳市泰祺科技有限公司 | Micro-control cloud data transmission method and system |
CN112948121B (en) * | 2021-03-19 | 2023-09-01 | 深圳市泰祺科技有限公司 | Micro-control cloud data transmission method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103927218B (en) | Event distributing method and system | |
JP2018106686A5 (en) | ||
CN106464746A (en) | Computer system to support failover in event stream processing system | |
TWI354475B (en) | Dispatching client requests to appropriate server- | |
US20180278692A1 (en) | Communication device, communication system, and communication method | |
CN106713124A (en) | Message push method and system based on MQTT and MYSQL | |
CN109510744A (en) | Internet of Things device intelligence cut-in method and device | |
JP2015529919A (en) | Information transmission method, apparatus, and system, terminal, and server | |
CN106789353A (en) | The method and system of orientation problem between client and service end | |
CN113626002A (en) | Service execution method and device | |
CN113867782A (en) | Gray scale distribution method and device, computer equipment and storage medium | |
CN104618364B (en) | Information processing method, electronic equipment and server | |
CN106713441A (en) | Method and device for uploading terminal application data | |
JP6343178B2 (en) | Communication system and control method therefor, first terminal and control method therefor, and program | |
CN105915575A (en) | Service calling method and equipment | |
CN103716230A (en) | Message sending method, device and server | |
CN109445922A (en) | Task processing method and device, electronic equipment and storage medium | |
CN109951551A (en) | A kind of container mirror image management system and method | |
CN102629345A (en) | Chain type communication cooperation method, apparatus and system thereof | |
US20120150995A1 (en) | Transfer apparatus, message transfer system, message transfer method, and program | |
CN103685402A (en) | Method for remote resource control, server and task originating device | |
CN107332724A (en) | Server monitoring method, device and system and baseboard management controller | |
CN104509071B (en) | processing request | |
CN109743416A (en) | CDN domain name dispatching method, device, computer readable storage medium and system | |
CN114125024A (en) | Audio transmission method, electronic device and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170524 |
|
RJ01 | Rejection of invention patent application after publication |