CN104125220A - Method for achieving rapid data exchange and response of cell phone application and background database - Google Patents
Method for achieving rapid data exchange and response of cell phone application and background database Download PDFInfo
- Publication number
- CN104125220A CN104125220A CN201410323476.9A CN201410323476A CN104125220A CN 104125220 A CN104125220 A CN 104125220A CN 201410323476 A CN201410323476 A CN 201410323476A CN 104125220 A CN104125220 A CN 104125220A
- Authority
- CN
- China
- Prior art keywords
- data
- response
- request
- network communication
- communication framework
- 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
Abstract
The invention discloses a method for achieving rapid data exchange and response of cell phone application and a background database. According to the method, rapid data exchange and response between the cell phone client application and the background database can be achieved through loading of network communication frame asynchronous data. By means of the method for achieving rapid data exchange and response of the cell phone application and the background database, the efficiency of obtaining data of the background database by a user which uses a cell phone client user system can be effectively increased.
Description
Technical field
The present invention relates to a kind of network data transmission technology, be specifically related to the application of a kind of mobile phone and background data base and carry out the technology of exchanges data.
Background technology
Along with the growth of China mobile number of users and popularizing of smart mobile phone, mobile phone has become carry-on communication tool indispensable in people's daily life and life assistant.Increasing people uses mobile phone view Internet information, and increasing user wishes from the Internet, to obtain how higher-quality data.And present data processing method is the method such as HttpClient, HttpUrlConnection, this single reactive mode can cause that data are repeated multiple times obtains data from network, causes the various resources of the system of wasting.
Particularly existing user terminal needs frequent processing as RFID or the little data frequently of still communicating by letter of this data volume of Quick Response Code, if adopt existing data processing method will waste greatly the various resources of system.
As can be seen here, providing a kind of data processing method is efficiently the urgently technical issues that need to address of this area.
Summary of the invention
Cause the problem of too much system resource waste for the data processing method between existing mobile phone application and background data base, the object of the present invention is to provide a kind of method that mobile phone is applied and background data base carries out fast data exchange and response that realizes.The method can make cell-phone customer terminal deal with data faster, and equal resource can be processed more data.
In order to achieve the above object, the present invention adopts following technical scheme:
Realize the method that mobile phone application and background data base carry out fast data exchange and response, described method realizes exchanges data and response fast between cell-phone customer terminal application and background data base by the loading of Network Communication Framework asynchronous data.
In preferred version, when described cell-phone customer terminal application reads related data, send request of data to Network Communication Framework, Network Communication Framework is processed for user's request of data, and request of data is sent to background data base;
Background data base obtains corresponding requested date according to this request of data, and the requested date getting is sent to Network Communication Framework carries out buffer memory;
Network Communication Framework returns to the requested date receiving from background data base cell-phone customer terminal application again.
Further, described Network Communication Framework adopts multi-level buffer processing mode to carry out exchanges data.
Further, described Network Communication Framework adopts first request first to process to such an extent that mode is processed data.
Further, described Network Communication Framework receives request of data, and while scheduling, first Network Communication Framework asks to increase a queue in priority at main thread, and buffer memory thread is given in request, asks to increase buffer queue in buffer memory thread;
If by request, can carry out response buffer and read also analysis request, then carry out resolution response and consign to main thread, complete Network Communication Framework scheduling;
If not by request, request can be given to network thread and ask to increase network-caching scheduling queue, then in network thread, carry out HTTP processing, resolution response, writes buffer memory; Then carry out resolution response and consign to main thread, and complete Network Communication Framework scheduling.
Further, in described Network Communication Framework, when Activity stops, system can be cancelled the uncompleted network request of all or part simultaneously.
Further, the loading data in described background data base are the asynchronous datas such as RFID data and Quick Response Code data.
Advantage provided by the invention is as follows:
(1) effectively raise the speed of the client data that user uses.
(2) effectively raise the speed of background server response user request msg.
(3) effectively raise the speed of background server processes user data.
(4) user and background server have effectively been reduced and have repeatedly processed the number of times of identical data.
(5), when the verification of RFID label, the technology of communicating by letter with service end and adopting, can make network service quicker, simpler, more reliable.
Brief description of the drawings
Further illustrate the present invention below in conjunction with the drawings and specific embodiments.
Fig. 1 is the schematic diagram that carries out exchanges data in the present invention;
Fig. 2 is the schematic diagram of the scheduling queue of Network Communication Framework in the present invention.
Embodiment
For technological means, creation characteristic that the present invention is realized, reach object and effect is easy to understand, below in conjunction with concrete diagram, further set forth the present invention.
Referring to Fig. 1, it is depicted as the schematic diagram that in the present invention, mobile phone is applied and background data base carries out fast data exchange and response.Mainly implemented based on cell-phone customer terminal application system 101, background data base system 103 and Network Communication Framework 102 by the whole exchanges data of figure and response process.
Wherein, cell-phone customer terminal application system 101 is mainly used in obtaining of relevant asynchronous data.
Network Communication Framework 102 exchanges fast and responds for realizing data between cell-phone customer terminal application system 101 and background data base system 103.
Background data base system 103 is for storing and providing cell-phone customer terminal application system 101 required data.
As shown in the figure, in the present invention, specifically realize exchanges data and response fast between cell-phone customer terminal application system 101 and background data base system 103 by the loading of Network Communication Framework 102 asynchronous datas, cell-phone customer terminal application system 101 is by the related data in these Network Communication Framework 102 rapid loading background data base systems 103.
Based on this principle, the present invention realizes the process following (referring to Fig. 1) of carrying out fast data exchange and response between mobile phone application and background data base:
When cell-phone customer terminal application system 101 reads the asynchronous data such as RFID or Quick Response Code, cell-phone customer terminal application system 101 will form corresponding request of data, and this request of data is sent to Network Communication Framework 102 by network.
Network Communication Framework 102 is receiving after relevant request of data, will it be carried out to multistage caching process, adopts the priority that first request is first processed data to be carried out to the sequence of priority.
After finishing dealing with, Network Communication Framework 102 sends to background data base system 103 to obtain relevant data preferential request of data.
Background data base system 103 is being received after relevant request of data, obtains corresponding requested RFID or Quick Response Code data, and send to Network Communication Framework 102 to carry out buffer memory this RFID or Quick Response Code data according to this request of data from database.
Network Communication Framework 102 returns to cell-phone customer terminal application system 101 according to the principle that first request first responds by corresponding RFID or Quick Response Code data by data received from background data base system 103 again, completes thus the process of response and the exchange of whole data.
In whole data handling procedure, if when the Activity assembly in Network Communication Framework stops, whole system will be cancelled the uncompleted network request of all or part simultaneously.Can effectively avoid using conventional communication framework thus time, in the time that Activity assembly stops, the phenomenon of continuation use Context wherein etc., can effectively avoid not guilty waste CPU, battery thus, and the resources such as network, can also avoid the conflict of program.
Referring to Fig. 2, it is depicted as Network Communication Framework 102 and carries out the scheduling queue schematic diagram adopting when multi-level buffer is processed.
As shown in the figure, the queue scheduling in Network Communication Framework 102 has mainly coordinated between main thread, buffer memory thread and network thread.
Wherein, main thread, for receiving client requests, feedback request content, consigns to buffer memory thread process by request.
Buffer memory thread, for receiving main thread request, processes main thread request, feeds back to main thread data, to not treatable data feedback to network thread.
Network thread, for the treatment of buffer memory thread request, processes data cached request, feeds back to main thread data, the network thread to not treatable data feedback to next stage.
Thus, to carry out the process of queue scheduling as follows for Network Communication Framework 102:
In the time that cell-phone customer terminal application system 101 reads RFID or Quick Response Code data, while sending request msg to Network Communication Framework 102, first Network Communication Framework 102 asks in priority, to increase a queue 201 in main thread, and gives buffer memory thread by request.
In buffer memory thread, request increases buffer scheduling queue 203, if by request, can carry out response buffer and read also analysis request 204.
After completing response and resolving, resolution response is consigned to main thread 202, and the data feedback that user is asked is to main thread, completes thus Network Communication Framework 102 and dispatches.
If request increase buffer scheduling queue 203 is not passed through in buffer memory thread, request is given to network thread and ask to increase network-caching scheduling queue 205.
Increase after network-caching scheduling queue, carry out HTTP processing in network thread, resolution response, writes buffer memory 206.
Finally, resolution response is consigned to main thread, complete thus Network Communication Framework scheduling 102.
Can effectively improve user and use the speed of mobile phone client users system acquisition background data base RFID or Quick Response Code data by such scheme, make client process data become faster, equal resource can be processed and can process more RFID or Quick Response Code data.
More than show and described general principle of the present invention, principal character and advantage of the present invention.The technical staff of the industry should understand; the present invention is not restricted to the described embodiments; that in above-described embodiment and specification, describes just illustrates principle of the present invention; without departing from the spirit and scope of the present invention; the present invention also has various changes and modifications, and these changes and improvements all fall in the claimed scope of the invention.The claimed scope of the present invention is defined by appending claims and equivalent thereof.
Claims (7)
1. realize the method that mobile phone is applied and background data base carries out fast data exchange and response for one kind, it is characterized in that, described method realizes exchanges data and response fast between cell-phone customer terminal application and background data base by the loading of Network Communication Framework asynchronous data.
2. a kind of method that mobile phone is applied and background data base carries out fast data exchange and response that realizes according to claim 1, it is characterized in that, when described cell-phone customer terminal application reads related data, send request of data to Network Communication Framework, Network Communication Framework is processed for user's request of data, and request of data is sent to background data base;
Background data base obtains corresponding requested date according to this request of data, and the requested date getting is sent to Network Communication Framework carries out buffer memory;
Network Communication Framework returns to the requested date receiving from background data base cell-phone customer terminal application again.
3. a kind of method that mobile phone is applied and background data base carries out fast data exchange and response that realizes according to claim 1 and 2, is characterized in that, described Network Communication Framework adopts multi-level buffer processing mode to carry out exchanges data.
4. a kind of method that mobile phone is applied and background data base carries out fast data exchange and response that realizes according to claim 3, is characterized in that, described Network Communication Framework adopts first request first to process to such an extent that mode is processed data.
5. a kind of method that mobile phone is applied and background data base carries out fast data exchange and response that realizes according to claim 3, it is characterized in that, described Network Communication Framework receives request of data, while scheduling, first Network Communication Framework asks to increase a queue in priority at main thread, buffer memory thread is given in request, asks to increase buffer queue in buffer memory thread;
If by request, can carry out response buffer and read also analysis request, then carry out resolution response and consign to main thread, complete Network Communication Framework scheduling;
If not by request, request can be given to network thread and ask to increase network-caching scheduling queue, then in network thread, carry out HTTP processing, resolution response, writes buffer memory; Then carry out resolution response and consign to main thread, and complete Network Communication Framework scheduling.
6. realize mobile phone application according to a kind of described in claim 1 or 2 or 4 or 5 and method that background data base carries out fast data exchange and response, it is characterized in that, in described Network Communication Framework, when Activity stops, system can be cancelled the uncompleted network request of all or part simultaneously.
7. a kind of method that mobile phone is applied and background data base carries out fast data exchange and response that realizes according to claim 1 and 2, is characterized in that, the loading data in described background data base are the asynchronous datas such as RFID data and Quick Response Code data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410323476.9A CN104125220A (en) | 2014-07-08 | 2014-07-08 | Method for achieving rapid data exchange and response of cell phone application and background database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410323476.9A CN104125220A (en) | 2014-07-08 | 2014-07-08 | Method for achieving rapid data exchange and response of cell phone application and background database |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104125220A true CN104125220A (en) | 2014-10-29 |
Family
ID=51770484
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410323476.9A Pending CN104125220A (en) | 2014-07-08 | 2014-07-08 | Method for achieving rapid data exchange and response of cell phone application and background database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104125220A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106341447A (en) * | 2016-08-12 | 2017-01-18 | 中国南方电网有限责任公司 | Database service intelligent exchange method based on mobile terminal |
CN108537085A (en) * | 2018-03-07 | 2018-09-14 | 阿里巴巴集团控股有限公司 | A kind of barcode scanning image-recognizing method, device and equipment |
CN108805559A (en) * | 2018-07-25 | 2018-11-13 | 努比亚技术有限公司 | Quick Response Code method for pushing, mobile terminal and computer readable storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1985261A (en) * | 2004-07-15 | 2007-06-20 | 国际商业机器公司 | Method for accessing information on object having tag, local server, ONS proxy, program, tag creation method, device having tag writer, tag, and program for controlling device having tag writer |
US20070229267A1 (en) * | 2006-01-31 | 2007-10-04 | Bea Systems, Inc. | EPC provisioning system |
US20070288482A1 (en) * | 2006-06-09 | 2007-12-13 | Bea Systems, Inc. | RFID Workflow Client |
CN102196376A (en) * | 2011-02-23 | 2011-09-21 | 上海博路信息技术有限公司 | Method for rapidly acquiring publication contents based on mobile terminal |
US20120166589A1 (en) * | 2004-03-24 | 2012-06-28 | Akamai Technologies, Inc. | Content delivery network for rfid devices |
CN102855323A (en) * | 2012-09-11 | 2013-01-02 | 北京蜂侠飞科技有限公司 | Information sharing method based on two-dimension codes and system implementing method |
CN103065116A (en) * | 2012-12-31 | 2013-04-24 | 王石磊 | Method and system capable of enabling client to recognize two-dimension code |
CN103401853A (en) * | 2013-07-24 | 2013-11-20 | 江苏晓山信息产业股份有限公司 | Safe and efficient coding and resolving method for network of things |
-
2014
- 2014-07-08 CN CN201410323476.9A patent/CN104125220A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120166589A1 (en) * | 2004-03-24 | 2012-06-28 | Akamai Technologies, Inc. | Content delivery network for rfid devices |
CN1985261A (en) * | 2004-07-15 | 2007-06-20 | 国际商业机器公司 | Method for accessing information on object having tag, local server, ONS proxy, program, tag creation method, device having tag writer, tag, and program for controlling device having tag writer |
US20070229267A1 (en) * | 2006-01-31 | 2007-10-04 | Bea Systems, Inc. | EPC provisioning system |
US20070288482A1 (en) * | 2006-06-09 | 2007-12-13 | Bea Systems, Inc. | RFID Workflow Client |
CN102196376A (en) * | 2011-02-23 | 2011-09-21 | 上海博路信息技术有限公司 | Method for rapidly acquiring publication contents based on mobile terminal |
CN102855323A (en) * | 2012-09-11 | 2013-01-02 | 北京蜂侠飞科技有限公司 | Information sharing method based on two-dimension codes and system implementing method |
CN103065116A (en) * | 2012-12-31 | 2013-04-24 | 王石磊 | Method and system capable of enabling client to recognize two-dimension code |
CN103401853A (en) * | 2013-07-24 | 2013-11-20 | 江苏晓山信息产业股份有限公司 | Safe and efficient coding and resolving method for network of things |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106341447A (en) * | 2016-08-12 | 2017-01-18 | 中国南方电网有限责任公司 | Database service intelligent exchange method based on mobile terminal |
CN108537085A (en) * | 2018-03-07 | 2018-09-14 | 阿里巴巴集团控股有限公司 | A kind of barcode scanning image-recognizing method, device and equipment |
CN108805559A (en) * | 2018-07-25 | 2018-11-13 | 努比亚技术有限公司 | Quick Response Code method for pushing, mobile terminal and computer readable storage medium |
CN108805559B (en) * | 2018-07-25 | 2023-12-15 | 努比亚技术有限公司 | Two-dimensional code pushing method, mobile terminal and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190228303A1 (en) | Method and apparatus for scheduling resource for deep learning framework | |
CN105808652B (en) | Method and device for realizing online customer service | |
US8806507B1 (en) | Dynamic provisioning of message groups | |
CN110019330B (en) | Information output method and device | |
CN108234784A (en) | Intelligent cloud customer service system | |
CN107748696A (en) | The method and terminal device of a kind of task scheduling | |
CN110928905B (en) | Data processing method and device | |
CN104536965B (en) | A kind of data query display systems under the conditions of big data and method | |
CN106095597B (en) | Client data processing method and processing device | |
CN107229656A (en) | Full dose data export method, apparatus and system | |
CN107809480A (en) | One kind transaction commutation system | |
CN103002435A (en) | Remote subscriber identity module activating system | |
CN111324786A (en) | Method and device for processing consultation problem information | |
CN104125220A (en) | Method for achieving rapid data exchange and response of cell phone application and background database | |
CN108108952A (en) | A kind of service implementation method, system, equipment and computer storage media | |
CN110389976B (en) | Multi-interface data scheduling method and device | |
CN106302125B (en) | The method, apparatus and system that a kind of pair of solicited message is responded | |
CN106302240A (en) | Received server-side client concurrently connects and data processing method | |
CN101883345B (en) | Method and device for processing AT command | |
CN108234575A (en) | For the commending system of scene under line and recommendation method | |
CN106341447A (en) | Database service intelligent exchange method based on mobile terminal | |
KR20140013892A (en) | Method of comparing output in a plurality of information systems | |
US20150120607A1 (en) | System and method for customer event email consolidation and delivery | |
CN108920278A (en) | Resource allocation methods and device | |
CN110795371B (en) | I/O request processing method, system, equipment and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20141029 |
|
RJ01 | Rejection of invention patent application after publication |